rail_write_pdu_header(s, orderType, orderLength);
Stream_SetPosition(s, orderLength);
WLog_Print(rail->log, WLOG_DEBUG, "Sending %s PDU, length: %" PRIu16 "",
- RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)],
- orderLength);
+ rail_get_order_type_string(orderType), orderLength);
return rail_send_channel_data(rail, s);
}
}
WLog_Print(rail->log, WLOG_DEBUG, "Received %s PDU, length:%" PRIu16 "",
- RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)],
- orderLength);
+ rail_get_order_type_string(orderType), orderLength);
switch (orderType)
{
#define TAG CHANNELS_TAG("rail.common")
-const char* const RAIL_ORDER_TYPE_STRINGS[] = { "",
- "Execute",
- "Activate",
- "System Parameters Update",
- "System Command",
- "Handshake",
- "Notify Event",
- "",
- "Window Move",
- "Local Move/Size",
- "Min Max Info",
- "Client Status",
- "System Menu",
- "Language Bar Info",
- "Get Application ID Request",
- "Get Application ID Response",
- "Execute Result",
- "",
- "",
- "",
- "",
- "",
- "" };
+static const char* const RAIL_ORDER_TYPE_STRINGS[] = { "",
+ "Execute",
+ "Activate",
+ "System Parameters Update",
+ "System Command",
+ "Handshake",
+ "Notify Event",
+ "",
+ "Window Move",
+ "Local Move/Size",
+ "Min Max Info",
+ "Client Status",
+ "System Menu",
+ "Language Bar Info",
+ "Get Application ID Request",
+ "Get Application ID Response",
+ "Execute Result",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "" };
+
+const char* rail_get_order_type_string(BYTE orderType)
+{
+ return RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)];
+}
/**
* Function description
#include <freerdp/rail.h>
-extern const char* const RAIL_ORDER_TYPE_STRINGS[];
+const char* rail_get_order_type_string(BYTE orderType);
#define RAIL_PDU_HEADER_LENGTH 4
Stream_SetPosition(s, 0);
rail_write_pdu_header(s, orderType, orderLength);
Stream_SetPosition(s, orderLength);
- WLog_DBG(TAG, "Sending %s PDU, length: %" PRIu16 "",
- RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], orderLength);
+ WLog_DBG(TAG, "Sending %s PDU, length: %" PRIu16 "", rail_get_order_type_string(orderType),
+ orderLength);
return rail_send(context, s, orderLength);
}
return ERROR_INTERNAL_ERROR;
}
- WLog_DBG(TAG, "Received %s PDU, length:%" PRIu16 "",
- RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], orderLength);
+ WLog_DBG(TAG, "Received %s PDU, length:%" PRIu16 "", rail_get_order_type_string(orderType),
+ orderLength);
switch (orderType)
{