libwinpr-utils: combine old and new stream utils

This commit is contained in:
Marc-André Moreau 2013-03-21 15:19:33 -04:00
parent 62eec0c2b5
commit a8201b0d1b
126 changed files with 1429 additions and 1435 deletions

View File

@ -87,10 +87,10 @@ struct _AUDIN_PLUGIN
IAudinDevice* device;
};
static int audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, STREAM* s)
static int audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
{
int error;
STREAM* out;
wStream* out;
UINT32 Version;
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
@ -116,14 +116,14 @@ static int audin_send_incoming_data_pdu(IWTSVirtualChannelCallback* pChannelCall
return callback->channel->Write(callback->channel, 1, out_data, NULL);
}
static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, STREAM* s)
static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
{
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) callback->plugin;
UINT32 i;
BYTE* fm;
int error;
STREAM* out;
wStream* out;
UINT32 NumFormats;
audinFormat format;
UINT32 cbSizeFormatsPacket;
@ -198,7 +198,7 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S
static int audin_send_format_change_pdu(IWTSVirtualChannelCallback* pChannelCallback, UINT32 NewFormat)
{
int error;
STREAM* out;
wStream* out;
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
out = stream_new(5);
@ -213,7 +213,7 @@ static int audin_send_format_change_pdu(IWTSVirtualChannelCallback* pChannelCall
static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallback, UINT32 Result)
{
int error;
STREAM* out;
wStream* out;
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
out = stream_new(5);
@ -228,7 +228,7 @@ static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallbac
static BOOL audin_receive_wave_data(BYTE* data, int size, void* user_data)
{
int error;
STREAM* out;
wStream* out;
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) user_data;
error = audin_send_incoming_data_pdu((IWTSVirtualChannelCallback*) callback);
@ -245,7 +245,7 @@ static BOOL audin_receive_wave_data(BYTE* data, int size, void* user_data)
return (error == 0 ? TRUE : FALSE);
}
static int audin_process_open(IWTSVirtualChannelCallback* pChannelCallback, STREAM* s)
static int audin_process_open(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
{
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) callback->plugin;
@ -279,7 +279,7 @@ static int audin_process_open(IWTSVirtualChannelCallback* pChannelCallback, STRE
return 0;
}
static int audin_process_format_change(IWTSVirtualChannelCallback* pChannelCallback, STREAM* s)
static int audin_process_format_change(IWTSVirtualChannelCallback* pChannelCallback, wStream* s)
{
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
AUDIN_PLUGIN * audin = (AUDIN_PLUGIN*) callback->plugin;
@ -314,7 +314,7 @@ static int audin_process_format_change(IWTSVirtualChannelCallback* pChannelCallb
static int audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, UINT32 cbSize, BYTE* pBuffer)
{
int error;
STREAM* s;
wStream* s;
BYTE MessageId;
s = stream_new(0);

View File

@ -66,14 +66,14 @@ static void audin_server_select_format(audin_server_context* context, int client
}
}
static void audin_server_send_version(audin_server* audin, STREAM* s)
static void audin_server_send_version(audin_server* audin, wStream* s)
{
stream_write_BYTE(s, MSG_SNDIN_VERSION);
stream_write_UINT32(s, 1); /* Version (4 bytes) */
WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL);
}
static BOOL audin_server_recv_version(audin_server* audin, STREAM* s, UINT32 length)
static BOOL audin_server_recv_version(audin_server* audin, wStream* s, UINT32 length)
{
UINT32 Version;
@ -86,7 +86,7 @@ static BOOL audin_server_recv_version(audin_server* audin, STREAM* s, UINT32 len
return TRUE;
}
static void audin_server_send_formats(audin_server* audin, STREAM* s)
static void audin_server_send_formats(audin_server* audin, wStream* s)
{
int i;
UINT32 nAvgBytesPerSec;
@ -120,7 +120,7 @@ static void audin_server_send_formats(audin_server* audin, STREAM* s)
WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL);
}
static BOOL audin_server_recv_formats(audin_server* audin, STREAM* s, UINT32 length)
static BOOL audin_server_recv_formats(audin_server* audin, wStream* s, UINT32 length)
{
int i;
@ -164,7 +164,7 @@ static BOOL audin_server_recv_formats(audin_server* audin, STREAM* s, UINT32 len
return TRUE;
}
static void audin_server_send_open(audin_server* audin, STREAM* s)
static void audin_server_send_open(audin_server* audin, wStream* s)
{
if (audin->context.selected_client_format < 0)
return;
@ -191,7 +191,7 @@ static void audin_server_send_open(audin_server* audin, STREAM* s)
WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL);
}
static BOOL audin_server_recv_open_reply(audin_server* audin, STREAM* s, UINT32 length)
static BOOL audin_server_recv_open_reply(audin_server* audin, wStream* s, UINT32 length)
{
UINT32 Result;
@ -204,7 +204,7 @@ static BOOL audin_server_recv_open_reply(audin_server* audin, STREAM* s, UINT32
return TRUE;
}
static BOOL audin_server_recv_data(audin_server* audin, STREAM* s, UINT32 length)
static BOOL audin_server_recv_data(audin_server* audin, wStream* s, UINT32 length)
{
AUDIO_FORMAT* format;
int sbytes_per_sample;
@ -265,7 +265,7 @@ static BOOL audin_server_recv_data(audin_server* audin, STREAM* s, UINT32 length
static void* audin_server_thread_func(void* arg)
{
void* fd;
STREAM* s;
wStream* s;
void* buffer;
BYTE MessageId;
BOOL ready = FALSE;

View File

@ -46,7 +46,7 @@
void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIST_EVENT* cb_event)
{
int i;
STREAM* s;
wStream* s;
DEBUG_CLIPRDR("Sending Clipboard Format List");
@ -57,7 +57,7 @@ void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIS
}
else
{
STREAM* body = stream_new(0);
wStream* body = stream_new(0);
for (i = 0; i < cb_event->num_formats; i++)
{
@ -101,13 +101,13 @@ void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIS
static void cliprdr_send_format_list_response(cliprdrPlugin* cliprdr)
{
STREAM* s;
wStream* s;
DEBUG_CLIPRDR("Sending Clipboard Format List Response");
s = cliprdr_packet_new(CB_FORMAT_LIST_RESPONSE, CB_RESPONSE_OK, 0);
cliprdr_packet_send(cliprdr, s);
}
void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, UINT32 length, UINT16 flags)
void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, wStream* s, UINT32 length, UINT16 flags)
{
int i;
BOOL ascii;
@ -152,7 +152,7 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, UINT3
}
}
void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, UINT32 length, UINT16 flags)
void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, wStream* s, UINT32 length, UINT16 flags)
{
int allocated_formats = 8;
BYTE* end_mark;
@ -194,7 +194,7 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, UINT32
}
}
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags)
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
{
int i;
UINT32 format;
@ -286,7 +286,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataL
cliprdr_send_format_list_response(cliprdr);
}
void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags)
void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
{
/* where is this documented? */
#if 0
@ -300,7 +300,7 @@ void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, UIN
#endif
}
void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags)
void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
{
RDP_CB_DATA_REQUEST_EVENT* cb_event;
@ -313,7 +313,7 @@ void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, UINT
void cliprdr_process_format_data_response_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_RESPONSE_EVENT* cb_event)
{
STREAM* s;
wStream* s;
DEBUG_CLIPRDR("Sending Format Data Response");
@ -332,7 +332,7 @@ void cliprdr_process_format_data_response_event(cliprdrPlugin* cliprdr, RDP_CB_D
void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_REQUEST_EVENT* cb_event)
{
STREAM* s;
wStream* s;
DEBUG_CLIPRDR("Sending Format Data Request");
@ -341,7 +341,7 @@ void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DA
cliprdr_packet_send(cliprdr, s);
}
void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags)
void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags)
{
RDP_CB_DATA_RESPONSE_EVENT* cb_event;

View File

@ -22,13 +22,13 @@
#define __CLIPRDR_FORMAT_H
void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIST_EVENT* cb_event);
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags);
void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags);
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags);
void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
void cliprdr_process_format_data_response_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_RESPONSE_EVENT* cb_event);
void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_REQUEST_EVENT* cb_event);
void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags);
void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UINT32 dataLen, UINT16 msgFlags);
#endif /* __CLIPRDR_FORMAT_H */

View File

@ -53,9 +53,9 @@ static const char* const CB_MSG_TYPE_STRINGS[] =
"CB_UNLOCK_CLIPDATA"
};
STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, UINT32 dataLen)
wStream* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, UINT32 dataLen)
{
STREAM* s;
wStream* s;
s = stream_new(dataLen + 8);
stream_write_UINT16(s, msgType);
@ -66,7 +66,7 @@ STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, UINT32 dataLen)
return s;
}
void cliprdr_packet_send(cliprdrPlugin* cliprdr, STREAM* s)
void cliprdr_packet_send(cliprdrPlugin* cliprdr, wStream* s)
{
int pos;
UINT32 dataLen;
@ -101,7 +101,7 @@ void cliprdr_print_general_capability_flags(UINT32 flags)
printf("}\n");
}
static void cliprdr_process_general_capability(cliprdrPlugin* cliprdr, STREAM* s)
static void cliprdr_process_general_capability(cliprdrPlugin* cliprdr, wStream* s)
{
UINT32 version;
UINT32 generalFlags;
@ -130,7 +130,7 @@ static void cliprdr_process_general_capability(cliprdrPlugin* cliprdr, STREAM* s
cliprdr->received_caps = TRUE;
}
static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, STREAM* s, UINT16 length, UINT16 flags)
static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, wStream* s, UINT16 length, UINT16 flags)
{
int i;
UINT16 lengthCapability;
@ -162,7 +162,7 @@ static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, STREAM* s, UINT16
static void cliprdr_send_clip_caps(cliprdrPlugin* cliprdr)
{
STREAM* s;
wStream* s;
UINT32 flags;
s = cliprdr_packet_new(CB_CLIP_CAPS, 0, 4 + CB_CAPSTYPE_GENERAL_LEN);
@ -181,7 +181,7 @@ static void cliprdr_send_clip_caps(cliprdrPlugin* cliprdr)
cliprdr_packet_send(cliprdr, s);
}
static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, UINT16 length, UINT16 flags)
static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, wStream* s, UINT16 length, UINT16 flags)
{
RDP_EVENT* event;
@ -192,7 +192,7 @@ static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, UIN
svc_plugin_send_event((rdpSvcPlugin*) cliprdr, event);
}
static void cliprdr_process_receive(rdpSvcPlugin* plugin, STREAM* s)
static void cliprdr_process_receive(rdpSvcPlugin* plugin, wStream* s)
{
UINT16 msgType;
UINT16 msgFlags;

View File

@ -45,8 +45,8 @@ struct cliprdr_plugin
};
typedef struct cliprdr_plugin cliprdrPlugin;
STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, UINT32 dataLen);
void cliprdr_packet_send(cliprdrPlugin* cliprdr, STREAM* data_out);
wStream* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, UINT32 dataLen);
void cliprdr_packet_send(cliprdrPlugin* cliprdr, wStream* data_out);
#ifdef WITH_DEBUG_CLIPRDR
#define DEBUG_CLIPRDR(fmt, ...) DEBUG_CLASS(CLIPRDR, fmt, ## __VA_ARGS__)

View File

@ -55,7 +55,7 @@ struct drdynvc_plugin
IWTSVirtualChannelManager* channel_mgr;
};
static int drdynvc_write_variable_uint(STREAM* stream, UINT32 val)
static int drdynvc_write_variable_uint(wStream* stream, UINT32 val)
{
int cb;
@ -80,7 +80,7 @@ static int drdynvc_write_variable_uint(STREAM* stream, UINT32 val)
int drdynvc_write_data(drdynvcPlugin* drdynvc, UINT32 ChannelId, BYTE* data, UINT32 data_size)
{
STREAM* data_out;
wStream* data_out;
UINT32 pos = 0;
UINT32 cbChId;
UINT32 cbLen;
@ -173,9 +173,9 @@ int drdynvc_push_event(drdynvcPlugin* drdynvc, RDP_EVENT* event)
return 0;
}
static int drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, STREAM* s)
static int drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
{
STREAM* data_out;
wStream* data_out;
int error;
DEBUG_DVC("Sp=%d cbChId=%d", Sp, cbChId);
@ -206,7 +206,7 @@ static int drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp, in
return 0;
}
static UINT32 drdynvc_read_variable_uint(STREAM* stream, int cbLen)
static UINT32 drdynvc_read_variable_uint(wStream* stream, int cbLen)
{
UINT32 val;
@ -228,12 +228,12 @@ static UINT32 drdynvc_read_variable_uint(STREAM* stream, int cbLen)
return val;
}
static int drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, STREAM* s)
static int drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
{
int pos;
int error;
UINT32 ChannelId;
STREAM* data_out;
wStream* data_out;
ChannelId = drdynvc_read_variable_uint(s, cbChId);
pos = stream_get_pos(s);
@ -268,7 +268,7 @@ static int drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cb
return 0;
}
static int drdynvc_process_data_first(drdynvcPlugin* drdynvc, int Sp, int cbChId, STREAM* s)
static int drdynvc_process_data_first(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
{
int error;
UINT32 Length;
@ -287,7 +287,7 @@ static int drdynvc_process_data_first(drdynvcPlugin* drdynvc, int Sp, int cbChId
stream_get_tail(s), stream_get_left(s));
}
static int drdynvc_process_data(drdynvcPlugin* drdynvc, int Sp, int cbChId, STREAM* s)
static int drdynvc_process_data(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
{
UINT32 ChannelId;
@ -298,7 +298,7 @@ static int drdynvc_process_data(drdynvcPlugin* drdynvc, int Sp, int cbChId, STRE
stream_get_tail(s), stream_get_left(s));
}
static int drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, STREAM* s)
static int drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s)
{
UINT32 ChannelId;
@ -309,7 +309,7 @@ static int drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp, int cbC
return 0;
}
static void drdynvc_process_receive(rdpSvcPlugin* plugin, STREAM* s)
static void drdynvc_process_receive(rdpSvcPlugin* plugin, wStream* s)
{
int value;
int Cmd;

View File

@ -86,7 +86,7 @@ struct _DVCMAN_CHANNEL
UINT32 channel_id;
IWTSVirtualChannelCallback* channel_callback;
STREAM* dvc_data;
wStream* dvc_data;
HANDLE dvc_chan_mutex;
};

View File

@ -376,7 +376,7 @@ BOOL drive_file_write(DRIVE_FILE* file, BYTE* buffer, UINT32 Length)
return TRUE;
}
BOOL drive_file_query_information(DRIVE_FILE* file, UINT32 FsInformationClass, STREAM* output)
BOOL drive_file_query_information(DRIVE_FILE* file, UINT32 FsInformationClass, wStream* output)
{
struct STAT st;
@ -428,7 +428,7 @@ BOOL drive_file_query_information(DRIVE_FILE* file, UINT32 FsInformationClass, S
return TRUE;
}
BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UINT32 Length, STREAM* input)
BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UINT32 Length, wStream* input)
{
char* s = NULL;
mode_t m;
@ -534,7 +534,7 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN
}
BOOL drive_file_query_directory(DRIVE_FILE* file, UINT32 FsInformationClass, BYTE InitialQuery,
const char* path, STREAM* output)
const char* path, wStream* output)
{
int length;
BOOL ret;

View File

@ -107,9 +107,9 @@ void drive_file_free(DRIVE_FILE* file);
BOOL drive_file_seek(DRIVE_FILE* file, UINT64 Offset);
BOOL drive_file_read(DRIVE_FILE* file, BYTE* buffer, UINT32* Length);
BOOL drive_file_write(DRIVE_FILE* file, BYTE* buffer, UINT32 Length);
BOOL drive_file_query_information(DRIVE_FILE* file, UINT32 FsInformationClass, STREAM* output);
BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UINT32 Length, STREAM* input);
BOOL drive_file_query_information(DRIVE_FILE* file, UINT32 FsInformationClass, wStream* output);
BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UINT32 Length, wStream* input);
BOOL drive_file_query_directory(DRIVE_FILE* file, UINT32 FsInformationClass, BYTE InitialQuery,
const char* path, STREAM* output);
const char* path, wStream* output);
#endif /* FREERDP_CHANNEL_DRIVE_FILE_H */

View File

@ -386,7 +386,7 @@ static void drive_process_irp_set_information(DRIVE_DEVICE* disk, IRP* irp)
static void drive_process_irp_query_volume_information(DRIVE_DEVICE* disk, IRP* irp)
{
UINT32 FsInformationClass;
STREAM* output = irp->output;
wStream* output = irp->output;
struct STATVFS svfst;
struct STAT st;
char* volumeLabel = {"FREERDP"};
@ -474,7 +474,7 @@ static void drive_process_irp_query_volume_information(DRIVE_DEVICE* disk, IRP*
static void drive_process_irp_silent_ignore(DRIVE_DEVICE* disk, IRP* irp)
{
UINT32 FsInformationClass;
STREAM* output = irp->output;
wStream* output = irp->output;
stream_read_UINT32(irp->input, FsInformationClass);

View File

@ -40,7 +40,7 @@
void rail_send_channel_data(void* rail_object, void* data, size_t length)
{
STREAM* s = NULL;
wStream* s = NULL;
railPlugin* plugin = (railPlugin*) rail_object;
s = stream_new(length);
@ -88,7 +88,7 @@ static void rail_process_terminate(rdpSvcPlugin* plugin)
}
static void rail_process_receive(rdpSvcPlugin* plugin, STREAM* s)
static void rail_process_receive(rdpSvcPlugin* plugin, wStream* s)
{
railPlugin* rail = (railPlugin*) plugin;
rail_order_recv(rail->rail_order, s);

View File

@ -88,7 +88,7 @@ void rail_string_to_unicode_string(rdpRailOrder* rail_order, char* string, RAIL_
unicode_string->length = (UINT16) length;
}
BOOL rail_read_pdu_header(STREAM* s, UINT16* orderType, UINT16* orderLength)
BOOL rail_read_pdu_header(wStream* s, UINT16* orderType, UINT16* orderLength)
{
if(stream_get_left(s) < 4)
return FALSE;
@ -97,21 +97,21 @@ BOOL rail_read_pdu_header(STREAM* s, UINT16* orderType, UINT16* orderLength)
return TRUE;
}
void rail_write_pdu_header(STREAM* s, UINT16 orderType, UINT16 orderLength)
void rail_write_pdu_header(wStream* s, UINT16 orderType, UINT16 orderLength)
{
stream_write_UINT16(s, orderType); /* orderType (2 bytes) */
stream_write_UINT16(s, orderLength); /* orderLength (2 bytes) */
}
STREAM* rail_pdu_init(int length)
wStream* rail_pdu_init(int length)
{
STREAM* s;
wStream* s;
s = stream_new(length + RAIL_PDU_HEADER_LENGTH);
stream_seek(s, RAIL_PDU_HEADER_LENGTH);
return s;
}
void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, UINT16 orderType)
void rail_send_pdu(rdpRailOrder* rail_order, wStream* s, UINT16 orderType)
{
UINT16 orderLength;
@ -128,7 +128,7 @@ void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, UINT16 orderType)
rail_send_channel_data(rail_order->plugin, s->buffer, orderLength);
}
void rail_write_high_contrast(STREAM* s, HIGH_CONTRAST* high_contrast)
void rail_write_high_contrast(wStream* s, HIGH_CONTRAST* high_contrast)
{
high_contrast->colorSchemeLength = high_contrast->colorScheme.length + 2;
stream_write_UINT32(s, high_contrast->flags); /* flags (4 bytes) */
@ -136,7 +136,7 @@ void rail_write_high_contrast(STREAM* s, HIGH_CONTRAST* high_contrast)
rail_write_unicode_string(s, &high_contrast->colorScheme); /* colorScheme */
}
BOOL rail_read_handshake_order(STREAM* s, RAIL_HANDSHAKE_ORDER* handshake)
BOOL rail_read_handshake_order(wStream* s, RAIL_HANDSHAKE_ORDER* handshake)
{
if(stream_get_left(s) < 4)
return FALSE;
@ -144,7 +144,7 @@ BOOL rail_read_handshake_order(STREAM* s, RAIL_HANDSHAKE_ORDER* handshake)
return TRUE;
}
BOOL rail_read_server_exec_result_order(STREAM* s, RAIL_EXEC_RESULT_ORDER* exec_result)
BOOL rail_read_server_exec_result_order(wStream* s, RAIL_EXEC_RESULT_ORDER* exec_result)
{
if(stream_get_left(s) < 8)
return FALSE;
@ -155,7 +155,7 @@ BOOL rail_read_server_exec_result_order(STREAM* s, RAIL_EXEC_RESULT_ORDER* exec_
return rail_read_unicode_string(s, &exec_result->exeOrFile); /* exeOrFile */
}
BOOL rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
BOOL rail_read_server_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam)
{
BYTE body;
@ -180,7 +180,7 @@ BOOL rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
return TRUE;
}
BOOL rail_read_server_minmaxinfo_order(STREAM* s, RAIL_MINMAXINFO_ORDER* minmaxinfo)
BOOL rail_read_server_minmaxinfo_order(wStream* s, RAIL_MINMAXINFO_ORDER* minmaxinfo)
{
if(stream_get_left(s) < 20)
return FALSE;
@ -196,7 +196,7 @@ BOOL rail_read_server_minmaxinfo_order(STREAM* s, RAIL_MINMAXINFO_ORDER* minmaxi
return TRUE;
}
BOOL rail_read_server_localmovesize_order(STREAM* s, RAIL_LOCALMOVESIZE_ORDER* localmovesize)
BOOL rail_read_server_localmovesize_order(wStream* s, RAIL_LOCALMOVESIZE_ORDER* localmovesize)
{
UINT16 isMoveSizeStart;
if(stream_get_left(s) < 12)
@ -212,7 +212,7 @@ BOOL rail_read_server_localmovesize_order(STREAM* s, RAIL_LOCALMOVESIZE_ORDER* l
return TRUE;
}
BOOL rail_read_server_get_appid_resp_order(STREAM* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp)
BOOL rail_read_server_get_appid_resp_order(wStream* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp)
{
if(stream_get_left(s) < 516)
return FALSE;
@ -224,7 +224,7 @@ BOOL rail_read_server_get_appid_resp_order(STREAM* s, RAIL_GET_APPID_RESP_ORDER*
return TRUE;
}
BOOL rail_read_langbar_info_order(STREAM* s, RAIL_LANGBAR_INFO_ORDER* langbar_info)
BOOL rail_read_langbar_info_order(wStream* s, RAIL_LANGBAR_INFO_ORDER* langbar_info)
{
if(stream_get_left(s) < 4)
return FALSE;
@ -232,17 +232,17 @@ BOOL rail_read_langbar_info_order(STREAM* s, RAIL_LANGBAR_INFO_ORDER* langbar_in
return TRUE;
}
void rail_write_handshake_order(STREAM* s, RAIL_HANDSHAKE_ORDER* handshake)
void rail_write_handshake_order(wStream* s, RAIL_HANDSHAKE_ORDER* handshake)
{
stream_write_UINT32(s, handshake->buildNumber); /* buildNumber (4 bytes) */
}
void rail_write_client_status_order(STREAM* s, RAIL_CLIENT_STATUS_ORDER* client_status)
void rail_write_client_status_order(wStream* s, RAIL_CLIENT_STATUS_ORDER* client_status)
{
stream_write_UINT32(s, client_status->flags); /* flags (4 bytes) */
}
void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec)
void rail_write_client_exec_order(wStream* s, RAIL_EXEC_ORDER* exec)
{
stream_write_UINT16(s, exec->flags); /* flags (2 bytes) */
stream_write_UINT16(s, exec->exeOrFile.length); /* exeOrFileLength (2 bytes) */
@ -253,7 +253,7 @@ void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec)
rail_write_unicode_string_value(s, &exec->arguments); /* arguments */
}
void rail_write_client_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
void rail_write_client_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam)
{
BYTE body;
stream_write_UINT32(s, sysparam->param); /* systemParam (4 bytes) */
@ -307,7 +307,7 @@ void rail_write_client_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
}
}
void rail_write_client_activate_order(STREAM* s, RAIL_ACTIVATE_ORDER* activate)
void rail_write_client_activate_order(wStream* s, RAIL_ACTIVATE_ORDER* activate)
{
BYTE enabled;
@ -317,27 +317,27 @@ void rail_write_client_activate_order(STREAM* s, RAIL_ACTIVATE_ORDER* activate)
stream_write_BYTE(s, enabled); /* enabled (1 byte) */
}
void rail_write_client_sysmenu_order(STREAM* s, RAIL_SYSMENU_ORDER* sysmenu)
void rail_write_client_sysmenu_order(wStream* s, RAIL_SYSMENU_ORDER* sysmenu)
{
stream_write_UINT32(s, sysmenu->windowId); /* windowId (4 bytes) */
stream_write_UINT16(s, sysmenu->left); /* left (2 bytes) */
stream_write_UINT16(s, sysmenu->top); /* top (2 bytes) */
}
void rail_write_client_syscommand_order(STREAM* s, RAIL_SYSCOMMAND_ORDER* syscommand)
void rail_write_client_syscommand_order(wStream* s, RAIL_SYSCOMMAND_ORDER* syscommand)
{
stream_write_UINT32(s, syscommand->windowId); /* windowId (4 bytes) */
stream_write_UINT16(s, syscommand->command); /* command (2 bytes) */
}
void rail_write_client_notify_event_order(STREAM* s, RAIL_NOTIFY_EVENT_ORDER* notify_event)
void rail_write_client_notify_event_order(wStream* s, RAIL_NOTIFY_EVENT_ORDER* notify_event)
{
stream_write_UINT32(s, notify_event->windowId); /* windowId (4 bytes) */
stream_write_UINT32(s, notify_event->notifyIconId); /* notifyIconId (4 bytes) */
stream_write_UINT32(s, notify_event->message); /* notifyIconId (4 bytes) */
}
void rail_write_client_window_move_order(STREAM* s, RAIL_WINDOW_MOVE_ORDER* window_move)
void rail_write_client_window_move_order(wStream* s, RAIL_WINDOW_MOVE_ORDER* window_move)
{
stream_write_UINT32(s, window_move->windowId); /* windowId (4 bytes) */
stream_write_UINT16(s, window_move->left); /* left (2 bytes) */
@ -346,17 +346,17 @@ void rail_write_client_window_move_order(STREAM* s, RAIL_WINDOW_MOVE_ORDER* wind
stream_write_UINT16(s, window_move->bottom); /* bottom (2 bytes) */
}
void rail_write_client_get_appid_req_order(STREAM* s, RAIL_GET_APPID_REQ_ORDER* get_appid_req)
void rail_write_client_get_appid_req_order(wStream* s, RAIL_GET_APPID_REQ_ORDER* get_appid_req)
{
stream_write_UINT32(s, get_appid_req->windowId); /* windowId (4 bytes) */
}
void rail_write_langbar_info_order(STREAM* s, RAIL_LANGBAR_INFO_ORDER* langbar_info)
void rail_write_langbar_info_order(wStream* s, RAIL_LANGBAR_INFO_ORDER* langbar_info)
{
stream_write_UINT32(s, langbar_info->languageBarStatus); /* languageBarStatus (4 bytes) */
}
BOOL rail_recv_handshake_order(rdpRailOrder* rail_order, STREAM* s)
BOOL rail_recv_handshake_order(rdpRailOrder* rail_order, wStream* s)
{
if(!rail_read_handshake_order(s, &rail_order->handshake))
return FALSE;
@ -399,7 +399,7 @@ BOOL rail_recv_handshake_order(rdpRailOrder* rail_order, STREAM* s)
return TRUE;
}
BOOL rail_recv_exec_result_order(rdpRailOrder* rail_order, STREAM* s)
BOOL rail_recv_exec_result_order(rdpRailOrder* rail_order, wStream* s)
{
if(!rail_read_server_exec_result_order(s, &rail_order->exec_result))
return FALSE;
@ -408,7 +408,7 @@ BOOL rail_recv_exec_result_order(rdpRailOrder* rail_order, STREAM* s)
return TRUE;
}
BOOL rail_recv_server_sysparam_order(rdpRailOrder* rail_order, STREAM* s)
BOOL rail_recv_server_sysparam_order(rdpRailOrder* rail_order, wStream* s)
{
if(!rail_read_server_sysparam_order(s, &rail_order->sysparam))
return FALSE;
@ -417,7 +417,7 @@ BOOL rail_recv_server_sysparam_order(rdpRailOrder* rail_order, STREAM* s)
return TRUE;
}
BOOL rail_recv_server_minmaxinfo_order(rdpRailOrder* rail_order, STREAM* s)
BOOL rail_recv_server_minmaxinfo_order(rdpRailOrder* rail_order, wStream* s)
{
if(!rail_read_server_minmaxinfo_order(s, &rail_order->minmaxinfo))
return FALSE;
@ -426,7 +426,7 @@ BOOL rail_recv_server_minmaxinfo_order(rdpRailOrder* rail_order, STREAM* s)
return TRUE;
}
BOOL rail_recv_server_localmovesize_order(rdpRailOrder* rail_order, STREAM* s)
BOOL rail_recv_server_localmovesize_order(rdpRailOrder* rail_order, wStream* s)
{
if(!rail_read_server_localmovesize_order(s, &rail_order->localmovesize))
return FALSE;
@ -435,7 +435,7 @@ BOOL rail_recv_server_localmovesize_order(rdpRailOrder* rail_order, STREAM* s)
return TRUE;
}
BOOL rail_recv_server_get_appid_resp_order(rdpRailOrder* rail_order, STREAM* s)
BOOL rail_recv_server_get_appid_resp_order(rdpRailOrder* rail_order, wStream* s)
{
if(!rail_read_server_get_appid_resp_order(s, &rail_order->get_appid_resp))
return FALSE;
@ -444,7 +444,7 @@ BOOL rail_recv_server_get_appid_resp_order(rdpRailOrder* rail_order, STREAM* s)
return TRUE;
}
BOOL rail_recv_langbar_info_order(rdpRailOrder* rail_order, STREAM* s)
BOOL rail_recv_langbar_info_order(rdpRailOrder* rail_order, wStream* s)
{
if(!rail_read_langbar_info_order(s, &rail_order->langbar_info))
return FALSE;
@ -453,7 +453,7 @@ BOOL rail_recv_langbar_info_order(rdpRailOrder* rail_order, STREAM* s)
return TRUE;
}
BOOL rail_order_recv(rdpRailOrder* rail_order, STREAM* s)
BOOL rail_order_recv(rdpRailOrder* rail_order, wStream* s)
{
UINT16 orderType;
UINT16 orderLength;
@ -496,7 +496,7 @@ BOOL rail_order_recv(rdpRailOrder* rail_order, STREAM* s)
void rail_send_handshake_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
s = rail_pdu_init(RAIL_HANDSHAKE_ORDER_LENGTH);
rail_write_handshake_order(s, &rail_order->handshake);
rail_send_pdu(rail_order, s, RAIL_ORDER_TYPE_HANDSHAKE);
@ -505,7 +505,7 @@ void rail_send_handshake_order(rdpRailOrder* rail_order)
void rail_send_client_status_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
s = rail_pdu_init(RAIL_CLIENT_STATUS_ORDER_LENGTH);
rail_write_client_status_order(s, &rail_order->client_status);
rail_send_pdu(rail_order, s, RAIL_ORDER_TYPE_CLIENT_STATUS);
@ -514,7 +514,7 @@ void rail_send_client_status_order(rdpRailOrder* rail_order)
void rail_send_client_exec_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
int length;
length = RAIL_EXEC_ORDER_LENGTH +
@ -530,7 +530,7 @@ void rail_send_client_exec_order(rdpRailOrder* rail_order)
void rail_send_client_sysparam_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
int length;
length = RAIL_SYSPARAM_ORDER_LENGTH;
@ -608,7 +608,7 @@ void rail_send_client_sysparams_order(rdpRailOrder* rail_order)
void rail_send_client_activate_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
s = rail_pdu_init(RAIL_ACTIVATE_ORDER_LENGTH);
rail_write_client_activate_order(s, &rail_order->activate);
rail_send_pdu(rail_order, s, RAIL_ORDER_TYPE_ACTIVATE);
@ -617,7 +617,7 @@ void rail_send_client_activate_order(rdpRailOrder* rail_order)
void rail_send_client_sysmenu_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
s = rail_pdu_init(RAIL_SYSMENU_ORDER_LENGTH);
rail_write_client_sysmenu_order(s, &rail_order->sysmenu);
rail_send_pdu(rail_order, s, RAIL_ORDER_TYPE_SYSMENU);
@ -626,7 +626,7 @@ void rail_send_client_sysmenu_order(rdpRailOrder* rail_order)
void rail_send_client_syscommand_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
s = rail_pdu_init(RAIL_SYSCOMMAND_ORDER_LENGTH);
rail_write_client_syscommand_order(s, &rail_order->syscommand);
rail_send_pdu(rail_order, s, RAIL_ORDER_TYPE_SYSCOMMAND);
@ -635,7 +635,7 @@ void rail_send_client_syscommand_order(rdpRailOrder* rail_order)
void rail_send_client_notify_event_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
s = rail_pdu_init(RAIL_NOTIFY_EVENT_ORDER_LENGTH);
rail_write_client_notify_event_order(s, &rail_order->notify_event);
rail_send_pdu(rail_order, s, RAIL_ORDER_TYPE_NOTIFY_EVENT);
@ -644,7 +644,7 @@ void rail_send_client_notify_event_order(rdpRailOrder* rail_order)
void rail_send_client_window_move_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
s = rail_pdu_init(RAIL_WINDOW_MOVE_ORDER_LENGTH);
rail_write_client_window_move_order(s, &rail_order->window_move);
rail_send_pdu(rail_order, s, RAIL_ORDER_TYPE_WINDOW_MOVE);
@ -653,7 +653,7 @@ void rail_send_client_window_move_order(rdpRailOrder* rail_order)
void rail_send_client_get_appid_req_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
s = rail_pdu_init(RAIL_GET_APPID_REQ_ORDER_LENGTH);
rail_write_client_get_appid_req_order(s, &rail_order->get_appid_req);
rail_send_pdu(rail_order, s, RAIL_ORDER_TYPE_GET_APPID_REQ);
@ -662,7 +662,7 @@ void rail_send_client_get_appid_req_order(rdpRailOrder* rail_order)
void rail_send_client_langbar_info_order(rdpRailOrder* rail_order)
{
STREAM* s;
wStream* s;
s = rail_pdu_init(RAIL_LANGBAR_INFO_ORDER_LENGTH);
rail_write_langbar_info_order(s, &rail_order->langbar_info);
rail_send_pdu(rail_order, s, RAIL_ORDER_TYPE_LANGBAR_INFO);

View File

@ -56,27 +56,27 @@
void rail_string_to_unicode_string(rdpRailOrder* rail_order, char* string, RAIL_UNICODE_STRING* unicode_string);
BOOL rail_read_handshake_order(STREAM* s, RAIL_HANDSHAKE_ORDER* handshake);
BOOL rail_read_server_exec_result_order(STREAM* s, RAIL_EXEC_RESULT_ORDER* exec_result);
BOOL rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam);
BOOL rail_read_server_minmaxinfo_order(STREAM* s, RAIL_MINMAXINFO_ORDER* minmaxinfo);
BOOL rail_read_server_localmovesize_order(STREAM* s, RAIL_LOCALMOVESIZE_ORDER* localmovesize);
BOOL rail_read_server_get_appid_resp_order(STREAM* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp);
BOOL rail_read_langbar_info_order(STREAM* s, RAIL_LANGBAR_INFO_ORDER* langbar_info);
BOOL rail_read_handshake_order(wStream* s, RAIL_HANDSHAKE_ORDER* handshake);
BOOL rail_read_server_exec_result_order(wStream* s, RAIL_EXEC_RESULT_ORDER* exec_result);
BOOL rail_read_server_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam);
BOOL rail_read_server_minmaxinfo_order(wStream* s, RAIL_MINMAXINFO_ORDER* minmaxinfo);
BOOL rail_read_server_localmovesize_order(wStream* s, RAIL_LOCALMOVESIZE_ORDER* localmovesize);
BOOL rail_read_server_get_appid_resp_order(wStream* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp);
BOOL rail_read_langbar_info_order(wStream* s, RAIL_LANGBAR_INFO_ORDER* langbar_info);
void rail_write_handshake_order(STREAM* s, RAIL_HANDSHAKE_ORDER* handshake);
void rail_write_client_status_order(STREAM* s, RAIL_CLIENT_STATUS_ORDER* client_status);
void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec);
void rail_write_client_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam);
void rail_write_client_activate_order(STREAM* s, RAIL_ACTIVATE_ORDER* activate);
void rail_write_client_sysmenu_order(STREAM* s, RAIL_SYSMENU_ORDER* sysmenu);
void rail_write_client_syscommand_order(STREAM* s, RAIL_SYSCOMMAND_ORDER* syscommand);
void rail_write_client_notify_event_order(STREAM* s, RAIL_NOTIFY_EVENT_ORDER* notify_event);
void rail_write_client_window_move_order(STREAM* s, RAIL_WINDOW_MOVE_ORDER* window_move);
void rail_write_client_get_appid_req_order(STREAM* s, RAIL_GET_APPID_REQ_ORDER* get_appid_req);
void rail_write_langbar_info_order(STREAM* s, RAIL_LANGBAR_INFO_ORDER* langbar_info);
void rail_write_handshake_order(wStream* s, RAIL_HANDSHAKE_ORDER* handshake);
void rail_write_client_status_order(wStream* s, RAIL_CLIENT_STATUS_ORDER* client_status);
void rail_write_client_exec_order(wStream* s, RAIL_EXEC_ORDER* exec);
void rail_write_client_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam);
void rail_write_client_activate_order(wStream* s, RAIL_ACTIVATE_ORDER* activate);
void rail_write_client_sysmenu_order(wStream* s, RAIL_SYSMENU_ORDER* sysmenu);
void rail_write_client_syscommand_order(wStream* s, RAIL_SYSCOMMAND_ORDER* syscommand);
void rail_write_client_notify_event_order(wStream* s, RAIL_NOTIFY_EVENT_ORDER* notify_event);
void rail_write_client_window_move_order(wStream* s, RAIL_WINDOW_MOVE_ORDER* window_move);
void rail_write_client_get_appid_req_order(wStream* s, RAIL_GET_APPID_REQ_ORDER* get_appid_req);
void rail_write_langbar_info_order(wStream* s, RAIL_LANGBAR_INFO_ORDER* langbar_info);
BOOL rail_order_recv(rdpRailOrder* rail_order, STREAM* s);
BOOL rail_order_recv(rdpRailOrder* rail_order, wStream* s);
void rail_send_handshake_order(rdpRailOrder* rail_order);
void rail_send_client_status_order(rdpRailOrder* rail_order);

