mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
Fixed default visibility.
When nothing is declared, only export symbols defined with WINPR_API or FREERDP_API defined. Override this setting if BUILD_TESTING to allow tests access to internal functions usually not exposed.
This commit is contained in:
parent
9d21117836
commit
1036f1e296
@ -122,8 +122,10 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED EXPORT_ALL_SYMBOLS)
|
||||
set(EXPORT_ALL_SYMBOLS TRUE)
|
||||
if(BUILD_TESTING)
|
||||
set(EXPORT_ALL_SYMBOLS TRUE)
|
||||
elseif(NOT DEFINED EXPORT_ALL_SYMBOLS)
|
||||
set(EXPORT_ALL_SYMBOLS FALSE)
|
||||
endif()
|
||||
|
||||
# BSD
|
||||
|
@ -398,7 +398,7 @@ BOOL freerdp_shall_disconnect(freerdp* instance)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
FREERDP_API BOOL freerdp_focus_required(freerdp* instance)
|
||||
BOOL freerdp_focus_required(freerdp* instance)
|
||||
{
|
||||
rdpRdp* rdp;
|
||||
BOOL bRetCode = FALSE;
|
||||
@ -778,19 +778,19 @@ void freerdp_free(freerdp* instance)
|
||||
free(instance);
|
||||
}
|
||||
|
||||
FREERDP_API ULONG freerdp_get_transport_sent(rdpContext* context, BOOL resetCount) {
|
||||
ULONG freerdp_get_transport_sent(rdpContext* context, BOOL resetCount) {
|
||||
ULONG written = context->rdp->transport->written;
|
||||
if (resetCount)
|
||||
context->rdp->transport->written = 0;
|
||||
return written;
|
||||
}
|
||||
|
||||
FREERDP_API HANDLE getChannelErrorEventHandle(rdpContext* context)
|
||||
HANDLE getChannelErrorEventHandle(rdpContext* context)
|
||||
{
|
||||
return context->channelErrorEvent;
|
||||
}
|
||||
|
||||
FREERDP_API BOOL checkChannelErrorEvent(rdpContext* context)
|
||||
BOOL checkChannelErrorEvent(rdpContext* context)
|
||||
{
|
||||
if (WaitForSingleObject( context->channelErrorEvent, 0) == WAIT_OBJECT_0)
|
||||
{
|
||||
@ -805,24 +805,24 @@ FREERDP_API BOOL checkChannelErrorEvent(rdpContext* context)
|
||||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
FREERDP_API UINT getChannelError(rdpContext* context)
|
||||
UINT getChannelError(rdpContext* context)
|
||||
{
|
||||
return context->channelErrorNum;
|
||||
}
|
||||
|
||||
FREERDP_API const char* getChannelErrorDescription(rdpContext* context)
|
||||
const char* getChannelErrorDescription(rdpContext* context)
|
||||
{
|
||||
return context->errorDescription;
|
||||
}
|
||||
|
||||
FREERDP_API void clearChannelError(rdpContext* context)
|
||||
void clearChannelError(rdpContext* context)
|
||||
{
|
||||
context->channelErrorNum = 0;
|
||||
memset(context->errorDescription, 0, 500);
|
||||
ResetEvent(context->channelErrorEvent);
|
||||
}
|
||||
|
||||
FREERDP_API void setChannelError(rdpContext* context, UINT errorNum, char* description)
|
||||
void setChannelError(rdpContext* context, UINT errorNum, char* description)
|
||||
{
|
||||
context->channelErrorNum = errorNum;
|
||||
strncpy(context->errorDescription, description, 499);
|
||||
|
@ -334,7 +334,7 @@ char* crypto_cert_subject_common_name(X509* xcert, int* length)
|
||||
return (char*) common_name;
|
||||
}
|
||||
|
||||
FREERDP_API void crypto_cert_subject_alt_name_free(int count, int *lengths,
|
||||
void crypto_cert_subject_alt_name_free(int count, int *lengths,
|
||||
char** alt_name)
|
||||
{
|
||||
int i;
|
||||
|
@ -660,7 +660,7 @@ macShadowSubsystem* mac_shadow_subsystem_new()
|
||||
return subsystem;
|
||||
}
|
||||
|
||||
int Mac_ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
|
||||
FREERDP_API int Mac_ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
|
||||
{
|
||||
pEntryPoints->New = (pfnShadowSubsystemNew) mac_shadow_subsystem_new;
|
||||
pEntryPoints->Free = (pfnShadowSubsystemFree) mac_shadow_subsystem_free;
|
||||
|
@ -519,7 +519,7 @@ winShadowSubsystem* win_shadow_subsystem_new()
|
||||
return subsystem;
|
||||
}
|
||||
|
||||
int Win_ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
|
||||
FREERDP_API int Win_ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
|
||||
{
|
||||
pEntryPoints->New = (pfnShadowSubsystemNew) win_shadow_subsystem_new;
|
||||
pEntryPoints->Free = (pfnShadowSubsystemFree) win_shadow_subsystem_free;
|
||||
|
@ -1437,7 +1437,7 @@ void x11_shadow_subsystem_free(x11ShadowSubsystem* subsystem)
|
||||
free(subsystem);
|
||||
}
|
||||
|
||||
int X11_ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
|
||||
FREERDP_API int X11_ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
|
||||
{
|
||||
pEntryPoints->New = (pfnShadowSubsystemNew) x11_shadow_subsystem_new;
|
||||
pEntryPoints->Free = (pfnShadowSubsystemFree) x11_shadow_subsystem_free;
|
||||
|
@ -523,37 +523,37 @@ static const _SERIAL_IOCTL_NAME _SERIAL_IOCTL_NAMES[] =
|
||||
/**
|
||||
* FIXME: got a proper function name and place
|
||||
*/
|
||||
const char* _comm_serial_ioctl_name(ULONG number);
|
||||
WINPR_API const char* _comm_serial_ioctl_name(ULONG number);
|
||||
|
||||
/**
|
||||
* FIXME: got a proper function name and place
|
||||
*/
|
||||
void _comm_setServerSerialDriver(HANDLE hComm, SERIAL_DRIVER_ID);
|
||||
WINPR_API void _comm_setServerSerialDriver(HANDLE hComm, SERIAL_DRIVER_ID);
|
||||
|
||||
/**
|
||||
* FIXME: got a proper function name and place
|
||||
*
|
||||
* permissive mode is disabled by default.
|
||||
*/
|
||||
BOOL _comm_set_permissive(HANDLE hDevice, BOOL permissive);
|
||||
WINPR_API BOOL _comm_set_permissive(HANDLE hDevice, BOOL permissive);
|
||||
|
||||
|
||||
/**
|
||||
* FIXME: to be moved in comm_ioctl.h
|
||||
*/
|
||||
BOOL CommDeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize,
|
||||
WINPR_API BOOL CommDeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize,
|
||||
LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
|
||||
|
||||
/**
|
||||
* FIXME: to be moved in comm_io.h
|
||||
*/
|
||||
BOOL CommReadFile(HANDLE hDevice, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
||||
WINPR_API BOOL CommReadFile(HANDLE hDevice, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
||||
LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped);
|
||||
|
||||
/**
|
||||
* FIXME: to be moved in comm_io.h
|
||||
*/
|
||||
BOOL CommWriteFile(HANDLE hDevice, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
|
||||
WINPR_API BOOL CommWriteFile(HANDLE hDevice, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
|
||||
LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -500,9 +500,9 @@ WINPR_API PCCERT_CONTEXT CertFindCertificateInStore(HCERTSTORE hCertStore, DWORD
|
||||
|
||||
WINPR_API PCCERT_CONTEXT CertEnumCertificatesInStore(HCERTSTORE hCertStore, PCCERT_CONTEXT pPrevCertContext);
|
||||
|
||||
DWORD CertGetNameStringW(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
WINPR_API DWORD CertGetNameStringW(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
DWORD dwFlags, void* pvTypePara, LPWSTR pszNameString, DWORD cchNameString);
|
||||
DWORD CertGetNameStringA(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
WINPR_API DWORD CertGetNameStringA(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
DWORD dwFlags, void* pvTypePara, LPSTR pszNameString, DWORD cchNameString);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -22,6 +22,6 @@
|
||||
|
||||
#include "wlog.h"
|
||||
|
||||
WINPR_API wLogAppender* WLog_BinaryAppender_New(wLog* log);
|
||||
wLogAppender* WLog_BinaryAppender_New(wLog* log);
|
||||
|
||||
#endif /* WINPR_WLOG_BINARY_APPENDER_PRIVATE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user