#define TAG CHANNELS_TAG("drdynvc.client")
static void dvcman_channel_free(void* channel);
+static UINT drdynvc_write_data(drdynvcPlugin* drdynvc, UINT32 ChannelId,
+ const BYTE* data, UINT32 dataSize);
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
-static UINT dvcman_register_plugin(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* name, IWTSPlugin* pPlugin)
+static UINT dvcman_register_plugin(IDRDYNVC_ENTRY_POINTS* pEntryPoints,
+ const char* name, IWTSPlugin* pPlugin)
{
DVCMAN* dvcman = ((DVCMAN_ENTRY_POINTS*) pEntryPoints)->dvcman;
}
}
-IWTSPlugin* dvcman_get_plugin(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* name)
+static IWTSPlugin* dvcman_get_plugin(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* name)
{
int i;
DVCMAN* dvcman = ((DVCMAN_ENTRY_POINTS*) pEntryPoints)->dvcman;
return NULL;
}
-ADDIN_ARGV* dvcman_get_plugin_data(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
+static ADDIN_ARGV* dvcman_get_plugin_data(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
return ((DVCMAN_ENTRY_POINTS*) pEntryPoints)->args;
}
-void* dvcman_get_rdp_settings(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
+static void* dvcman_get_rdp_settings(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
return (void*) ((DVCMAN_ENTRY_POINTS*) pEntryPoints)->settings;
}
-UINT32 dvcman_get_channel_id(IWTSVirtualChannel * channel)
+static UINT32 dvcman_get_channel_id(IWTSVirtualChannel * channel)
{
return ((DVCMAN_CHANNEL*) channel)->channel_id;
}
-IWTSVirtualChannel* dvcman_find_channel_by_id(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId)
+static IWTSVirtualChannel* dvcman_find_channel_by_id(IWTSVirtualChannelManager* pChannelMgr,
+ UINT32 ChannelId)
{
int index;
BOOL found = FALSE;
return (found) ? ((IWTSVirtualChannel*) channel) : NULL;
}
-void* dvcman_get_channel_interface_by_name(IWTSVirtualChannelManager* pChannelMgr, const char* ChannelName)
+static void* dvcman_get_channel_interface_by_name(IWTSVirtualChannelManager* pChannelMgr,
+ const char* ChannelName)
{
int i;
BOOL found = FALSE;
return (found) ? pInterface : NULL;
}
-IWTSVirtualChannelManager* dvcman_new(drdynvcPlugin* plugin)
+static IWTSVirtualChannelManager* dvcman_new(drdynvcPlugin* plugin)
{
DVCMAN* dvcman;
*
* @return 0 on success, otherwise a Win32 error code
*/
-static UINT dvcman_load_addin(IWTSVirtualChannelManager* pChannelMgr, ADDIN_ARGV* args, rdpSettings* settings)
+static UINT dvcman_load_addin(IWTSVirtualChannelManager* pChannelMgr, ADDIN_ARGV* args,
+ rdpSettings* settings)
{
DVCMAN_ENTRY_POINTS entryPoints;
PDVC_PLUGIN_ENTRY pDVCPluginEntry = NULL;
return CHANNEL_RC_OK;
}
-static DVCMAN_CHANNEL* dvcman_channel_new(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, const char* ChannelName)
+static DVCMAN_CHANNEL* dvcman_channel_new(IWTSVirtualChannelManager* pChannelMgr,
+ UINT32 ChannelId, const char* ChannelName)
{
DVCMAN_CHANNEL* channel;
return channel;
}
-void dvcman_channel_free(void* arg)
+static void dvcman_channel_free(void* arg)
{
DVCMAN_CHANNEL* channel = (DVCMAN_CHANNEL*) arg;
free(channel);
}
-void dvcman_free(IWTSVirtualChannelManager* pChannelMgr)
+static void dvcman_free(IWTSVirtualChannelManager* pChannelMgr)
{
int i;
IWTSPlugin* pPlugin;
*
* @return 0 on success, otherwise a Win32 error code
*/
-UINT dvcman_init(IWTSVirtualChannelManager* pChannelMgr)
+static UINT dvcman_init(IWTSVirtualChannelManager* pChannelMgr)
{
int i;
IWTSPlugin* pPlugin;
*
* @return 0 on success, otherwise a Win32 error code
*/
-static UINT dvcman_write_channel(IWTSVirtualChannel* pChannel, ULONG cbSize, BYTE* pBuffer, void* pReserved)
+static UINT dvcman_write_channel(IWTSVirtualChannel* pChannel, ULONG cbSize,
+ const BYTE* pBuffer, void* pReserved)
{
UINT status;
DVCMAN_CHANNEL* channel = (DVCMAN_CHANNEL*) pChannel;
EnterCriticalSection(&(channel->lock));
- status = drdynvc_write_data(channel->dvcman->drdynvc, channel->channel_id, pBuffer, cbSize);
+ status = drdynvc_write_data(channel->dvcman->drdynvc,
+ channel->channel_id, pBuffer, cbSize);
LeaveCriticalSection(&(channel->lock));
*
* @return 0 on success, otherwise a Win32 error code
*/
-UINT dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, const char* ChannelName)
+UINT dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr,
+ UINT32 ChannelId, const char* ChannelName)
{
int i;
BOOL bAccept;
*
* @return 0 on success, otherwise a Win32 error code
*/
-UINT dvcman_open_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId)
+static UINT dvcman_open_channel(IWTSVirtualChannelManager* pChannelMgr,
+ UINT32 ChannelId)
{
DVCMAN_CHANNEL* channel;
IWTSVirtualChannelCallback* pCallback;
*
* @return 0 on success, otherwise a Win32 error code
*/
-UINT dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId)
+static UINT dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr,
+ UINT32 ChannelId)
{
DVCMAN_CHANNEL* channel;
IWTSVirtualChannel* ichannel;
*
* @return 0 on success, otherwise a Win32 error code
*/
-UINT dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, UINT32 length)
+static UINT dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr,
+ UINT32 ChannelId, UINT32 length)
{
DVCMAN_CHANNEL* channel;
*
* @return 0 on success, otherwise a Win32 error code
*/
-UINT dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, wStream* data)
+static UINT dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr,
+ UINT32 ChannelId, wStream* data)
{
UINT status = CHANNEL_RC_OK;
DVCMAN_CHANNEL* channel;
*
* @return 0 on success, otherwise a Win32 error code
*/
-UINT drdynvc_send(drdynvcPlugin* drdynvc, wStream* s)
+static UINT drdynvc_send(drdynvcPlugin* drdynvc, wStream* s)
{
UINT status;
*
* @return 0 on success, otherwise a Win32 error code
*/
-UINT drdynvc_write_data(drdynvcPlugin* drdynvc, UINT32 ChannelId, BYTE* data, UINT32 dataSize)
+UINT drdynvc_write_data(drdynvcPlugin* drdynvc, UINT32 ChannelId,
+ const BYTE* data, UINT32 dataSize)
{
wStream* data_out;
unsigned long pos;
*
* @return 0 on success, otherwise a Win32 error code
*/
-static UINT drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
+static UINT drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp,
+ int cbChId, wStream* s)
{
UINT status;
*
* @return 0 on success, otherwise a Win32 error code
*/
-static UINT drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
+static UINT drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp,
+ int cbChId, wStream* s)
{
unsigned long pos;
UINT status;
*
* @return 0 on success, otherwise a Win32 error code
*/
-static UINT drdynvc_process_data_first(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
+static UINT drdynvc_process_data_first(drdynvcPlugin* drdynvc, int Sp,
+ int cbChId, wStream* s)
{
UINT status;
UINT32 Length;
*
* @return 0 on success, otherwise a Win32 error code
*/
-static UINT drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
+static UINT drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp,
+ int cbChId, wStream* s)
{
int value;
UINT error;
*
* @return 0 on success, otherwise a Win32 error code
*/
-UINT drdynvc_add_init_handle_data(void* pInitHandle, void* pUserData)
+static UINT drdynvc_add_init_handle_data(void* pInitHandle, void* pUserData)
{
if (!g_InitHandles)
g_InitHandles = ListDictionary_New(TRUE);
return CHANNEL_RC_OK;
}
-void* drdynvc_get_init_handle_data(void* pInitHandle)
+static void* drdynvc_get_init_handle_data(void* pInitHandle)
{
void* pUserData = NULL;
pUserData = ListDictionary_GetItemValue(g_InitHandles, pInitHandle);
return pUserData;
}
-void drdynvc_remove_init_handle_data(void* pInitHandle)
+static void drdynvc_remove_init_handle_data(void* pInitHandle)
{
ListDictionary_Remove(g_InitHandles, pInitHandle);
*
* @return 0 on success, otherwise a Win32 error code
*/
-UINT drdynvc_add_open_handle_data(DWORD openHandle, void* pUserData)
+static UINT drdynvc_add_open_handle_data(DWORD openHandle, void* pUserData)
{
void* pOpenHandle = (void*) (size_t) openHandle;
return CHANNEL_RC_OK;
}
-void* drdynvc_get_open_handle_data(DWORD openHandle)
+static void* drdynvc_get_open_handle_data(DWORD openHandle)
{
void* pUserData = NULL;
void* pOpenHandle = (void*) (size_t) openHandle;
return pUserData;
}
-void drdynvc_remove_open_handle_data(DWORD openHandle)
+static void drdynvc_remove_open_handle_data(DWORD openHandle)
{
void* pOpenHandle = (void*) (size_t) openHandle;
*
* @return 0 on success, otherwise a Win32 error code
*/
-static UINT drdynvc_virtual_channel_event_connected(drdynvcPlugin* drdynvc, LPVOID pData, UINT32 dataLength)
+static UINT drdynvc_virtual_channel_event_connected(drdynvcPlugin* drdynvc,
+ LPVOID pData, UINT32 dataLength)
{
UINT32 status;
UINT32 index;
{
UINT status;
- if (MessageQueue_PostQuit(drdynvc->queue, 0) && (WaitForSingleObject(drdynvc->thread, INFINITE) == WAIT_FAILED))
+ if (MessageQueue_PostQuit(drdynvc->queue, 0) &&
+ (WaitForSingleObject(drdynvc->thread, INFINITE) == WAIT_FAILED))
{
status = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", status);
* Channel Client Interface
*/
-int drdynvc_get_version(DrdynvcClientContext* context)
+static int drdynvc_get_version(DrdynvcClientContext* context)
{
drdynvcPlugin* drdynvc = (drdynvcPlugin*) context->handle;
return drdynvc->version;