View File

@ -62,7 +62,7 @@ static void irp_complete(IRP* irp)
irp_free(irp);
}
IRP* irp_new(DEVMAN* devman, STREAM* data_in)
IRP* irp_new(DEVMAN* devman, wStream* data_in)
{
IRP* irp;
UINT32 DeviceId;

View File

@ -23,6 +23,6 @@
#include "rdpdr_main.h"
IRP* irp_new(DEVMAN* devman, STREAM* data_in);
IRP* irp_new(DEVMAN* devman, wStream* data_in);
#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_IRP_H */

View File

@ -33,7 +33,7 @@
#include "rdpdr_capabilities.h"
/* Output device redirection capability set header */
static void rdpdr_write_capset_header(STREAM* data_out, UINT16 capabilityType, UINT16 capabilityLength, UINT32 version)
static void rdpdr_write_capset_header(wStream* data_out, UINT16 capabilityType, UINT16 capabilityLength, UINT32 version)
{
stream_write_UINT16(data_out, capabilityType);
stream_write_UINT16(data_out, capabilityLength);
@ -41,7 +41,7 @@ static void rdpdr_write_capset_header(STREAM* data_out, UINT16 capabilityType, U
}
/* Output device direction general capability set */
static void rdpdr_write_general_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
static void rdpdr_write_general_capset(rdpdrPlugin* rdpdr, wStream* data_out)
{
rdpdr_write_capset_header(data_out, CAP_GENERAL_TYPE, 44, GENERAL_CAPABILITY_VERSION_02);
@ -58,7 +58,7 @@ static void rdpdr_write_general_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
}
/* Process device direction general capability set */
static void rdpdr_process_general_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
static void rdpdr_process_general_capset(rdpdrPlugin* rdpdr, wStream* data_in)
{
UINT16 capabilityLength;
@ -67,13 +67,13 @@ static void rdpdr_process_general_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
}
/* Output printer direction capability set */
static void rdpdr_write_printer_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
static void rdpdr_write_printer_capset(rdpdrPlugin* rdpdr, wStream* data_out)
{
rdpdr_write_capset_header(data_out, CAP_PRINTER_TYPE, 8, PRINT_CAPABILITY_VERSION_01);
}
/* Process printer direction capability set */
static void rdpdr_process_printer_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
static void rdpdr_process_printer_capset(rdpdrPlugin* rdpdr, wStream* data_in)
{
UINT16 capabilityLength;
@ -82,13 +82,13 @@ static void rdpdr_process_printer_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
}
/* Output port redirection capability set */
static void rdpdr_write_port_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
static void rdpdr_write_port_capset(rdpdrPlugin* rdpdr, wStream* data_out)
{
rdpdr_write_capset_header(data_out, CAP_PORT_TYPE, 8, PORT_CAPABILITY_VERSION_01);
}
/* Process port redirection capability set */
static void rdpdr_process_port_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
static void rdpdr_process_port_capset(rdpdrPlugin* rdpdr, wStream* data_in)
{
UINT16 capabilityLength;
@ -97,13 +97,13 @@ static void rdpdr_process_port_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
}
/* Output drive redirection capability set */
static void rdpdr_write_drive_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
static void rdpdr_write_drive_capset(rdpdrPlugin* rdpdr, wStream* data_out)
{
rdpdr_write_capset_header(data_out, CAP_DRIVE_TYPE, 8, DRIVE_CAPABILITY_VERSION_02);
}
/* Process drive redirection capability set */
static void rdpdr_process_drive_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
static void rdpdr_process_drive_capset(rdpdrPlugin* rdpdr, wStream* data_in)
{
UINT16 capabilityLength;
@ -112,13 +112,13 @@ static void rdpdr_process_drive_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
}
/* Output smart card redirection capability set */
static void rdpdr_write_smartcard_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
static void rdpdr_write_smartcard_capset(rdpdrPlugin* rdpdr, wStream* data_out)
{
rdpdr_write_capset_header(data_out, CAP_SMARTCARD_TYPE, 8, SMARTCARD_CAPABILITY_VERSION_01);
}
/* Process smartcard redirection capability set */
static void rdpdr_process_smartcard_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
static void rdpdr_process_smartcard_capset(rdpdrPlugin* rdpdr, wStream* data_in)
{
UINT16 capabilityLength;
@ -126,7 +126,7 @@ static void rdpdr_process_smartcard_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
stream_seek(data_in, capabilityLength - 4);
}
void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, STREAM* data_in)
void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, wStream* data_in)
{
UINT16 i;
UINT16 numCapabilities;
@ -170,7 +170,7 @@ void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, STREAM* data_in)
void rdpdr_send_capability_response(rdpdrPlugin* rdpdr)
{
STREAM* data_out;
wStream* data_out;
data_out = stream_new(256);

View File

@ -23,7 +23,7 @@
#include "rdpdr_main.h"
void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, STREAM* data_in);
void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, wStream* data_in);
void rdpdr_send_capability_response(rdpdrPlugin* rdpdr);
#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_CAPABILITIES_H */

View File

@ -64,7 +64,7 @@ static void rdpdr_process_connect(rdpSvcPlugin* plugin)
}
}
static void rdpdr_process_server_announce_request(rdpdrPlugin* rdpdr, STREAM* data_in)
static void rdpdr_process_server_announce_request(rdpdrPlugin* rdpdr, wStream* data_in)
{
stream_read_UINT16(data_in, rdpdr->versionMajor);
stream_read_UINT16(data_in, rdpdr->versionMinor);
@ -75,7 +75,7 @@ static void rdpdr_process_server_announce_request(rdpdrPlugin* rdpdr, STREAM* da
static void rdpdr_send_client_announce_reply(rdpdrPlugin* rdpdr)
{
STREAM* data_out;
wStream* data_out;
data_out = stream_new(12);
@ -91,7 +91,7 @@ static void rdpdr_send_client_announce_reply(rdpdrPlugin* rdpdr)
static void rdpdr_send_client_name_request(rdpdrPlugin* rdpdr)
{
STREAM* data_out;
wStream* data_out;
WCHAR* computerNameW = NULL;
size_t computerNameLenW;
@ -116,7 +116,7 @@ static void rdpdr_send_client_name_request(rdpdrPlugin* rdpdr)
svc_plugin_send((rdpSvcPlugin*) rdpdr, data_out);
}
static void rdpdr_process_server_clientid_confirm(rdpdrPlugin* rdpdr, STREAM* data_in)
static void rdpdr_process_server_clientid_confirm(rdpdrPlugin* rdpdr, wStream* data_in)
{
UINT16 versionMajor;
UINT16 versionMinor;
@ -148,7 +148,7 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use
UINT32 count;
int data_len;
int count_pos;
STREAM* data_out;
wStream* data_out;
DEVICE* device;
LIST_ITEM* item;
@ -213,7 +213,7 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use
svc_plugin_send((rdpSvcPlugin*) rdpdr, data_out);
}
static BOOL rdpdr_process_irp(rdpdrPlugin* rdpdr, STREAM* data_in)
static BOOL rdpdr_process_irp(rdpdrPlugin* rdpdr, wStream* data_in)
{
IRP* irp;
@ -227,7 +227,7 @@ static BOOL rdpdr_process_irp(rdpdrPlugin* rdpdr, STREAM* data_in)
return TRUE;
}
static void rdpdr_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
static void rdpdr_process_receive(rdpSvcPlugin* plugin, wStream* data_in)
{
UINT16 component;
UINT16 packetID;

View File

@ -124,7 +124,7 @@ static void* rdpsnd_schedule_thread(void* arg)
void rdpsnd_send_quality_mode_pdu(rdpsndPlugin* rdpsnd)
{
STREAM* pdu;
wStream* pdu;
pdu = stream_new(8);
stream_write_BYTE(pdu, SNDC_QUALITYMODE); /* msgType */
@ -191,7 +191,7 @@ void rdpsnd_select_supported_audio_formats(rdpsndPlugin* rdpsnd)
void rdpsnd_send_client_audio_formats(rdpsndPlugin* rdpsnd)
{
int index;
STREAM* pdu;
wStream* pdu;
UINT16 length;
UINT32 dwVolume;
UINT16 dwVolumeLeft;
@ -251,7 +251,7 @@ void rdpsnd_send_client_audio_formats(rdpsndPlugin* rdpsnd)
svc_plugin_send((rdpSvcPlugin*) rdpsnd, pdu);
}
void rdpsnd_recv_server_audio_formats_pdu(rdpsndPlugin* rdpsnd, STREAM* s)
void rdpsnd_recv_server_audio_formats_pdu(rdpsndPlugin* rdpsnd, wStream* s)
{
int index;
UINT16 wVersion;
@ -300,7 +300,7 @@ void rdpsnd_recv_server_audio_formats_pdu(rdpsndPlugin* rdpsnd, STREAM* s)
void rdpsnd_send_training_confirm_pdu(rdpsndPlugin* rdpsnd, UINT16 wTimeStamp, UINT16 wPackSize)
{
STREAM* pdu;
wStream* pdu;
pdu = stream_new(8);
stream_write_BYTE(pdu, SNDC_TRAINING); /* msgType */
@ -312,7 +312,7 @@ void rdpsnd_send_training_confirm_pdu(rdpsndPlugin* rdpsnd, UINT16 wTimeStamp, U
svc_plugin_send((rdpSvcPlugin*) rdpsnd, pdu);
}
static void rdpsnd_recv_training_pdu(rdpsndPlugin* rdpsnd, STREAM* s)
static void rdpsnd_recv_training_pdu(rdpsndPlugin* rdpsnd, wStream* s)
{
UINT16 wTimeStamp;
UINT16 wPackSize;
@ -323,7 +323,7 @@ static void rdpsnd_recv_training_pdu(rdpsndPlugin* rdpsnd, STREAM* s)
rdpsnd_send_training_confirm_pdu(rdpsnd, wTimeStamp, wPackSize);
}
static void rdpsnd_recv_wave_info_pdu(rdpsndPlugin* rdpsnd, STREAM* s, UINT16 BodySize)
static void rdpsnd_recv_wave_info_pdu(rdpsndPlugin* rdpsnd, wStream* s, UINT16 BodySize)
{
UINT16 wFormatNo;
AUDIO_FORMAT* format;
@ -365,7 +365,7 @@ static void rdpsnd_recv_wave_info_pdu(rdpsndPlugin* rdpsnd, STREAM* s, UINT16 Bo
void rdpsnd_send_wave_confirm_pdu(rdpsndPlugin* rdpsnd, UINT16 wTimeStamp, BYTE cConfirmedBlockNo)
{
STREAM* pdu;
wStream* pdu;
pdu = stream_new(8);
stream_write_BYTE(pdu, SNDC_WAVECONFIRM);
@ -383,7 +383,7 @@ void rdpsnd_device_send_wave_confirm_pdu(rdpsndDevicePlugin* device, RDPSND_WAVE
MessageQueue_Post(device->rdpsnd->queue, NULL, 0, (void*) wave, NULL);
}
static void rdpsnd_recv_wave_pdu(rdpsndPlugin* rdpsnd, STREAM* s)
static void rdpsnd_recv_wave_pdu(rdpsndPlugin* rdpsnd, wStream* s)
{
int size;
BYTE* data;
@ -454,7 +454,7 @@ static void rdpsnd_recv_close_pdu(rdpsndPlugin* rdpsnd)
rdpsnd->isOpen = FALSE;
}
static void rdpsnd_recv_volume_pdu(rdpsndPlugin* rdpsnd, STREAM* s)
static void rdpsnd_recv_volume_pdu(rdpsndPlugin* rdpsnd, wStream* s)
{
UINT32 dwVolume;
@ -467,7 +467,7 @@ static void rdpsnd_recv_volume_pdu(rdpsndPlugin* rdpsnd, STREAM* s)
}
}
static void rdpsnd_recv_pdu(rdpSvcPlugin* plugin, STREAM* s)
static void rdpsnd_recv_pdu(rdpSvcPlugin* plugin, wStream* s)
{
BYTE msgType;
UINT16 BodySize;

View File

@ -42,7 +42,7 @@ typedef struct _rdpsnd_server
HANDLE thread;
HANDLE StopEvent;
void* rdpsnd_channel;
STREAM* rdpsnd_pdu;
wStream* rdpsnd_pdu;
FREERDP_DSP_CONTEXT* dsp_context;
BYTE* out_buffer;
@ -55,7 +55,7 @@ typedef struct _rdpsnd_server
} rdpsnd_server;
static BOOL rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s)
static BOOL rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, wStream* s)
{
int pos;
UINT16 i;
@ -104,7 +104,7 @@ static BOOL rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s)
return status;
}
static void rdpsnd_server_recv_waveconfirm(rdpsnd_server* rdpsnd, STREAM* s)
static void rdpsnd_server_recv_waveconfirm(rdpsnd_server* rdpsnd, wStream* s)
{
//unhandled for now
@ -115,7 +115,7 @@ static void rdpsnd_server_recv_waveconfirm(rdpsnd_server* rdpsnd, STREAM* s)
stream_seek_BYTE(s); // padding
}
static void rdpsnd_server_recv_quality_mode(rdpsnd_server* rdpsnd, STREAM* s)
static void rdpsnd_server_recv_quality_mode(rdpsnd_server* rdpsnd, wStream* s)
{
//unhandled for now
UINT16 quality;
@ -126,7 +126,7 @@ static void rdpsnd_server_recv_quality_mode(rdpsnd_server* rdpsnd, STREAM* s)
printf("Client requested sound quality: %#0X\n", quality);
}
static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s)
static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, wStream* s)
{
int i, num_known_format = 0;
UINT32 flags, vol, pitch;
@ -184,7 +184,7 @@ static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s)
static void* rdpsnd_server_thread_func(void* arg)
{
void* fd;
STREAM* s;
wStream* s;
void* buffer;
DWORD status;
BYTE msgType;
@ -350,7 +350,7 @@ static BOOL rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd)
BOOL status;
AUDIO_FORMAT* format;
int tbytes_per_frame;
STREAM* s = rdpsnd->rdpsnd_pdu;
wStream* s = rdpsnd->rdpsnd_pdu;
format = &rdpsnd->context.client_formats[rdpsnd->context.selected_client_format];
tbytes_per_frame = format->nChannels * rdpsnd->src_bytes_per_sample;
@ -463,7 +463,7 @@ static BOOL rdpsnd_server_set_volume(rdpsnd_server_context* context, int left, i
int pos;
BOOL status;
rdpsnd_server* rdpsnd = (rdpsnd_server*) context;
STREAM* s = rdpsnd->rdpsnd_pdu;
wStream* s = rdpsnd->rdpsnd_pdu;
stream_write_BYTE(s, SNDC_SETVOLUME);
stream_write_BYTE(s, 0);
@ -487,7 +487,7 @@ static BOOL rdpsnd_server_close(rdpsnd_server_context* context)
int pos;
BOOL status;
rdpsnd_server* rdpsnd = (rdpsnd_server*) context;
STREAM* s = rdpsnd->rdpsnd_pdu;
wStream* s = rdpsnd->rdpsnd_pdu;
if (rdpsnd->context.selected_client_format < 0)
return FALSE;

View File

@ -47,10 +47,10 @@ struct sample_plugin
/* put your private data here */
};
static void sample_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
static void sample_process_receive(rdpSvcPlugin* plugin, wStream* data_in)
{
int bytes;
STREAM* data_out;
wStream* data_out;
samplePlugin* sample = (samplePlugin*) plugin;
printf("sample_process_receive:\n");

View File

@ -79,7 +79,7 @@ static void tty_set_termios(SERIAL_TTY* tty);
static BOOL tty_get_termios(SERIAL_TTY* tty);
static int tty_get_error_status();
UINT32 serial_tty_control(SERIAL_TTY* tty, UINT32 IoControlCode, STREAM* input, STREAM* output, UINT32* abort_io)
UINT32 serial_tty_control(SERIAL_TTY* tty, UINT32 IoControlCode, wStream* input, wStream* output, UINT32* abort_io)
{
int purge_mask;
UINT32 result;

View File

@ -71,7 +71,7 @@ void serial_tty_free(SERIAL_TTY* tty);
BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, UINT32* Length);
BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, UINT32 Length);
UINT32 serial_tty_control(SERIAL_TTY* tty, UINT32 IoControlCode, STREAM* input, STREAM* output, UINT32* abort_io);
UINT32 serial_tty_control(SERIAL_TTY* tty, UINT32 IoControlCode, wStream* input, wStream* output, UINT32* abort_io);
BOOL serial_tty_get_event(SERIAL_TTY* tty, UINT32* result);

View File

@ -128,7 +128,7 @@ static void wts_queue_send_item(rdpPeerChannel* channel, wts_data_item* item)
SetEvent(vcm->send_event);
}
static int wts_read_variable_uint(STREAM* s, int cbLen, UINT32* val)
static int wts_read_variable_uint(wStream* s, int cbLen, UINT32* val)
{
switch (cbLen)
{
@ -167,7 +167,7 @@ static void wts_read_drdynvc_capabilities_response(rdpPeerChannel* channel, UINT
channel->vcm->drdynvc_state = DRDYNVC_STATE_READY;
}
static void wts_read_drdynvc_create_response(rdpPeerChannel* channel, STREAM* s, UINT32 length)
static void wts_read_drdynvc_create_response(rdpPeerChannel* channel, wStream* s, UINT32 length)
{
UINT32 CreationStatus;
@ -190,7 +190,7 @@ static void wts_read_drdynvc_create_response(rdpPeerChannel* channel, STREAM* s,
SetEvent(channel->receive_event);
}
static void wts_read_drdynvc_data_first(rdpPeerChannel* channel, STREAM* s, int cbLen, UINT32 length)
static void wts_read_drdynvc_data_first(rdpPeerChannel* channel, wStream* s, int cbLen, UINT32 length)
{
int value;
@ -209,7 +209,7 @@ static void wts_read_drdynvc_data_first(rdpPeerChannel* channel, STREAM* s, int
stream_write(channel->receive_data, stream_get_tail(s), length);
}
static void wts_read_drdynvc_data(rdpPeerChannel* channel, STREAM* s, UINT32 length)
static void wts_read_drdynvc_data(rdpPeerChannel* channel, wStream* s, UINT32 length)
{
if (channel->dvc_total_length > 0)
{
@ -315,7 +315,7 @@ static void wts_read_drdynvc_pdu(rdpPeerChannel* channel)
}
}
static int wts_write_variable_uint(STREAM* stream, UINT32 val)
static int wts_write_variable_uint(wStream* stream, UINT32 val)
{
int cb;
@ -338,7 +338,7 @@ static int wts_write_variable_uint(STREAM* stream, UINT32 val)
return cb;
}
static void wts_write_drdynvc_header(STREAM *s, BYTE Cmd, UINT32 ChannelId)
static void wts_write_drdynvc_header(wStream *s, BYTE Cmd, UINT32 ChannelId)
{
BYTE* bm;
int cbChId;
@ -349,7 +349,7 @@ static void wts_write_drdynvc_header(STREAM *s, BYTE Cmd, UINT32 ChannelId)
*bm = ((Cmd & 0x0F) << 4) | cbChId;
}
static void wts_write_drdynvc_create_request(STREAM *s, UINT32 ChannelId, const char *ChannelName)
static void wts_write_drdynvc_create_request(wStream *s, UINT32 ChannelId, const char *ChannelName)
{
UINT32 len;
@ -545,7 +545,7 @@ void* WTSVirtualChannelOpenEx(
{
int i;
int len;
STREAM* s;
wStream* s;
rdpPeerChannel* channel;
freerdp_peer* client = vcm->client;
@ -745,7 +745,7 @@ BOOL WTSVirtualChannelWrite(
{
rdpPeerChannel* channel = (rdpPeerChannel*) hChannelHandle;
wts_data_item* item;
STREAM* s;
wStream* s;
int cbLen;
int cbChId;
int first;
@ -822,7 +822,7 @@ BOOL WTSVirtualChannelWrite(
BOOL WTSVirtualChannelClose(
/* __in */ void* hChannelHandle)
{
STREAM* s;
wStream* s;
wts_data_item* item;
WTSVirtualChannelManager* vcm;
rdpPeerChannel* channel = (rdpPeerChannel*) hChannelHandle;

View File

@ -66,7 +66,7 @@ struct rdp_peer_channel
UINT16 channel_type;
UINT16 index;
STREAM* receive_data;
wStream* receive_data;
HANDLE receive_event;
LIST* receive_queue;
HANDLE mutex;

View File

@ -284,7 +284,7 @@ static void tsmf_print_guid(const BYTE* guid)
}
/* http://msdn.microsoft.com/en-us/library/dd318229.aspx */
static UINT32 tsmf_codec_parse_BITMAPINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, STREAM* s, BOOL bypass)
static UINT32 tsmf_codec_parse_BITMAPINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, wStream* s, BOOL bypass)
{
UINT32 biSize;
UINT32 biWidth;
@ -308,7 +308,7 @@ static UINT32 tsmf_codec_parse_BITMAPINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, STR
}
/* http://msdn.microsoft.com/en-us/library/dd407326.aspx */
static UINT32 tsmf_codec_parse_VIDEOINFOHEADER2(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
static UINT32 tsmf_codec_parse_VIDEOINFOHEADER2(TS_AM_MEDIA_TYPE* mediatype, wStream* s)
{
UINT64 AvgTimePerFrame;
@ -334,7 +334,7 @@ static UINT32 tsmf_codec_parse_VIDEOINFOHEADER2(TS_AM_MEDIA_TYPE* mediatype, STR
}
/* http://msdn.microsoft.com/en-us/library/dd390700.aspx */
static UINT32 tsmf_codec_parse_VIDEOINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
static UINT32 tsmf_codec_parse_VIDEOINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, wStream* s)
{
/*
typedef struct tagVIDEOINFOHEADER {
@ -367,7 +367,7 @@ typedef struct tagVIDEOINFOHEADER {
return 48;
}
BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, wStream* s)
{
int i;
UINT32 cbFormat;
@ -514,7 +514,7 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
return ret;
}
BOOL tsmf_codec_check_media_type(STREAM* s)
BOOL tsmf_codec_check_media_type(wStream* s)
{
BYTE* m;
BOOL ret;

View File

@ -22,8 +22,8 @@
#include "tsmf_types.h"
BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s);
BOOL tsmf_codec_check_media_type(STREAM* s);
BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, wStream* s);
BOOL tsmf_codec_check_media_type(wStream* s);
#endif

View File

@ -31,9 +31,9 @@ struct _TSMF_IFMAN
UINT32 stream_id;
UINT32 message_id;
STREAM* input;
wStream* input;
UINT32 input_size;
STREAM* output;
wStream* output;
BOOL output_pending;
UINT32 output_interface_id;
};

View File

@ -77,7 +77,7 @@ struct _TSMF_PLUGIN
void tsmf_playback_ack(IWTSVirtualChannelCallback* pChannelCallback,
UINT32 message_id, UINT64 duration, UINT32 data_size)
{
STREAM* s;
wStream* s;
int status;
TSMF_CHANNEL_CALLBACK* callback = (TSMF_CHANNEL_CALLBACK*) pChannelCallback;
@ -121,8 +121,8 @@ static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
BYTE* pBuffer)
{
int length;
STREAM* input;
STREAM* output;
wStream* input;
wStream* output;
int status = -1;
TSMF_IFMAN ifman;
UINT32 MessageId;

View File

@ -983,7 +983,7 @@ TSMF_STREAM* tsmf_stream_find_by_id(TSMF_PRESENTATION* presentation, UINT32 stre
return NULL;
}
void tsmf_stream_set_format(TSMF_STREAM* stream, const char* name, STREAM* s)
void tsmf_stream_set_format(TSMF_STREAM* stream, const char* name, wStream* s)
{
TS_AM_MEDIA_TYPE mediatype;

View File

@ -49,7 +49,7 @@ void tsmf_presentation_free(TSMF_PRESENTATION* presentation);
TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, UINT32 stream_id);
TSMF_STREAM* tsmf_stream_find_by_id(TSMF_PRESENTATION* presentation, UINT32 stream_id);
void tsmf_stream_set_format(TSMF_STREAM* stream, const char* name, STREAM* s);
void tsmf_stream_set_format(TSMF_STREAM* stream, const char* name, wStream* s);
void tsmf_stream_end(TSMF_STREAM* stream);
void tsmf_stream_free(TSMF_STREAM* stream);

View File

@ -898,7 +898,7 @@ static void xf_cliprdr_process_unicodetext(clipboardContext* cb, BYTE* data, int
static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size)
{
STREAM* s;
wStream* s;
UINT16 bpp;
UINT32 offset;
UINT32 ncolors;

View File

@ -63,7 +63,7 @@ void dump_data(unsigned char * p, int len, int width, char* name)
printf("\n");
}
void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line)
void assert_stream(wStream* s, BYTE* data, int length, const char* func, int line)
{
int i;
int actual_length;

View File

@ -38,6 +38,6 @@
}
void dump_data(unsigned char * p, int len, int width, char* name);
void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line);
void assert_stream(wStream* s, BYTE* data, int length, const char* func, int line);
#define ASSERT_STREAM(_s, _data, _length) assert_stream(_s, _data, _length, __FUNCTION__, __LINE__)

View File

@ -92,8 +92,8 @@ BYTE gcc_conference_create_request_expected[307] =
void test_gcc_write_conference_create_request(void)
{
STREAM* s;
STREAM user_data;
wStream* s;
wStream user_data;
user_data.buffer = gcc_user_data;
user_data.capacity = sizeof(gcc_user_data);
@ -123,7 +123,7 @@ BYTE gcc_client_core_data_expected[216] =
void test_gcc_write_client_core_data(void)
{
STREAM* s;
wStream* s;
rdpSettings* settings;
s = stream_new(512);
@ -150,7 +150,7 @@ BYTE gcc_client_security_data_expected[12] =
void test_gcc_write_client_security_data(void)
{
STREAM* s;
wStream* s;
rdpSettings* settings;
s = stream_new(12);
@ -173,7 +173,7 @@ BYTE gcc_client_cluster_data_expected[12] =
void test_gcc_write_client_cluster_data(void)
{
STREAM* s;
wStream* s;
rdpSettings* settings;
s = stream_new(12);
@ -191,7 +191,7 @@ BYTE gcc_client_network_data_expected[44] =
void test_gcc_write_client_network_data(void)
{
STREAM* s;
wStream* s;
rdpSettings* settings;
s = stream_new(44);

View File

@ -313,7 +313,7 @@ BYTE platform_challenge[10] = "\x54\x00\x45\x00\x53\x00\x54\x00\x00\x00";
void test_license(void)
{
STREAM _s, *s;
wStream _s, *s;
s = &_s;
memcpy(license->ClientRandom, client_random, sizeof(client_random));
@ -419,7 +419,7 @@ BYTE test_encrypted_premaster_secret[64] =
void test_license_generate_keys(void)
{
STREAM _s, *s;
wStream _s, *s;
s = &_s;
memcpy(license->ClientRandom, client_random, sizeof(client_random));
@ -455,7 +455,7 @@ void test_license_generate_keys(void)
void test_license_encrypt_premaster_secret(void)
{
STREAM _s, *s;
wStream _s, *s;
s = &_s;
memcpy(license->PremasterSecret, premaster_secret, sizeof(premaster_secret));
@ -476,7 +476,7 @@ BYTE test_platform_challenge[10] =
void test_license_decrypt_platform_challenge(void)
{
STREAM _s, *s;
wStream _s, *s;
s = &_s;
memcpy(license->LicensingEncryptionKey, test_licensing_encryption_key,

View File

@ -96,9 +96,9 @@ BYTE mcs_connect_initial_expected[409] =
void test_mcs_write_connect_initial(void)
{
STREAM* s;
wStream* s;
rdpMcs* mcs;
STREAM _user_data, *user_data;
wStream _user_data, *user_data;
mcs = mcs_new((rdpTransport*) NULL);

View File

@ -348,7 +348,7 @@ void test_nsc_encode(void)
{
int i;
BYTE* rgb_data;
STREAM* enc_stream;
wStream* enc_stream;
NSC_CONTEXT* context;
rgb_data = (BYTE *) malloc(64 * 64 * 3);

View File

@ -73,7 +73,7 @@ BYTE dstblt_order[] = "\x48\x00\x37\x01";
void test_read_dstblt_order(void)
{
STREAM _s, *s;
wStream _s, *s;
DSTBLT_ORDER dstblt;
s = &_s;
@ -98,7 +98,7 @@ BYTE patblt_order[] = "\x1a\x00\xc3\x01\x0d\x00\x0d\x00\xf0\xff\xff\x00\x5b\xef\
void test_read_patblt_order(void)
{
STREAM _s, *s;
wStream _s, *s;
PATBLT_ORDER patblt;
s = &_s;
@ -128,7 +128,7 @@ BYTE scrblt_order[] = "\x07\x00\xa1\x01\xf1\x00\xcc\x2f\x01\x8e\x00";
void test_read_scrblt_order(void)
{
STREAM _s, *s;
wStream _s, *s;
SCRBLT_ORDER scrblt;
s = &_s;
@ -155,7 +155,7 @@ BYTE opaque_rect_order[] = "\x00\x04\x00\x03\x73\x02\x06";
void test_read_opaque_rect_order(void)
{
STREAM _s, *s;
wStream _s, *s;
OPAQUE_RECT_ORDER opaque_rect;
s = &_s;
@ -180,7 +180,7 @@ BYTE draw_nine_grid_order[] = "\xfb\xf9\x0d\x00";
void test_read_draw_nine_grid_order(void)
{
STREAM _s, *s;
wStream _s, *s;
DRAW_NINE_GRID_ORDER draw_nine_grid;
s = &_s;
@ -213,7 +213,7 @@ BYTE multi_opaque_rect_order[] =
void test_read_multi_opaque_rect_order(void)
{
STREAM _s, *s;
wStream _s, *s;
MULTI_OPAQUE_RECT_ORDER multi_opaque_rect;
s = &_s;
@ -260,7 +260,7 @@ BYTE line_to_order[] = "\x03\xb1\x0e\xa6\x5b\xef\x00";
void test_read_line_to_order(void)
{
STREAM _s, *s;
wStream _s, *s;
LINE_TO_ORDER line_to;
s = &_s;
@ -303,7 +303,7 @@ BYTE polyline_order[] =
void test_read_polyline_order(void)
{
STREAM _s, *s;
wStream _s, *s;
POLYLINE_ORDER polyline;
s = &_s;
@ -371,7 +371,7 @@ BYTE glyph_index_order_2[] =
void test_read_glyph_index_order(void)
{
STREAM _s, *s;
wStream _s, *s;
GLYPH_INDEX_ORDER glyph_index;
s = &_s;
@ -422,7 +422,7 @@ BYTE fast_index_order[] =
void test_read_fast_index_order(void)
{
STREAM _s, *s;
wStream _s, *s;
FAST_INDEX_ORDER fast_index;
s = &_s;
@ -460,7 +460,7 @@ BYTE fast_glyph_order[] =
void test_read_fast_glyph_order(void)
{
STREAM _s, *s;
wStream _s, *s;
FAST_GLYPH_ORDER fast_glyph;
s = &_s;
@ -495,7 +495,7 @@ BYTE polygon_cb_order[] =
void test_read_polygon_cb_order(void)
{
STREAM _s, *s;
wStream _s, *s;
POLYGON_CB_ORDER polygon_cb;
s = &_s;
@ -527,7 +527,7 @@ BYTE cache_bitmap_order[] = "\x00\x00\x10\x01\x08\x01\x00\x00\x00\x10";
void test_read_cache_bitmap_order(void)
{
STREAM _s, *s;
wStream _s, *s;
UINT16 extraFlags;
CACHE_BITMAP_ORDER cache_bitmap;
@ -568,7 +568,7 @@ BYTE cache_bitmap_v2_order[] =
void test_read_cache_bitmap_v2_order(void)
{
STREAM _s, *s;
wStream _s, *s;
UINT16 extraFlags;
CACHE_BITMAP_V2_ORDER cache_bitmap_v2;
@ -599,7 +599,7 @@ BYTE cache_bitmap_v3_order[] =
void test_read_cache_bitmap_v3_order(void)
{
STREAM _s, *s;
wStream _s, *s;
UINT16 extraFlags;
CACHE_BITMAP_V3_ORDER cache_bitmap_v3;
@ -629,7 +629,7 @@ BYTE cache_brush_order[] = "\x00\x01\x08\x08\x81\x08\xaa\x55\xaa\x55\xaa\x55\xaa
void test_read_cache_brush_order(void)
{
STREAM _s, *s;
wStream _s, *s;
CACHE_BRUSH_ORDER cache_brush;
s = &_s;
@ -653,7 +653,7 @@ BYTE create_offscreen_bitmap_order[] = "\x00\x80\x60\x01\x10\x00\x01\x00\x02\x00
void test_read_create_offscreen_bitmap_order(void)
{
STREAM _s, *s;
wStream _s, *s;
OFFSCREEN_DELETE_LIST* deleteList;
CREATE_OFFSCREEN_BITMAP_ORDER create_offscreen_bitmap;
@ -681,7 +681,7 @@ BYTE switch_surface_order[] = "\xff\xff";
void test_read_switch_surface_order(void)
{
STREAM _s, *s;
wStream _s, *s;
SWITCH_SURFACE_ORDER switch_surface;
s = &_s;
@ -733,7 +733,7 @@ void test_patblt(rdpContext* context, PATBLT_ORDER* patblt)
void test_update_recv_orders(void)
{
rdpRdp* rdp;
STREAM _s, *s;
wStream _s, *s;
rdpUpdate* update;
s = &_s;

View File

@ -426,7 +426,7 @@ typedef struct
RAIL_EVENT in_events[20];
size_t in_events_number;
STREAM in_streams[20];
wStream in_streams[20];
size_t in_streams_number;
RDP_PLUGIN_DATA plugin_data;
@ -522,7 +522,7 @@ static void save_dump(void* data, size_t size)
thread_param * p = global_thread_params;
if (p->in_streams_number < ARRAYSIZE(p->in_streams))
{
STREAM* s = &p->in_streams[p->in_streams_number];
wStream* s = &p->in_streams[p->in_streams_number];
s->buffer = malloc(size);
s->capacity = size;
@ -663,7 +663,7 @@ void test_rail_plugin(void)
freerdp* inst = &s_inst;
size_t sn = 0;
size_t en = 0;
STREAM* ss = NULL;
wStream* ss = NULL;
RAIL_EVENT* ee = NULL;
printf("\n");

View File

@ -304,7 +304,7 @@ void test_decode(void)
{
RFX_CONTEXT* context;
BYTE decode_buffer[4096 * 3];
STREAM* s;
wStream* s;
s = stream_new(sizeof(y_data) + sizeof(cb_data) + sizeof(cr_data));
stream_write(s, y_data, sizeof(y_data));
@ -329,7 +329,7 @@ void test_decode(void)
void test_encode(void)
{
RFX_CONTEXT* context;
STREAM* enc_stream;
wStream* enc_stream;
int y_size, cb_size, cr_size;
int i;
BYTE decode_buffer[4096 * 3];
@ -374,7 +374,7 @@ void test_encode(void)
void test_message(void)
{
RFX_CONTEXT* context;
STREAM* s;
wStream* s;
int i, j;
RFX_RECT rect = {0, 0, 100, 80};
RFX_MESSAGE * message;

View File

@ -465,7 +465,7 @@ struct _DEVICE
UINT32 type;
char* name;
STREAM* data;
wStream* data;
pcIRPRequest IRPRequest;
pcFreeDevice Free;
@ -483,10 +483,10 @@ struct _IRP
UINT32 CompletionId;
UINT32 MajorFunction;
UINT32 MinorFunction;
STREAM* input;
wStream* input;
UINT32 IoStatus;
STREAM* output;
wStream* output;
pcIRPResponse Complete;
pcIRPResponse Discard;

View File

@ -68,7 +68,7 @@ FREERDP_API NSC_CONTEXT* nsc_context_new(void);
FREERDP_API void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_format);
FREERDP_API void nsc_process_message(NSC_CONTEXT* context, UINT16 bpp,
UINT16 width, UINT16 height, BYTE* data, UINT32 length);
FREERDP_API void nsc_compose_message(NSC_CONTEXT* context, STREAM* s,
FREERDP_API void nsc_compose_message(NSC_CONTEXT* context, wStream* s,
BYTE* bmpdata, int width, int height, int rowstride);
FREERDP_API void nsc_context_free(NSC_CONTEXT* context);

View File

@ -123,8 +123,8 @@ FREERDP_API UINT16 rfx_message_get_rect_count(RFX_MESSAGE* message);
FREERDP_API RFX_RECT* rfx_message_get_rect(RFX_MESSAGE* message, int index);
FREERDP_API void rfx_message_free(RFX_CONTEXT* context, RFX_MESSAGE* message);
FREERDP_API void rfx_compose_message_header(RFX_CONTEXT* context, STREAM* s);
FREERDP_API void rfx_compose_message(RFX_CONTEXT* context, STREAM* s,
FREERDP_API void rfx_compose_message_header(RFX_CONTEXT* context, wStream* s);
FREERDP_API void rfx_compose_message(RFX_CONTEXT* context, wStream* s,
const RFX_RECT* rects, int num_rects, BYTE* image_data, int width, int height, int rowstride);
#ifdef __cplusplus

View File

@ -51,34 +51,34 @@
#define BER_PC(_pc) (_pc ? BER_CONSTRUCT : BER_PRIMITIVE)
FREERDP_API BOOL ber_read_length(STREAM* s, int* length);
FREERDP_API int ber_write_length(STREAM* s, int length);
FREERDP_API BOOL ber_read_length(wStream* s, int* length);
FREERDP_API int ber_write_length(wStream* s, int length);
FREERDP_API int _ber_skip_length(int length);
FREERDP_API int ber_get_content_length(int length);
FREERDP_API BOOL ber_read_universal_tag(STREAM* s, BYTE tag, BOOL pc);
FREERDP_API void ber_write_universal_tag(STREAM* s, BYTE tag, BOOL pc);
FREERDP_API BOOL ber_read_application_tag(STREAM* s, BYTE tag, int* length);
FREERDP_API void ber_write_application_tag(STREAM* s, BYTE tag, int length);
FREERDP_API BOOL ber_read_application_tag(STREAM* s, BYTE tag, int* length);
FREERDP_API BOOL ber_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count);
FREERDP_API void ber_write_enumerated(STREAM* s, BYTE enumerated, BYTE count);
FREERDP_API BOOL ber_read_contextual_tag(STREAM* s, BYTE tag, int* length, BOOL pc);
FREERDP_API int ber_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc);
FREERDP_API BOOL ber_read_universal_tag(wStream* s, BYTE tag, BOOL pc);
FREERDP_API void ber_write_universal_tag(wStream* s, BYTE tag, BOOL pc);
FREERDP_API BOOL ber_read_application_tag(wStream* s, BYTE tag, int* length);
FREERDP_API void ber_write_application_tag(wStream* s, BYTE tag, int length);
FREERDP_API BOOL ber_read_application_tag(wStream* s, BYTE tag, int* length);
FREERDP_API BOOL ber_read_enumerated(wStream* s, BYTE* enumerated, BYTE count);
FREERDP_API void ber_write_enumerated(wStream* s, BYTE enumerated, BYTE count);
FREERDP_API BOOL ber_read_contextual_tag(wStream* s, BYTE tag, int* length, BOOL pc);
FREERDP_API int ber_write_contextual_tag(wStream* s, BYTE tag, int length, BOOL pc);
FREERDP_API int ber_skip_contextual_tag(int length);
FREERDP_API BOOL ber_read_sequence_tag(STREAM* s, int* length);
FREERDP_API int ber_write_sequence_tag(STREAM* s, int length);
FREERDP_API BOOL ber_read_sequence_tag(wStream* s, int* length);
FREERDP_API int ber_write_sequence_tag(wStream* s, int length);
FREERDP_API int ber_skip_sequence(int length);
FREERDP_API int ber_skip_sequence_tag(int length);
FREERDP_API BOOL ber_read_bit_string(STREAM* s, int* length, BYTE* padding);
FREERDP_API void ber_write_octet_string(STREAM* s, const BYTE* oct_str, int length);
FREERDP_API BOOL ber_read_octet_string_tag(STREAM* s, int* length);
FREERDP_API int ber_write_octet_string_tag(STREAM* s, int length);
FREERDP_API BOOL ber_read_bit_string(wStream* s, int* length, BYTE* padding);
FREERDP_API void ber_write_octet_string(wStream* s, const BYTE* oct_str, int length);
FREERDP_API BOOL ber_read_octet_string_tag(wStream* s, int* length);
FREERDP_API int ber_write_octet_string_tag(wStream* s, int length);
FREERDP_API int ber_skip_octet_string(int length);
FREERDP_API BOOL ber_read_BOOL(STREAM* s, BOOL* value);
FREERDP_API void ber_write_BOOL(STREAM* s, BOOL value);
FREERDP_API BOOL ber_read_integer(STREAM* s, UINT32* value);
FREERDP_API int ber_write_integer(STREAM* s, UINT32 value);
FREERDP_API BOOL ber_read_integer_length(STREAM* s, int* length);
FREERDP_API BOOL ber_read_BOOL(wStream* s, BOOL* value);
FREERDP_API void ber_write_BOOL(wStream* s, BOOL value);
FREERDP_API BOOL ber_read_integer(wStream* s, UINT32* value);
FREERDP_API int ber_write_integer(wStream* s, UINT32 value);
FREERDP_API BOOL ber_read_integer_length(wStream* s, int* length);
FREERDP_API int ber_skip_integer(UINT32 value);
#endif /* FREERDP_CRYPTO_BER_H */

View File

@ -23,13 +23,13 @@
#include <freerdp/crypto/er.h>
FREERDP_API int _der_skip_length(int length);
FREERDP_API int der_write_length(STREAM* s, int length);
FREERDP_API int der_write_length(wStream* s, int length);
FREERDP_API int der_get_content_length(int length);
FREERDP_API int der_skip_octet_string(int length);
FREERDP_API int der_skip_sequence_tag(int length);
FREERDP_API int der_write_sequence_tag(STREAM* s, int length);
FREERDP_API int der_write_sequence_tag(wStream* s, int length);
FREERDP_API int der_skip_contextual_tag(int length);
FREERDP_API int der_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc);
FREERDP_API void der_write_octet_string(STREAM* s, BYTE* oct_str, int length);
FREERDP_API int der_write_contextual_tag(wStream* s, BYTE tag, int length, BOOL pc);
FREERDP_API void der_write_octet_string(wStream* s, BYTE* oct_str, int length);
#endif /* FREERDP_CRYPTO_DER_H */

View File

@ -54,35 +54,35 @@
#define ER_PC(_pc) (_pc ? ER_CONSTRUCT : ER_PRIMITIVE)
FREERDP_API void er_read_length(STREAM* s, int* length);
FREERDP_API int er_write_length(STREAM* s, int length, BOOL flag);
FREERDP_API void er_read_length(wStream* s, int* length);
FREERDP_API int er_write_length(wStream* s, int length, BOOL flag);
FREERDP_API int _er_skip_length(int length);
FREERDP_API int er_get_content_length(int length);
FREERDP_API BOOL er_read_universal_tag(STREAM* s, BYTE tag, BOOL pc);
FREERDP_API void er_write_universal_tag(STREAM* s, BYTE tag, BOOL pc);
FREERDP_API BOOL er_read_application_tag(STREAM* s, BYTE tag, int* length);
FREERDP_API void er_write_application_tag(STREAM* s, BYTE tag, int length, BOOL flag);
FREERDP_API BOOL er_read_application_tag(STREAM* s, BYTE tag, int* length);
FREERDP_API BOOL er_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count);
FREERDP_API void er_write_enumerated(STREAM* s, BYTE enumerated, BYTE count, BOOL flag);
FREERDP_API BOOL er_read_contextual_tag(STREAM* s, BYTE tag, int* length, BOOL pc);
FREERDP_API int er_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc, BOOL flag);
FREERDP_API BOOL er_read_universal_tag(wStream* s, BYTE tag, BOOL pc);
FREERDP_API void er_write_universal_tag(wStream* s, BYTE tag, BOOL pc);
FREERDP_API BOOL er_read_application_tag(wStream* s, BYTE tag, int* length);
FREERDP_API void er_write_application_tag(wStream* s, BYTE tag, int length, BOOL flag);
FREERDP_API BOOL er_read_application_tag(wStream* s, BYTE tag, int* length);
FREERDP_API BOOL er_read_enumerated(wStream* s, BYTE* enumerated, BYTE count);
FREERDP_API void er_write_enumerated(wStream* s, BYTE enumerated, BYTE count, BOOL flag);
FREERDP_API BOOL er_read_contextual_tag(wStream* s, BYTE tag, int* length, BOOL pc);
FREERDP_API int er_write_contextual_tag(wStream* s, BYTE tag, int length, BOOL pc, BOOL flag);
FREERDP_API int er_skip_contextual_tag(int length);
FREERDP_API BOOL er_read_sequence_tag(STREAM* s, int* length);
FREERDP_API int er_write_sequence_tag(STREAM* s, int length, BOOL flag);
FREERDP_API BOOL er_read_sequence_tag(wStream* s, int* length);
FREERDP_API int er_write_sequence_tag(wStream* s, int length, BOOL flag);
FREERDP_API int er_skip_sequence(int length);
FREERDP_API int er_skip_sequence_tag(int length);
FREERDP_API BOOL er_read_bit_string(STREAM* s, int* length, BYTE* padding);
FREERDP_API BOOL er_write_bit_string_tag(STREAM* s, UINT32 length, BYTE padding, BOOL flag);
FREERDP_API BOOL er_read_octet_string(STREAM* s, int* length);
FREERDP_API void er_write_octet_string(STREAM* s, BYTE* oct_str, int length, BOOL flag);
FREERDP_API int er_write_octet_string_tag(STREAM* s, int length, BOOL flag);
FREERDP_API BOOL er_read_bit_string(wStream* s, int* length, BYTE* padding);
FREERDP_API BOOL er_write_bit_string_tag(wStream* s, UINT32 length, BYTE padding, BOOL flag);
FREERDP_API BOOL er_read_octet_string(wStream* s, int* length);
FREERDP_API void er_write_octet_string(wStream* s, BYTE* oct_str, int length, BOOL flag);
FREERDP_API int er_write_octet_string_tag(wStream* s, int length, BOOL flag);
FREERDP_API int er_skip_octet_string(int length);
FREERDP_API BOOL er_read_BOOL(STREAM* s, BOOL* value);
FREERDP_API void er_write_BOOL(STREAM* s, BOOL value);
FREERDP_API BOOL er_read_integer(STREAM* s, UINT32* value);
FREERDP_API int er_write_integer(STREAM* s, INT32 value);
FREERDP_API BOOL er_read_integer_length(STREAM* s, int* length);
FREERDP_API BOOL er_read_BOOL(wStream* s, BOOL* value);
FREERDP_API void er_write_BOOL(wStream* s, BOOL value);
FREERDP_API BOOL er_read_integer(wStream* s, UINT32* value);
FREERDP_API int er_write_integer(wStream* s, INT32 value);
FREERDP_API BOOL er_read_integer_length(wStream* s, int* length);
FREERDP_API int er_skip_integer(INT32 value);
#endif /* FREERDP_CRYPTO_ER_H */

View File

@ -23,27 +23,27 @@
#include <freerdp/api.h>
#include <freerdp/utils/stream.h>
FREERDP_API BOOL per_read_length(STREAM* s, UINT16* length);
FREERDP_API void per_write_length(STREAM* s, int length);
FREERDP_API BOOL per_read_choice(STREAM* s, BYTE* choice);
FREERDP_API void per_write_choice(STREAM* s, BYTE choice);
FREERDP_API BOOL per_read_selection(STREAM* s, BYTE* selection);
FREERDP_API void per_write_selection(STREAM* s, BYTE selection);
FREERDP_API BOOL per_read_number_of_sets(STREAM* s, BYTE* number);
FREERDP_API void per_write_number_of_sets(STREAM* s, BYTE number);
FREERDP_API BOOL per_read_padding(STREAM* s, int length);
FREERDP_API void per_write_padding(STREAM* s, int length);
FREERDP_API BOOL per_read_integer(STREAM* s, UINT32* integer);
FREERDP_API BOOL per_read_integer16(STREAM* s, UINT16* integer, UINT16 min);
FREERDP_API void per_write_integer(STREAM* s, UINT32 integer);
FREERDP_API void per_write_integer16(STREAM* s, UINT16 integer, UINT16 min);
FREERDP_API BOOL per_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count);
FREERDP_API void per_write_enumerated(STREAM* s, BYTE enumerated, BYTE count);
FREERDP_API void per_write_object_identifier(STREAM* s, BYTE oid[6]);
FREERDP_API BOOL per_read_object_identifier(STREAM* s, BYTE oid[6]);
FREERDP_API BOOL per_read_octet_string(STREAM* s, BYTE* oct_str, int length, int min);
FREERDP_API void per_write_octet_string(STREAM* s, BYTE* oct_str, int length, int min);
FREERDP_API BOOL per_read_numeric_string(STREAM* s, int min);
FREERDP_API void per_write_numeric_string(STREAM* s, BYTE* num_str, int length, int min);
FREERDP_API BOOL per_read_length(wStream* s, UINT16* length);
FREERDP_API void per_write_length(wStream* s, int length);
FREERDP_API BOOL per_read_choice(wStream* s, BYTE* choice);
FREERDP_API void per_write_choice(wStream* s, BYTE choice);
FREERDP_API BOOL per_read_selection(wStream* s, BYTE* selection);
FREERDP_API void per_write_selection(wStream* s, BYTE selection);
FREERDP_API BOOL per_read_number_of_sets(wStream* s, BYTE* number);
FREERDP_API void per_write_number_of_sets(wStream* s, BYTE number);
FREERDP_API BOOL per_read_padding(wStream* s, int length);
FREERDP_API void per_write_padding(wStream* s, int length);
FREERDP_API BOOL per_read_integer(wStream* s, UINT32* integer);
FREERDP_API BOOL per_read_integer16(wStream* s, UINT16* integer, UINT16 min);
FREERDP_API void per_write_integer(wStream* s, UINT32 integer);
FREERDP_API void per_write_integer16(wStream* s, UINT16 integer, UINT16 min);
FREERDP_API BOOL per_read_enumerated(wStream* s, BYTE* enumerated, BYTE count);
FREERDP_API void per_write_enumerated(wStream* s, BYTE enumerated, BYTE count);
FREERDP_API void per_write_object_identifier(wStream* s, BYTE oid[6]);
FREERDP_API BOOL per_read_object_identifier(wStream* s, BYTE oid[6]);
FREERDP_API BOOL per_read_octet_string(wStream* s, BYTE* oct_str, int length, int min);
FREERDP_API void per_write_octet_string(wStream* s, BYTE* oct_str, int length, int min);
FREERDP_API BOOL per_read_numeric_string(wStream* s, int min);
FREERDP_API void per_write_numeric_string(wStream* s, BYTE* num_str, int length, int min);
#endif /* FREERDP_CRYPTO_PER_H */

View File

@ -152,7 +152,7 @@ typedef void (*pPlaySound)(rdpContext* context, PLAY_SOUND_UPDATE* play_sound);
typedef void (*pRefreshRect)(rdpContext* context, BYTE count, RECTANGLE_16* areas);
typedef void (*pSuppressOutput)(rdpContext* context, BYTE allow, RECTANGLE_16* area);
typedef void (*pSurfaceCommand)(rdpContext* context, STREAM* s);
typedef void (*pSurfaceCommand)(rdpContext* context, wStream* s);
typedef void (*pSurfaceBits)(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_command);
typedef void (*pSurfaceFrameMarker)(rdpContext* context, SURFACE_FRAME_MARKER* surface_frame_marker);
typedef void (*pSurfaceFrameAcknowledge)(rdpContext* context, UINT32 frameId);

View File

@ -30,9 +30,9 @@ extern "C" {
FREERDP_API void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, UINT16 cbString);
FREERDP_API void rail_unicode_string_free(RAIL_UNICODE_STRING* unicode_string);
FREERDP_API BOOL rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string);
FREERDP_API void rail_write_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string);
FREERDP_API void rail_write_unicode_string_value(STREAM* s, RAIL_UNICODE_STRING* unicode_string);
FREERDP_API BOOL rail_read_unicode_string(wStream* s, RAIL_UNICODE_STRING* unicode_string);
FREERDP_API void rail_write_unicode_string(wStream* s, RAIL_UNICODE_STRING* unicode_string);
FREERDP_API void rail_write_unicode_string_value(wStream* s, RAIL_UNICODE_STRING* unicode_string);
FREERDP_API void* rail_clone_order(UINT32 event_type, void* order);
FREERDP_API void rail_free_cloned_order(UINT32 event_type, void* order);

View File

@ -28,168 +28,5 @@
#include <winpr/stream.h>
struct _STREAM
{
BYTE* buffer;
BYTE* pointer;
size_t length;
size_t capacity;
};
typedef struct _STREAM STREAM;
#ifdef __cplusplus
extern "C" {
#endif
FREERDP_API STREAM* stream_new(int size);
FREERDP_API void stream_free(STREAM* stream);
#define stream_attach(_s, _buf, _size) do { \
_s->capacity = _size; \
_s->buffer = _buf; \
_s->pointer = _buf; } while (0)
#define stream_detach(_s) memset(_s, 0, sizeof(STREAM))
#define stream_clear(_s) memset(_s->buffer, 0, _s->capacity)
FREERDP_API void stream_extend(STREAM* stream, int request_size);
#define stream_check_size(_s, _n) \
while (_s->pointer - _s->buffer + (_n) > _s->capacity) \
stream_extend(_s, _n)
#define stream_get_pos(_s) (_s->pointer - _s->buffer)
#define stream_set_pos(_s,_m) _s->pointer = _s->buffer + (_m)
#define stream_seek(_s,_offset) _s->pointer += (_offset)
#define stream_rewind(_s,_offset) _s->pointer -= (_offset)
#define stream_seal(_s) _s->capacity = (_s->pointer - _s->buffer)
#define stream_get_mark(_s,_mark) _mark = _s->pointer
#define stream_set_mark(_s,_mark) _s->pointer = _mark
#define stream_get_head(_s) _s->buffer
#define stream_get_tail(_s) _s->pointer
#define stream_get_length(_s) (_s->pointer - _s->buffer)
#define stream_get_data(_s) (_s->buffer)
#define stream_get_size(_s) (_s->capacity)
#define stream_get_left(_s) (_s->capacity - (_s->pointer - _s->buffer))
#define stream_read_BYTE(_s, _v) do { _v = *_s->pointer++; } while (0)
#define stream_read_UINT16(_s, _v) do { _v = \
(UINT16)(*_s->pointer) + \
(UINT16)(((UINT16)(*(_s->pointer + 1))) << 8); \
_s->pointer += 2; } while (0)
#define stream_read_UINT32(_s, _v) do { _v = \
(UINT32)(*_s->pointer) + \
(((UINT32)(*(_s->pointer + 1))) << 8) + \
(((UINT32)(*(_s->pointer + 2))) << 16) + \
(((UINT32)(*(_s->pointer + 3))) << 24); \
_s->pointer += 4; } while (0)
#define stream_read_UINT64(_s, _v) do { _v = \
(UINT64)(*_s->pointer) + \
(((UINT64)(*(_s->pointer + 1))) << 8) + \
(((UINT64)(*(_s->pointer + 2))) << 16) + \
(((UINT64)(*(_s->pointer + 3))) << 24) + \
(((UINT64)(*(_s->pointer + 4))) << 32) + \
(((UINT64)(*(_s->pointer + 5))) << 40) + \
(((UINT64)(*(_s->pointer + 6))) << 48) + \
(((UINT64)(*(_s->pointer + 7))) << 56); \
_s->pointer += 8; } while (0)
#define stream_read(_s, _b, _n) do { \
memcpy(_b, (_s->pointer), (_n)); \
_s->pointer += (_n); \
} while (0)
#define stream_write_BYTE(_s, _v) do { \
*_s->pointer++ = (BYTE)(_v); } while (0)
#define stream_write_UINT16(_s, _v) do { \
*_s->pointer++ = (_v) & 0xFF; \
*_s->pointer++ = ((_v) >> 8) & 0xFF; } while (0)
#define stream_write_UINT32(_s, _v) do { \
*_s->pointer++ = (_v) & 0xFF; \
*_s->pointer++ = ((_v) >> 8) & 0xFF; \
*_s->pointer++ = ((_v) >> 16) & 0xFF; \
*_s->pointer++ = ((_v) >> 24) & 0xFF; } while (0)
#define stream_write_UINT64(_s, _v) do { \
*_s->pointer++ = (UINT64)(_v) & 0xFF; \
*_s->pointer++ = ((UINT64)(_v) >> 8) & 0xFF; \
*_s->pointer++ = ((UINT64)(_v) >> 16) & 0xFF; \
*_s->pointer++ = ((UINT64)(_v) >> 24) & 0xFF; \
*_s->pointer++ = ((UINT64)(_v) >> 32) & 0xFF; \
*_s->pointer++ = ((UINT64)(_v) >> 40) & 0xFF; \
*_s->pointer++ = ((UINT64)(_v) >> 48) & 0xFF; \
*_s->pointer++ = ((UINT64)(_v) >> 56) & 0xFF; } while (0)
#define stream_write(_s, _b, _n) do { \
memcpy(_s->pointer, (_b), (_n)); \
_s->pointer += (_n); \
} while (0)
#define stream_write_zero(_s, _n) do { \
memset(_s->pointer, '\0', (_n)); \
_s->pointer += (_n); \
} while (0)
#define stream_set_byte(_s, _v, _n) do { \
memset(_s->pointer, _v, (_n)); \
_s->pointer += (_n); \
} while (0)
#define stream_peek_BYTE(_s, _v) do { _v = *_s->pointer; } while (0)
#define stream_peek_UINT16(_s, _v) do { _v = \
(UINT16)(*_s->pointer) + \
(((UINT16)(*(_s->pointer + 1))) << 8); \
} while (0)
#define stream_peek_UINT32(_s, _v) do { _v = \
(UINT32)(*_s->pointer) + \
(((UINT32)(*(_s->pointer + 1))) << 8) + \
(((UINT32)(*(_s->pointer + 2))) << 16) + \
(((UINT32)(*(_s->pointer + 3))) << 24); \
} while (0)
#define stream_peek_UINT64(_s, _v) do { _v = \
(UINT64)(*_s->pointer) + \
(((UINT64)(*(_s->pointer + 1))) << 8) + \
(((UINT64)(*(_s->pointer + 2))) << 16) + \
(((UINT64)(*(_s->pointer + 3))) << 24) + \
(((UINT64)(*(_s->pointer + 4))) << 32) + \
(((UINT64)(*(_s->pointer + 5))) << 40) + \
(((UINT64)(*(_s->pointer + 6))) << 48) + \
(((UINT64)(*(_s->pointer + 7))) << 56); \
} while (0)
#define stream_seek_BYTE(_s) stream_seek(_s, 1)
#define stream_seek_UINT16(_s) stream_seek(_s, 2)
#define stream_seek_UINT32(_s) stream_seek(_s, 4)
#define stream_seek_UINT64(_s) stream_seek(_s, 8)
#define stream_read_UINT16_be(_s, _v) do { _v = \
(((UINT16)(*_s->pointer)) << 8) + \
(UINT16)(*(_s->pointer + 1)); \
_s->pointer += 2; } while (0)
#define stream_read_UINT32_be(_s, _v) do { _v = \
(((UINT32)(*(_s->pointer))) << 24) + \
(((UINT32)(*(_s->pointer + 1))) << 16) + \
(((UINT32)(*(_s->pointer + 2))) << 8) + \
(((UINT32)(*(_s->pointer + 3)))); \
_s->pointer += 4; } while (0)
#define stream_write_UINT16_be(_s, _v) do { \
*_s->pointer++ = ((_v) >> 8) & 0xFF; \
*_s->pointer++ = (_v) & 0xFF; } while (0)
#define stream_write_UINT32_be(_s, _v) do { \
stream_write_UINT16_be(_s, ((_v) >> 16 & 0xFFFF)); \
stream_write_UINT16_be(_s, ((_v) & 0xFFFF)); \
} while (0)
#define stream_copy(_dst, _src, _n) do { \
memcpy(_dst->pointer, _src->pointer, _n); \
_dst->pointer += _n; \
_src->pointer += _n; \
} while (0)
static INLINE BOOL stream_skip(STREAM* s, int sz) {
if (stream_get_left(s) < sz)
return FALSE;
stream_seek(s, sz);
return TRUE;
}
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_UTILS_STREAM_H */

View File

@ -36,7 +36,7 @@ typedef struct rdp_string rdpString;
extern "C" {
#endif
FREERDP_API BOOL freerdp_string_read_length32(STREAM* s, rdpString* string);
FREERDP_API BOOL freerdp_string_read_length32(wStream* s, rdpString* string);
FREERDP_API void freerdp_string_free(rdpString* string);
#ifdef __cplusplus

View File

@ -44,12 +44,12 @@ struct rdp_svc_plugin
CHANNEL_DEF channel_def;
void (*connect_callback)(rdpSvcPlugin* plugin);
void (*receive_callback)(rdpSvcPlugin* plugin, STREAM* data_in);
void (*receive_callback)(rdpSvcPlugin* plugin, wStream* data_in);
void (*event_callback)(rdpSvcPlugin* plugin, RDP_EVENT* event);
void (*terminate_callback)(rdpSvcPlugin* plugin);
HANDLE thread;
STREAM* data_in;
wStream* data_in;
void* init_handle;
UINT32 open_handle;
wMessagePipe* MsgPipe;
@ -60,7 +60,7 @@ extern "C" {
#endif
FREERDP_API void svc_plugin_init(rdpSvcPlugin* plugin, CHANNEL_ENTRY_POINTS* pEntryPoints);
FREERDP_API int svc_plugin_send(rdpSvcPlugin* plugin, STREAM* data_out);
FREERDP_API int svc_plugin_send(rdpSvcPlugin* plugin, wStream* data_out);
FREERDP_API int svc_plugin_send_event(rdpSvcPlugin* plugin, RDP_EVENT* event);
#ifdef __cplusplus

View File

@ -169,7 +169,7 @@ static void nsc_rle_decompress_data(NSC_CONTEXT* context)
}
}
static void nsc_stream_initialize(NSC_CONTEXT* context, STREAM* s)
static void nsc_stream_initialize(NSC_CONTEXT* context, wStream* s)
{
int i;
@ -183,7 +183,7 @@ static void nsc_stream_initialize(NSC_CONTEXT* context, STREAM* s)
context->nsc_stream.Planes = stream_get_tail(s);
}
static void nsc_context_initialize(NSC_CONTEXT* context, STREAM* s)
static void nsc_context_initialize(NSC_CONTEXT* context, wStream* s)
{
int i;
UINT32 length;
@ -327,7 +327,7 @@ void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_f
void nsc_process_message(NSC_CONTEXT* context, UINT16 bpp,
UINT16 width, UINT16 height, BYTE* data, UINT32 length)
{
STREAM* s;
wStream* s;
s = stream_new(0);
stream_attach(s, data, length);

View File

@ -329,7 +329,7 @@ static void nsc_rle_compress_data(NSC_CONTEXT* context)
}
}
void nsc_compose_message(NSC_CONTEXT* context, STREAM* s,
void nsc_compose_message(NSC_CONTEXT* context, wStream* s,
BYTE* bmpdata, int width, int height, int rowstride)
{
int i;

View File

@ -325,7 +325,7 @@ int rfx_tile_pool_return(RFX_CONTEXT* context, RFX_TILE* tile)
return 0;
}
static BOOL rfx_process_message_sync(RFX_CONTEXT* context, STREAM* s)
static BOOL rfx_process_message_sync(RFX_CONTEXT* context, wStream* s)
{
UINT32 magic;
@ -355,7 +355,7 @@ static BOOL rfx_process_message_sync(RFX_CONTEXT* context, STREAM* s)
return TRUE;
}
static BOOL rfx_process_message_codec_versions(RFX_CONTEXT* context, STREAM* s)
static BOOL rfx_process_message_codec_versions(RFX_CONTEXT* context, wStream* s)
{
BYTE numCodecs;
@ -386,7 +386,7 @@ static BOOL rfx_process_message_codec_versions(RFX_CONTEXT* context, STREAM* s)
return TRUE;
}
static BOOL rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s)
static BOOL rfx_process_message_channels(RFX_CONTEXT* context, wStream* s)
{
BYTE channelId;
BYTE numChannels;
@ -427,7 +427,7 @@ static BOOL rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s)
return TRUE;
}
static BOOL rfx_process_message_context(RFX_CONTEXT* context, STREAM* s)
static BOOL rfx_process_message_context(RFX_CONTEXT* context, wStream* s)
{
BYTE ctxId;
UINT16 tileSize;
@ -472,7 +472,7 @@ static BOOL rfx_process_message_context(RFX_CONTEXT* context, STREAM* s)
return TRUE;
}
static BOOL rfx_process_message_frame_begin(RFX_CONTEXT* context, RFX_MESSAGE* message, STREAM* s)
static BOOL rfx_process_message_frame_begin(RFX_CONTEXT* context, RFX_MESSAGE* message, wStream* s)
{
UINT32 frameIdx;
UINT16 numRegions;
@ -489,12 +489,12 @@ static BOOL rfx_process_message_frame_begin(RFX_CONTEXT* context, RFX_MESSAGE* m
return TRUE;
}
static void rfx_process_message_frame_end(RFX_CONTEXT* context, RFX_MESSAGE* message, STREAM* s)
static void rfx_process_message_frame_end(RFX_CONTEXT* context, RFX_MESSAGE* message, wStream* s)
{
DEBUG_RFX("RFX_FRAME_END");
}
static BOOL rfx_process_message_region(RFX_CONTEXT* context, RFX_MESSAGE* message, STREAM* s)
static BOOL rfx_process_message_region(RFX_CONTEXT* context, RFX_MESSAGE* message, wStream* s)
{
int i;
@ -539,7 +539,7 @@ static BOOL rfx_process_message_region(RFX_CONTEXT* context, RFX_MESSAGE* messag
return TRUE;
}
static BOOL rfx_process_message_tile(RFX_CONTEXT* context, RFX_TILE* tile, STREAM* s)
static BOOL rfx_process_message_tile(RFX_CONTEXT* context, RFX_TILE* tile, wStream* s)
{
BYTE quantIdxY;
BYTE quantIdxCb;
@ -578,7 +578,7 @@ static BOOL rfx_process_message_tile(RFX_CONTEXT* context, RFX_TILE* tile, STREA
struct _RFX_TILE_WORK_PARAM
{
STREAM s;
wStream s;
RFX_TILE* tile;
RFX_CONTEXT* context;
};
@ -590,7 +590,7 @@ void CALLBACK rfx_process_message_tile_work_callback(PTP_CALLBACK_INSTANCE insta
rfx_process_message_tile(param->context, param->tile, &(param->s));
}
static BOOL rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* message, STREAM* s)
static BOOL rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* message, wStream* s)
{
int i;
int pos;
@ -721,7 +721,7 @@ static BOOL rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
{
params[i].context = context;
params[i].tile = message->tiles[i];
CopyMemory(&(params[i].s), s, sizeof(STREAM));
CopyMemory(&(params[i].s), s, sizeof(wStream));
work_objects[i] = CreateThreadpoolWork((PTP_WORK_CALLBACK) rfx_process_message_tile_work_callback,
(void*) &params[i], &context->priv->ThreadPoolEnv);
@ -750,7 +750,7 @@ static BOOL rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, UINT32 length)
{
int pos;
STREAM* s;
wStream* s;
UINT32 blockLen;
UINT32 blockType;
RFX_MESSAGE* message;
@ -884,7 +884,7 @@ void rfx_message_free(RFX_CONTEXT* context, RFX_MESSAGE* message)
}
}
static void rfx_compose_message_sync(RFX_CONTEXT* context, STREAM* s)
static void rfx_compose_message_sync(RFX_CONTEXT* context, wStream* s)
{
stream_write_UINT16(s, WBT_SYNC); /* BlockT.blockType */
stream_write_UINT32(s, 12); /* BlockT.blockLen */
@ -892,7 +892,7 @@ static void rfx_compose_message_sync(RFX_CONTEXT* context, STREAM* s)
stream_write_UINT16(s, WF_VERSION_1_0); /* version */
}
static void rfx_compose_message_codec_versions(RFX_CONTEXT* context, STREAM* s)
static void rfx_compose_message_codec_versions(RFX_CONTEXT* context, wStream* s)
{
stream_write_UINT16(s, WBT_CODEC_VERSIONS); /* BlockT.blockType */
stream_write_UINT32(s, 10); /* BlockT.blockLen */
@ -901,7 +901,7 @@ static void rfx_compose_message_codec_versions(RFX_CONTEXT* context, STREAM* s)
stream_write_UINT16(s, WF_VERSION_1_0); /* codecs.version */
}
static void rfx_compose_message_channels(RFX_CONTEXT* context, STREAM* s)
static void rfx_compose_message_channels(RFX_CONTEXT* context, wStream* s)
{
stream_write_UINT16(s, WBT_CHANNELS); /* BlockT.blockType */
stream_write_UINT32(s, 12); /* BlockT.blockLen */
@ -911,7 +911,7 @@ static void rfx_compose_message_channels(RFX_CONTEXT* context, STREAM* s)
stream_write_UINT16(s, context->height); /* Channel.height */
}
static void rfx_compose_message_context(RFX_CONTEXT* context, STREAM* s)
static void rfx_compose_message_context(RFX_CONTEXT* context, wStream* s)
{
UINT16 properties;
@ -940,7 +940,7 @@ static void rfx_compose_message_context(RFX_CONTEXT* context, STREAM* s)
context->properties = properties;
}
void rfx_compose_message_header(RFX_CONTEXT* context, STREAM* s)
void rfx_compose_message_header(RFX_CONTEXT* context, wStream* s)
{
stream_check_size(s, 12 + 10 + 12 + 13);
@ -952,7 +952,7 @@ void rfx_compose_message_header(RFX_CONTEXT* context, STREAM* s)
context->header_processed = TRUE;
}
static void rfx_compose_message_frame_begin(RFX_CONTEXT* context, STREAM* s)
static void rfx_compose_message_frame_begin(RFX_CONTEXT* context, wStream* s)
{
stream_check_size(s, 14);
@ -966,7 +966,7 @@ static void rfx_compose_message_frame_begin(RFX_CONTEXT* context, STREAM* s)
context->frame_idx++;
}
static void rfx_compose_message_region(RFX_CONTEXT* context, STREAM* s,
static void rfx_compose_message_region(RFX_CONTEXT* context, wStream* s,
const RFX_RECT* rects, int num_rects)
{
int size;
@ -994,7 +994,7 @@ static void rfx_compose_message_region(RFX_CONTEXT* context, STREAM* s,
stream_write_UINT16(s, 1); /* numTilesets */
}
static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s,
static void rfx_compose_message_tile(RFX_CONTEXT* context, wStream* s,
BYTE* tile_data, int tile_width, int tile_height, int rowstride,
const UINT32* quantVals, int quantIdxY, int quantIdxCb, int quantIdxCr,
int xIdx, int yIdx)
@ -1036,7 +1036,7 @@ static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s,
stream_set_pos(s, end_pos);
}
static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s,
static void rfx_compose_message_tileset(RFX_CONTEXT* context, wStream* s,
BYTE* image_data, int width, int height, int rowstride)
{
int i;
@ -1125,7 +1125,7 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s,
stream_set_pos(s, end_pos);
}
static void rfx_compose_message_frame_end(RFX_CONTEXT* context, STREAM* s)
static void rfx_compose_message_frame_end(RFX_CONTEXT* context, wStream* s)
{
stream_check_size(s, 8);
@ -1135,7 +1135,7 @@ static void rfx_compose_message_frame_end(RFX_CONTEXT* context, STREAM* s)
stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
}
static void rfx_compose_message_data(RFX_CONTEXT* context, STREAM* s,
static void rfx_compose_message_data(RFX_CONTEXT* context, wStream* s,
const RFX_RECT* rects, int num_rects, BYTE* image_data, int width, int height, int rowstride)
{
rfx_compose_message_frame_begin(context, s);
@ -1144,7 +1144,7 @@ static void rfx_compose_message_data(RFX_CONTEXT* context, STREAM* s,
rfx_compose_message_frame_end(context, s);
}
FREERDP_API void rfx_compose_message(RFX_CONTEXT* context, STREAM* s,
FREERDP_API void rfx_compose_message(RFX_CONTEXT* context, wStream* s,
const RFX_RECT* rects, int num_rects, BYTE* image_data, int width, int height, int rowstride)
{
/* Only the first frame should send the RemoteFX header */

View File

@ -142,7 +142,7 @@ void CALLBACK rfx_decode_component_work_callback(PTP_CALLBACK_INSTANCE instance,
}
/* stride is bytes between rows in the output buffer. */
BOOL rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in,
BOOL rfx_decode_rgb(RFX_CONTEXT* context, wStream* data_in,
int y_size, const UINT32* y_quants,
int cb_size, const UINT32* cb_quants,
int cr_size, const UINT32* cr_quants, BYTE* rgb_buffer, int stride)

View File

@ -23,7 +23,7 @@
#include <freerdp/codec/rfx.h>
/* stride is bytes between rows in the output buffer. */
BOOL rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in,
BOOL rfx_decode_rgb(RFX_CONTEXT* context, wStream* data_in,
int y_size, const UINT32 * y_quants,
int cb_size, const UINT32 * cb_quants,
int cr_size, const UINT32 * cr_quants, BYTE* rgb_buffer,

View File

@ -219,7 +219,7 @@ static void rfx_encode_component(RFX_CONTEXT* context, const UINT32* quantizatio
void rfx_encode_rgb(RFX_CONTEXT* context, const BYTE* rgb_data, int width, int height, int rowstride,
const UINT32* y_quants, const UINT32* cb_quants, const UINT32* cr_quants,
STREAM* data_out, int* y_size, int* cb_size, int* cr_size)
wStream* data_out, int* y_size, int* cb_size, int* cr_size)
{
INT16* pSrcDst[3];
primitives_t* prims = primitives_get();

View File

@ -24,7 +24,7 @@
void rfx_encode_rgb(RFX_CONTEXT* context, const BYTE* rgb_data, int width, int height, int rowstride,
const UINT32* y_quants, const UINT32* cb_quants, const UINT32* cr_quants,
STREAM* data_out, int* y_size, int* cb_size, int* cr_size);
wStream* data_out, int* y_size, int* cb_size, int* cr_size);
#endif

View File

@ -34,13 +34,13 @@ static const char* const CTRLACTION_STRINGS[] =
};
*/
void rdp_write_synchronize_pdu(STREAM* s, rdpSettings* settings)
void rdp_write_synchronize_pdu(wStream* s, rdpSettings* settings)
{
stream_write_UINT16(s, SYNCMSGTYPE_SYNC); /* messageType (2 bytes) */
stream_write_UINT16(s, settings->PduSource); /* targetUser (2 bytes) */
}
BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, wStream* s)
{
if (rdp->settings->ServerMode)
return rdp_recv_server_synchronize_pdu(rdp, s);
@ -48,7 +48,7 @@ BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s)
return rdp_recv_client_synchronize_pdu(rdp, s);
}
BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, wStream* s)
{
rdp->finalize_sc_pdus |= FINALIZE_SC_SYNCHRONIZE_PDU;
return TRUE;
@ -56,7 +56,7 @@ BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = rdp_data_pdu_init(rdp);
@ -64,7 +64,7 @@ BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp)
return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_SYNCHRONIZE, rdp->mcs->user_id);
}
BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, wStream* s)
{
UINT16 messageType;
@ -86,7 +86,7 @@ BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = rdp_data_pdu_init(rdp);
@ -95,7 +95,7 @@ BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp)
return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_SYNCHRONIZE, rdp->mcs->user_id);
}
BOOL rdp_recv_control_pdu(STREAM* s, UINT16* action)
BOOL rdp_recv_control_pdu(wStream* s, UINT16* action)
{
if (stream_get_left(s) < 8)
return FALSE;
@ -107,14 +107,14 @@ BOOL rdp_recv_control_pdu(STREAM* s, UINT16* action)
return TRUE;
}
void rdp_write_client_control_pdu(STREAM* s, UINT16 action)
void rdp_write_client_control_pdu(wStream* s, UINT16 action)
{
stream_write_UINT16(s, action); /* action (2 bytes) */
stream_write_UINT16(s, 0); /* grantId (2 bytes) */
stream_write_UINT32(s, 0); /* controlId (4 bytes) */
}
BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, wStream* s)
{
UINT16 action;
@ -137,7 +137,7 @@ BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = rdp_data_pdu_init(rdp);
@ -150,7 +150,7 @@ BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp)
BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = rdp_data_pdu_init(rdp);
@ -163,7 +163,7 @@ BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp)
BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action)
{
STREAM* s;
wStream* s;
s = rdp_data_pdu_init(rdp);
rdp_write_client_control_pdu(s, action);
@ -171,13 +171,13 @@ BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action)
return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->user_id);
}
void rdp_write_persistent_list_entry(STREAM* s, UINT32 key1, UINT32 key2)
void rdp_write_persistent_list_entry(wStream* s, UINT32 key1, UINT32 key2)
{
stream_write_UINT32(s, key1); /* key1 (4 bytes) */
stream_write_UINT32(s, key2); /* key2 (4 bytes) */
}
void rdp_write_client_persistent_key_list_pdu(STREAM* s, rdpSettings* settings)
void rdp_write_client_persistent_key_list_pdu(wStream* s, rdpSettings* settings)
{
stream_write_UINT16(s, 0); /* numEntriesCache0 (2 bytes) */
stream_write_UINT16(s, 0); /* numEntriesCache1 (2 bytes) */
@ -198,7 +198,7 @@ void rdp_write_client_persistent_key_list_pdu(STREAM* s, rdpSettings* settings)
BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = rdp_data_pdu_init(rdp);
rdp_write_client_persistent_key_list_pdu(s, rdp->settings);
@ -206,7 +206,7 @@ BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp)
return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_BITMAP_CACHE_PERSISTENT_LIST, rdp->mcs->user_id);
}
BOOL rdp_recv_client_font_list_pdu(STREAM* s)
BOOL rdp_recv_client_font_list_pdu(wStream* s)
{
if (stream_get_left(s) < 8)
return FALSE;
@ -214,7 +214,7 @@ BOOL rdp_recv_client_font_list_pdu(STREAM* s)
return TRUE;
}
void rdp_write_client_font_list_pdu(STREAM* s, UINT16 flags)
void rdp_write_client_font_list_pdu(wStream* s, UINT16 flags)
{
stream_write_UINT16(s, 0); /* numberFonts (2 bytes) */
stream_write_UINT16(s, 0); /* totalNumFonts (2 bytes) */
@ -224,7 +224,7 @@ void rdp_write_client_font_list_pdu(STREAM* s, UINT16 flags)
BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags)
{
STREAM* s;
wStream* s;
s = rdp_data_pdu_init(rdp);
rdp_write_client_font_list_pdu(s, flags);
@ -232,7 +232,7 @@ BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags)
return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_FONT_LIST, rdp->mcs->user_id);
}
BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, wStream* s)
{
if (rdp->settings->ServerMode)
return rdp_recv_server_font_map_pdu(rdp, s);
@ -240,13 +240,13 @@ BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s)
return rdp_recv_client_font_map_pdu(rdp, s);
}
BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, wStream* s)
{
rdp->finalize_sc_pdus |= FINALIZE_SC_FONT_MAP_PDU;
return TRUE;
}
BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, wStream* s)
{
rdp->finalize_sc_pdus |= FINALIZE_SC_FONT_MAP_PDU;
if(stream_get_left(s) >= 8)
@ -262,7 +262,7 @@ BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = rdp_data_pdu_init(rdp);
@ -274,7 +274,7 @@ BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp)
return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_FONT_MAP, rdp->mcs->user_id);
}
BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_deactivate_all(rdpRdp* rdp, wStream* s)
{
UINT16 lengthSourceDescriptor;
@ -312,7 +312,7 @@ BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s)
BOOL rdp_send_deactivate_all(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = rdp_pdu_init(rdp);
@ -323,7 +323,7 @@ BOOL rdp_send_deactivate_all(rdpRdp* rdp)
return rdp_send_pdu(rdp, s, PDU_TYPE_DEACTIVATE_ALL, rdp->mcs->user_id);
}
BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, wStream* s)
{
UINT16 action;
@ -337,7 +337,7 @@ BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, wStream* s)
{
if (!rdp_recv_client_font_list_pdu(s))
return FALSE;

View File

@ -37,28 +37,28 @@
#define FONTLIST_FIRST 0x0001
#define FONTLIST_LAST 0x0002
BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_deactivate_all(rdpRdp* rdp, wStream* s);
BOOL rdp_send_deactivate_all(rdpRdp* rdp);
BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, wStream* s);
BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, wStream* s);
BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp);
BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, wStream* s);
BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp);
BOOL rdp_recv_control_pdu(STREAM* s, UINT16* action);
BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_control_pdu(wStream* s, UINT16* action);
BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, wStream* s);
BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp);
BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp);
BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action);
BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp);
BOOL rdp_recv_client_font_list_pdu(STREAM* s);
BOOL rdp_recv_client_font_list_pdu(wStream* s);
BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags);
BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, wStream* s);
BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, wStream* s);
BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, wStream* s);
BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp);
BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s);
BOOL rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, STREAM* s);
BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, wStream* s);
BOOL rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, wStream* s);
#endif /* __ACTIVATION_H */

View File

@ -65,7 +65,7 @@ const char* const CAPSET_TYPE_STRINGS[] =
#endif
BOOL rdp_print_capability_sets(STREAM* s, UINT16 numberCapabilities, BOOL receiving);
BOOL rdp_print_capability_sets(wStream* s, UINT16 numberCapabilities, BOOL receiving);
/* CODEC_GUID_REMOTEFX: 0x76772F12BD724463AFB3B73C9C6F7886 */
@ -112,19 +112,19 @@ GUID CODEC_GUID_JPEG =
{ 0x86, 0x9A, 0xCB, 0x8B, 0x37, 0xB6, 0x62, 0x37 }
};
void rdp_read_capability_set_header(STREAM* s, UINT16* length, UINT16* type)
void rdp_read_capability_set_header(wStream* s, UINT16* length, UINT16* type)
{
stream_read_UINT16(s, *type); /* capabilitySetType */
stream_read_UINT16(s, *length); /* lengthCapability */
}
void rdp_write_capability_set_header(STREAM* s, UINT16 length, UINT16 type)
void rdp_write_capability_set_header(wStream* s, UINT16 length, UINT16 type)
{
stream_write_UINT16(s, type); /* capabilitySetType */
stream_write_UINT16(s, length); /* lengthCapability */
}
BYTE* rdp_capability_set_start(STREAM* s)
BYTE* rdp_capability_set_start(wStream* s)
{
BYTE* header;
@ -134,7 +134,7 @@ BYTE* rdp_capability_set_start(STREAM* s)
return header;
}
void rdp_capability_set_finish(STREAM* s, BYTE* header, UINT16 type)
void rdp_capability_set_finish(wStream* s, BYTE* header, UINT16 type)
{
UINT16 length;
BYTE* footer;
@ -155,7 +155,7 @@ void rdp_capability_set_finish(STREAM* s, BYTE* header, UINT16 type)
* @return if the operation completed successfully
*/
BOOL rdp_read_general_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_general_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT16 extraFlags;
BYTE refreshRectSupport;
@ -204,7 +204,7 @@ BOOL rdp_read_general_capability_set(STREAM* s, UINT16 length, rdpSettings* sett
* @param settings settings
*/
void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_general_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT16 extraFlags;
@ -237,7 +237,7 @@ void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_GENERAL);
}
BOOL rdp_print_general_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_general_capability_set(wStream* s, UINT16 length)
{
UINT16 osMajorType;
UINT16 osMinorType;
@ -291,7 +291,7 @@ BOOL rdp_print_general_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_bitmap_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_bitmap_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
BYTE drawingFlags;
UINT16 desktopWidth;
@ -342,7 +342,7 @@ BOOL rdp_read_bitmap_capability_set(STREAM* s, UINT16 length, rdpSettings* setti
* @param settings settings
*/
void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_bitmap_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
BYTE drawingFlags = 0;
@ -378,7 +378,7 @@ void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP);
}
BOOL rdp_print_bitmap_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_bitmap_capability_set(wStream* s, UINT16 length)
{
UINT16 preferredBitsPerPixel;
UINT16 receive1BitPerPixel;
@ -438,7 +438,7 @@ BOOL rdp_print_bitmap_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_order_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_order_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
int i;
UINT16 orderFlags;
@ -482,7 +482,7 @@ BOOL rdp_read_order_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
* @param settings settings
*/
void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_order_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT16 orderFlags;
@ -530,7 +530,7 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_ORDER);
}
BOOL rdp_print_order_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_order_capability_set(wStream* s, UINT16 length)
{
BYTE terminalDescriptor[16];
UINT32 pad4OctetsA;
@ -635,7 +635,7 @@ BOOL rdp_print_order_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_bitmap_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_bitmap_cache_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 40)
return FALSE;
@ -663,7 +663,7 @@ BOOL rdp_read_bitmap_cache_capability_set(STREAM* s, UINT16 length, rdpSettings*
* @param settings settings
*/
void rdp_write_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_bitmap_cache_capability_set(wStream* s, rdpSettings* settings)
{
int bpp;
UINT16 size;
@ -695,7 +695,7 @@ void rdp_write_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CACHE);
}
BOOL rdp_print_bitmap_cache_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_bitmap_cache_capability_set(wStream* s, UINT16 length)
{
UINT32 pad1, pad2, pad3;
UINT32 pad4, pad5, pad6;
@ -748,7 +748,7 @@ BOOL rdp_print_bitmap_cache_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_control_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_control_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 12)
return FALSE;
@ -768,7 +768,7 @@ BOOL rdp_read_control_capability_set(STREAM* s, UINT16 length, rdpSettings* sett
* @param settings settings
*/
void rdp_write_control_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_control_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
@ -782,7 +782,7 @@ void rdp_write_control_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_CONTROL);
}
BOOL rdp_print_control_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_control_capability_set(wStream* s, UINT16 length)
{
UINT16 controlFlags;
UINT16 remoteDetachFlag;
@ -815,7 +815,7 @@ BOOL rdp_print_control_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_window_activation_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_window_activation_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 12)
return FALSE;
@ -835,7 +835,7 @@ BOOL rdp_read_window_activation_capability_set(STREAM* s, UINT16 length, rdpSett
* @param settings settings
*/
void rdp_write_window_activation_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_window_activation_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
@ -849,7 +849,7 @@ void rdp_write_window_activation_capability_set(STREAM* s, rdpSettings* settings
rdp_capability_set_finish(s, header, CAPSET_TYPE_ACTIVATION);
}
BOOL rdp_print_window_activation_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_window_activation_capability_set(wStream* s, UINT16 length)
{
UINT16 helpKeyFlag;
UINT16 helpKeyIndexFlag;
@ -882,7 +882,7 @@ BOOL rdp_print_window_activation_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_pointer_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_pointer_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT16 colorPointerFlag;
UINT16 colorPointerCacheSize;
@ -912,7 +912,7 @@ BOOL rdp_read_pointer_capability_set(STREAM* s, UINT16 length, rdpSettings* sett
* @param settings settings
*/
void rdp_write_pointer_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_pointer_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT16 colorPointerFlag;
@ -932,7 +932,7 @@ void rdp_write_pointer_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_POINTER);
}
BOOL rdp_print_pointer_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_pointer_capability_set(wStream* s, UINT16 length)
{
UINT16 colorPointerFlag;
UINT16 colorPointerCacheSize;
@ -962,7 +962,7 @@ BOOL rdp_print_pointer_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_share_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_share_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 8)
return FALSE;
@ -980,7 +980,7 @@ BOOL rdp_read_share_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
* @param settings settings
*/
void rdp_write_share_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_share_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT16 nodeId;
@ -995,7 +995,7 @@ void rdp_write_share_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_SHARE);
}
BOOL rdp_print_share_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_share_capability_set(wStream* s, UINT16 length)
{
UINT16 nodeId;
UINT16 pad2Octets;
@ -1022,7 +1022,7 @@ BOOL rdp_print_share_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_color_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_color_cache_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 8)
return FALSE;
@ -1040,7 +1040,7 @@ BOOL rdp_read_color_cache_capability_set(STREAM* s, UINT16 length, rdpSettings*
* @param settings settings
*/
void rdp_write_color_cache_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_color_cache_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
@ -1052,7 +1052,7 @@ void rdp_write_color_cache_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_COLOR_CACHE);
}
BOOL rdp_print_color_cache_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_color_cache_capability_set(wStream* s, UINT16 length)
{
UINT16 colorTableCacheSize;
UINT16 pad2Octets;
@ -1079,7 +1079,7 @@ BOOL rdp_print_color_cache_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_sound_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_sound_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT16 soundFlags;
@ -1101,7 +1101,7 @@ BOOL rdp_read_sound_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
* @param settings settings
*/
void rdp_write_sound_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_sound_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT16 soundFlags;
@ -1116,7 +1116,7 @@ void rdp_write_sound_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_SOUND);
}
BOOL rdp_print_sound_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_sound_capability_set(wStream* s, UINT16 length)
{
UINT16 soundFlags;
UINT16 pad2OctetsA;
@ -1143,7 +1143,7 @@ BOOL rdp_print_sound_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_input_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_input_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT16 inputFlags;
@ -1196,7 +1196,7 @@ BOOL rdp_read_input_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
* @param settings settings
*/
void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_input_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT16 inputFlags;
@ -1222,7 +1222,7 @@ void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_INPUT);
}
BOOL rdp_print_input_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_input_capability_set(wStream* s, UINT16 length)
{
UINT16 inputFlags;
UINT16 pad2OctetsA;
@ -1262,7 +1262,7 @@ BOOL rdp_print_input_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_font_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_font_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length > 4)
stream_seek_UINT16(s); /* fontSupportFlags (2 bytes) */
@ -1280,7 +1280,7 @@ BOOL rdp_read_font_capability_set(STREAM* s, UINT16 length, rdpSettings* setting
* @param settings settings
*/
void rdp_write_font_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_font_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
@ -1292,7 +1292,7 @@ void rdp_write_font_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_FONT);
}
BOOL rdp_print_font_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_font_capability_set(wStream* s, UINT16 length)
{
UINT16 fontSupportFlags = 0;
UINT16 pad2Octets = 0;
@ -1319,7 +1319,7 @@ BOOL rdp_print_font_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_brush_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_brush_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 8)
return FALSE;
@ -1336,7 +1336,7 @@ BOOL rdp_read_brush_capability_set(STREAM* s, UINT16 length, rdpSettings* settin
* @param settings settings
*/
void rdp_write_brush_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_brush_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
@ -1347,7 +1347,7 @@ void rdp_write_brush_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_BRUSH);
}
BOOL rdp_print_brush_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_brush_capability_set(wStream* s, UINT16 length)
{
UINT32 brushSupportLevel;
@ -1368,7 +1368,7 @@ BOOL rdp_print_brush_capability_set(STREAM* s, UINT16 length)
* @msdn{cc240566}
* @param s stream
*/
void rdp_read_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definition)
void rdp_read_cache_definition(wStream* s, GLYPH_CACHE_DEFINITION* cache_definition)
{
stream_read_UINT16(s, cache_definition->cacheEntries); /* cacheEntries (2 bytes) */
stream_read_UINT16(s, cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */
@ -1379,7 +1379,7 @@ void rdp_read_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definiti
* @msdn{cc240566}
* @param s stream
*/
void rdp_write_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definition)
void rdp_write_cache_definition(wStream* s, GLYPH_CACHE_DEFINITION* cache_definition)
{
stream_write_UINT16(s, cache_definition->cacheEntries); /* cacheEntries (2 bytes) */
stream_write_UINT16(s, cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */
@ -1393,7 +1393,7 @@ void rdp_write_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definit
* @return if the operation completed successfully
*/
BOOL rdp_read_glyph_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_glyph_cache_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT16 glyphSupportLevel;
@ -1417,7 +1417,7 @@ BOOL rdp_read_glyph_cache_capability_set(STREAM* s, UINT16 length, rdpSettings*
* @param settings settings
*/
void rdp_write_glyph_cache_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_glyph_cache_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
@ -1443,7 +1443,7 @@ void rdp_write_glyph_cache_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_GLYPH_CACHE);
}
BOOL rdp_print_glyph_cache_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_glyph_cache_capability_set(wStream* s, UINT16 length)
{
GLYPH_CACHE_DEFINITION glyphCache[10];
GLYPH_CACHE_DEFINITION fragCache;
@ -1496,7 +1496,7 @@ BOOL rdp_print_glyph_cache_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_offscreen_bitmap_cache_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT32 offscreenSupportLevel;
@ -1520,7 +1520,7 @@ BOOL rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, UINT16 length, rd
* @param settings settings
*/
void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_offscreen_bitmap_cache_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT32 offscreenSupportLevel = FALSE;
@ -1537,7 +1537,7 @@ void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* set
rdp_capability_set_finish(s, header, CAPSET_TYPE_OFFSCREEN_CACHE);
}
BOOL rdp_print_offscreen_bitmap_cache_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_offscreen_bitmap_cache_capability_set(wStream* s, UINT16 length)
{
UINT32 offscreenSupportLevel;
UINT16 offscreenCacheSize;
@ -1567,7 +1567,7 @@ BOOL rdp_print_offscreen_bitmap_cache_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_bitmap_cache_host_support_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_bitmap_cache_host_support_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
BYTE cacheVersion;
@ -1591,7 +1591,7 @@ BOOL rdp_read_bitmap_cache_host_support_capability_set(STREAM* s, UINT16 length,
* @param settings settings
*/
void rdp_write_bitmap_cache_host_support_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_bitmap_cache_host_support_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
@ -1604,7 +1604,7 @@ void rdp_write_bitmap_cache_host_support_capability_set(STREAM* s, rdpSettings*
rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CACHE_HOST_SUPPORT);
}
BOOL rdp_print_bitmap_cache_host_support_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_bitmap_cache_host_support_capability_set(wStream* s, UINT16 length)
{
BYTE cacheVersion;
BYTE pad1;
@ -1626,7 +1626,7 @@ BOOL rdp_print_bitmap_cache_host_support_capability_set(STREAM* s, UINT16 length
return TRUE;
}
void rdp_read_bitmap_cache_cell_info(STREAM* s, BITMAP_CACHE_V2_CELL_INFO* cellInfo)
void rdp_read_bitmap_cache_cell_info(wStream* s, BITMAP_CACHE_V2_CELL_INFO* cellInfo)
{
UINT32 info;
@ -1641,7 +1641,7 @@ void rdp_read_bitmap_cache_cell_info(STREAM* s, BITMAP_CACHE_V2_CELL_INFO* cellI
cellInfo->persistent = (info & 0x80000000) ? 1 : 0;
}
void rdp_write_bitmap_cache_cell_info(STREAM* s, BITMAP_CACHE_V2_CELL_INFO* cellInfo)
void rdp_write_bitmap_cache_cell_info(wStream* s, BITMAP_CACHE_V2_CELL_INFO* cellInfo)
{
UINT32 info;
@ -1662,7 +1662,7 @@ void rdp_write_bitmap_cache_cell_info(STREAM* s, BITMAP_CACHE_V2_CELL_INFO* cell
* @return if the operation completed successfully
*/
BOOL rdp_read_bitmap_cache_v2_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_bitmap_cache_v2_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 40)
return FALSE;
@ -1687,7 +1687,7 @@ BOOL rdp_read_bitmap_cache_v2_capability_set(STREAM* s, UINT16 length, rdpSettin
* @param settings settings
*/
void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_bitmap_cache_v2_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT16 cacheFlags;
@ -1712,7 +1712,7 @@ void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CACHE_V2);
}
BOOL rdp_print_bitmap_cache_v2_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_bitmap_cache_v2_capability_set(wStream* s, UINT16 length)
{
UINT16 cacheFlags;
BYTE pad2;
@ -1754,7 +1754,7 @@ BOOL rdp_print_bitmap_cache_v2_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_virtual_channel_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_virtual_channel_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT32 flags;
UINT32 VCChunkSize;
@ -1782,7 +1782,7 @@ BOOL rdp_read_virtual_channel_capability_set(STREAM* s, UINT16 length, rdpSettin
* @param settings settings
*/
void rdp_write_virtual_channel_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_virtual_channel_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT32 flags;
@ -1797,7 +1797,7 @@ void rdp_write_virtual_channel_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_VIRTUAL_CHANNEL);
}
BOOL rdp_print_virtual_channel_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_virtual_channel_capability_set(wStream* s, UINT16 length)
{
UINT32 flags;
UINT32 VCChunkSize;
@ -1828,7 +1828,7 @@ BOOL rdp_print_virtual_channel_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_draw_nine_grid_cache_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT32 drawNineGridSupportLevel;
@ -1853,7 +1853,7 @@ BOOL rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, UINT16 length, rdpS
* @param settings settings
*/
void rdp_write_draw_nine_grid_cache_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_draw_nine_grid_cache_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT32 drawNineGridSupportLevel;
@ -1869,7 +1869,7 @@ void rdp_write_draw_nine_grid_cache_capability_set(STREAM* s, rdpSettings* setti
rdp_capability_set_finish(s, header, CAPSET_TYPE_DRAW_NINE_GRID_CACHE);
}
void rdp_write_gdiplus_cache_entries(STREAM* s, UINT16 gce, UINT16 bce, UINT16 pce, UINT16 ice, UINT16 ace)
void rdp_write_gdiplus_cache_entries(wStream* s, UINT16 gce, UINT16 bce, UINT16 pce, UINT16 ice, UINT16 ace)
{
stream_write_UINT16(s, gce); /* gdipGraphicsCacheEntries (2 bytes) */
stream_write_UINT16(s, bce); /* gdipBrushCacheEntries (2 bytes) */
@ -1878,7 +1878,7 @@ void rdp_write_gdiplus_cache_entries(STREAM* s, UINT16 gce, UINT16 bce, UINT16 p
stream_write_UINT16(s, ace); /* gdipImageAttributesCacheEntries (2 bytes) */
}
void rdp_write_gdiplus_cache_chunk_size(STREAM* s, UINT16 gccs, UINT16 obccs, UINT16 opccs, UINT16 oiaccs)
void rdp_write_gdiplus_cache_chunk_size(wStream* s, UINT16 gccs, UINT16 obccs, UINT16 opccs, UINT16 oiaccs)
{
stream_write_UINT16(s, gccs); /* gdipGraphicsCacheChunkSize (2 bytes) */
stream_write_UINT16(s, obccs); /* gdipObjectBrushCacheChunkSize (2 bytes) */
@ -1886,14 +1886,14 @@ void rdp_write_gdiplus_cache_chunk_size(STREAM* s, UINT16 gccs, UINT16 obccs, UI
stream_write_UINT16(s, oiaccs); /* gdipObjectImageAttributesCacheChunkSize (2 bytes) */
}
void rdp_write_gdiplus_image_cache_properties(STREAM* s, UINT16 oiccs, UINT16 oicts, UINT16 oicms)
void rdp_write_gdiplus_image_cache_properties(wStream* s, UINT16 oiccs, UINT16 oicts, UINT16 oicms)
{
stream_write_UINT16(s, oiccs); /* gdipObjectImageCacheChunkSize (2 bytes) */
stream_write_UINT16(s, oicts); /* gdipObjectImageCacheTotalSize (2 bytes) */
stream_write_UINT16(s, oicms); /* gdipObjectImageCacheMaxSize (2 bytes) */
}
BOOL rdp_print_draw_nine_grid_cache_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_draw_nine_grid_cache_capability_set(wStream* s, UINT16 length)
{
UINT32 drawNineGridSupportLevel;
UINT16 DrawNineGridCacheSize;
@ -1919,7 +1919,7 @@ BOOL rdp_print_draw_nine_grid_cache_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_draw_gdiplus_cache_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT32 drawGDIPlusSupportLevel;
UINT32 drawGdiplusCacheLevel;
@ -1950,7 +1950,7 @@ BOOL rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, UINT16 length, rdpSet
* @param settings settings
*/
void rdp_write_draw_gdiplus_cache_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_draw_gdiplus_cache_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT32 drawGDIPlusSupportLevel;
@ -1971,7 +1971,7 @@ void rdp_write_draw_gdiplus_cache_capability_set(STREAM* s, rdpSettings* setting
rdp_capability_set_finish(s, header, CAPSET_TYPE_DRAW_GDI_PLUS);
}
BOOL rdp_print_draw_gdiplus_cache_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_draw_gdiplus_cache_capability_set(wStream* s, UINT16 length)
{
UINT32 drawGdiPlusSupportLevel;
UINT32 GdipVersion;
@ -2000,7 +2000,7 @@ BOOL rdp_print_draw_gdiplus_cache_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_remote_programs_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_remote_programs_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT32 railSupportLevel;
@ -2027,7 +2027,7 @@ BOOL rdp_read_remote_programs_capability_set(STREAM* s, UINT16 length, rdpSettin
* @param settings settings
*/
void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_remote_programs_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT32 railSupportLevel;
@ -2044,7 +2044,7 @@ void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_RAIL);
}
BOOL rdp_print_remote_programs_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_remote_programs_capability_set(wStream* s, UINT16 length)
{
UINT32 railSupportLevel;
@ -2068,7 +2068,7 @@ BOOL rdp_print_remote_programs_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_window_list_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_window_list_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 11)
return FALSE;
@ -2087,7 +2087,7 @@ BOOL rdp_read_window_list_capability_set(STREAM* s, UINT16 length, rdpSettings*
* @param settings settings
*/
void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_window_list_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT32 wndSupportLevel;
@ -2103,7 +2103,7 @@ void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_WINDOW);
}
BOOL rdp_print_window_list_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_window_list_capability_set(wStream* s, UINT16 length)
{
UINT32 wndSupportLevel;
BYTE numIconCaches;
@ -2133,7 +2133,7 @@ BOOL rdp_print_window_list_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_desktop_composition_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_desktop_composition_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 6)
return FALSE;
@ -2150,7 +2150,7 @@ BOOL rdp_read_desktop_composition_capability_set(STREAM* s, UINT16 length, rdpSe
* @param settings settings
*/
void rdp_write_desktop_composition_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_desktop_composition_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT16 compDeskSupportLevel;
@ -2164,7 +2164,7 @@ void rdp_write_desktop_composition_capability_set(STREAM* s, rdpSettings* settin
rdp_capability_set_finish(s, header, CAPSET_TYPE_COMP_DESK);
}
BOOL rdp_print_desktop_composition_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_desktop_composition_capability_set(wStream* s, UINT16 length)
{
UINT16 compDeskSupportLevel;
@ -2188,7 +2188,7 @@ BOOL rdp_print_desktop_composition_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_multifragment_update_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_multifragment_update_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
UINT32 multifragMaxRequestSize;
if (length < 8)
@ -2208,7 +2208,7 @@ BOOL rdp_read_multifragment_update_capability_set(STREAM* s, UINT16 length, rdpS
* @param settings settings
*/
void rdp_write_multifragment_update_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_multifragment_update_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
@ -2219,7 +2219,7 @@ void rdp_write_multifragment_update_capability_set(STREAM* s, rdpSettings* setti
rdp_capability_set_finish(s, header, CAPSET_TYPE_MULTI_FRAGMENT_UPDATE);
}
BOOL rdp_print_multifragment_update_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_multifragment_update_capability_set(wStream* s, UINT16 length)
{
UINT32 maxRequestSize;
@ -2243,7 +2243,7 @@ BOOL rdp_print_multifragment_update_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_large_pointer_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_large_pointer_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 6)
return FALSE;
@ -2260,7 +2260,7 @@ BOOL rdp_read_large_pointer_capability_set(STREAM* s, UINT16 length, rdpSettings
* @param settings settings
*/
void rdp_write_large_pointer_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_large_pointer_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT16 largePointerSupportFlags;
@ -2274,7 +2274,7 @@ void rdp_write_large_pointer_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_LARGE_POINTER);
}
BOOL rdp_print_large_pointer_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_large_pointer_capability_set(wStream* s, UINT16 length)
{
UINT16 largePointerSupportFlags;
@ -2298,7 +2298,7 @@ BOOL rdp_print_large_pointer_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_surface_commands_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_surface_commands_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 12)
return FALSE;
@ -2318,7 +2318,7 @@ BOOL rdp_read_surface_commands_capability_set(STREAM* s, UINT16 length, rdpSetti
* @param settings settings
*/
void rdp_write_surface_commands_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_surface_commands_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT32 cmdFlags;
@ -2335,7 +2335,7 @@ void rdp_write_surface_commands_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_SURFACE_COMMANDS);
}
BOOL rdp_print_surface_commands_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_surface_commands_capability_set(wStream* s, UINT16 length)
{
UINT32 cmdFlags;
UINT32 reserved;
@ -2354,7 +2354,7 @@ BOOL rdp_print_surface_commands_capability_set(STREAM* s, UINT16 length)
return TRUE;
}
void rdp_read_bitmap_codec_guid(STREAM* s, GUID* guid)
void rdp_read_bitmap_codec_guid(wStream* s, GUID* guid)
{
BYTE g[16];
@ -2373,7 +2373,7 @@ void rdp_read_bitmap_codec_guid(STREAM* s, GUID* guid)
guid->Data4[7] = g[15];
}
void rdp_write_bitmap_codec_guid(STREAM* s, GUID* guid)
void rdp_write_bitmap_codec_guid(wStream* s, GUID* guid)
{
BYTE g[16];
@ -2431,7 +2431,7 @@ char* rdp_get_bitmap_codec_guid_name(GUID* guid)
* @return if the operation completed successfully
*/
BOOL rdp_read_bitmap_codecs_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_bitmap_codecs_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
GUID codecGuid;
RPC_STATUS rpc_status;
@ -2501,7 +2501,7 @@ BOOL rdp_read_bitmap_codecs_capability_set(STREAM* s, UINT16 length, rdpSettings
* @param s stream
* @param settings settings
*/
void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings)
void rdp_write_rfx_client_capability_container(wStream* s, rdpSettings* settings)
{
UINT32 captureFlags;
BYTE codecMode;
@ -2551,7 +2551,7 @@ void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings)
* @param s stream
* @param settings settings
*/
void rdp_write_nsc_client_capability_container(STREAM* s, rdpSettings* settings)
void rdp_write_nsc_client_capability_container(wStream* s, rdpSettings* settings)
{
stream_write_UINT16(s, 3); /* codecPropertiesLength */
@ -2561,7 +2561,7 @@ void rdp_write_nsc_client_capability_container(STREAM* s, rdpSettings* settings)
stream_write_BYTE(s, 3); /* colorLossLevel */
}
void rdp_write_jpeg_client_capability_container(STREAM* s, rdpSettings* settings)
void rdp_write_jpeg_client_capability_container(wStream* s, rdpSettings* settings)
{
stream_write_UINT16(s, 1); /* codecPropertiesLength */
stream_write_BYTE(s, settings->JpegQuality);
@ -2572,13 +2572,13 @@ void rdp_write_jpeg_client_capability_container(STREAM* s, rdpSettings* settings
* @param s stream
* @param settings settings
*/
void rdp_write_rfx_server_capability_container(STREAM* s, rdpSettings* settings)
void rdp_write_rfx_server_capability_container(wStream* s, rdpSettings* settings)
{
stream_write_UINT16(s, 4); /* codecPropertiesLength */
stream_write_UINT32(s, 0); /* reserved */
}
void rdp_write_jpeg_server_capability_container(STREAM* s, rdpSettings* settings)
void rdp_write_jpeg_server_capability_container(wStream* s, rdpSettings* settings)
{
stream_write_UINT16(s, 1); /* codecPropertiesLength */
stream_write_BYTE(s, 75);
@ -2589,7 +2589,7 @@ void rdp_write_jpeg_server_capability_container(STREAM* s, rdpSettings* settings
* @param s stream
* @param settings settings
*/
void rdp_write_nsc_server_capability_container(STREAM* s, rdpSettings* settings)
void rdp_write_nsc_server_capability_container(wStream* s, rdpSettings* settings)
{
stream_write_UINT16(s, 4); /* codecPropertiesLength */
stream_write_UINT32(s, 0); /* reserved */
@ -2602,7 +2602,7 @@ void rdp_write_nsc_server_capability_container(STREAM* s, rdpSettings* settings)
* @param settings settings
*/
void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_bitmap_codecs_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
BYTE bitmapCodecCount;
@ -2692,7 +2692,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CODECS);
}
BOOL rdp_print_bitmap_codecs_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_bitmap_codecs_capability_set(wStream* s, UINT16 length)
{
GUID codecGuid;
BYTE bitmapCodecCount;
@ -2748,7 +2748,7 @@ BOOL rdp_print_bitmap_codecs_capability_set(STREAM* s, UINT16 length)
* @return if the operation completed successfully
*/
BOOL rdp_read_frame_acknowledge_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_frame_acknowledge_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
if (length < 8)
return FALSE;
@ -2770,7 +2770,7 @@ BOOL rdp_read_frame_acknowledge_capability_set(STREAM* s, UINT16 length, rdpSett
* @param settings settings
*/
void rdp_write_frame_acknowledge_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_frame_acknowledge_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
UINT32 frame_acknowledge;
@ -2783,7 +2783,7 @@ void rdp_write_frame_acknowledge_capability_set(STREAM* s, rdpSettings* settings
rdp_capability_set_finish(s, header, CAPSET_TYPE_FRAME_ACKNOWLEDGE);
}
BOOL rdp_print_frame_acknowledge_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_frame_acknowledge_capability_set(wStream* s, UINT16 length)
{
UINT32 frameAcknowledge;
@ -2799,7 +2799,7 @@ BOOL rdp_print_frame_acknowledge_capability_set(STREAM* s, UINT16 length)
return TRUE;
}
BOOL rdp_read_bitmap_cache_v3_codec_id_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
BOOL rdp_read_bitmap_cache_v3_codec_id_capability_set(wStream* s, UINT16 length, rdpSettings* settings)
{
BYTE bitmapCacheV3CodecId;
@ -2811,7 +2811,7 @@ BOOL rdp_read_bitmap_cache_v3_codec_id_capability_set(STREAM* s, UINT16 length,
return TRUE;
}
void rdp_write_bitmap_cache_v3_codec_id_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_bitmap_cache_v3_codec_id_capability_set(wStream* s, rdpSettings* settings)
{
BYTE* header;
@ -2820,7 +2820,7 @@ void rdp_write_bitmap_cache_v3_codec_id_capability_set(STREAM* s, rdpSettings* s
rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CACHE_V3_CODEC_ID);
}
BOOL rdp_print_bitmap_cache_v3_codec_id_capability_set(STREAM* s, UINT16 length)
BOOL rdp_print_bitmap_cache_v3_codec_id_capability_set(wStream* s, UINT16 length)
{
BYTE bitmapCacheV3CodecId;
@ -2836,7 +2836,7 @@ BOOL rdp_print_bitmap_cache_v3_codec_id_capability_set(STREAM* s, UINT16 length)
return TRUE;
}
BOOL rdp_print_capability_sets(STREAM* s, UINT16 numberCapabilities, BOOL receiving)
BOOL rdp_print_capability_sets(wStream* s, UINT16 numberCapabilities, BOOL receiving)
{
UINT16 type;
UINT16 length;
@ -3023,7 +3023,7 @@ BOOL rdp_print_capability_sets(STREAM* s, UINT16 numberCapabilities, BOOL receiv
return TRUE;
}
BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, UINT16 numberCapabilities)
BOOL rdp_read_capability_sets(wStream* s, rdpSettings* settings, UINT16 numberCapabilities)
{
BYTE* mark;
UINT16 count;
@ -3222,7 +3222,7 @@ BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, UINT16 numberCap
return TRUE;
}
BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_demand_active(rdpRdp* rdp, wStream* s)
{
UINT16 length;
UINT16 channelId;
@ -3300,7 +3300,7 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
return TRUE;
}
void rdp_write_demand_active(STREAM* s, rdpSettings* settings)
void rdp_write_demand_active(wStream* s, rdpSettings* settings)
{
BYTE *bm, *em, *lm;
UINT16 numberCapabilities;
@ -3362,7 +3362,7 @@ void rdp_write_demand_active(STREAM* s, rdpSettings* settings)
BOOL rdp_send_demand_active(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = rdp_pdu_init(rdp);
@ -3373,7 +3373,7 @@ BOOL rdp_send_demand_active(rdpRdp* rdp)
return rdp_send_pdu(rdp, s, PDU_TYPE_DEMAND_ACTIVE, rdp->mcs->user_id);
}
BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_confirm_active(rdpRdp* rdp, wStream* s)
{
UINT16 length;
UINT16 channelId;
@ -3432,7 +3432,7 @@ BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s)
return rdp_read_capability_sets(s, rdp->settings, numberCapabilities);
}
void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
void rdp_write_confirm_active(wStream* s, rdpSettings* settings)
{
BYTE *bm, *em, *lm;
UINT16 numberCapabilities;
@ -3565,7 +3565,7 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
BOOL rdp_send_confirm_active(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = rdp_pdu_init(rdp);

View File

@ -164,11 +164,11 @@
#define CLW_ENTROPY_RLGR1 0x01
#define CLW_ENTROPY_RLGR3 0x04
BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s);
void rdp_write_demand_active(STREAM* s, rdpSettings* settings);
BOOL rdp_recv_demand_active(rdpRdp* rdp, wStream* s);
void rdp_write_demand_active(wStream* s, rdpSettings* settings);
BOOL rdp_send_demand_active(rdpRdp* rdp);
BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s);
void rdp_write_confirm_active(STREAM* s, rdpSettings* settings);
BOOL rdp_recv_confirm_active(rdpRdp* rdp, wStream* s);
void rdp_write_confirm_active(wStream* s, rdpSettings* settings);
BOOL rdp_send_confirm_active(rdpRdp* rdp);
#endif /* __CAPABILITIES_H */

View File

@ -154,7 +154,7 @@ static const char *certificate_read_errors[] = {
BOOL certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info)
{
STREAM* s;
wStream* s;
int length;
BYTE padding;
UINT32 version;
@ -319,7 +319,7 @@ void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain)
}
}
static BOOL certificate_process_server_public_key(rdpCertificate* certificate, STREAM* s, UINT32 length)
static BOOL certificate_process_server_public_key(rdpCertificate* certificate, wStream* s, UINT32 length)
{
BYTE magic[4];
UINT32 keylen;
@ -355,7 +355,7 @@ static BOOL certificate_process_server_public_key(rdpCertificate* certificate, S
}
static BOOL certificate_process_server_public_signature(rdpCertificate* certificate,
const BYTE* sigdata, int sigdatalen, STREAM* s, UINT32 siglen)
const BYTE* sigdata, int sigdatalen, wStream* s, UINT32 siglen)
{
int i, sum;
CryptoMd5 md5ctx;
@ -416,7 +416,7 @@ static BOOL certificate_process_server_public_signature(rdpCertificate* certific
* @param s stream
*/
BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s)
BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, wStream* s)
{
UINT32 dwSigAlgId;
UINT32 dwKeyAlgId;
@ -496,7 +496,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate
* @param s stream
*/
BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, STREAM* s)
BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, wStream* s)
{
int i;
UINT32 certLength;
@ -560,7 +560,7 @@ BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate,
int certificate_read_server_certificate(rdpCertificate* certificate, BYTE* server_cert, int length)
{
STREAM* s;
wStream* s;
UINT32 dwVersion;
int status = 1;

View File

@ -47,8 +47,8 @@ BOOL certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info);
rdpX509CertChain* certificate_new_x509_certificate_chain(UINT32 count);
void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain);
BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s);
BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, STREAM* s);
BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, wStream* s);
BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, wStream* s);
int certificate_read_server_certificate(rdpCertificate* certificate, BYTE* server_cert, int length);
rdpCertificate* certificate_new(void);

View File

@ -35,7 +35,7 @@
BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size)
{
STREAM* s;
wStream* s;
UINT32 flags;
int i, left;
int chunk_size;
@ -93,7 +93,7 @@ BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size)
return TRUE;
}
BOOL freerdp_channel_process(freerdp* instance, STREAM* s, UINT16 channel_id)
BOOL freerdp_channel_process(freerdp* instance, wStream* s, UINT16 channel_id)
{
UINT32 length;
UINT32 flags;
@ -112,7 +112,7 @@ BOOL freerdp_channel_process(freerdp* instance, STREAM* s, UINT16 channel_id)
return TRUE;
}
BOOL freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, UINT16 channel_id)
BOOL freerdp_channel_peer_process(freerdp_peer* client, wStream* s, UINT16 channel_id)
{
UINT32 length;
UINT32 flags;

View File

@ -21,7 +21,7 @@
#define __CHANNEL_H
BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size);
BOOL freerdp_channel_process(freerdp* instance, STREAM* s, UINT16 channel_id);
BOOL freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, UINT16 channel_id);
BOOL freerdp_channel_process(freerdp* instance, wStream* s, UINT16 channel_id);
BOOL freerdp_channel_peer_process(freerdp_peer* client, wStream* s, UINT16 channel_id);
#endif /* __CHANNEL_H */

View File

@ -254,7 +254,7 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp)
{
BYTE* mod;
BYTE* exp;
STREAM* s;
wStream* s;
UINT32 length;
UINT32 key_len;
BYTE crypt_client_random[256 + 8];
@ -316,7 +316,7 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp)
return TRUE;
}
static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s)
static BOOL rdp_server_establish_keys(rdpRdp* rdp, wStream* s)
{
BYTE client_random[64]; /* Should be only 32 after successful decryption, but on failure might take up to 64 bytes. */
BYTE crypt_client_random[256 + 8];
@ -394,7 +394,7 @@ static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_client_connect_mcs_connect_response(rdpRdp* rdp, STREAM* s)
BOOL rdp_client_connect_mcs_connect_response(rdpRdp* rdp, wStream* s)
{
if (!mcs_recv_connect_response(rdp->mcs, s))
{
@ -413,7 +413,7 @@ BOOL rdp_client_connect_mcs_connect_response(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s)
BOOL rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, wStream* s)
{
if (!mcs_recv_attach_user_confirm(rdp->mcs, s))
return FALSE;
@ -426,7 +426,7 @@ BOOL rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s)
BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, wStream* s)
{
int i;
UINT16 channel_id;
@ -497,7 +497,7 @@ BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_client_connect_license(rdpRdp* rdp, STREAM* s)
BOOL rdp_client_connect_license(rdpRdp* rdp, wStream* s)
{
if (!license_recv(rdp->license, s))
return FALSE;
@ -516,7 +516,7 @@ BOOL rdp_client_connect_license(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s)
BOOL rdp_client_connect_demand_active(rdpRdp* rdp, wStream* s)
{
BYTE* mark;
UINT16 width;
@ -583,7 +583,7 @@ BOOL rdp_client_connect_finalize(rdpRdp* rdp)
return TRUE;
}
BOOL rdp_server_accept_nego(rdpRdp* rdp, STREAM* s)
BOOL rdp_server_accept_nego(rdpRdp* rdp, wStream* s)
{
BOOL status;
rdpSettings* settings = rdp->settings;
@ -646,7 +646,7 @@ BOOL rdp_server_accept_nego(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s)
BOOL rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, wStream* s)
{
int i;
@ -670,7 +670,7 @@ BOOL rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, STREAM* s)
BOOL rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, wStream* s)
{
if (!mcs_recv_erect_domain_request(rdp->mcs, s))
return FALSE;
@ -680,7 +680,7 @@ BOOL rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s)
BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, wStream* s)
{
if (!mcs_recv_attach_user_request(rdp->mcs, s))
return FALSE;
@ -693,7 +693,7 @@ BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s)
BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, wStream* s)
{
int i;
UINT16 channel_id;
@ -725,7 +725,7 @@ BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_server_accept_client_keys(rdpRdp* rdp, STREAM* s)
BOOL rdp_server_accept_client_keys(rdpRdp* rdp, wStream* s)
{
if (!rdp_server_establish_keys(rdp, s))
@ -736,7 +736,7 @@ BOOL rdp_server_accept_client_keys(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s)
BOOL rdp_server_accept_client_info(rdpRdp* rdp, wStream* s)
{
if (!rdp_recv_client_info(rdp, s))
@ -750,7 +750,7 @@ BOOL rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s)
BOOL rdp_server_accept_confirm_active(rdpRdp* rdp, wStream* s)
{
if (!rdp_recv_confirm_active(rdp, s))
return FALSE;

View File

@ -46,21 +46,21 @@ enum CONNECTION_STATE
BOOL rdp_client_connect(rdpRdp* rdp);
BOOL rdp_client_redirect(rdpRdp* rdp);
BOOL rdp_client_connect_mcs_connect_response(rdpRdp* rdp, STREAM* s);
BOOL rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s);
BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s);
BOOL rdp_client_connect_license(rdpRdp* rdp, STREAM* s);
BOOL rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s);
BOOL rdp_client_connect_mcs_connect_response(rdpRdp* rdp, wStream* s);
BOOL rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, wStream* s);
BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, wStream* s);
BOOL rdp_client_connect_license(rdpRdp* rdp, wStream* s);
BOOL rdp_client_connect_demand_active(rdpRdp* rdp, wStream* s);
BOOL rdp_client_connect_finalize(rdpRdp* rdp);
BOOL rdp_server_accept_nego(rdpRdp* rdp, STREAM* s);
BOOL rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s);
BOOL rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, STREAM* s);
BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s);
BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s);
BOOL rdp_server_accept_client_keys(rdpRdp* rdp, STREAM* s);
BOOL rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s);
BOOL rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s);
BOOL rdp_server_accept_nego(rdpRdp* rdp, wStream* s);
BOOL rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, wStream* s);
BOOL rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, wStream* s);
BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, wStream* s);
BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, wStream* s);
BOOL rdp_server_accept_client_keys(rdpRdp* rdp, wStream* s);
BOOL rdp_server_accept_client_info(rdpRdp* rdp, wStream* s);
BOOL rdp_server_accept_confirm_active(rdpRdp* rdp, wStream* s);
BOOL rdp_server_reactivate(rdpRdp* rdp);
#endif /* __CONNECTION_H */

View File

@ -72,7 +72,7 @@ static const char* const FASTPATH_UPDATETYPE_STRINGS[] =
* This function assumes that at least two bytes are available in the stream
* and doesn't touch third byte.
*/
UINT16 fastpath_header_length(STREAM* s)
UINT16 fastpath_header_length(wStream* s)
{
BYTE length1;
@ -89,7 +89,7 @@ UINT16 fastpath_header_length(STREAM* s)
* @param encryptionFlags
* @return length
*/
UINT16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s)
UINT16 fastpath_read_header(rdpFastPath* fastpath, wStream* s)
{
BYTE header;
UINT16 length;
@ -107,7 +107,7 @@ UINT16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s)
return length;
}
static INLINE void fastpath_read_update_header(STREAM* s, BYTE* updateCode, BYTE* fragmentation, BYTE* compression)
static INLINE void fastpath_read_update_header(wStream* s, BYTE* updateCode, BYTE* fragmentation, BYTE* compression)
{
BYTE updateHeader;
@ -117,7 +117,7 @@ static INLINE void fastpath_read_update_header(STREAM* s, BYTE* updateCode, BYTE
*compression = (updateHeader >> 6) & 0x03;
}
static INLINE void fastpath_write_update_header(STREAM* s, BYTE updateCode, BYTE fragmentation, BYTE compression)
static INLINE void fastpath_write_update_header(wStream* s, BYTE updateCode, BYTE fragmentation, BYTE compression)
{
BYTE updateHeader = 0;
@ -127,7 +127,7 @@ static INLINE void fastpath_write_update_header(STREAM* s, BYTE updateCode, BYTE
stream_write_BYTE(s, updateHeader);
}
BOOL fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s, UINT16 *length)
BOOL fastpath_read_header_rdp(rdpFastPath* fastpath, wStream* s, UINT16 *length)
{
BYTE header;
@ -146,7 +146,7 @@ BOOL fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s, UINT16 *length)
return TRUE;
}
static BOOL fastpath_recv_orders(rdpFastPath* fastpath, STREAM* s)
static BOOL fastpath_recv_orders(rdpFastPath* fastpath, wStream* s)
{
rdpUpdate* update = fastpath->rdp->update;
UINT16 numberOrders;
@ -163,7 +163,7 @@ static BOOL fastpath_recv_orders(rdpFastPath* fastpath, STREAM* s)
return TRUE;
}
static BOOL fastpath_recv_update_common(rdpFastPath* fastpath, STREAM* s)
static BOOL fastpath_recv_update_common(rdpFastPath* fastpath, wStream* s)
{
UINT16 updateType;
rdpUpdate* update = fastpath->rdp->update;
@ -190,7 +190,7 @@ static BOOL fastpath_recv_update_common(rdpFastPath* fastpath, STREAM* s)
return TRUE;
}
static BOOL fastpath_recv_update_synchronize(rdpFastPath* fastpath, STREAM* s)
static BOOL fastpath_recv_update_synchronize(rdpFastPath* fastpath, wStream* s)
{
/* server 2008 can send invalid synchronize packet with missing padding,
so don't return FALSE even if the packet is invalid */
@ -198,7 +198,7 @@ static BOOL fastpath_recv_update_synchronize(rdpFastPath* fastpath, STREAM* s)
return TRUE;
}
static int fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, UINT32 size, STREAM* s)
static int fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, UINT32 size, wStream* s)
{
int status = 0;
rdpUpdate* update = fastpath->rdp->update;
@ -276,7 +276,7 @@ static int fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, UINT32 s
return status;
}
static int fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s)
static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
{
int status;
UINT16 size;
@ -286,8 +286,8 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s)
BYTE fragmentation;
BYTE compression;
BYTE compressionFlags;
STREAM* update_stream;
STREAM* comp_stream;
wStream* update_stream;
wStream* comp_stream;
rdpRdp* rdp;
UINT32 roff;
UINT32 rlen;
@ -370,7 +370,7 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s)
return status;
}
int fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s)
int fastpath_recv_updates(rdpFastPath* fastpath, wStream* s)
{
int status = 0;
rdpUpdate* update = fastpath->rdp->update;
@ -388,7 +388,7 @@ int fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s)
return status;
}
static BOOL fastpath_read_input_event_header(STREAM* s, BYTE* eventFlags, BYTE* eventCode)
static BOOL fastpath_read_input_event_header(wStream* s, BYTE* eventFlags, BYTE* eventCode)
{
BYTE eventHeader;
@ -403,7 +403,7 @@ static BOOL fastpath_read_input_event_header(STREAM* s, BYTE* eventFlags, BYTE*
return TRUE;
}
static BOOL fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags)
static BOOL fastpath_recv_input_event_scancode(rdpFastPath* fastpath, wStream* s, BYTE eventFlags)
{
UINT16 flags;
UINT16 code;
@ -427,7 +427,7 @@ static BOOL fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s,
return TRUE;
}
static BOOL fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags)
static BOOL fastpath_recv_input_event_mouse(rdpFastPath* fastpath, wStream* s, BYTE eventFlags)
{
UINT16 pointerFlags;
UINT16 xPos;
@ -445,7 +445,7 @@ static BOOL fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s, BY
return TRUE;
}
static BOOL fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags)
static BOOL fastpath_recv_input_event_mousex(rdpFastPath* fastpath, wStream* s, BYTE eventFlags)
{
UINT16 pointerFlags;
UINT16 xPos;
@ -463,14 +463,14 @@ static BOOL fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s, B
return TRUE;
}
static BOOL fastpath_recv_input_event_sync(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags)
static BOOL fastpath_recv_input_event_sync(rdpFastPath* fastpath, wStream* s, BYTE eventFlags)
{
IFCALL(fastpath->rdp->input->SynchronizeEvent, fastpath->rdp->input, eventFlags);
return TRUE;
}
static BOOL fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags)
static BOOL fastpath_recv_input_event_unicode(rdpFastPath* fastpath, wStream* s, BYTE eventFlags)
{
UINT16 unicodeCode;
UINT16 flags;
@ -491,7 +491,7 @@ static BOOL fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s,
return TRUE;
}
static BOOL fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s)
static BOOL fastpath_recv_input_event(rdpFastPath* fastpath, wStream* s)
{
BYTE eventFlags;
BYTE eventCode;
@ -534,7 +534,7 @@ static BOOL fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s)
return TRUE;
}
int fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s)
int fastpath_recv_inputs(rdpFastPath* fastpath, wStream* s)
{
BYTE i;
@ -575,10 +575,10 @@ static UINT32 fastpath_get_sec_bytes(rdpRdp* rdp)
return sec_bytes;
}
STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, BYTE eventFlags, BYTE eventCode)
wStream* fastpath_input_pdu_init(rdpFastPath* fastpath, BYTE eventFlags, BYTE eventCode)
{
rdpRdp *rdp;
STREAM* s;
wStream* s;
rdp = fastpath->rdp;
@ -594,7 +594,7 @@ STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, BYTE eventFlags, BYTE eve
return s;
}
BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s)
BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, wStream* s)
{
rdpRdp *rdp;
UINT16 length;
@ -651,9 +651,9 @@ BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s)
return TRUE;
}
STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath)
wStream* fastpath_update_pdu_init(rdpFastPath* fastpath)
{
STREAM* s;
wStream* s;
s = transport_send_stream_init(fastpath->rdp->transport, FASTPATH_MAX_PACKET_SIZE);
stream_seek(s, 3); /* fpOutputHeader, length1 and length2 */
stream_seek(s, fastpath_get_sec_bytes(fastpath->rdp));
@ -661,7 +661,7 @@ STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath)
return s;
}
BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s)
BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, wStream* s)
{
rdpRdp* rdp;
BYTE* bm;
@ -683,9 +683,9 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s)
UINT32 totalLength;
BYTE fragmentation;
BYTE header;
STREAM* update;
STREAM* comp_update;
STREAM* ls;
wStream* update;
wStream* comp_update;
wStream* ls;
result = TRUE;
rdp = fastpath->rdp;

View File

@ -99,20 +99,20 @@ struct rdp_fastpath
rdpRdp* rdp;
BYTE encryptionFlags;
BYTE numberEvents;
STREAM* updateData;
wStream* updateData;
};
UINT16 fastpath_header_length(STREAM* s);
UINT16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s);
BOOL fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s, UINT16 *length);
int fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s);
int fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s);
UINT16 fastpath_header_length(wStream* s);
UINT16 fastpath_read_header(rdpFastPath* fastpath, wStream* s);
BOOL fastpath_read_header_rdp(rdpFastPath* fastpath, wStream* s, UINT16 *length);
int fastpath_recv_updates(rdpFastPath* fastpath, wStream* s);
int fastpath_recv_inputs(rdpFastPath* fastpath, wStream* s);
STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, BYTE eventFlags, BYTE eventCode);
BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s);
wStream* fastpath_input_pdu_init(rdpFastPath* fastpath, BYTE eventFlags, BYTE eventCode);
BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, wStream* s);
STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath);
BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s);
wStream* fastpath_update_pdu_init(rdpFastPath* fastpath);
BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, wStream* s);
BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, UINT16 frameAction, UINT32 frameId);

View File

@ -119,7 +119,7 @@ BOOL freerdp_connect(freerdp* instance)
if (instance->settings->PlayRemoteFx)
{
STREAM* s;
wStream* s;
rdpUpdate* update;
pcap_record record;

View File

@ -137,7 +137,7 @@ BYTE h221_sc_key[4] = "McDn";
* @param settings rdp settings
*/
BOOL gcc_read_conference_create_request(STREAM* s, rdpSettings* settings)
BOOL gcc_read_conference_create_request(wStream* s, rdpSettings* settings)
{
UINT16 length;
BYTE choice;
@ -194,7 +194,7 @@ BOOL gcc_read_conference_create_request(STREAM* s, rdpSettings* settings)
* @param user_data client data blocks
*/
void gcc_write_conference_create_request(STREAM* s, STREAM* user_data)
void gcc_write_conference_create_request(wStream* s, wStream* user_data)
{
/* ConnectData */
per_write_choice(s, 0); /* From Key select object (0) of type OBJECT_IDENTIFIER */
@ -222,7 +222,7 @@ void gcc_write_conference_create_request(STREAM* s, STREAM* user_data)
per_write_octet_string(s, user_data->buffer, stream_get_length(user_data), 0); /* array of client data blocks */
}
BOOL gcc_read_conference_create_response(STREAM* s, rdpSettings* settings)
BOOL gcc_read_conference_create_response(wStream* s, rdpSettings* settings)
{
UINT16 length;
UINT32 tag;
@ -271,7 +271,7 @@ BOOL gcc_read_conference_create_response(STREAM* s, rdpSettings* settings)
return TRUE;
}
void gcc_write_conference_create_response(STREAM* s, STREAM* user_data)
void gcc_write_conference_create_response(wStream* s, wStream* user_data)
{
/* ConnectData */
per_write_choice(s, 0);
@ -305,7 +305,7 @@ void gcc_write_conference_create_response(STREAM* s, STREAM* user_data)
per_write_octet_string(s, user_data->buffer, stream_get_length(user_data), 0); /* array of server data blocks */
}
BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings* settings, int length)
BOOL gcc_read_client_data_blocks(wStream* s, rdpSettings* settings, int length)
{
UINT16 type;
UINT16 blockLength;
@ -355,7 +355,7 @@ BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings* settings, int length)
return TRUE;
}
void gcc_write_client_data_blocks(STREAM* s, rdpSettings* settings)
void gcc_write_client_data_blocks(wStream* s, rdpSettings* settings)
{
gcc_write_client_core_data(s, settings);
gcc_write_client_cluster_data(s, settings);
@ -390,7 +390,7 @@ void gcc_write_client_data_blocks(STREAM* s, rdpSettings* settings)
}
}
BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings* settings, int length)
BOOL gcc_read_server_data_blocks(wStream* s, rdpSettings* settings, int length)
{
UINT16 type;
UINT16 offset = 0;
@ -444,14 +444,14 @@ BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings* settings, int length)
return TRUE;
}
void gcc_write_server_data_blocks(STREAM* s, rdpSettings* settings)
void gcc_write_server_data_blocks(wStream* s, rdpSettings* settings)
{
gcc_write_server_core_data(s, settings);
gcc_write_server_network_data(s, settings);
gcc_write_server_security_data(s, settings);
}
BOOL gcc_read_user_data_header(STREAM* s, UINT16* type, UINT16* length)
BOOL gcc_read_user_data_header(wStream* s, UINT16* type, UINT16* length)
{
if (stream_get_left(s) < 4)
return FALSE;
@ -473,7 +473,7 @@ BOOL gcc_read_user_data_header(STREAM* s, UINT16* type, UINT16* length)
* @param length data block length
*/
void gcc_write_user_data_header(STREAM* s, UINT16 type, UINT16 length)
void gcc_write_user_data_header(wStream* s, UINT16 type, UINT16 length)
{
stream_write_UINT16(s, type); /* type */
stream_write_UINT16(s, length); /* length */
@ -486,7 +486,7 @@ void gcc_write_user_data_header(STREAM* s, UINT16 type, UINT16 length)
* @param settings rdp settings
*/
BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
BOOL gcc_read_client_core_data(wStream* s, rdpSettings* settings, UINT16 blockLength)
{
char* str = NULL;
UINT32 version;
@ -657,7 +657,7 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen
* @param settings rdp settings
*/
void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
void gcc_write_client_core_data(wStream* s, rdpSettings* settings)
{
UINT32 version;
WCHAR* clientName = NULL;
@ -749,7 +749,7 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
stream_write_UINT32(s, settings->SelectedProtocol); /* serverSelectedProtocol */
}
BOOL gcc_read_server_core_data(STREAM* s, rdpSettings* settings)
BOOL gcc_read_server_core_data(wStream* s, rdpSettings* settings)
{
UINT32 version;
UINT32 clientRequestedProtocols;
@ -767,7 +767,7 @@ BOOL gcc_read_server_core_data(STREAM* s, rdpSettings* settings)
return TRUE;
}
void gcc_write_server_core_data(STREAM* s, rdpSettings* settings)
void gcc_write_server_core_data(wStream* s, rdpSettings* settings)
{
gcc_write_user_data_header(s, SC_CORE, 12);
@ -782,7 +782,7 @@ void gcc_write_server_core_data(STREAM* s, rdpSettings* settings)
* @param settings rdp settings
*/
BOOL gcc_read_client_security_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
BOOL gcc_read_client_security_data(wStream* s, rdpSettings* settings, UINT16 blockLength)
{
if (blockLength < 8)
return FALSE;
@ -807,7 +807,7 @@ BOOL gcc_read_client_security_data(STREAM* s, rdpSettings* settings, UINT16 bloc
* @param settings rdp settings
*/
void gcc_write_client_security_data(STREAM* s, rdpSettings* settings)
void gcc_write_client_security_data(wStream* s, rdpSettings* settings)
{
gcc_write_user_data_header(s, CS_SECURITY, 12);
@ -824,7 +824,7 @@ void gcc_write_client_security_data(STREAM* s, rdpSettings* settings)
}
}
BOOL gcc_read_server_security_data(STREAM* s, rdpSettings* settings)
BOOL gcc_read_server_security_data(wStream* s, rdpSettings* settings)
{
BYTE* data;
UINT32 length;
@ -930,7 +930,7 @@ const BYTE tssk_exponent[] =
0x5b, 0x7b, 0x88, 0xc0
};
void gcc_write_server_security_data(STREAM* s, rdpSettings* settings)
void gcc_write_server_security_data(wStream* s, rdpSettings* settings)
{
CryptoMd5 md5;
BYTE* sigData;
@ -1059,7 +1059,7 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings)
* @param settings rdp settings
*/
BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
BOOL gcc_read_client_network_data(wStream* s, rdpSettings* settings, UINT16 blockLength)
{
int i;
@ -1091,7 +1091,7 @@ BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, UINT16 block
* @param settings rdp settings
*/
void gcc_write_client_network_data(STREAM* s, rdpSettings* settings)
void gcc_write_client_network_data(wStream* s, rdpSettings* settings)
{
int i;
UINT16 length;
@ -1113,7 +1113,7 @@ void gcc_write_client_network_data(STREAM* s, rdpSettings* settings)
}
}
BOOL gcc_read_server_network_data(STREAM* s, rdpSettings* settings)
BOOL gcc_read_server_network_data(wStream* s, rdpSettings* settings)
{
int i;
UINT16 MCSChannelId;
@ -1146,7 +1146,7 @@ BOOL gcc_read_server_network_data(STREAM* s, rdpSettings* settings)
return TRUE;
}
void gcc_write_server_network_data(STREAM* s, rdpSettings* settings)
void gcc_write_server_network_data(wStream* s, rdpSettings* settings)
{
int i;
@ -1171,7 +1171,7 @@ void gcc_write_server_network_data(STREAM* s, rdpSettings* settings)
* @param settings rdp settings
*/
BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
BOOL gcc_read_client_cluster_data(wStream* s, rdpSettings* settings, UINT16 blockLength)
{
UINT32 flags;
@ -1197,7 +1197,7 @@ BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, UINT16 block
* @param settings rdp settings
*/
void gcc_write_client_cluster_data(STREAM* s, rdpSettings* settings)
void gcc_write_client_cluster_data(wStream* s, rdpSettings* settings)
{
UINT32 flags;
@ -1219,7 +1219,7 @@ void gcc_write_client_cluster_data(STREAM* s, rdpSettings* settings)
* @param settings rdp settings
*/
BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
BOOL gcc_read_client_monitor_data(wStream* s, rdpSettings* settings, UINT16 blockLength)
{
printf("CS_MONITOR\n");
return TRUE;
@ -1232,7 +1232,7 @@ BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings* settings, UINT16 block
* @param settings rdp settings
*/
void gcc_write_client_monitor_data(STREAM* s, rdpSettings* settings)
void gcc_write_client_monitor_data(wStream* s, rdpSettings* settings)
{
int i;
UINT16 length;

View File

@ -27,31 +27,31 @@
#include <freerdp/settings.h>
#include <freerdp/utils/stream.h>
BOOL gcc_read_conference_create_request(STREAM* s, rdpSettings* settings);
void gcc_write_conference_create_request(STREAM* s, STREAM* user_data);
BOOL gcc_read_conference_create_response(STREAM* s, rdpSettings* settings);
void gcc_write_conference_create_response(STREAM* s, STREAM* user_data);
BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings *settings, int length);
void gcc_write_client_data_blocks(STREAM* s, rdpSettings *settings);
BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length);
void gcc_write_server_data_blocks(STREAM* s, rdpSettings *settings);
BOOL gcc_read_user_data_header(STREAM* s, UINT16* type, UINT16* length);
void gcc_write_user_data_header(STREAM* s, UINT16 type, UINT16 length);
BOOL gcc_read_client_core_data(STREAM* s, rdpSettings *settings, UINT16 blockLength);
void gcc_write_client_core_data(STREAM* s, rdpSettings *settings);
BOOL gcc_read_server_core_data(STREAM* s, rdpSettings *settings);
void gcc_write_server_core_data(STREAM* s, rdpSettings *settings);
BOOL gcc_read_client_security_data(STREAM* s, rdpSettings *settings, UINT16 blockLength);
void gcc_write_client_security_data(STREAM* s, rdpSettings *settings);
BOOL gcc_read_server_security_data(STREAM* s, rdpSettings *settings);
void gcc_write_server_security_data(STREAM* s, rdpSettings *settings);
BOOL gcc_read_client_network_data(STREAM* s, rdpSettings *settings, UINT16 blockLength);
void gcc_write_client_network_data(STREAM* s, rdpSettings *settings);
BOOL gcc_read_server_network_data(STREAM* s, rdpSettings *settings);
void gcc_write_server_network_data(STREAM* s, rdpSettings *settings);
BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings *settings, UINT16 blockLength);
void gcc_write_client_cluster_data(STREAM* s, rdpSettings *settings);
BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings *settings, UINT16 blockLength);
void gcc_write_client_monitor_data(STREAM* s, rdpSettings *settings);
BOOL gcc_read_conference_create_request(wStream* s, rdpSettings* settings);
void gcc_write_conference_create_request(wStream* s, wStream* user_data);
BOOL gcc_read_conference_create_response(wStream* s, rdpSettings* settings);
void gcc_write_conference_create_response(wStream* s, wStream* user_data);
BOOL gcc_read_client_data_blocks(wStream* s, rdpSettings *settings, int length);
void gcc_write_client_data_blocks(wStream* s, rdpSettings *settings);
BOOL gcc_read_server_data_blocks(wStream* s, rdpSettings *settings, int length);
void gcc_write_server_data_blocks(wStream* s, rdpSettings *settings);
BOOL gcc_read_user_data_header(wStream* s, UINT16* type, UINT16* length);
void gcc_write_user_data_header(wStream* s, UINT16 type, UINT16 length);
BOOL gcc_read_client_core_data(wStream* s, rdpSettings *settings, UINT16 blockLength);
void gcc_write_client_core_data(wStream* s, rdpSettings *settings);
BOOL gcc_read_server_core_data(wStream* s, rdpSettings *settings);
void gcc_write_server_core_data(wStream* s, rdpSettings *settings);
BOOL gcc_read_client_security_data(wStream* s, rdpSettings *settings, UINT16 blockLength);
void gcc_write_client_security_data(wStream* s, rdpSettings *settings);
BOOL gcc_read_server_security_data(wStream* s, rdpSettings *settings);
void gcc_write_server_security_data(wStream* s, rdpSettings *settings);
BOOL gcc_read_client_network_data(wStream* s, rdpSettings *settings, UINT16 blockLength);
void gcc_write_client_network_data(wStream* s, rdpSettings *settings);
BOOL gcc_read_server_network_data(wStream* s, rdpSettings *settings);
void gcc_write_server_network_data(wStream* s, rdpSettings *settings);
BOOL gcc_read_client_cluster_data(wStream* s, rdpSettings *settings, UINT16 blockLength);
void gcc_write_client_cluster_data(wStream* s, rdpSettings *settings);
BOOL gcc_read_client_monitor_data(wStream* s, rdpSettings *settings, UINT16 blockLength);
void gcc_write_client_monitor_data(wStream* s, rdpSettings *settings);
#endif /* FREERDP_CORE_GCC_H */

View File

@ -49,7 +49,7 @@ static const char* const INFO_TYPE_LOGON_STRINGS[] =
* @param settings settings
*/
BOOL rdp_read_server_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
BOOL rdp_read_server_auto_reconnect_cookie(wStream* s, rdpSettings* settings)
{
ARC_SC_PRIVATE_PACKET* autoReconnectCookie;
autoReconnectCookie = settings->ServerAutoReconnectCookie;
@ -70,7 +70,7 @@ BOOL rdp_read_server_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
* @param settings settings
*/
BOOL rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
BOOL rdp_read_client_auto_reconnect_cookie(wStream* s, rdpSettings* settings)
{
ARC_CS_PRIVATE_PACKET* autoReconnectCookie;
autoReconnectCookie = settings->ClientAutoReconnectCookie;
@ -93,7 +93,7 @@ BOOL rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
* @param settings settings
*/
void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
void rdp_write_client_auto_reconnect_cookie(wStream* s, rdpSettings* settings)
{
ARC_CS_PRIVATE_PACKET* autoReconnectCookie;
autoReconnectCookie = settings->ClientAutoReconnectCookie;
@ -111,7 +111,7 @@ void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
* @param settings settings
*/
BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
BOOL rdp_read_extended_info_packet(wStream* s, rdpSettings* settings)
{
UINT16 clientAddressFamily;
UINT16 cbClientAddress;
@ -170,7 +170,7 @@ BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
* @param settings settings
*/
void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings)
void rdp_write_extended_info_packet(wStream* s, rdpSettings* settings)
{
int clientAddressFamily;
WCHAR* clientAddress = NULL;
@ -225,7 +225,7 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings)
* @param settings settings
*/
BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
BOOL rdp_read_info_packet(wStream* s, rdpSettings* settings)
{
UINT32 flags;
UINT16 cbDomain;
@ -314,7 +314,7 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
* @param settings settings
*/
void rdp_write_info_packet(STREAM* s, rdpSettings* settings)
void rdp_write_info_packet(wStream* s, rdpSettings* settings)
{
UINT32 flags;
WCHAR* domain = NULL;
@ -430,7 +430,7 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings)
* @param s stream
*/
BOOL rdp_recv_client_info(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_client_info(rdpRdp* rdp, wStream* s)
{
UINT16 length;
UINT16 channelId;
@ -473,7 +473,7 @@ BOOL rdp_recv_client_info(rdpRdp* rdp, STREAM* s)
BOOL rdp_send_client_info(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
//rdp->settings->crypt_flags |= SEC_INFO_PKT;
rdp->sec_flags |= SEC_INFO_PKT;
@ -482,7 +482,7 @@ BOOL rdp_send_client_info(rdpRdp* rdp)
return rdp_send(rdp, s, MCS_GLOBAL_CHANNEL_ID);
}
BOOL rdp_recv_logon_info_v1(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_logon_info_v1(rdpRdp* rdp, wStream* s)
{
UINT32 cbDomain;
UINT32 cbUserName;
@ -497,7 +497,7 @@ BOOL rdp_recv_logon_info_v1(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_recv_logon_info_v2(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_logon_info_v2(rdpRdp* rdp, wStream* s)
{
UINT32 cbDomain;
UINT32 cbUserName;
@ -518,7 +518,7 @@ BOOL rdp_recv_logon_info_v2(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_recv_logon_plain_notify(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_logon_plain_notify(rdpRdp* rdp, wStream* s)
{
if(stream_get_left(s) < 576)
return FALSE;
@ -526,7 +526,7 @@ BOOL rdp_recv_logon_plain_notify(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_recv_logon_error_info(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_logon_error_info(rdpRdp* rdp, wStream* s)
{
UINT32 errorNotificationType;
UINT32 errorNotificationData;
@ -538,7 +538,7 @@ BOOL rdp_recv_logon_error_info(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_recv_logon_info_extended(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_logon_info_extended(rdpRdp* rdp, wStream* s)
{
UINT32 cbFieldData;
UINT32 fieldsPresent;
@ -576,7 +576,7 @@ BOOL rdp_recv_logon_info_extended(rdpRdp* rdp, STREAM* s)
return TRUE;
}
BOOL rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_save_session_info(rdpRdp* rdp, wStream* s)
{
UINT32 infoType;

View File

@ -70,21 +70,21 @@
#define LOGON_FAILED_OTHER 0x00000002
#define LOGON_WARNING 0x00000003
void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time);
void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time);
void rdp_get_client_time_zone(STREAM* s, rdpSettings* settings);
BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings);
void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings);
BOOL rdp_read_server_auto_reconnect_cookie(STREAM* s, rdpSettings* settings);
BOOL rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings);
void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings);
void rdp_write_auto_reconnect_cookie(STREAM* s, rdpSettings* settings);
BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings);
void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings);
BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings);
void rdp_write_info_packet(STREAM* s, rdpSettings* settings);
BOOL rdp_recv_client_info(rdpRdp* rdp, STREAM* s);
void rdp_read_system_time(wStream* s, SYSTEM_TIME* system_time);
void rdp_write_system_time(wStream* s, SYSTEM_TIME* system_time);
void rdp_get_client_time_zone(wStream* s, rdpSettings* settings);
BOOL rdp_read_client_time_zone(wStream* s, rdpSettings* settings);
void rdp_write_client_time_zone(wStream* s, rdpSettings* settings);
BOOL rdp_read_server_auto_reconnect_cookie(wStream* s, rdpSettings* settings);
BOOL rdp_read_client_auto_reconnect_cookie(wStream* s, rdpSettings* settings);
void rdp_write_client_auto_reconnect_cookie(wStream* s, rdpSettings* settings);
void rdp_write_auto_reconnect_cookie(wStream* s, rdpSettings* settings);
BOOL rdp_read_extended_info_packet(wStream* s, rdpSettings* settings);
void rdp_write_extended_info_packet(wStream* s, rdpSettings* settings);
BOOL rdp_read_info_packet(wStream* s, rdpSettings* settings);
void rdp_write_info_packet(wStream* s, rdpSettings* settings);
BOOL rdp_recv_client_info(rdpRdp* rdp, wStream* s);
BOOL rdp_send_client_info(rdpRdp* rdp);
BOOL rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_save_session_info(rdpRdp* rdp, wStream* s);
#endif /* __INFO_H */

View File

@ -29,33 +29,33 @@
#include "input.h"
void rdp_write_client_input_pdu_header(STREAM* s, UINT16 number)
void rdp_write_client_input_pdu_header(wStream* s, UINT16 number)
{
stream_write_UINT16(s, 1); /* numberEvents (2 bytes) */
stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
}
void rdp_write_input_event_header(STREAM* s, UINT32 time, UINT16 type)
void rdp_write_input_event_header(wStream* s, UINT32 time, UINT16 type)
{
stream_write_UINT32(s, time); /* eventTime (4 bytes) */
stream_write_UINT16(s, type); /* messageType (2 bytes) */
}
STREAM* rdp_client_input_pdu_init(rdpRdp* rdp, UINT16 type)
wStream* rdp_client_input_pdu_init(rdpRdp* rdp, UINT16 type)
{
STREAM* s;
wStream* s;
s = rdp_data_pdu_init(rdp);
rdp_write_client_input_pdu_header(s, 1);
rdp_write_input_event_header(s, 0, type);
return s;
}
void rdp_send_client_input_pdu(rdpRdp* rdp, STREAM* s)
void rdp_send_client_input_pdu(rdpRdp* rdp, wStream* s)
{
rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_INPUT, rdp->mcs->user_id);
}
void input_write_synchronize_event(STREAM* s, UINT32 flags)
void input_write_synchronize_event(wStream* s, UINT32 flags)
{
stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
stream_write_UINT32(s, flags); /* toggleFlags (4 bytes) */
@ -63,7 +63,7 @@ void input_write_synchronize_event(STREAM* s, UINT32 flags)
void input_send_synchronize_event(rdpInput* input, UINT32 flags)
{
STREAM* s;
wStream* s;
rdpRdp* rdp = input->context->rdp;
s = rdp_client_input_pdu_init(rdp, INPUT_EVENT_SYNC);
@ -71,7 +71,7 @@ void input_send_synchronize_event(rdpInput* input, UINT32 flags)
rdp_send_client_input_pdu(rdp, s);
}
void input_write_keyboard_event(STREAM* s, UINT16 flags, UINT16 code)
void input_write_keyboard_event(wStream* s, UINT16 flags, UINT16 code)
{
stream_write_UINT16(s, flags); /* keyboardFlags (2 bytes) */
stream_write_UINT16(s, code); /* keyCode (2 bytes) */
@ -80,7 +80,7 @@ void input_write_keyboard_event(STREAM* s, UINT16 flags, UINT16 code)
void input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
{
STREAM* s;
wStream* s;
rdpRdp* rdp = input->context->rdp;
s = rdp_client_input_pdu_init(rdp, INPUT_EVENT_SCANCODE);
@ -88,7 +88,7 @@ void input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
rdp_send_client_input_pdu(rdp, s);
}
void input_write_unicode_keyboard_event(STREAM* s, UINT16 flags, UINT16 code)
void input_write_unicode_keyboard_event(wStream* s, UINT16 flags, UINT16 code)
{
stream_write_UINT16(s, flags); /* keyboardFlags (2 bytes) */
stream_write_UINT16(s, code); /* unicodeCode (2 bytes) */
@ -97,7 +97,7 @@ void input_write_unicode_keyboard_event(STREAM* s, UINT16 flags, UINT16 code)
void input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
{
STREAM* s;
wStream* s;
UINT16 keyboardFlags = 0;
rdpRdp* rdp = input->context->rdp;
@ -117,7 +117,7 @@ void input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 cod
rdp_send_client_input_pdu(rdp, s);
}
void input_write_mouse_event(STREAM* s, UINT16 flags, UINT16 x, UINT16 y)
void input_write_mouse_event(wStream* s, UINT16 flags, UINT16 x, UINT16 y)
{
stream_write_UINT16(s, flags); /* pointerFlags (2 bytes) */
stream_write_UINT16(s, x); /* xPos (2 bytes) */
@ -126,7 +126,7 @@ void input_write_mouse_event(STREAM* s, UINT16 flags, UINT16 x, UINT16 y)
void input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
{
STREAM* s;
wStream* s;
rdpRdp* rdp = input->context->rdp;
s = rdp_client_input_pdu_init(rdp, INPUT_EVENT_MOUSE);
@ -134,7 +134,7 @@ void input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
rdp_send_client_input_pdu(rdp, s);
}
void input_write_extended_mouse_event(STREAM* s, UINT16 flags, UINT16 x, UINT16 y)
void input_write_extended_mouse_event(wStream* s, UINT16 flags, UINT16 x, UINT16 y)
{
stream_write_UINT16(s, flags); /* pointerFlags (2 bytes) */
stream_write_UINT16(s, x); /* xPos (2 bytes) */
@ -143,7 +143,7 @@ void input_write_extended_mouse_event(STREAM* s, UINT16 flags, UINT16 x, UINT16
void input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
{
STREAM* s;
wStream* s;
rdpRdp* rdp = input->context->rdp;
s = rdp_client_input_pdu_init(rdp, INPUT_EVENT_MOUSEX);
@ -153,7 +153,7 @@ void input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UI
void input_send_fastpath_synchronize_event(rdpInput* input, UINT32 flags)
{
STREAM* s;
wStream* s;
rdpRdp* rdp = input->context->rdp;
/* The FastPath Synchronization eventFlags has identical values as SlowPath */
@ -163,7 +163,7 @@ void input_send_fastpath_synchronize_event(rdpInput* input, UINT32 flags)
void input_send_fastpath_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
{
STREAM* s;
wStream* s;
BYTE eventFlags = 0;
rdpRdp* rdp = input->context->rdp;
@ -176,7 +176,7 @@ void input_send_fastpath_keyboard_event(rdpInput* input, UINT16 flags, UINT16 co
void input_send_fastpath_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
{
STREAM* s;
wStream* s;
BYTE eventFlags = 0;
rdpRdp* rdp = input->context->rdp;
@ -188,7 +188,7 @@ void input_send_fastpath_unicode_keyboard_event(rdpInput* input, UINT16 flags, U
void input_send_fastpath_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
{
STREAM* s;
wStream* s;
rdpRdp* rdp = input->context->rdp;
s = fastpath_input_pdu_init(rdp->fastpath, 0, FASTPATH_INPUT_EVENT_MOUSE);
@ -198,7 +198,7 @@ void input_send_fastpath_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UI
void input_send_fastpath_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
{
STREAM* s;
wStream* s;
rdpRdp* rdp = input->context->rdp;
s = fastpath_input_pdu_init(rdp->fastpath, 0, FASTPATH_INPUT_EVENT_MOUSEX);
@ -206,7 +206,7 @@ void input_send_fastpath_extended_mouse_event(rdpInput* input, UINT16 flags, UIN
fastpath_send_input_pdu(rdp->fastpath, s);
}
static BOOL input_recv_sync_event(rdpInput* input, STREAM* s)
static BOOL input_recv_sync_event(rdpInput* input, wStream* s)
{
UINT32 toggleFlags;
@ -221,7 +221,7 @@ static BOOL input_recv_sync_event(rdpInput* input, STREAM* s)
return TRUE;
}
static BOOL input_recv_keyboard_event(rdpInput* input, STREAM* s)
static BOOL input_recv_keyboard_event(rdpInput* input, wStream* s)
{
UINT16 keyboardFlags, keyCode;
@ -237,7 +237,7 @@ static BOOL input_recv_keyboard_event(rdpInput* input, STREAM* s)
return TRUE;
}
static BOOL input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s)
static BOOL input_recv_unicode_keyboard_event(rdpInput* input, wStream* s)
{
UINT16 keyboardFlags, unicodeCode;
@ -266,7 +266,7 @@ static BOOL input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s)
return TRUE;
}
static BOOL input_recv_mouse_event(rdpInput* input, STREAM* s)
static BOOL input_recv_mouse_event(rdpInput* input, wStream* s)
{
UINT16 pointerFlags, xPos, yPos;
@ -282,7 +282,7 @@ static BOOL input_recv_mouse_event(rdpInput* input, STREAM* s)
return TRUE;
}
static BOOL input_recv_extended_mouse_event(rdpInput* input, STREAM* s)
static BOOL input_recv_extended_mouse_event(rdpInput* input, wStream* s)
{
UINT16 pointerFlags, xPos, yPos;
@ -298,7 +298,7 @@ static BOOL input_recv_extended_mouse_event(rdpInput* input, STREAM* s)
return TRUE;
}
static BOOL input_recv_event(rdpInput* input, STREAM* s)
static BOOL input_recv_event(rdpInput* input, wStream* s)
{
UINT16 messageType;
@ -345,7 +345,7 @@ static BOOL input_recv_event(rdpInput* input, STREAM* s)
return TRUE;
}
BOOL input_recv(rdpInput* input, STREAM* s)
BOOL input_recv(rdpInput* input, wStream* s)
{
UINT16 i, numberEvents;

View File

@ -49,7 +49,7 @@ void input_send_fastpath_unicode_keyboard_event(rdpInput* input, UINT16 flags, U
void input_send_fastpath_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
void input_send_fastpath_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
BOOL input_recv(rdpInput* input, STREAM* s);
BOOL input_recv(rdpInput* input, wStream* s);
int input_process_events(rdpInput* input);
void input_register_client_callbacks(rdpInput* input);

View File

@ -123,7 +123,7 @@ void license_print_scope_list(SCOPE_LIST* scopeList)
* @return if the operation completed successfully
*/
BOOL license_read_preamble(STREAM* s, BYTE* bMsgType, BYTE* flags, UINT16* wMsgSize)
BOOL license_read_preamble(wStream* s, BYTE* bMsgType, BYTE* flags, UINT16* wMsgSize)
{
/* preamble (4 bytes) */
if (stream_get_left(s) < 4)
@ -145,7 +145,7 @@ BOOL license_read_preamble(STREAM* s, BYTE* bMsgType, BYTE* flags, UINT16* wMsgS
* @param wMsgSize message size
*/
void license_write_preamble(STREAM* s, BYTE bMsgType, BYTE flags, UINT16 wMsgSize)
void license_write_preamble(wStream* s, BYTE bMsgType, BYTE flags, UINT16 wMsgSize)
{
/* preamble (4 bytes) */
stream_write_BYTE(s, bMsgType); /* bMsgType (1 byte) */
@ -159,9 +159,9 @@ void license_write_preamble(STREAM* s, BYTE bMsgType, BYTE flags, UINT16 wMsgSiz
* @return stream
*/
STREAM* license_send_stream_init(rdpLicense* license)
wStream* license_send_stream_init(rdpLicense* license)
{
STREAM* s;
wStream* s;
s = transport_send_stream_init(license->rdp->transport, 4096);
stream_seek(s, LICENSE_PACKET_HEADER_MAX_LENGTH);
@ -176,7 +176,7 @@ STREAM* license_send_stream_init(rdpLicense* license)
* @param s stream
*/
BOOL license_send(rdpLicense* license, STREAM* s, BYTE type)
BOOL license_send(rdpLicense* license, wStream* s, BYTE type)
{
int length;
BYTE flags;
@ -222,7 +222,7 @@ BOOL license_send(rdpLicense* license, STREAM* s, BYTE type)
* @return if the operation completed successfully
*/
BOOL license_recv(rdpLicense* license, STREAM* s)
BOOL license_recv(rdpLicense* license, wStream* s)
{
BYTE flags;
BYTE bMsgType;
@ -461,7 +461,7 @@ void license_decrypt_platform_challenge(rdpLicense* license)
* @param productInfo product information
*/
BOOL license_read_product_info(STREAM* s, PRODUCT_INFO* productInfo)
BOOL license_read_product_info(wStream* s, PRODUCT_INFO* productInfo)
{
if (stream_get_left(s) < 8)
return FALSE;
@ -536,7 +536,7 @@ void license_free_product_info(PRODUCT_INFO* productInfo)
* @param blob license binary blob
*/
BOOL license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob)
BOOL license_read_binary_blob(wStream* s, LICENSE_BLOB* blob)
{
UINT16 wBlobType;
@ -575,7 +575,7 @@ BOOL license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob)
* @param blob license binary blob
*/
void license_write_binary_blob(STREAM* s, LICENSE_BLOB* blob)
void license_write_binary_blob(wStream* s, LICENSE_BLOB* blob)
{
stream_write_UINT16(s, blob->type); /* wBlobType (2 bytes) */
stream_write_UINT16(s, blob->length); /* wBlobLen (2 bytes) */
@ -584,7 +584,7 @@ void license_write_binary_blob(STREAM* s, LICENSE_BLOB* blob)
stream_write(s, blob->data, blob->length); /* blobData */
}
void license_write_encrypted_premaster_secret_blob(STREAM* s, LICENSE_BLOB* blob, UINT32 ModulusLength)
void license_write_encrypted_premaster_secret_blob(wStream* s, LICENSE_BLOB* blob, UINT32 ModulusLength)
{
UINT32 length;
@ -644,7 +644,7 @@ void license_free_binary_blob(LICENSE_BLOB* blob)
* @param scopeList scope list
*/
BOOL license_read_scope_list(STREAM* s, SCOPE_LIST* scopeList)
BOOL license_read_scope_list(wStream* s, SCOPE_LIST* scopeList)
{
UINT32 i;
UINT32 scopeCount;
@ -719,7 +719,7 @@ void license_free_scope_list(SCOPE_LIST* scopeList)
* @param s stream
*/
BOOL license_read_license_request_packet(rdpLicense* license, STREAM* s)
BOOL license_read_license_request_packet(rdpLicense* license, wStream* s)
{
/* ServerRandom (32 bytes) */
if (stream_get_left(s) < 32)
@ -774,7 +774,7 @@ BOOL license_read_license_request_packet(rdpLicense* license, STREAM* s)
* @param s stream
*/
BOOL license_read_platform_challenge_packet(rdpLicense* license, STREAM* s)
BOOL license_read_platform_challenge_packet(rdpLicense* license, wStream* s)
{
BYTE MacData[16];
UINT32 ConnectFlags = 0;
@ -825,7 +825,7 @@ BOOL license_read_platform_challenge_packet(rdpLicense* license, STREAM* s)
* @param s stream
*/
void license_read_new_license_packet(rdpLicense* license, STREAM* s)
void license_read_new_license_packet(rdpLicense* license, wStream* s)
{
DEBUG_LICENSE("Receiving New License Packet");
license->state = LICENSE_STATE_COMPLETED;
@ -838,7 +838,7 @@ void license_read_new_license_packet(rdpLicense* license, STREAM* s)
* @param s stream
*/
void license_read_upgrade_license_packet(rdpLicense* license, STREAM* s)
void license_read_upgrade_license_packet(rdpLicense* license, wStream* s)
{
DEBUG_LICENSE("Receiving Upgrade License Packet");
license->state = LICENSE_STATE_COMPLETED;
@ -851,7 +851,7 @@ void license_read_upgrade_license_packet(rdpLicense* license, STREAM* s)
* @param s stream
*/
BOOL license_read_error_alert_packet(rdpLicense* license, STREAM* s)
BOOL license_read_error_alert_packet(rdpLicense* license, wStream* s)
{
UINT32 dwErrorCode;
UINT32 dwStateTransition;
@ -907,7 +907,7 @@ BOOL license_read_error_alert_packet(rdpLicense* license, STREAM* s)
* @param s stream
*/
void license_write_new_license_request_packet(rdpLicense* license, STREAM* s)
void license_write_new_license_request_packet(rdpLicense* license, wStream* s)
{
UINT32 PlatformId;
UINT32 PreferredKeyExchangeAlg = KEY_EXCHANGE_ALG_RSA;
@ -949,7 +949,7 @@ void license_write_new_license_request_packet(rdpLicense* license, STREAM* s)
void license_send_new_license_request_packet(rdpLicense* license)
{
STREAM* s;
wStream* s;
char* username;
DEBUG_LICENSE("Sending New License Packet");
@ -986,7 +986,7 @@ void license_send_new_license_request_packet(rdpLicense* license)
* @param mac_data signature
*/
void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, BYTE* macData)
void license_write_platform_challenge_response_packet(rdpLicense* license, wStream* s, BYTE* macData)
{
license_write_binary_blob(s, license->EncryptedPlatformChallenge); /* EncryptedPlatformChallengeResponse */
license_write_binary_blob(s, license->EncryptedHardwareId); /* EncryptedHWID */
@ -1001,7 +1001,7 @@ void license_write_platform_challenge_response_packet(rdpLicense* license, STREA
void license_send_platform_challenge_response_packet(rdpLicense* license)
{
STREAM* s;
wStream* s;
int length;
BYTE* buffer;
CryptoRc4 rc4;
@ -1056,7 +1056,7 @@ void license_send_platform_challenge_response_packet(rdpLicense* license)
BOOL license_send_valid_client_error_packet(rdpLicense* license)
{
STREAM* s;
wStream* s;
s = license_send_stream_init(license);

View File

@ -198,9 +198,9 @@ struct rdp_license
SCOPE_LIST* ScopeList;
};
BOOL license_recv(rdpLicense* license, STREAM* s);
BOOL license_send(rdpLicense* license, STREAM* s, BYTE type);
STREAM* license_send_stream_init(rdpLicense* license);
BOOL license_recv(rdpLicense* license, wStream* s);
BOOL license_send(rdpLicense* license, wStream* s, BYTE type);
wStream* license_send_stream_init(rdpLicense* license);
void license_generate_randoms(rdpLicense* license);
void license_generate_keys(rdpLicense* license);
@ -210,27 +210,27 @@ void license_decrypt_platform_challenge(rdpLicense* license);
PRODUCT_INFO* license_new_product_info(void);
void license_free_product_info(PRODUCT_INFO* productInfo);
BOOL license_read_product_info(STREAM* s, PRODUCT_INFO* productInfo);
BOOL license_read_product_info(wStream* s, PRODUCT_INFO* productInfo);
LICENSE_BLOB* license_new_binary_blob(UINT16 type);
void license_free_binary_blob(LICENSE_BLOB* blob);
BOOL license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob);
void license_write_binary_blob(STREAM* s, LICENSE_BLOB* blob);
BOOL license_read_binary_blob(wStream* s, LICENSE_BLOB* blob);
void license_write_binary_blob(wStream* s, LICENSE_BLOB* blob);
SCOPE_LIST* license_new_scope_list(void);
void license_free_scope_list(SCOPE_LIST* scopeList);
BOOL license_read_scope_list(STREAM* s, SCOPE_LIST* scopeList);
BOOL license_read_scope_list(wStream* s, SCOPE_LIST* scopeList);
BOOL license_read_license_request_packet(rdpLicense* license, STREAM* s);
BOOL license_read_platform_challenge_packet(rdpLicense* license, STREAM* s);
void license_read_new_license_packet(rdpLicense* license, STREAM* s);
void license_read_upgrade_license_packet(rdpLicense* license, STREAM* s);
BOOL license_read_error_alert_packet(rdpLicense* license, STREAM* s);
BOOL license_read_license_request_packet(rdpLicense* license, wStream* s);
BOOL license_read_platform_challenge_packet(rdpLicense* license, wStream* s);
void license_read_new_license_packet(rdpLicense* license, wStream* s);
void license_read_upgrade_license_packet(rdpLicense* license, wStream* s);
BOOL license_read_error_alert_packet(rdpLicense* license, wStream* s);
void license_write_new_license_request_packet(rdpLicense* license, STREAM* s);
void license_write_new_license_request_packet(rdpLicense* license, wStream* s);
void license_send_new_license_request_packet(rdpLicense* license);
void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, BYTE* mac_data);
void license_write_platform_challenge_response_packet(rdpLicense* license, wStream* s, BYTE* mac_data);
void license_send_platform_challenge_response_packet(rdpLicense* license);
BOOL license_send_valid_client_error_packet(rdpLicense* license);

View File

@ -191,7 +191,7 @@ static const char* const mcs_result_enumerated[] =
* @return
*/
BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, UINT16* length)
BOOL mcs_read_domain_mcspdu_header(wStream* s, enum DomainMCSPDU* domainMCSPDU, UINT16* length)
{
UINT16 li;
BYTE choice;
@ -222,7 +222,7 @@ BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, U
* @param length TPKT length
*/
void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options)
void mcs_write_domain_mcspdu_header(wStream* s, enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options)
{
tpkt_write_header(s, length);
tpdu_write_data(s);
@ -258,7 +258,7 @@ static void mcs_init_domain_parameters(DomainParameters* domainParameters,
* @param domainParameters domain parameters
*/
BOOL mcs_read_domain_parameters(STREAM* s, DomainParameters* domainParameters)
BOOL mcs_read_domain_parameters(wStream* s, DomainParameters* domainParameters)
{
int length;
return
@ -279,10 +279,10 @@ BOOL mcs_read_domain_parameters(STREAM* s, DomainParameters* domainParameters)
* @param domainParameters domain parameters
*/
void mcs_write_domain_parameters(STREAM* s, DomainParameters* domainParameters)
void mcs_write_domain_parameters(wStream* s, DomainParameters* domainParameters)
{
int length;
STREAM* tmps;
wStream* tmps;
tmps = stream_new(stream_get_size(s));
ber_write_integer(tmps, domainParameters->maxChannelIds);
@ -326,7 +326,7 @@ void mcs_print_domain_parameters(DomainParameters* domainParameters)
* @param s stream
*/
BOOL mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s)
BOOL mcs_recv_connect_initial(rdpMcs* mcs, wStream* s)
{
UINT16 li;
int length;
@ -383,10 +383,10 @@ BOOL mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s)
* @param user_data GCC Conference Create Request
*/
void mcs_write_connect_initial(STREAM* s, rdpMcs* mcs, STREAM* user_data)
void mcs_write_connect_initial(wStream* s, rdpMcs* mcs, wStream* user_data)
{
int length;
STREAM* tmps;
wStream* tmps;
tmps = stream_new(stream_get_size(s));
@ -426,10 +426,10 @@ void mcs_write_connect_initial(STREAM* s, rdpMcs* mcs, STREAM* user_data)
* @param user_data GCC Conference Create Response
*/
void mcs_write_connect_response(STREAM* s, rdpMcs* mcs, STREAM* user_data)
void mcs_write_connect_response(wStream* s, rdpMcs* mcs, wStream* user_data)
{
int length;
STREAM* tmps;
wStream* tmps;
tmps = stream_new(stream_get_size(s));
ber_write_enumerated(tmps, 0, MCS_Result_enum_length);
@ -453,11 +453,11 @@ void mcs_write_connect_response(STREAM* s, rdpMcs* mcs, STREAM* user_data)
BOOL mcs_send_connect_initial(rdpMcs* mcs)
{
STREAM* s;
wStream* s;
int length;
BYTE *bm, *em;
STREAM* gcc_CCrq;
STREAM* client_data;
wStream* gcc_CCrq;
wStream* client_data;
int status;
client_data = stream_new(512);
@ -494,7 +494,7 @@ BOOL mcs_send_connect_initial(rdpMcs* mcs)
* @param mcs mcs module
*/
BOOL mcs_recv_connect_response(rdpMcs* mcs, STREAM* s)
BOOL mcs_recv_connect_response(rdpMcs* mcs, wStream* s)
{
int length;
BYTE result;
@ -532,12 +532,12 @@ BOOL mcs_recv_connect_response(rdpMcs* mcs, STREAM* s)
BOOL mcs_send_connect_response(rdpMcs* mcs)
{
STREAM* s;
wStream* s;
int length;
int ret;
BYTE *bm, *em;
STREAM* gcc_CCrsp;
STREAM* server_data;
wStream* gcc_CCrsp;
wStream* server_data;
server_data = stream_new(512);
gcc_write_server_data_blocks(server_data, mcs->transport->settings);
@ -574,7 +574,7 @@ BOOL mcs_send_connect_response(rdpMcs* mcs)
* @param s stream
*/
BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s)
BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, wStream* s)
{
UINT16 length;
enum DomainMCSPDU MCSPDU;
@ -591,7 +591,7 @@ BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s)
BOOL mcs_send_erect_domain_request(rdpMcs* mcs)
{
STREAM* s;
wStream* s;
UINT16 length = 12;
s = transport_send_stream_init(mcs->transport, length);
@ -613,7 +613,7 @@ BOOL mcs_send_erect_domain_request(rdpMcs* mcs)
* @param s stream
*/
BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s)
BOOL mcs_recv_attach_user_request(rdpMcs* mcs, wStream* s)
{
UINT16 length;
enum DomainMCSPDU MCSPDU;
@ -630,7 +630,7 @@ BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s)
BOOL mcs_send_attach_user_request(rdpMcs* mcs)
{
STREAM* s;
wStream* s;
UINT16 length = 8;
s = transport_send_stream_init(mcs->transport, length);
@ -648,7 +648,7 @@ BOOL mcs_send_attach_user_request(rdpMcs* mcs)
* @param mcs mcs module
*/
BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s)
BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, wStream* s)
{
UINT16 length;
BYTE result;
@ -669,7 +669,7 @@ BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s)
BOOL mcs_send_attach_user_confirm(rdpMcs* mcs)
{
STREAM* s;
wStream* s;
UINT16 length = 11;
s = transport_send_stream_init(mcs->transport, length);
@ -692,7 +692,7 @@ BOOL mcs_send_attach_user_confirm(rdpMcs* mcs)
* @param s stream
*/
BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, UINT16* channel_id)
BOOL mcs_recv_channel_join_request(rdpMcs* mcs, wStream* s, UINT16* channel_id)
{
UINT16 length;
enum DomainMCSPDU MCSPDU;
@ -715,7 +715,7 @@ BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, UINT16* channel_id)
BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channel_id)
{
STREAM* s;
wStream* s;
UINT16 length = 12;
s = transport_send_stream_init(mcs->transport, 12);
@ -736,7 +736,7 @@ BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channel_id)
* @param mcs mcs module
*/
BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, UINT16* channel_id)
BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, wStream* s, UINT16* channel_id)
{
BOOL status;
UINT16 length;
@ -765,7 +765,7 @@ BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, UINT16* channel_id)
BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, UINT16 channel_id)
{
STREAM* s;
wStream* s;
UINT16 length = 15;
s = transport_send_stream_init(mcs->transport, 15);
@ -788,7 +788,7 @@ BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, UINT16 channel_id)
BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs)
{
STREAM* s;
wStream* s;
UINT16 length = 9;
s = transport_send_stream_init(mcs->transport, 9);

View File

@ -129,26 +129,26 @@ typedef struct rdp_mcs rdpMcs;
#define MCS_TYPE_CONNECT_INITIAL 0x65
#define MCS_TYPE_CONNECT_RESPONSE 0x66
void mcs_write_connect_initial(STREAM* s, rdpMcs* mcs, STREAM* user_data);
void mcs_write_connect_response(STREAM* s, rdpMcs* mcs, STREAM* user_data);
void mcs_write_connect_initial(wStream* s, rdpMcs* mcs, wStream* user_data);
void mcs_write_connect_response(wStream* s, rdpMcs* mcs, wStream* user_data);
BOOL mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s);
BOOL mcs_recv_connect_initial(rdpMcs* mcs, wStream* s);
BOOL mcs_send_connect_initial(rdpMcs* mcs);
BOOL mcs_recv_connect_response(rdpMcs* mcs, STREAM* s);
BOOL mcs_recv_connect_response(rdpMcs* mcs, wStream* s);
BOOL mcs_send_connect_response(rdpMcs* mcs);
BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s);
BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, wStream* s);
BOOL mcs_send_erect_domain_request(rdpMcs* mcs);
BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s);
BOOL mcs_recv_attach_user_request(rdpMcs* mcs, wStream* s);
BOOL mcs_send_attach_user_request(rdpMcs* mcs);
BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s);
BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, wStream* s);
BOOL mcs_send_attach_user_confirm(rdpMcs* mcs);
BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, UINT16* channel_id);
BOOL mcs_recv_channel_join_request(rdpMcs* mcs, wStream* s, UINT16* channel_id);
BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channel_id);
BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, UINT16* channel_id);
BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, wStream* s, UINT16* channel_id);
BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, UINT16 channel_id);
BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs);
BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, UINT16* length);
void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options);
BOOL mcs_read_domain_mcspdu_header(wStream* s, enum DomainMCSPDU* domainMCSPDU, UINT16* length);
void mcs_write_domain_mcspdu_header(wStream* s, enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options);
rdpMcs* mcs_new(rdpTransport* transport);
void mcs_free(rdpMcs* mcs);

View File

@ -139,11 +139,11 @@ static void update_message_SuppressOutput(rdpContext* context, BYTE allow, RECTA
MakeMessageId(Update, SuppressOutput), (void*) (size_t) allow, (void*) lParam);
}
static void update_message_SurfaceCommand(rdpContext* context, STREAM* s)
static void update_message_SurfaceCommand(rdpContext* context, wStream* s)
{
STREAM* wParam;
wStream* wParam;
wParam = (STREAM*) malloc(sizeof(STREAM));
wParam = (wStream*) malloc(sizeof(wStream));
wParam->capacity = s->capacity;
wParam->buffer = (BYTE*) malloc(wParam->capacity);
@ -982,9 +982,9 @@ int update_message_process_update_class(rdpUpdateProxy* proxy, wMessage* msg, in
break;
case Update_SurfaceCommand:
IFCALL(proxy->SurfaceCommand, msg->context, (STREAM*) msg->wParam);
IFCALL(proxy->SurfaceCommand, msg->context, (wStream*) msg->wParam);
{
STREAM* s = (STREAM*) msg->wParam;
wStream* s = (wStream*) msg->wParam;
free(s->buffer);
free(s);
}

View File

@ -253,7 +253,7 @@ int nego_transport_disconnect(rdpNego* nego)
BOOL nego_send_preconnection_pdu(rdpNego* nego)
{
STREAM* s;
wStream* s;
UINT32 cbSize;
UINT16 cchPCB = 0;
WCHAR* wszPCB = NULL;
@ -462,7 +462,7 @@ void nego_attempt_rdp(rdpNego* nego)
BOOL nego_recv_response(rdpNego* nego)
{
STREAM* s = transport_recv_stream_init(nego->transport, 1024);
wStream* s = transport_recv_stream_init(nego->transport, 1024);
if (transport_read(nego->transport, s) < 0)
return FALSE;
@ -478,7 +478,7 @@ BOOL nego_recv_response(rdpNego* nego)
* @param extra nego pointer
*/
int nego_recv(rdpTransport* transport, STREAM* s, void* extra)
int nego_recv(rdpTransport* transport, wStream* s, void* extra)
{
BYTE li;
BYTE type;
@ -556,7 +556,7 @@ int nego_recv(rdpTransport* transport, STREAM* s, void* extra)
* @param s stream
*/
BOOL nego_read_request(rdpNego* nego, STREAM* s)
BOOL nego_read_request(rdpNego* nego, wStream* s)
{
BYTE li;
BYTE c;
@ -638,7 +638,7 @@ void nego_send(rdpNego* nego)
BOOL nego_send_negotiation_request(rdpNego* nego)
{
STREAM* s;
wStream* s;
int length;
BYTE *bm, *em;
int cookie_length;
@ -697,7 +697,7 @@ BOOL nego_send_negotiation_request(rdpNego* nego)
* @param s
*/
void nego_process_negotiation_request(rdpNego* nego, STREAM* s)
void nego_process_negotiation_request(rdpNego* nego, wStream* s)
{
BYTE flags;
UINT16 length;
@ -719,7 +719,7 @@ void nego_process_negotiation_request(rdpNego* nego, STREAM* s)
* @param s
*/
void nego_process_negotiation_response(rdpNego* nego, STREAM* s)
void nego_process_negotiation_response(rdpNego* nego, wStream* s)
{
UINT16 length;
@ -745,7 +745,7 @@ void nego_process_negotiation_response(rdpNego* nego, STREAM* s)
* @param s
*/
void nego_process_negotiation_failure(rdpNego* nego, STREAM* s)
void nego_process_negotiation_failure(rdpNego* nego, wStream* s)
{
BYTE flags;
UINT16 length;
@ -789,7 +789,7 @@ void nego_process_negotiation_failure(rdpNego* nego, STREAM* s)
BOOL nego_send_negotiation_response(rdpNego* nego)
{
STREAM* s;
wStream* s;
BYTE* bm;
BYTE* em;
int length;

View File

@ -117,14 +117,14 @@ void nego_attempt_tls(rdpNego* nego);
void nego_attempt_rdp(rdpNego* nego);
void nego_send(rdpNego* nego);
int nego_recv(rdpTransport* transport, STREAM* s, void* extra);
int nego_recv(rdpTransport* transport, wStream* s, void* extra);
BOOL nego_recv_response(rdpNego* nego);
BOOL nego_read_request(rdpNego* nego, STREAM* s);
BOOL nego_read_request(rdpNego* nego, wStream* s);
BOOL nego_send_negotiation_request(rdpNego* nego);
void nego_process_negotiation_request(rdpNego* nego, STREAM* s);
void nego_process_negotiation_response(rdpNego* nego, STREAM* s);
void nego_process_negotiation_failure(rdpNego* nego, STREAM* s);
void nego_process_negotiation_request(rdpNego* nego, wStream* s);
void nego_process_negotiation_response(rdpNego* nego, wStream* s);
void nego_process_negotiation_failure(rdpNego* nego, wStream* s);
BOOL nego_send_negotiation_response(rdpNego* nego);
rdpNego* nego_new(struct rdp_transport * transport);

View File

@ -805,7 +805,7 @@ int credssp_skip_ts_password_creds(rdpCredssp* credssp)
return length;
}
void credssp_read_ts_password_creds(rdpCredssp* credssp, STREAM* s)
void credssp_read_ts_password_creds(rdpCredssp* credssp, wStream* s)
{
int length;
@ -842,7 +842,7 @@ void credssp_read_ts_password_creds(rdpCredssp* credssp, STREAM* s)
credssp->identity.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
}
void credssp_write_ts_password_creds(rdpCredssp* credssp, STREAM* s)
void credssp_write_ts_password_creds(rdpCredssp* credssp, wStream* s)
{
int length;
@ -887,7 +887,7 @@ int credssp_skip_ts_credentials(rdpCredssp* credssp)
void credssp_read_ts_credentials(rdpCredssp* credssp, PSecBuffer ts_credentials)
{
STREAM* s;
wStream* s;
int length;
int ts_password_creds_length;
@ -911,7 +911,7 @@ void credssp_read_ts_credentials(rdpCredssp* credssp, PSecBuffer ts_credentials)
stream_free(s);
}
void credssp_write_ts_credentials(rdpCredssp* credssp, STREAM* s)
void credssp_write_ts_credentials(rdpCredssp* credssp, wStream* s)
{
int length;
int ts_password_creds_length;
@ -942,7 +942,7 @@ void credssp_write_ts_credentials(rdpCredssp* credssp, STREAM* s)
void credssp_encode_ts_credentials(rdpCredssp* credssp)
{
STREAM* s;
wStream* s;
int length;
s = stream_new(0);
@ -1077,7 +1077,7 @@ int credssp_skip_ts_request(int length)
void credssp_send(rdpCredssp* credssp)
{
STREAM* s;
wStream* s;
int length;
int ts_request_length;
int nego_tokens_length;
@ -1140,7 +1140,7 @@ void credssp_send(rdpCredssp* credssp)
int credssp_recv(rdpCredssp* credssp)
{
STREAM* s;
wStream* s;
int length;
int status;
UINT32 version;

View File

@ -145,7 +145,7 @@ static const BYTE BMF_BPP[] =
0, 1, 0, 8, 16, 24, 32
};
static INLINE BOOL update_read_coord(STREAM* s, INT32* coord, BOOL delta)
static INLINE BOOL update_read_coord(wStream* s, INT32* coord, BOOL delta)
{
INT8 lsi8;
INT16 lsi16;
@ -167,7 +167,7 @@ static INLINE BOOL update_read_coord(STREAM* s, INT32* coord, BOOL delta)
return TRUE;
}
static INLINE BOOL update_read_color(STREAM* s, UINT32* color)
static INLINE BOOL update_read_color(wStream* s, UINT32* color)
{
BYTE byte;
@ -182,7 +182,7 @@ static INLINE BOOL update_read_color(STREAM* s, UINT32* color)
return TRUE;
}
static INLINE void update_read_colorref(STREAM* s, UINT32* color)
static INLINE void update_read_colorref(wStream* s, UINT32* color)
{
BYTE byte;
@ -195,7 +195,7 @@ static INLINE void update_read_colorref(STREAM* s, UINT32* color)
stream_seek_BYTE(s);
}
static INLINE void update_read_color_quad(STREAM* s, UINT32* color)
static INLINE void update_read_color_quad(wStream* s, UINT32* color)
{
BYTE byte;
@ -208,7 +208,7 @@ static INLINE void update_read_color_quad(STREAM* s, UINT32* color)
stream_seek_BYTE(s);
}
static INLINE BOOL update_read_2byte_unsigned(STREAM* s, UINT32* value)
static INLINE BOOL update_read_2byte_unsigned(wStream* s, UINT32* value)
{
BYTE byte;
@ -232,7 +232,7 @@ static INLINE BOOL update_read_2byte_unsigned(STREAM* s, UINT32* value)
return TRUE;
}
static INLINE BOOL update_read_2byte_signed(STREAM* s, INT32* value)
static INLINE BOOL update_read_2byte_signed(wStream* s, INT32* value)
{
BYTE byte;
BOOL negative;
@ -259,7 +259,7 @@ static INLINE BOOL update_read_2byte_signed(STREAM* s, INT32* value)
return TRUE;
}
static INLINE BOOL update_read_4byte_unsigned(STREAM* s, UINT32* value)
static INLINE BOOL update_read_4byte_unsigned(wStream* s, UINT32* value)
{
BYTE byte;
BYTE count;
@ -308,7 +308,7 @@ static INLINE BOOL update_read_4byte_unsigned(STREAM* s, UINT32* value)
return TRUE;
}
static INLINE BOOL update_read_delta(STREAM* s, INT32* value)
static INLINE BOOL update_read_delta(wStream* s, INT32* value)
{
BYTE byte;
@ -331,7 +331,7 @@ static INLINE BOOL update_read_delta(STREAM* s, INT32* value)
return TRUE;
}
static INLINE void update_read_glyph_delta(STREAM* s, UINT16* value)
static INLINE void update_read_glyph_delta(wStream* s, UINT16* value)
{
BYTE byte;
@ -343,7 +343,7 @@ static INLINE void update_read_glyph_delta(STREAM* s, UINT16* value)
*value = (byte & 0x3F);
}
static INLINE void update_seek_glyph_delta(STREAM* s)
static INLINE void update_seek_glyph_delta(wStream* s)
{
BYTE byte;
@ -353,7 +353,7 @@ static INLINE void update_seek_glyph_delta(STREAM* s)
stream_seek_BYTE(s);
}
static INLINE BOOL update_read_brush(STREAM* s, rdpBrush* brush, BYTE fieldFlags)
static INLINE BOOL update_read_brush(wStream* s, rdpBrush* brush, BYTE fieldFlags)
{
if (fieldFlags & ORDER_FIELD_01)
{
@ -410,7 +410,7 @@ static INLINE BOOL update_read_brush(STREAM* s, rdpBrush* brush, BYTE fieldFlags
return TRUE;
}
static INLINE BOOL update_read_delta_rects(STREAM* s, DELTA_RECT* rectangles, int number)
static INLINE BOOL update_read_delta_rects(wStream* s, DELTA_RECT* rectangles, int number)
{
int i;
BYTE flags = 0;
@ -464,7 +464,7 @@ static INLINE BOOL update_read_delta_rects(STREAM* s, DELTA_RECT* rectangles, in
return TRUE;
}
static INLINE BOOL update_read_delta_points(STREAM* s, DELTA_POINT* points, int number, INT16 x, INT16 y)
static INLINE BOOL update_read_delta_points(wStream* s, DELTA_POINT* points, int number, INT16 x, INT16 y)
{
int i;
BYTE flags = 0;
@ -576,7 +576,7 @@ static INLINE BOOL update_read_delta_points(STREAM* s, DELTA_POINT* points, int
/* Primary Drawing Orders */
BOOL update_read_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, DSTBLT_ORDER* dstblt)
BOOL update_read_dstblt_order(wStream* s, ORDER_INFO* orderInfo, DSTBLT_ORDER* dstblt)
{
ORDER_FIELD_COORD(1, dstblt->nLeftRect);
ORDER_FIELD_COORD(2, dstblt->nTopRect);
@ -586,7 +586,7 @@ BOOL update_read_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, DSTBLT_ORDER* ds
return TRUE;
}
BOOL update_read_patblt_order(STREAM* s, ORDER_INFO* orderInfo, PATBLT_ORDER* patblt)
BOOL update_read_patblt_order(wStream* s, ORDER_INFO* orderInfo, PATBLT_ORDER* patblt)
{
ORDER_FIELD_COORD(1, patblt->nLeftRect);
ORDER_FIELD_COORD(2, patblt->nTopRect);
@ -598,7 +598,7 @@ BOOL update_read_patblt_order(STREAM* s, ORDER_INFO* orderInfo, PATBLT_ORDER* pa
return update_read_brush(s, &patblt->brush, orderInfo->fieldFlags >> 7);
}
BOOL update_read_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, SCRBLT_ORDER* scrblt)
BOOL update_read_scrblt_order(wStream* s, ORDER_INFO* orderInfo, SCRBLT_ORDER* scrblt)
{
ORDER_FIELD_COORD(1, scrblt->nLeftRect);
ORDER_FIELD_COORD(2, scrblt->nTopRect);
@ -610,7 +610,7 @@ BOOL update_read_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, SCRBLT_ORDER* sc
return TRUE;
}
BOOL update_read_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, OPAQUE_RECT_ORDER* opaque_rect)
BOOL update_read_opaque_rect_order(wStream* s, ORDER_INFO* orderInfo, OPAQUE_RECT_ORDER* opaque_rect)
{
BYTE byte;
@ -643,7 +643,7 @@ BOOL update_read_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, OPAQUE_RECT
return TRUE;
}
BOOL update_read_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, DRAW_NINE_GRID_ORDER* draw_nine_grid)
BOOL update_read_draw_nine_grid_order(wStream* s, ORDER_INFO* orderInfo, DRAW_NINE_GRID_ORDER* draw_nine_grid)
{
ORDER_FIELD_COORD(1, draw_nine_grid->srcLeft);
ORDER_FIELD_COORD(2, draw_nine_grid->srcTop);
@ -653,7 +653,7 @@ BOOL update_read_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, DRAW_NIN
return TRUE;
}
BOOL update_read_multi_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_DSTBLT_ORDER* multi_dstblt)
BOOL update_read_multi_dstblt_order(wStream* s, ORDER_INFO* orderInfo, MULTI_DSTBLT_ORDER* multi_dstblt)
{
ORDER_FIELD_COORD(1, multi_dstblt->nLeftRect);
ORDER_FIELD_COORD(2, multi_dstblt->nTopRect);
@ -672,7 +672,7 @@ BOOL update_read_multi_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_DSTB
return TRUE;
}
BOOL update_read_multi_patblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_PATBLT_ORDER* multi_patblt)
BOOL update_read_multi_patblt_order(wStream* s, ORDER_INFO* orderInfo, MULTI_PATBLT_ORDER* multi_patblt)
{
ORDER_FIELD_COORD(1, multi_patblt->nLeftRect);
ORDER_FIELD_COORD(2, multi_patblt->nTopRect);
@ -698,7 +698,7 @@ BOOL update_read_multi_patblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_PATB
return TRUE;
}
BOOL update_read_multi_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_SCRBLT_ORDER* multi_scrblt)
BOOL update_read_multi_scrblt_order(wStream* s, ORDER_INFO* orderInfo, MULTI_SCRBLT_ORDER* multi_scrblt)
{
ORDER_FIELD_COORD(1, multi_scrblt->nLeftRect);
ORDER_FIELD_COORD(2, multi_scrblt->nTopRect);
@ -719,7 +719,7 @@ BOOL update_read_multi_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_SCRB
return TRUE;
}
BOOL update_read_multi_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect)
BOOL update_read_multi_opaque_rect_order(wStream* s, ORDER_INFO* orderInfo, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect)
{
BYTE byte;
ORDER_FIELD_COORD(1, multi_opaque_rect->nLeftRect);
@ -764,7 +764,7 @@ BOOL update_read_multi_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, MULTI
}
BOOL update_read_multi_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_DRAW_NINE_GRID_ORDER* multi_draw_nine_grid)
BOOL update_read_multi_draw_nine_grid_order(wStream* s, ORDER_INFO* orderInfo, MULTI_DRAW_NINE_GRID_ORDER* multi_draw_nine_grid)
{
ORDER_FIELD_COORD(1, multi_draw_nine_grid->srcLeft);
ORDER_FIELD_COORD(2, multi_draw_nine_grid->srcTop);
@ -780,7 +780,7 @@ BOOL update_read_multi_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, MU
return TRUE;
}
BOOL update_read_line_to_order(STREAM* s, ORDER_INFO* orderInfo, LINE_TO_ORDER* line_to)
BOOL update_read_line_to_order(wStream* s, ORDER_INFO* orderInfo, LINE_TO_ORDER* line_to)
{
ORDER_FIELD_UINT16(1, line_to->backMode);
ORDER_FIELD_COORD(2, line_to->nXStart);
@ -795,7 +795,7 @@ BOOL update_read_line_to_order(STREAM* s, ORDER_INFO* orderInfo, LINE_TO_ORDER*
return TRUE;
}
BOOL update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER* polyline)
BOOL update_read_polyline_order(wStream* s, ORDER_INFO* orderInfo, POLYLINE_ORDER* polyline)
{
UINT16 word;
@ -822,7 +822,7 @@ BOOL update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER
return TRUE;
}
BOOL update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* memblt)
BOOL update_read_memblt_order(wStream* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* memblt)
{
ORDER_FIELD_UINT16(1, memblt->cacheId);
ORDER_FIELD_COORD(2, memblt->nLeftRect);
@ -839,7 +839,7 @@ BOOL update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* me
return TRUE;
}
BOOL update_read_mem3blt_order(STREAM* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER* mem3blt)
BOOL update_read_mem3blt_order(wStream* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER* mem3blt)
{
ORDER_FIELD_UINT16(1, mem3blt->cacheId);
ORDER_FIELD_COORD(2, mem3blt->nLeftRect);
@ -861,7 +861,7 @@ BOOL update_read_mem3blt_order(STREAM* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER*
return TRUE;
}
BOOL update_read_save_bitmap_order(STREAM* s, ORDER_INFO* orderInfo, SAVE_BITMAP_ORDER* save_bitmap)
BOOL update_read_save_bitmap_order(wStream* s, ORDER_INFO* orderInfo, SAVE_BITMAP_ORDER* save_bitmap)
{
ORDER_FIELD_UINT32(1, save_bitmap->savedBitmapPosition);
ORDER_FIELD_COORD(2, save_bitmap->nLeftRect);
@ -872,7 +872,7 @@ BOOL update_read_save_bitmap_order(STREAM* s, ORDER_INFO* orderInfo, SAVE_BITMAP
return TRUE;
}
BOOL update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX_ORDER* glyph_index)
BOOL update_read_glyph_index_order(wStream* s, ORDER_INFO* orderInfo, GLYPH_INDEX_ORDER* glyph_index)
{
ORDER_FIELD_BYTE(1, glyph_index->cacheId);
ORDER_FIELD_BYTE(2, glyph_index->flAccel);
@ -909,7 +909,7 @@ BOOL update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX
return TRUE;
}
BOOL update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_ORDER* fast_index)
BOOL update_read_fast_index_order(wStream* s, ORDER_INFO* orderInfo, FAST_INDEX_ORDER* fast_index)
{
ORDER_FIELD_BYTE(1, fast_index->cacheId);
ORDER_FIELD_2BYTE(2, fast_index->ulCharInc, fast_index->flAccel);
@ -940,7 +940,7 @@ BOOL update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_O
return TRUE;
}
BOOL update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_ORDER* fast_glyph)
BOOL update_read_fast_glyph_order(wStream* s, ORDER_INFO* orderInfo, FAST_GLYPH_ORDER* fast_glyph)
{
BYTE* phold;
GLYPH_DATA_V2* glyph;
@ -1003,7 +1003,7 @@ BOOL update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_O
return TRUE;
}
BOOL update_read_polygon_sc_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_SC_ORDER* polygon_sc)
BOOL update_read_polygon_sc_order(wStream* s, ORDER_INFO* orderInfo, POLYGON_SC_ORDER* polygon_sc)
{
ORDER_FIELD_COORD(1, polygon_sc->xStart);
ORDER_FIELD_COORD(2, polygon_sc->yStart);
@ -1028,7 +1028,7 @@ BOOL update_read_polygon_sc_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_SC_O
return TRUE;
}
BOOL update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_ORDER* polygon_cb)
BOOL update_read_polygon_cb_order(wStream* s, ORDER_INFO* orderInfo, POLYGON_CB_ORDER* polygon_cb)
{
ORDER_FIELD_COORD(1, polygon_cb->xStart);
ORDER_FIELD_COORD(2, polygon_cb->yStart);
@ -1062,7 +1062,7 @@ BOOL update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_O
return TRUE;
}
BOOL update_read_ellipse_sc_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_SC_ORDER* ellipse_sc)
BOOL update_read_ellipse_sc_order(wStream* s, ORDER_INFO* orderInfo, ELLIPSE_SC_ORDER* ellipse_sc)
{
ORDER_FIELD_COORD(1, ellipse_sc->leftRect);
ORDER_FIELD_COORD(2, ellipse_sc->topRect);
@ -1074,7 +1074,7 @@ BOOL update_read_ellipse_sc_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_SC_O
return TRUE;
}
BOOL update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_ORDER* ellipse_cb)
BOOL update_read_ellipse_cb_order(wStream* s, ORDER_INFO* orderInfo, ELLIPSE_CB_ORDER* ellipse_cb)
{
ORDER_FIELD_COORD(1, ellipse_cb->leftRect);
ORDER_FIELD_COORD(2, ellipse_cb->topRect);
@ -1089,7 +1089,7 @@ BOOL update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_O
/* Secondary Drawing Orders */
BOOL update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, UINT16 flags)
BOOL update_read_cache_bitmap_order(wStream* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, UINT16 flags)
{
if (stream_get_left(s) < 9)
return FALSE;
@ -1130,7 +1130,7 @@ BOOL update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_
return TRUE;
}
BOOL update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, UINT16 flags)
BOOL update_read_cache_bitmap_v2_order(wStream* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, UINT16 flags)
{
BYTE bitsPerPixelId;
@ -1198,7 +1198,7 @@ BOOL update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_b
return TRUE;
}
BOOL update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, UINT16 flags)
BOOL update_read_cache_bitmap_v3_order(wStream* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, UINT16 flags)
{
BYTE bitsPerPixelId;
BITMAP_DATA_EX* bitmapData;
@ -1236,7 +1236,7 @@ BOOL update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_b
return TRUE;
}
BOOL update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, UINT16 flags)
BOOL update_read_cache_color_table_order(wStream* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, UINT16 flags)
{
int i;
UINT32* colorTable;
@ -1266,7 +1266,7 @@ BOOL update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cac
return TRUE;
}
BOOL update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, UINT16 flags)
BOOL update_read_cache_glyph_order(wStream* s, CACHE_GLYPH_ORDER* cache_glyph_order, UINT16 flags)
{
int i;
INT16 lsi16;
@ -1311,7 +1311,7 @@ BOOL update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_ord
return TRUE;
}
BOOL update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, UINT16 flags)
BOOL update_read_cache_glyph_v2_order(wStream* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, UINT16 flags)
{
int i;
GLYPH_DATA_V2* glyph;
@ -1355,7 +1355,7 @@ BOOL update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_gly
return TRUE;
}
BOOL update_decompress_brush(STREAM* s, BYTE* output, BYTE bpp)
BOOL update_decompress_brush(wStream* s, BYTE* output, BYTE bpp)
{
int index;
int x, y, k;
@ -1387,7 +1387,7 @@ BOOL update_decompress_brush(STREAM* s, BYTE* output, BYTE bpp)
return TRUE;
}
BOOL update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_order, UINT16 flags)
BOOL update_read_cache_brush_order(wStream* s, CACHE_BRUSH_ORDER* cache_brush_order, UINT16 flags)
{
int i;
int size;
@ -1464,7 +1464,7 @@ BOOL update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_ord
/* Alternate Secondary Drawing Orders */
BOOL update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap)
BOOL update_read_create_offscreen_bitmap_order(wStream* s, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap)
{
UINT16 flags;
BOOL deleteListPresent;
@ -1508,7 +1508,7 @@ BOOL update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMA
return TRUE;
}
BOOL update_read_switch_surface_order(STREAM* s, SWITCH_SURFACE_ORDER* switch_surface)
BOOL update_read_switch_surface_order(wStream* s, SWITCH_SURFACE_ORDER* switch_surface)
{
if (stream_get_left(s) < 2)
return FALSE;
@ -1516,7 +1516,7 @@ BOOL update_read_switch_surface_order(STREAM* s, SWITCH_SURFACE_ORDER* switch_su
return TRUE;
}
BOOL update_read_create_nine_grid_bitmap_order(STREAM* s, CREATE_NINE_GRID_BITMAP_ORDER* create_nine_grid_bitmap)
BOOL update_read_create_nine_grid_bitmap_order(wStream* s, CREATE_NINE_GRID_BITMAP_ORDER* create_nine_grid_bitmap)
{
NINE_GRID_BITMAP_INFO* nineGridInfo;
@ -1535,7 +1535,7 @@ BOOL update_read_create_nine_grid_bitmap_order(STREAM* s, CREATE_NINE_GRID_BITMA
return TRUE;
}
BOOL update_read_frame_marker_order(STREAM* s, FRAME_MARKER_ORDER* frame_marker)
BOOL update_read_frame_marker_order(wStream* s, FRAME_MARKER_ORDER* frame_marker)
{
if (stream_get_left(s) < 4)
return FALSE;
@ -1543,7 +1543,7 @@ BOOL update_read_frame_marker_order(STREAM* s, FRAME_MARKER_ORDER* frame_marker)
return TRUE;
}
BOOL update_read_stream_bitmap_first_order(STREAM* s, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first)
BOOL update_read_stream_bitmap_first_order(wStream* s, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first)
{
if (stream_get_left(s) < 10) // 8 + 2 at least
return FALSE;
@ -1567,7 +1567,7 @@ BOOL update_read_stream_bitmap_first_order(STREAM* s, STREAM_BITMAP_FIRST_ORDER*
return TRUE;
}
BOOL update_read_stream_bitmap_next_order(STREAM* s, STREAM_BITMAP_NEXT_ORDER* stream_bitmap_next)
BOOL update_read_stream_bitmap_next_order(wStream* s, STREAM_BITMAP_NEXT_ORDER* stream_bitmap_next)
{
if (stream_get_left(s) < 5)
return FALSE;
@ -1577,7 +1577,7 @@ BOOL update_read_stream_bitmap_next_order(STREAM* s, STREAM_BITMAP_NEXT_ORDER* s
return TRUE;
}
BOOL update_read_draw_gdiplus_first_order(STREAM* s, DRAW_GDIPLUS_FIRST_ORDER* draw_gdiplus_first)
BOOL update_read_draw_gdiplus_first_order(wStream* s, DRAW_GDIPLUS_FIRST_ORDER* draw_gdiplus_first)
{
if (stream_get_left(s) < 11)
return FALSE;
@ -1589,7 +1589,7 @@ BOOL update_read_draw_gdiplus_first_order(STREAM* s, DRAW_GDIPLUS_FIRST_ORDER* d
return stream_skip(s, draw_gdiplus_first->cbSize); /* emfRecords */
}
BOOL update_read_draw_gdiplus_next_order(STREAM* s, DRAW_GDIPLUS_NEXT_ORDER* draw_gdiplus_next)
BOOL update_read_draw_gdiplus_next_order(wStream* s, DRAW_GDIPLUS_NEXT_ORDER* draw_gdiplus_next)
{
if (stream_get_left(s) < 3)
return FALSE;
@ -1598,7 +1598,7 @@ BOOL update_read_draw_gdiplus_next_order(STREAM* s, DRAW_GDIPLUS_NEXT_ORDER* dra
return TRUE;
}
BOOL update_read_draw_gdiplus_end_order(STREAM* s, DRAW_GDIPLUS_END_ORDER* draw_gdiplus_end)
BOOL update_read_draw_gdiplus_end_order(wStream* s, DRAW_GDIPLUS_END_ORDER* draw_gdiplus_end)
{
if (stream_get_left(s) < 11)
return FALSE;
@ -1610,7 +1610,7 @@ BOOL update_read_draw_gdiplus_end_order(STREAM* s, DRAW_GDIPLUS_END_ORDER* draw_
return stream_skip(s, draw_gdiplus_end->cbSize); /* emfRecords */
}
BOOL update_read_draw_gdiplus_cache_first_order(STREAM* s, DRAW_GDIPLUS_CACHE_FIRST_ORDER* draw_gdiplus_cache_first)
BOOL update_read_draw_gdiplus_cache_first_order(wStream* s, DRAW_GDIPLUS_CACHE_FIRST_ORDER* draw_gdiplus_cache_first)
{
if (stream_get_left(s) < 11)
return FALSE;
@ -1623,7 +1623,7 @@ BOOL update_read_draw_gdiplus_cache_first_order(STREAM* s, DRAW_GDIPLUS_CACHE_FI
return stream_skip(s, draw_gdiplus_cache_first->cbSize); /* emfRecords */
}
BOOL update_read_draw_gdiplus_cache_next_order(STREAM* s, DRAW_GDIPLUS_CACHE_NEXT_ORDER* draw_gdiplus_cache_next)
BOOL update_read_draw_gdiplus_cache_next_order(wStream* s, DRAW_GDIPLUS_CACHE_NEXT_ORDER* draw_gdiplus_cache_next)
{
if (stream_get_left(s) < 7)
return FALSE;
@ -1635,7 +1635,7 @@ BOOL update_read_draw_gdiplus_cache_next_order(STREAM* s, DRAW_GDIPLUS_CACHE_NEX
}
BOOL update_read_draw_gdiplus_cache_end_order(STREAM* s, DRAW_GDIPLUS_CACHE_END_ORDER* draw_gdiplus_cache_end)
BOOL update_read_draw_gdiplus_cache_end_order(wStream* s, DRAW_GDIPLUS_CACHE_END_ORDER* draw_gdiplus_cache_end)
{
if (stream_get_left(s) < 11)
return FALSE;
@ -1648,7 +1648,7 @@ BOOL update_read_draw_gdiplus_cache_end_order(STREAM* s, DRAW_GDIPLUS_CACHE_END_
return stream_skip(s, draw_gdiplus_cache_end->cbSize); /* emfRecords */
}
BOOL update_read_field_flags(STREAM* s, UINT32* fieldFlags, BYTE flags, BYTE fieldBytes)
BOOL update_read_field_flags(wStream* s, UINT32* fieldFlags, BYTE flags, BYTE fieldBytes)
{
int i;
BYTE byte;
@ -1676,7 +1676,7 @@ BOOL update_read_field_flags(STREAM* s, UINT32* fieldFlags, BYTE flags, BYTE fie
return TRUE;
}
BOOL update_read_bounds(STREAM* s, rdpBounds* bounds)
BOOL update_read_bounds(wStream* s, rdpBounds* bounds)
{
BYTE flags;
@ -1730,7 +1730,7 @@ BOOL update_read_bounds(STREAM* s, rdpBounds* bounds)
return TRUE;
}
BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, BYTE flags)
BOOL update_recv_primary_order(rdpUpdate* update, wStream* s, BYTE flags)
{
ORDER_INFO* orderInfo;
rdpContext* context = update->context;
@ -1914,7 +1914,7 @@ BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, BYTE flags)
return TRUE;
}
BOOL update_recv_secondary_order(rdpUpdate* update, STREAM* s, BYTE flags)
BOOL update_recv_secondary_order(rdpUpdate* update, wStream* s, BYTE flags)
{
BYTE* next;
BYTE orderType;
@ -2005,7 +2005,7 @@ BOOL update_recv_secondary_order(rdpUpdate* update, STREAM* s, BYTE flags)
return TRUE;
}
BOOL update_recv_altsec_order(rdpUpdate* update, STREAM* s, BYTE flags)
BOOL update_recv_altsec_order(rdpUpdate* update, wStream* s, BYTE flags)
{
BYTE orderType;
rdpContext* context = update->context;
@ -2107,7 +2107,7 @@ BOOL update_recv_altsec_order(rdpUpdate* update, STREAM* s, BYTE flags)
return TRUE;
}
BOOL update_recv_order(rdpUpdate* update, STREAM* s)
BOOL update_recv_order(rdpUpdate* update, wStream* s)
{
BYTE controlFlags;

View File

@ -184,50 +184,50 @@
#define CG_GLYPH_UNICODE_PRESENT 0x0010
BOOL update_recv_order(rdpUpdate* update, STREAM* s);
BOOL update_recv_order(rdpUpdate* update, wStream* s);
BOOL update_read_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, DSTBLT_ORDER* dstblt);
BOOL update_read_patblt_order(STREAM* s, ORDER_INFO* orderInfo, PATBLT_ORDER* patblt);
BOOL update_read_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, SCRBLT_ORDER* scrblt);
BOOL update_read_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, OPAQUE_RECT_ORDER* opaque_rect);
BOOL update_read_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, DRAW_NINE_GRID_ORDER* draw_nine_grid);
BOOL update_read_multi_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_DSTBLT_ORDER* multi_dstblt);
BOOL update_read_multi_patblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_PATBLT_ORDER* multi_patblt);
BOOL update_read_multi_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_SCRBLT_ORDER* multi_scrblt);
BOOL update_read_multi_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect);
BOOL update_read_multi_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_DRAW_NINE_GRID_ORDER* multi_draw_nine_grid);
BOOL update_read_line_to_order(STREAM* s, ORDER_INFO* orderInfo, LINE_TO_ORDER* line_to);
BOOL update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER* polyline);
BOOL update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* memblt);
BOOL update_read_mem3blt_order(STREAM* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER* mem3blt);
BOOL update_read_save_bitmap_order(STREAM* s, ORDER_INFO* orderInfo, SAVE_BITMAP_ORDER* save_bitmap);
BOOL update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX_ORDER* glyph_index);
BOOL update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_ORDER* fast_index);
BOOL update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_ORDER* fast_glyph);
BOOL update_read_polygon_sc_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_SC_ORDER* polygon_sc);
BOOL update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_ORDER* polygon_cb);
BOOL update_read_ellipse_sc_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_SC_ORDER* ellipse_sc);
BOOL update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_ORDER* ellipse_cb);
BOOL update_read_dstblt_order(wStream* s, ORDER_INFO* orderInfo, DSTBLT_ORDER* dstblt);
BOOL update_read_patblt_order(wStream* s, ORDER_INFO* orderInfo, PATBLT_ORDER* patblt);
BOOL update_read_scrblt_order(wStream* s, ORDER_INFO* orderInfo, SCRBLT_ORDER* scrblt);
BOOL update_read_opaque_rect_order(wStream* s, ORDER_INFO* orderInfo, OPAQUE_RECT_ORDER* opaque_rect);
BOOL update_read_draw_nine_grid_order(wStream* s, ORDER_INFO* orderInfo, DRAW_NINE_GRID_ORDER* draw_nine_grid);
BOOL update_read_multi_dstblt_order(wStream* s, ORDER_INFO* orderInfo, MULTI_DSTBLT_ORDER* multi_dstblt);
BOOL update_read_multi_patblt_order(wStream* s, ORDER_INFO* orderInfo, MULTI_PATBLT_ORDER* multi_patblt);
BOOL update_read_multi_scrblt_order(wStream* s, ORDER_INFO* orderInfo, MULTI_SCRBLT_ORDER* multi_scrblt);
BOOL update_read_multi_opaque_rect_order(wStream* s, ORDER_INFO* orderInfo, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect);
BOOL update_read_multi_draw_nine_grid_order(wStream* s, ORDER_INFO* orderInfo, MULTI_DRAW_NINE_GRID_ORDER* multi_draw_nine_grid);
BOOL update_read_line_to_order(wStream* s, ORDER_INFO* orderInfo, LINE_TO_ORDER* line_to);
BOOL update_read_polyline_order(wStream* s, ORDER_INFO* orderInfo, POLYLINE_ORDER* polyline);
BOOL update_read_memblt_order(wStream* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* memblt);
BOOL update_read_mem3blt_order(wStream* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER* mem3blt);
BOOL update_read_save_bitmap_order(wStream* s, ORDER_INFO* orderInfo, SAVE_BITMAP_ORDER* save_bitmap);
BOOL update_read_glyph_index_order(wStream* s, ORDER_INFO* orderInfo, GLYPH_INDEX_ORDER* glyph_index);
BOOL update_read_fast_index_order(wStream* s, ORDER_INFO* orderInfo, FAST_INDEX_ORDER* fast_index);
BOOL update_read_fast_glyph_order(wStream* s, ORDER_INFO* orderInfo, FAST_GLYPH_ORDER* fast_glyph);
BOOL update_read_polygon_sc_order(wStream* s, ORDER_INFO* orderInfo, POLYGON_SC_ORDER* polygon_sc);
BOOL update_read_polygon_cb_order(wStream* s, ORDER_INFO* orderInfo, POLYGON_CB_ORDER* polygon_cb);
BOOL update_read_ellipse_sc_order(wStream* s, ORDER_INFO* orderInfo, ELLIPSE_SC_ORDER* ellipse_sc);
BOOL update_read_ellipse_cb_order(wStream* s, ORDER_INFO* orderInfo, ELLIPSE_CB_ORDER* ellipse_cb);
BOOL update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, UINT16 flags);
BOOL update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, UINT16 flags);
BOOL update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, UINT16 flags);
BOOL update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, UINT16 flags);
BOOL update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, UINT16 flags);
BOOL update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, UINT16 flags);
BOOL update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_order, UINT16 flags);
BOOL update_read_cache_bitmap_order(wStream* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, UINT16 flags);
BOOL update_read_cache_bitmap_v2_order(wStream* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, UINT16 flags);
BOOL update_read_cache_bitmap_v3_order(wStream* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, UINT16 flags);
BOOL update_read_cache_color_table_order(wStream* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, UINT16 flags);
BOOL update_read_cache_glyph_order(wStream* s, CACHE_GLYPH_ORDER* cache_glyph_order, UINT16 flags);
BOOL update_read_cache_glyph_v2_order(wStream* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, UINT16 flags);
BOOL update_read_cache_brush_order(wStream* s, CACHE_BRUSH_ORDER* cache_brush_order, UINT16 flags);
BOOL update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap);
BOOL update_read_switch_surface_order(STREAM* s, SWITCH_SURFACE_ORDER* switch_surface);
BOOL update_read_create_nine_grid_bitmap_order(STREAM* s, CREATE_NINE_GRID_BITMAP_ORDER* create_nine_grid_bitmap);
BOOL update_read_frame_marker_order(STREAM* s, FRAME_MARKER_ORDER* frame_marker);
BOOL update_read_stream_bitmap_first_order(STREAM* s, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first);
BOOL update_read_stream_bitmap_next_order(STREAM* s, STREAM_BITMAP_NEXT_ORDER* stream_bitmap_next);
BOOL update_read_draw_gdiplus_first_order(STREAM* s, DRAW_GDIPLUS_FIRST_ORDER* draw_gdiplus_first);
BOOL update_read_draw_gdiplus_next_order(STREAM* s, DRAW_GDIPLUS_NEXT_ORDER* draw_gdiplus_next);
BOOL update_read_draw_gdiplus_end_order(STREAM* s, DRAW_GDIPLUS_END_ORDER* draw_gdiplus_end);
BOOL update_read_draw_gdiplus_cache_first_order(STREAM* s, DRAW_GDIPLUS_CACHE_FIRST_ORDER* draw_gdiplus_cache_first);
BOOL update_read_draw_gdiplus_cache_next_order(STREAM* s, DRAW_GDIPLUS_CACHE_NEXT_ORDER* draw_gdiplus_cache_next);
BOOL update_read_draw_gdiplus_cache_end_order(STREAM* s, DRAW_GDIPLUS_CACHE_END_ORDER* draw_gdiplus_cache_end);
BOOL update_read_create_offscreen_bitmap_order(wStream* s, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap);
BOOL update_read_switch_surface_order(wStream* s, SWITCH_SURFACE_ORDER* switch_surface);
BOOL update_read_create_nine_grid_bitmap_order(wStream* s, CREATE_NINE_GRID_BITMAP_ORDER* create_nine_grid_bitmap);
BOOL update_read_frame_marker_order(wStream* s, FRAME_MARKER_ORDER* frame_marker);
BOOL update_read_stream_bitmap_first_order(wStream* s, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first);
BOOL update_read_stream_bitmap_next_order(wStream* s, STREAM_BITMAP_NEXT_ORDER* stream_bitmap_next);
BOOL update_read_draw_gdiplus_first_order(wStream* s, DRAW_GDIPLUS_FIRST_ORDER* draw_gdiplus_first);
BOOL update_read_draw_gdiplus_next_order(wStream* s, DRAW_GDIPLUS_NEXT_ORDER* draw_gdiplus_next);
BOOL update_read_draw_gdiplus_end_order(wStream* s, DRAW_GDIPLUS_END_ORDER* draw_gdiplus_end);
BOOL update_read_draw_gdiplus_cache_first_order(wStream* s, DRAW_GDIPLUS_CACHE_FIRST_ORDER* draw_gdiplus_cache_first);
BOOL update_read_draw_gdiplus_cache_next_order(wStream* s, DRAW_GDIPLUS_CACHE_NEXT_ORDER* draw_gdiplus_cache_next);
BOOL update_read_draw_gdiplus_cache_end_order(wStream* s, DRAW_GDIPLUS_CACHE_END_ORDER* draw_gdiplus_cache_end);
#endif /* __ORDERS_H */

View File

@ -68,7 +68,7 @@ static BOOL freerdp_peer_check_fds(freerdp_peer* client)
return TRUE;
}
static BOOL peer_recv_data_pdu(freerdp_peer* client, STREAM* s)
static BOOL peer_recv_data_pdu(freerdp_peer* client, wStream* s)
{
BYTE type;
UINT16 length;
@ -158,7 +158,7 @@ static BOOL peer_recv_data_pdu(freerdp_peer* client, STREAM* s)
return TRUE;
}
static int peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s)
static int peer_recv_tpkt_pdu(freerdp_peer* client, wStream* s)
{
rdpRdp* rdp;
UINT16 length;
@ -219,7 +219,7 @@ static int peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s)
return 0;
}
static int peer_recv_fastpath_pdu(freerdp_peer* client, STREAM* s)
static int peer_recv_fastpath_pdu(freerdp_peer* client, wStream* s)
{
rdpRdp* rdp;
UINT16 length;
@ -247,7 +247,7 @@ static int peer_recv_fastpath_pdu(freerdp_peer* client, STREAM* s)
return fastpath_recv_inputs(fastpath, s);
}
static int peer_recv_pdu(freerdp_peer* client, STREAM* s)
static int peer_recv_pdu(freerdp_peer* client, wStream* s)
{
if (tpkt_verify_header(s))
return peer_recv_tpkt_pdu(client, s);
@ -255,7 +255,7 @@ static int peer_recv_pdu(freerdp_peer* client, STREAM* s)
return peer_recv_fastpath_pdu(client, s);
}
static int peer_recv_callback(rdpTransport* transport, STREAM* s, void* extra)
static int peer_recv_callback(rdpTransport* transport, wStream* s, void* extra)
{
freerdp_peer* client = (freerdp_peer*) extra;
rdpRdp* rdp = client->context->rdp;

View File

@ -77,7 +77,7 @@ static const char* const DATA_PDU_TYPE_STRINGS[] =
* @param flags security flags
*/
BOOL rdp_read_security_header(STREAM* s, UINT16* flags)
BOOL rdp_read_security_header(wStream* s, UINT16* flags)
{
/* Basic Security Header */
if(stream_get_left(s) < 4)
@ -94,14 +94,14 @@ BOOL rdp_read_security_header(STREAM* s, UINT16* flags)
* @param flags security flags
*/
void rdp_write_security_header(STREAM* s, UINT16 flags)
void rdp_write_security_header(wStream* s, UINT16 flags)
{
/* Basic Security Header */
stream_write_UINT16(s, flags); /* flags */
stream_write_UINT16(s, 0); /* flagsHi (unused) */
}
BOOL rdp_read_share_control_header(STREAM* s, UINT16* length, UINT16* type, UINT16* channel_id)
BOOL rdp_read_share_control_header(wStream* s, UINT16* length, UINT16* type, UINT16* channel_id)
{
if (stream_get_left(s) < 2)
return FALSE;
@ -123,7 +123,7 @@ BOOL rdp_read_share_control_header(STREAM* s, UINT16* length, UINT16* type, UINT
return TRUE;
}
void rdp_write_share_control_header(STREAM* s, UINT16 length, UINT16 type, UINT16 channel_id)
void rdp_write_share_control_header(wStream* s, UINT16 length, UINT16 type, UINT16 channel_id)
{
length -= RDP_PACKET_HEADER_MAX_LENGTH;
@ -133,7 +133,7 @@ void rdp_write_share_control_header(STREAM* s, UINT16 length, UINT16 type, UINT1
stream_write_UINT16(s, channel_id); /* pduSource */
}
BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, UINT32* share_id,
BOOL rdp_read_share_data_header(wStream* s, UINT16* length, BYTE* type, UINT32* share_id,
BYTE *compressed_type, UINT16 *compressed_len)
{
if (stream_get_left(s) < 12)
@ -150,7 +150,7 @@ BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, UINT32* s
return TRUE;
}
void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, UINT32 share_id)
void rdp_write_share_data_header(wStream* s, UINT16 length, BYTE type, UINT32 share_id)
{
length -= RDP_PACKET_HEADER_MAX_LENGTH;
length -= RDP_SHARE_CONTROL_HEADER_LENGTH;
@ -166,7 +166,7 @@ void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, UINT32 sha
stream_write_UINT16(s, 0); /* compressedLength (2 bytes) */
}
static int rdp_security_stream_init(rdpRdp* rdp, STREAM* s)
static int rdp_security_stream_init(rdpRdp* rdp, wStream* s)
{
if (rdp->do_crypt)
{
@ -194,9 +194,9 @@ static int rdp_security_stream_init(rdpRdp* rdp, STREAM* s)
* @return
*/
STREAM* rdp_send_stream_init(rdpRdp* rdp)
wStream* rdp_send_stream_init(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = transport_send_stream_init(rdp->transport, 2048);
stream_seek(s, RDP_PACKET_HEADER_MAX_LENGTH);
@ -205,9 +205,9 @@ STREAM* rdp_send_stream_init(rdpRdp* rdp)
return s;
}
STREAM* rdp_pdu_init(rdpRdp* rdp)
wStream* rdp_pdu_init(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = transport_send_stream_init(rdp->transport, 2048);
stream_seek(s, RDP_PACKET_HEADER_MAX_LENGTH);
rdp_security_stream_init(rdp, s);
@ -215,9 +215,9 @@ STREAM* rdp_pdu_init(rdpRdp* rdp)
return s;
}
STREAM* rdp_data_pdu_init(rdpRdp* rdp)
wStream* rdp_data_pdu_init(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = transport_send_stream_init(rdp->transport, 2048);
stream_seek(s, RDP_PACKET_HEADER_MAX_LENGTH);
rdp_security_stream_init(rdp, s);
@ -234,7 +234,7 @@ STREAM* rdp_data_pdu_init(rdpRdp* rdp)
* @param channel_id channel id
*/
BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, UINT16* length, UINT16* channel_id)
BOOL rdp_read_header(rdpRdp* rdp, wStream* s, UINT16* length, UINT16* channel_id)
{
UINT16 initiator;
enum DomainMCSPDU MCSPDU;
@ -284,7 +284,7 @@ BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, UINT16* length, UINT16* channel_id)
* @param channel_id channel id
*/
void rdp_write_header(rdpRdp* rdp, STREAM* s, UINT16 length, UINT16 channel_id)
void rdp_write_header(rdpRdp* rdp, wStream* s, UINT16 length, UINT16 channel_id)
{
int body_length;
enum DomainMCSPDU MCSPDU;
@ -316,7 +316,7 @@ void rdp_write_header(rdpRdp* rdp, STREAM* s, UINT16 length, UINT16 channel_id)
stream_write_UINT16_be(s, length); /* userData (OCTET_STRING) */
}
static UINT32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length)
static UINT32 rdp_security_stream_out(rdpRdp* rdp, wStream* s, int length)
{
BYTE* data;
UINT32 sec_flags;
@ -401,7 +401,7 @@ static UINT32 rdp_get_sec_bytes(rdpRdp* rdp)
* @param channel_id channel id
*/
BOOL rdp_send(rdpRdp* rdp, STREAM* s, UINT16 channel_id)
BOOL rdp_send(rdpRdp* rdp, wStream* s, UINT16 channel_id)
{
UINT16 length;
UINT32 sec_bytes;
@ -427,7 +427,7 @@ BOOL rdp_send(rdpRdp* rdp, STREAM* s, UINT16 channel_id)
return TRUE;
}
BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, UINT16 type, UINT16 channel_id)
BOOL rdp_send_pdu(rdpRdp* rdp, wStream* s, UINT16 type, UINT16 channel_id)
{
UINT16 length;
UINT32 sec_bytes;
@ -454,7 +454,7 @@ BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, UINT16 type, UINT16 channel_id)
return TRUE;
}
BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id)
BOOL rdp_send_data_pdu(rdpRdp* rdp, wStream* s, BYTE type, UINT16 channel_id)
{
UINT16 length;
UINT32 sec_bytes;
@ -482,7 +482,7 @@ BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id)
return TRUE;
}
BOOL rdp_recv_set_error_info_data_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_set_error_info_data_pdu(rdpRdp* rdp, wStream* s)
{
if (stream_get_left(s) < 4)
return FALSE;
@ -495,7 +495,7 @@ BOOL rdp_recv_set_error_info_data_pdu(rdpRdp* rdp, STREAM* s)
return TRUE;
}
int rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
int rdp_recv_data_pdu(rdpRdp* rdp, wStream* s)
{
BYTE type;
UINT16 length;
@ -504,7 +504,7 @@ int rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
UINT16 compressed_len;
UINT32 roff;
UINT32 rlen;
STREAM* comp_stream;
wStream* comp_stream;
if (!rdp_read_share_data_header(s, &length, &type, &share_id, &compressed_type, &compressed_len))
return -1;
@ -642,7 +642,7 @@ int rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
return 0;
}
BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, wStream* s)
{
UINT16 type;
UINT16 length;
@ -672,7 +672,7 @@ BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s)
* @param length int
*/
BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, UINT16 securityFlags)
BOOL rdp_decrypt(rdpRdp* rdp, wStream* s, int length, UINT16 securityFlags)
{
BYTE cmac[8];
BYTE wmac[8];
@ -747,7 +747,7 @@ BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, UINT16 securityFlags)
* @param s stream
*/
static int rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
static int rdp_recv_tpkt_pdu(rdpRdp* rdp, wStream* s)
{
UINT16 length;
UINT16 pduType;
@ -838,7 +838,7 @@ static int rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
return 0;
}
static int rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s)
static int rdp_recv_fastpath_pdu(rdpRdp* rdp, wStream* s)
{
UINT16 length;
rdpFastPath* fastpath;
@ -865,7 +865,7 @@ static int rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s)
return fastpath_recv_updates(rdp->fastpath, s);
}
static int rdp_recv_pdu(rdpRdp* rdp, STREAM* s)
static int rdp_recv_pdu(rdpRdp* rdp, wStream* s)
{
if (tpkt_verify_header(s))
return rdp_recv_tpkt_pdu(rdp, s);
@ -880,7 +880,7 @@ static int rdp_recv_pdu(rdpRdp* rdp, STREAM* s)
void rdp_recv(rdpRdp* rdp)
{
STREAM* s;
wStream* s;
s = transport_recv_stream_init(rdp->transport, 4096);
transport_read(rdp->transport, s);
@ -888,7 +888,7 @@ void rdp_recv(rdpRdp* rdp)
rdp_recv_pdu(rdp, s);
}
static int rdp_recv_callback(rdpTransport* transport, STREAM* s, void* extra)
static int rdp_recv_callback(rdpTransport* transport, wStream* s, void* extra)
{
int status = 0;
rdpRdp* rdp = (rdpRdp*) extra;

View File

@ -157,35 +157,35 @@ struct rdp_rdp
BOOL disconnect;
};
BOOL rdp_read_security_header(STREAM* s, UINT16* flags);
void rdp_write_security_header(STREAM* s, UINT16 flags);
BOOL rdp_read_security_header(wStream* s, UINT16* flags);
void rdp_write_security_header(wStream* s, UINT16 flags);
BOOL rdp_read_share_control_header(STREAM* s, UINT16* length, UINT16* type, UINT16* channel_id);
void rdp_write_share_control_header(STREAM* s, UINT16 length, UINT16 type, UINT16 channel_id);
BOOL rdp_read_share_control_header(wStream* s, UINT16* length, UINT16* type, UINT16* channel_id);
void rdp_write_share_control_header(wStream* s, UINT16 length, UINT16 type, UINT16 channel_id);
BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, UINT32* share_id,
BOOL rdp_read_share_data_header(wStream* s, UINT16* length, BYTE* type, UINT32* share_id,
BYTE *compressed_type, UINT16 *compressed_len);
void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, UINT32 share_id);
void rdp_write_share_data_header(wStream* s, UINT16 length, BYTE type, UINT32 share_id);
STREAM* rdp_send_stream_init(rdpRdp* rdp);
wStream* rdp_send_stream_init(rdpRdp* rdp);
BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, UINT16* length, UINT16* channel_id);
void rdp_write_header(rdpRdp* rdp, STREAM* s, UINT16 length, UINT16 channel_id);
BOOL rdp_read_header(rdpRdp* rdp, wStream* s, UINT16* length, UINT16* channel_id);
void rdp_write_header(rdpRdp* rdp, wStream* s, UINT16 length, UINT16 channel_id);
STREAM* rdp_pdu_init(rdpRdp* rdp);
BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, UINT16 type, UINT16 channel_id);
wStream* rdp_pdu_init(rdpRdp* rdp);
BOOL rdp_send_pdu(rdpRdp* rdp, wStream* s, UINT16 type, UINT16 channel_id);
STREAM* rdp_data_pdu_init(rdpRdp* rdp);
BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id);
int rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s);
wStream* rdp_data_pdu_init(rdpRdp* rdp);
BOOL rdp_send_data_pdu(rdpRdp* rdp, wStream* s, BYTE type, UINT16 channel_id);
int rdp_recv_data_pdu(rdpRdp* rdp, wStream* s);
BOOL rdp_send(rdpRdp* rdp, STREAM* s, UINT16 channel_id);
BOOL rdp_send(rdpRdp* rdp, wStream* s, UINT16 channel_id);
void rdp_recv(rdpRdp* rdp);
int rdp_send_channel_data(rdpRdp* rdp, int channel_id, BYTE* data, int size);
BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, wStream* s);
void rdp_set_blocking_mode(rdpRdp* rdp, BOOL blocking);
int rdp_check_fds(rdpRdp* rdp);
@ -199,6 +199,6 @@ void rdp_free(rdpRdp* rdp);
#define DEBUG_RDP(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
#endif
BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, UINT16 securityFlags);
BOOL rdp_decrypt(rdpRdp* rdp, wStream* s, int length, UINT16 securityFlags);
#endif /* __RDP_H */

View File

@ -61,7 +61,7 @@ void rdp_print_redirection_flags(UINT32 flags)
printf("}\n");
}
BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, wStream* s)
{
UINT16 flags;
UINT16 length;
@ -186,12 +186,12 @@ BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
return rdp_client_redirect(rdp);
}
BOOL rdp_recv_redirection_packet(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_redirection_packet(rdpRdp* rdp, wStream* s)
{
return rdp_recv_server_redirection_pdu(rdp, s);
}
BOOL rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, STREAM* s)
BOOL rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, wStream* s)
{
return stream_skip(s, 2) && /* pad2Octets (2 bytes) */
rdp_recv_server_redirection_pdu(rdp, s) &&

View File

@ -46,8 +46,8 @@ struct rdp_redirection
};
typedef struct rdp_redirection rdpRedirection;
BOOL rdp_recv_redirection_packet(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, STREAM* s);
BOOL rdp_recv_redirection_packet(rdpRdp* rdp, wStream* s);
BOOL rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, wStream* s);
rdpRedirection* redirection_new(void);
void redirection_free(rdpRedirection* redirection);

View File

@ -25,7 +25,7 @@
#include "surface.h"
static int update_recv_surfcmd_surface_bits(rdpUpdate* update, STREAM* s, UINT32 *length)
static int update_recv_surfcmd_surface_bits(rdpUpdate* update, wStream* s, UINT32 *length)
{
int pos;
SURFACE_BITS_COMMAND* cmd = &update->surface_bits_command;
@ -60,14 +60,14 @@ static int update_recv_surfcmd_surface_bits(rdpUpdate* update, STREAM* s, UINT32
static void update_send_frame_acknowledge(rdpRdp* rdp, UINT32 frameId)
{
STREAM* s;
wStream* s;
s = rdp_data_pdu_init(rdp);
stream_write_UINT32(s, frameId);
rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_FRAME_ACKNOWLEDGE, rdp->mcs->user_id);
}
static int update_recv_surfcmd_frame_marker(rdpUpdate* update, STREAM* s, UINT32 *length)
static int update_recv_surfcmd_frame_marker(rdpUpdate* update, wStream* s, UINT32 *length)
{
SURFACE_FRAME_MARKER* marker = &update->surface_frame_marker;
@ -91,7 +91,7 @@ static int update_recv_surfcmd_frame_marker(rdpUpdate* update, STREAM* s, UINT32
return 0;
}
int update_recv_surfcmds(rdpUpdate* update, UINT32 size, STREAM* s)
int update_recv_surfcmds(rdpUpdate* update, UINT32 size, wStream* s)
{
BYTE* mark;
UINT16 cmdType;
@ -134,7 +134,7 @@ int update_recv_surfcmds(rdpUpdate* update, UINT32 size, STREAM* s)
return 0;
}
void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd)
void update_write_surfcmd_surface_bits_header(wStream* s, SURFACE_BITS_COMMAND* cmd)
{
stream_check_size(s, SURFCMD_SURFACE_BITS_HEADER_LENGTH);
@ -152,7 +152,7 @@ void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* c
stream_write_UINT32(s, cmd->bitmapDataLength);
}
void update_write_surfcmd_frame_marker(STREAM* s, UINT16 frameAction, UINT32 frameId)
void update_write_surfcmd_frame_marker(wStream* s, UINT16 frameAction, UINT32 frameId)
{
stream_check_size(s, SURFCMD_FRAME_MARKER_LENGTH);

View File

@ -33,10 +33,10 @@ enum SURFCMD_CMDTYPE
CMDTYPE_STREAM_SURFACE_BITS = 0x0006
};
int update_recv_surfcmds(rdpUpdate* update, UINT32 size, STREAM* s);
int update_recv_surfcmds(rdpUpdate* update, UINT32 size, wStream* s);
void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd);
void update_write_surfcmd_frame_marker(STREAM* s, UINT16 frameAction, UINT32 frameId);
void update_write_surfcmd_surface_bits_header(wStream* s, SURFACE_BITS_COMMAND* cmd);
void update_write_surfcmd_frame_marker(wStream* s, UINT16 frameAction, UINT32 frameId);
#endif /* __SURFACE */

View File

@ -32,7 +32,7 @@
* @param system_time system time structure
*/
void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time)
void rdp_read_system_time(wStream* s, SYSTEM_TIME* system_time)
{
stream_read_UINT16(s, system_time->wYear); /* wYear, must be set to 0 */
stream_read_UINT16(s, system_time->wMonth); /* wMonth */
@ -51,7 +51,7 @@ void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time)
* @param system_time system time structure
*/
void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time)
void rdp_write_system_time(wStream* s, SYSTEM_TIME* system_time)
{
stream_write_UINT16(s, system_time->wYear); /* wYear, must be set to 0 */
stream_write_UINT16(s, system_time->wMonth); /* wMonth */
@ -74,7 +74,7 @@ void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time)
* @param settings settings
*/
BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings)
BOOL rdp_read_client_time_zone(wStream* s, rdpSettings* settings)
{
char* str = NULL;
TIME_ZONE_INFO* clientTimeZone;
@ -115,7 +115,7 @@ BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings)
* @param settings settings
*/
void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings)
void rdp_write_client_time_zone(wStream* s, rdpSettings* settings)
{
UINT32 bias;
INT32 sbias;

View File

@ -30,11 +30,11 @@
#include <freerdp/utils/stream.h>
#include <freerdp/locale/timezone.h>
void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time);
void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time);
void rdp_get_client_time_zone(STREAM* s, rdpSettings* settings);
BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings);
void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings);
void rdp_read_system_time(wStream* s, SYSTEM_TIME* system_time);
void rdp_write_system_time(wStream* s, SYSTEM_TIME* system_time);
void rdp_get_client_time_zone(wStream* s, rdpSettings* settings);
BOOL rdp_read_client_time_zone(wStream* s, rdpSettings* settings);
void rdp_write_client_time_zone(wStream* s, rdpSettings* settings);
#ifdef WITH_DEBUG_TIMEZONE
#define DEBUG_TIMEZONE(fmt, ...) DEBUG_CLASS(TIMEZONE, fmt, ## __VA_ARGS__)

View File

@ -66,7 +66,7 @@
* @return TPDU length indicator (LI)
*/
BOOL tpdu_read_header(STREAM* s, BYTE* code, BYTE *li)
BOOL tpdu_read_header(wStream* s, BYTE* code, BYTE *li)
{
if(stream_get_left(s) < 3)
return FALSE;
@ -96,7 +96,7 @@ BOOL tpdu_read_header(STREAM* s, BYTE* code, BYTE *li)
* @param code TPDU code
*/
void tpdu_write_header(STREAM* s, UINT16 length, BYTE code)
void tpdu_write_header(wStream* s, UINT16 length, BYTE code)
{
stream_write_BYTE(s, length); /* LI */
stream_write_BYTE(s, code); /* code */
@ -119,7 +119,7 @@ void tpdu_write_header(STREAM* s, UINT16 length, BYTE code)
* @return length indicator (LI)
*/
BOOL tpdu_read_connection_request(STREAM* s, BYTE *li)
BOOL tpdu_read_connection_request(wStream* s, BYTE *li)
{
BYTE code;
@ -141,7 +141,7 @@ BOOL tpdu_read_connection_request(STREAM* s, BYTE *li)
* @param length TPDU length
*/
void tpdu_write_connection_request(STREAM* s, UINT16 length)
void tpdu_write_connection_request(wStream* s, UINT16 length)
{
tpdu_write_header(s, length, X224_TPDU_CONNECTION_REQUEST);
}
@ -152,7 +152,7 @@ void tpdu_write_connection_request(STREAM* s, UINT16 length)
* @return length indicator (LI)
*/
BOOL tpdu_read_connection_confirm(STREAM* s, BYTE *li)
BOOL tpdu_read_connection_confirm(wStream* s, BYTE *li)
{
BYTE code;
@ -174,7 +174,7 @@ BOOL tpdu_read_connection_confirm(STREAM* s, BYTE *li)
* @param length TPDU length
*/
void tpdu_write_connection_confirm(STREAM* s, UINT16 length)
void tpdu_write_connection_confirm(wStream* s, UINT16 length)
{
tpdu_write_header(s, length, X224_TPDU_CONNECTION_CONFIRM);
}
@ -185,7 +185,7 @@ void tpdu_write_connection_confirm(STREAM* s, UINT16 length)
* @param length TPDU length
*/
void tpdu_write_disconnect_request(STREAM* s, UINT16 length)
void tpdu_write_disconnect_request(wStream* s, UINT16 length)
{
tpdu_write_header(s, length, X224_TPDU_DISCONNECT_REQUEST);
}
@ -195,7 +195,7 @@ void tpdu_write_disconnect_request(STREAM* s, UINT16 length)
* @param s stream
*/
void tpdu_write_data(STREAM* s)
void tpdu_write_data(wStream* s)
{
tpdu_write_header(s, 2, X224_TPDU_DATA);
}
@ -205,7 +205,7 @@ void tpdu_write_data(STREAM* s)
* @param s stream
*/
BOOL tpdu_read_data(STREAM* s, UINT16 *LI)
BOOL tpdu_read_data(wStream* s, UINT16 *LI)
{
BYTE code;
BYTE li;

Some files were not shown because too many files have changed in this diff Show More