VirtualBox

Changeset 5982 in vbox


Ignore:
Timestamp:
Dec 6, 2007 11:08:42 AM (17 years ago)
Author:
vboxsync
Message:

Removed obsolete VRDP server interface that used COM.

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r5963 r5982  
    156156# enable VRDP server
    157157VBOX_WITH_VRDP = 1
    158 # enable the new VRDP server interface which does not use COM
    159 VBOX_WITH_VRDP_NO_COM = 1
    160158# build VRDP authentication modules
    161159VBOX_WITH_VRDP_AUTHMOD = 1
  • trunk/include/VBox/VBoxGuest.h

    r5891 r5982  
    737737
    738738#pragma pack(1)
    739 
    740739/** VBVA command header. */
    741740typedef struct _VBVACMDHDR
     
    747746   uint16_t h;
    748747} VBVACMDHDR;
    749 
    750 /* VBVA order codes. Must be >= 0, because the VRDP server internally
    751  * uses negative values to mark some operations.
    752  * Values are important since they are used as an index in the
    753  * "supported orders" bit mask.
    754  */
    755 #define VBVA_VRDP_DIRTY_RECT     (0)
    756 #define VBVA_VRDP_SOLIDRECT      (1)
    757 #define VBVA_VRDP_SOLIDBLT       (2)
    758 #define VBVA_VRDP_DSTBLT         (3)
    759 #define VBVA_VRDP_SCREENBLT      (4)
    760 #define VBVA_VRDP_PATBLTBRUSH    (5)
    761 #define VBVA_VRDP_MEMBLT         (6)
    762 #define VBVA_VRDP_CACHED_BITMAP  (7)
    763 #define VBVA_VRDP_DELETED_BITMAP (8)
    764 #define VBVA_VRDP_LINE           (9)
    765 #define VBVA_VRDP_BOUNDS         (10)
    766 #define VBVA_VRDP_REPEAT         (11)
    767 #define VBVA_VRDP_POLYLINE       (12)
    768 #define VBVA_VRDP_ELLIPSE        (13)
    769 #define VBVA_VRDP_SAVESCREEN     (14)
    770 
    771 #define VBVA_VRDP_INDEX_TO_BIT(__index) (1 << (__index))
    772 
    773 #ifndef VRDP_NO_COM
    774 /* 128 bit bitmap hash. */
    775 typedef uint8_t VRDPBITMAPHASH[16];
    776 
    777 typedef struct _VRDPORDERPOINT
    778 {
    779     int16_t  x;
    780     int16_t  y;
    781 } VRDPORDERPOINT;
    782 
    783 typedef struct _VRDPORDERPOLYPOINTS
    784 {
    785     uint8_t  c;
    786     VRDPORDERPOINT a[16];
    787 } VRDPORDERPOLYPOINTS;
    788 
    789 typedef struct _VRDPORDERAREA
    790 {
    791     int16_t  x;
    792     int16_t  y;
    793     uint16_t w;
    794     uint16_t h;
    795 } VRDPORDERAREA;
    796 
    797 typedef struct _VRDPORDERBOUNDS
    798 {
    799     VRDPORDERPOINT pt1;
    800     VRDPORDERPOINT pt2;
    801 } VRDPORDERBOUNDS;
    802 
    803 typedef struct _VRDPORDERREPEAT
    804 {
    805     VRDPORDERBOUNDS bounds;
    806 } VRDPORDERREPEAT;
    807 
    808 
    809 /* Header for bitmap bits in VBVA VRDP operations. */
    810 typedef struct _VRDPDATABITS
    811 {
    812     /* Size of bitmap data without the header. */
    813     uint32_t cb;
    814     int16_t  x;
    815     int16_t  y;
    816     uint16_t cWidth;
    817     uint16_t cHeight;
    818     uint8_t cbPixel;
    819 } VRDPDATABITS;
    820 
    821 typedef struct _VRDPORDERSOLIDRECT
    822 {
    823     int16_t  x;
    824     int16_t  y;
    825     uint16_t w;
    826     uint16_t h;
    827     uint32_t rgb;
    828 } VRDPORDERSOLIDRECT;
    829 
    830 typedef struct _VRDPORDERSOLIDBLT
    831 {
    832     int16_t  x;
    833     int16_t  y;
    834     uint16_t w;
    835     uint16_t h;
    836     uint32_t rgb;
    837     uint8_t  rop;
    838 } VRDPORDERSOLIDBLT;
    839 
    840 typedef struct _VRDPORDERDSTBLT
    841 {
    842     int16_t  x;
    843     int16_t  y;
    844     uint16_t w;
    845     uint16_t h;
    846     uint8_t  rop;
    847 } VRDPORDERDSTBLT;
    848 
    849 typedef struct _VRDPORDERSCREENBLT
    850 {
    851     int16_t  x;
    852     int16_t  y;
    853     uint16_t w;
    854     uint16_t h;
    855     int16_t  xSrc;
    856     int16_t  ySrc;
    857     uint8_t  rop;
    858 } VRDPORDERSCREENBLT;
    859 
    860 typedef struct _VRDPORDERPATBLTBRUSH
    861 {
    862     int16_t  x;
    863     int16_t  y;
    864     uint16_t w;
    865     uint16_t h;
    866     int8_t   xSrc;
    867     int8_t   ySrc;
    868     uint32_t rgbFG;
    869     uint32_t rgbBG;
    870     uint8_t  rop;
    871     uint8_t  pattern[8];
    872 } VRDPORDERPATBLTBRUSH;
    873 
    874 typedef struct _VRDPORDERMEMBLT
    875 {
    876     int16_t  x;
    877     int16_t  y;
    878     uint16_t w;
    879     uint16_t h;
    880     int16_t  xSrc;
    881     int16_t  ySrc;
    882     uint8_t  rop;
    883     VRDPBITMAPHASH hash;
    884 } VRDPORDERMEMBLT;
    885 
    886 typedef struct _VRDPORDERCACHEDBITMAP
    887 {
    888     VRDPBITMAPHASH hash;
    889     /* VRDPDATABITS and the bitmap data follows. */
    890 } VRDPORDERCACHEDBITMAP;
    891 
    892 typedef struct _VRDPORDERDELETEDBITMAP
    893 {
    894     VRDPBITMAPHASH hash;
    895 } VRDPORDERDELETEDBITMAP;
    896 
    897 typedef struct _VRDPORDERLINE
    898 {
    899     int16_t  x1;
    900     int16_t  y1;
    901     int16_t  x2;
    902     int16_t  y2;
    903     int16_t  xBounds1;
    904     int16_t  yBounds1;
    905     int16_t  xBounds2;
    906     int16_t  yBounds2;
    907     uint8_t  mix;
    908     uint32_t rgb;
    909 } VRDPORDERLINE;
    910 
    911 typedef struct _VRDPORDERPOLYLINE
    912 {
    913     VRDPORDERPOINT ptStart;
    914     uint8_t  mix;
    915     uint32_t rgb;
    916     VRDPORDERPOLYPOINTS points;
    917 } VRDPORDERPOLYLINE;
    918 
    919 typedef struct _VRDPORDERELLIPSE
    920 {
    921     VRDPORDERPOINT pt1;
    922     VRDPORDERPOINT pt2;
    923     uint8_t  mix;
    924     uint8_t  fillMode;
    925     uint32_t rgb;
    926 } VRDPORDERELLIPSE;
    927 
    928 typedef struct _VRDPORDERSAVESCREEN
    929 {
    930     VRDPORDERPOINT pt1;
    931     VRDPORDERPOINT pt2;
    932     uint8_t ident;
    933     uint8_t restore;
    934 } VRDPORDERSAVESCREEN;
    935 #endif /* VRDP_NO_COM */
    936748#pragma pack()
    937749
  • trunk/include/VBox/vrdpapi.h

    r5782 r5982  
    1919#define ___VBox_vrdpapi_h
    2020
    21 #ifdef VRDP_NO_COM
    2221#include <iprt/cdefs.h>
    2322#include <iprt/types.h>
    24 #else
    25 #include <VBox/cdefs.h>
    26 #include <VBox/types.h>
    27 #endif /* VRDP_NO_COM */
    2823
    2924#ifdef IN_RING0
     
    5550#endif /* __cplusplus */
    5651
    57 #ifdef VRDP_NO_COM
    58 /* New, callback based VRDP server interface declarations. */
     52/* Callback based VRDP server interface declarations. */
    5953
    6054#if defined(IN_VRDP)
     
    953947                                HVRDPSERVER *phServer);
    954948
    955 typedef VRDPDECL(int) FNVRDPCREATESERVER (const VRDPINTERFACEHDR *pCallbacks,
    956                                           void *pvCallback,
    957                                           VRDPINTERFACEHDR **ppEntryPoints,
    958                                           HVRDPSERVER *phServer);
     949typedef DECLCALLBACK(int) FNVRDPCREATESERVER (const VRDPINTERFACEHDR *pCallbacks,
     950                                              void *pvCallback,
     951                                              VRDPINTERFACEHDR **ppEntryPoints,
     952                                              HVRDPSERVER *phServer);
    959953typedef FNVRDPCREATESERVER *PFNVRDPCREATESERVER;
    960 #else
    961 /**
    962  * Start server for the specified IConsole.
    963  *
    964  * @return VBox status code
    965  * @param pconsole     Pointer to IConsole instance to fetch display, mouse and keyboard interfaces.
    966  * @param pvrdpserver  Pointer to IVRDPServer instance to fetch configuration.
    967  * @param phserver     Pointer to server instance handle,
    968  *                     created by the function.
    969  */
    970 VRDPR3DECL(int) VRDPStartServer (IConsole *pconsole, IVRDPServer *pvrdpserver, HVRDPSERVER *phserver);
    971 
    972 
    973 /**
    974  * Shutdown server.
    975  *
    976  * @param hserver Handle of VRDP server instance to be stopped.
    977  */
    978 VRDPR3DECL(void) VRDPShutdownServer (HVRDPSERVER hserver);
    979 
    980 
    981 /**
    982  * Send framebuffer bitmap to client.
    983  *
    984  * @param hserver Handle of VRDP server instance.
    985  * @param x       top left horizontal coordinate in framebuffer.
    986  * @param y       top left vertical coordinate in framebuffer.
    987  * @param w       width of rectangle.
    988  * @param h       height of rectangle.
    989  */
    990 VRDPR3DECL(void) VRDPSendUpdateBitmap (HVRDPSERVER hserver, unsigned uScreenId, unsigned x, unsigned y, unsigned w, unsigned h);
    991 
    992 /**
    993  * Inform client that display was resized.
    994  * New width and height are taken from the current framebuffer.
    995  *
    996  * @param hserver Handle of VRDP server instance.
    997  */
    998 VRDPR3DECL(void) VRDPSendResize (HVRDPSERVER hserver);
    999 
    1000 /**
    1001  * Send an update in accelerated mode.
    1002  *
    1003  * @param hserver   Handle of VRDP server instance.
    1004  * @param pvUpdate  The update information. Actually pointer to VBoxGuest.h::VBVACMDHDR structure with extra data.
    1005  * @param cbUpdate  Size of the update data.
    1006  */
    1007 VRDPR3DECL(void) VRDPSendUpdate (HVRDPSERVER hserver, unsigned uScreenId, void *pvUpdate, uint32_t cbUpdate);
    1008 
    1009 /** @todo comment the structure. */
    1010 typedef struct _VRDPCOLORPOINTER
    1011 {
    1012     uint16_t u16HotX;
    1013     uint16_t u16HotY;
    1014     uint16_t u16Width;
    1015     uint16_t u16Height;
    1016     uint16_t u16MaskLen;
    1017     uint16_t u16DataLen;
    1018     uint32_t vrdpInternal;
    1019 } VRDPCOLORPOINTER;
    1020 
    1021 typedef VRDPCOLORPOINTER *PVRDPCOLORPOINTER;
    1022 
    1023 /**
    1024  * Set mouse pointer shape.
    1025  *
    1026  * @param hserver Handle of VRDP server instance.
    1027  * @param porder  The pointer shape information.
    1028  */
    1029 VRDPR3DECL(void) VRDPSendColorPointer (HVRDPSERVER hserver, PVRDPCOLORPOINTER pdata);
    1030 
    1031 /**
    1032  * Hide mouse pointer.
    1033  *
    1034  * @param hserver Handle of VRDP server instance.
    1035  */
    1036 VRDPR3DECL(void) VRDPSendHidePointer (HVRDPSERVER hserver);
    1037 
    1038 /** Audio format information packed in a 32 bit value. */
    1039 typedef uint32_t VRDPAUDIOFORMAT;
    1040 
    1041 /** Constructs 32 bit value for given frequency, number of channel and bits per sample. */
    1042 #define VRDP_AUDIO_FMT_MAKE(freq, c, bps, s) ((((s) & 0x1) << 28) + (((bps) & 0xFF) << 20) + (((c) & 0xF) << 16) + ((freq) & 0xFFFF))
    1043 
    1044 /** Decode frequency. */
    1045 #define VRDP_AUDIO_FMT_SAMPLE_FREQ(a) ((a) & 0xFFFF)
    1046 /** Decode number of channels. */
    1047 #define VRDP_AUDIO_FMT_CHANNELS(a) (((a) >> 16) & 0xF)
    1048 /** Decode number signess. */
    1049 #define VRDP_AUDIO_FMT_SIGNED(a) (((a) >> 28) & 0x1)
    1050 /** Decode number of bits per sample. */
    1051 #define VRDP_AUDIO_FMT_BITS_PER_SAMPLE(a) (((a) >> 20) & 0xFF)
    1052 /** Decode number of bytes per sample. */
    1053 #define VRDP_AUDIO_FMT_BYTES_PER_SAMPLE(a) ((VRDP_AUDIO_FMT_BITS_PER_SAMPLE(a) + 7) / 8)
    1054 
    1055 /**
    1056  * Queues the samples to be sent to client.
    1057  *
    1058  * @param hserver    Handle of VRDP server instance.
    1059  * @param pvSamples  Address of samples to be sent.
    1060  * @param cSamples   Number of samples.
    1061  * @param format     Encoded audio format for these samples.
    1062  */
    1063 VRDPR3DECL(void) VRDPSendAudioSamples (HVRDPSERVER hserver, void *pvSamples, uint32_t cSamples, VRDPAUDIOFORMAT format);
    1064 
    1065 /**
    1066  * Sets sound volume on client.
    1067  *
    1068  * @param hserver    Handle of VRDP server instance.
    1069  * @param left       0..0xFFFF volume level for left channel.
    1070  * @param right      0..0xFFFF volume level for right channel.
    1071  */
    1072 VRDPR3DECL(void) VRDPSendAudioVolume (HVRDPSERVER hserver, uint16_t left, uint16_t right);
    1073 
    1074 
    1075 /*
    1076  * Remote USB backend protocol.
    1077  */
    1078 
    1079 /* The version of Remote USB Protocol. */
    1080 #define VRDP_USB_VERSION (1)
    1081 
    1082 /** USB backend operations. */
    1083 #define VRDP_USB_REQ_OPEN              (0)
    1084 #define VRDP_USB_REQ_CLOSE             (1)
    1085 #define VRDP_USB_REQ_RESET             (2)
    1086 #define VRDP_USB_REQ_SET_CONFIG        (3)
    1087 #define VRDP_USB_REQ_CLAIM_INTERFACE   (4)
    1088 #define VRDP_USB_REQ_RELEASE_INTERFACE (5)
    1089 #define VRDP_USB_REQ_INTERFACE_SETTING (6)
    1090 #define VRDP_USB_REQ_QUEUE_URB         (7)
    1091 #define VRDP_USB_REQ_REAP_URB          (8)
    1092 #define VRDP_USB_REQ_CLEAR_HALTED_EP   (9)
    1093 #define VRDP_USB_REQ_CANCEL_URB        (10)
    1094 
    1095 /** USB service operations. */
    1096 #define VRDP_USB_REQ_DEVICE_LIST       (11)
    1097 #define VRDP_USB_REQ_NEGOTIATE         (12)
    1098 
    1099 /** An operation completion status is a byte. */
    1100 typedef uint8_t VRDPUSBSTATUS;
    1101 
    1102 /** USB device identifier is an 32 bit value. */
    1103 typedef uint32_t VRDPUSBDEVID;
    1104 
    1105 /** Status codes. */
    1106 #define VRDP_USB_STATUS_SUCCESS        ((VRDPUSBSTATUS)0)
    1107 #define VRDP_USB_STATUS_ACCESS_DENIED  ((VRDPUSBSTATUS)1)
    1108 #define VRDP_USB_STATUS_DEVICE_REMOVED ((VRDPUSBSTATUS)2)
    1109 
    1110 /*
    1111  * Data structures to use with VRDPSendUSBRequest.
    1112  * The *RET* structures always represent the layout of VRDP data.
    1113  * The *PARM* structures normally the same as VRDP layout.
    1114  * However the VRDP_USB_REQ_QUEUE_URB_PARM has a pointer to
    1115  * URB data in place where actual data will be in VRDP layout.
    1116  *
    1117  * Since replies (*RET*) are asynchronous, the 'success'
    1118  * replies are not required for operations which return
    1119  * only the status code (VRDPUSBREQRETHDR only):
    1120  *  VRDP_USB_REQ_OPEN
    1121  *  VRDP_USB_REQ_RESET
    1122  *  VRDP_USB_REQ_SET_CONFIG
    1123  *  VRDP_USB_REQ_CLAIM_INTERFACE
    1124  *  VRDP_USB_REQ_RELEASE_INTERFACE
    1125  *  VRDP_USB_REQ_INTERFACE_SETTING
    1126  *  VRDP_USB_REQ_CLEAR_HALTED_EP
    1127  *
    1128  */
    1129 
    1130 /* VRDP layout has no aligments. */
    1131 #pragma pack(1)
    1132 
    1133 /* Common header for all VRDP USB packets. After the reply hdr follows *PARM* or *RET* data. */
    1134 typedef struct _VRDPUSBPKTHDR
    1135 {
    1136     /* Total length of the reply NOT including the 'length' field. */
    1137     uint32_t length;
    1138     /* The operation code for which the reply was sent by the client. */
    1139     uint8_t code;
    1140 } VRDPUSBPKTHDR;
    1141 
    1142 /* Common header for all return structures. */
    1143 typedef struct _VRDPUSBREQRETHDR
    1144 {
    1145     /* Device status. */
    1146     VRDPUSBSTATUS status;
    1147     /* Device id. */
    1148     VRDPUSBDEVID id;
    1149 } VRDPUSBREQRETHDR;
    1150 
    1151 
    1152 /* VRDP_USB_REQ_OPEN
    1153  */
    1154 typedef struct _VRDP_USB_REQ_OPEN_PARM
    1155 {
    1156     uint8_t code;
    1157     VRDPUSBDEVID id;
    1158 } VRDP_USB_REQ_OPEN_PARM;
    1159 
    1160 typedef struct _VRDP_USB_REQ_OPEN_RET
    1161 {
    1162     VRDPUSBREQRETHDR hdr;
    1163 } VRDP_USB_REQ_OPEN_RET;
    1164 
    1165 
    1166 /* VRDP_USB_REQ_CLOSE
    1167  */
    1168 typedef struct _VRDP_USB_REQ_CLOSE_PARM
    1169 {
    1170     uint8_t code;
    1171     VRDPUSBDEVID id;
    1172 } VRDP_USB_REQ_CLOSE_PARM;
    1173 
    1174 /* The close request has no returned data. */
    1175 
    1176 
    1177 /* VRDP_USB_REQ_RESET
    1178  */
    1179 typedef struct _VRDP_USB_REQ_RESET_PARM
    1180 {
    1181     uint8_t code;
    1182     VRDPUSBDEVID id;
    1183 } VRDP_USB_REQ_RESET_PARM;
    1184 
    1185 typedef struct _VRDP_USB_REQ_RESET_RET
    1186 {
    1187     VRDPUSBREQRETHDR hdr;
    1188 } VRDP_USB_REQ_RESET_RET;
    1189 
    1190 
    1191 /* VRDP_USB_REQ_SET_CONFIG
    1192  */
    1193 typedef struct _VRDP_USB_REQ_SET_CONFIG_PARM
    1194 {
    1195     uint8_t code;
    1196     VRDPUSBDEVID id;
    1197     uint8_t configuration;
    1198 } VRDP_USB_REQ_SET_CONFIG_PARM;
    1199 
    1200 typedef struct _VRDP_USB_REQ_SET_CONFIG_RET
    1201 {
    1202     VRDPUSBREQRETHDR hdr;
    1203 } VRDP_USB_REQ_SET_CONFIG_RET;
    1204 
    1205 
    1206 /* VRDP_USB_REQ_CLAIM_INTERFACE
    1207  */
    1208 typedef struct _VRDP_USB_REQ_CLAIM_INTERFACE_PARM
    1209 {
    1210     uint8_t code;
    1211     VRDPUSBDEVID id;
    1212     uint8_t iface;
    1213 } VRDP_USB_REQ_CLAIM_INTERFACE_PARM;
    1214 
    1215 typedef struct _VRDP_USB_REQ_CLAIM_INTERFACE_RET
    1216 {
    1217     VRDPUSBREQRETHDR hdr;
    1218 } VRDP_USB_REQ_CLAIM_INTERFACE_RET;
    1219 
    1220 
    1221 /* VRDP_USB_REQ_RELEASE_INTERFACE
    1222  */
    1223 typedef struct _VRDP_USB_REQ_RELEASE_INTERFACE_PARM
    1224 {
    1225     uint8_t code;
    1226     VRDPUSBDEVID id;
    1227     uint8_t iface;
    1228 } VRDP_USB_REQ_RELEASE_INTERFACE_PARM;
    1229 
    1230 typedef struct _VRDP_USB_REQ_RELEASE_INTERFACE_RET
    1231 {
    1232     VRDPUSBREQRETHDR hdr;
    1233 } VRDP_USB_REQ_RELEASE_INTERFACE_RET;
    1234 
    1235 
    1236 /* VRDP_USB_REQ_INTERFACE_SETTING
    1237  */
    1238 typedef struct _VRDP_USB_REQ_INTERFACE_SETTING_PARM
    1239 {
    1240     uint8_t code;
    1241     VRDPUSBDEVID id;
    1242     uint8_t iface;
    1243     uint8_t setting;
    1244 } VRDP_USB_REQ_INTERFACE_SETTING_PARM;
    1245 
    1246 typedef struct _VRDP_USB_REQ_INTERFACE_SETTING_RET
    1247 {
    1248     VRDPUSBREQRETHDR hdr;
    1249 } VRDP_USB_REQ_INTERFACE_SETTING_RET;
    1250 
    1251 
    1252 /* VRDP_USB_REQ_QUEUE_URB
    1253  */
    1254 
    1255 #define VRDP_USB_TRANSFER_TYPE_CTRL (0)
    1256 #define VRDP_USB_TRANSFER_TYPE_ISOC (1)
    1257 #define VRDP_USB_TRANSFER_TYPE_BULK (2)
    1258 #define VRDP_USB_TRANSFER_TYPE_INTR (3)
    1259 #define VRDP_USB_TRANSFER_TYPE_MSG  (4)
    1260 
    1261 #define VRDP_USB_DIRECTION_SETUP (0)
    1262 #define VRDP_USB_DIRECTION_IN    (1)
    1263 #define VRDP_USB_DIRECTION_OUT   (2)
    1264 
    1265 typedef struct _VRDP_USB_REQ_QUEUE_URB_PARM
    1266 {
    1267     uint8_t code;
    1268     VRDPUSBDEVID id;
    1269     uint32_t handle;    /* Distinguishes that particular URB. Later used in CancelURB and returned by ReapURB */
    1270     uint8_t type;
    1271     uint8_t ep;
    1272     uint8_t direction;
    1273     uint32_t urblen;    /* Length of the URB. */
    1274     uint32_t datalen;   /* Length of the data. */
    1275     void *data;         /* In RDP layout the data follow. */
    1276 } VRDP_USB_REQ_QUEUE_URB_PARM;
    1277 
    1278 /* The queue URB has no explicit return. The reap URB reply will be
    1279  * eventually the indirect result.
    1280  */
    1281 
    1282 
    1283 /* VRDP_USB_REQ_REAP_URB
    1284  * Notificationg from server to client that server expects an URB
    1285  * from any device.
    1286  * Only sent if negotiated URB return method is polling.
    1287  * Normally, the client will send URBs back as soon as they are ready.
    1288  */
    1289 typedef struct _VRDP_USB_REQ_REAP_URB_PARM
    1290 {
    1291     uint8_t code;
    1292 } VRDP_USB_REQ_REAP_URB_PARM;
    1293 
    1294 
    1295 #define VRDP_USB_XFER_OK    (0)
    1296 #define VRDP_USB_XFER_STALL (1)
    1297 #define VRDP_USB_XFER_DNR   (2)
    1298 #define VRDP_USB_XFER_CRC   (3)
    1299 
    1300 #define VRDP_USB_REAP_FLAG_CONTINUED (0x0)
    1301 #define VRDP_USB_REAP_FLAG_LAST      (0x1)
    1302 
    1303 #define VRDP_USB_REAP_VALID_FLAGS    (VRDP_USB_REAP_FLAG_LAST)
    1304 
    1305 typedef struct _VRDPUSBREQREAPURBBODY
    1306 {
    1307     VRDPUSBDEVID     id;        /* From which device the URB arrives. */
    1308     uint8_t          flags;     /* VRDP_USB_REAP_FLAG_* */
    1309     uint8_t          error;     /* VRDP_USB_XFER_* */
    1310     uint32_t         handle;    /* Handle of returned URB. Not 0. */
    1311     uint32_t         len;       /* Length of data actually transferred. */
    1312     /* Data follow. */
    1313 } VRDPUSBREQREAPURBBODY;
    1314 
    1315 typedef struct _VRDP_USB_REQ_REAP_URB_RET
    1316 {
    1317     /* The REAP URB has no header, only completed URBs are returned. */
    1318     VRDPUSBREQREAPURBBODY body;
    1319     /* Another body may follow, depending on flags. */
    1320 } VRDP_USB_REQ_REAP_URB_RET;
    1321 
    1322 
    1323 /* VRDP_USB_REQ_CLEAR_HALTED_EP
    1324  */
    1325 typedef struct _VRDP_USB_REQ_CLEAR_HALTED_EP_PARM
    1326 {
    1327     uint8_t code;
    1328     VRDPUSBDEVID id;
    1329     uint8_t ep;
    1330 } VRDP_USB_REQ_CLEAR_HALTED_EP_PARM;
    1331 
    1332 typedef struct _VRDP_USB_REQ_CLEAR_HALTED_EP_RET
    1333 {
    1334     VRDPUSBREQRETHDR hdr;
    1335 } VRDP_USB_REQ_CLEAR_HALTED_EP_RET;
    1336 
    1337 
    1338 /* VRDP_USB_REQ_CANCEL_URB
    1339  */
    1340 typedef struct _VRDP_USB_REQ_CANCEL_URB_PARM
    1341 {
    1342     uint8_t code;
    1343     VRDPUSBDEVID id;
    1344     uint32_t handle;
    1345 } VRDP_USB_REQ_CANCEL_URB_PARM;
    1346 
    1347 /* The cancel URB request has no return. */
    1348 
    1349 
    1350 /* VRDP_USB_REQ_DEVICE_LIST
    1351  *
    1352  * Server polls USB devices on client by sending this request
    1353  * periodically. Client sends back a list of all devices
    1354  * connected to it. Each device is assigned with an identifier,
    1355  * that is used to distinguish the particular device.
    1356  */
    1357 typedef struct _VRDP_USB_REQ_DEVICE_LIST_PARM
    1358 {
    1359     uint8_t code;
    1360 } VRDP_USB_REQ_DEVICE_LIST_PARM;
    1361 
    1362 /* Data is a list of the following variable length structures. */
    1363 typedef struct _VRDPUSBDEVICEDESC
    1364 {
    1365     /* Offset of the next structure. 0 if last. */
    1366     uint16_t oNext;
    1367 
    1368     /* Identifier of the device assigned by client. */
    1369     VRDPUSBDEVID id;
    1370 
    1371     /** USB version number. */
    1372     uint16_t        bcdUSB;
    1373     /** Device class. */
    1374     uint8_t         bDeviceClass;
    1375     /** Device subclass. */
    1376     uint8_t         bDeviceSubClass;
    1377     /** Device protocol */
    1378     uint8_t         bDeviceProtocol;
    1379     /** Vendor ID. */
    1380     uint16_t        idVendor;
    1381     /** Product ID. */
    1382     uint16_t        idProduct;
    1383     /** Revision, integer part. */
    1384     uint16_t        bcdRev;
    1385     /** Manufacturer string. */
    1386     uint16_t        oManufacturer;
    1387     /** Product string. */
    1388     uint16_t        oProduct;
    1389     /** Serial number string. */
    1390     uint16_t        oSerialNumber;
    1391     /** Physical USB port the device is connected to. */
    1392     uint16_t        idPort;
    1393 
    1394 } VRDPUSBDEVICEDESC;
    1395 
    1396 typedef struct _VRDP_USB_REQ_DEVICE_LIST_RET
    1397 {
    1398     VRDPUSBDEVICEDESC body;
    1399     /* Other devices may follow.
    1400      * The list ends with (uint16_t)0,
    1401      * which means that an empty list consists of 2 zero bytes.
    1402      */
    1403 } VRDP_USB_REQ_DEVICE_LIST_RET;
    1404 
    1405 typedef struct _VRDPUSBREQNEGOTIATEPARM
    1406 {
    1407     uint8_t code;
    1408 
    1409     /* Remote USB Protocol version. */
    1410     uint32_t version;
    1411 
    1412 } VRDPUSBREQNEGOTIATEPARM;
    1413 
    1414 #define VRDP_USB_CAPS_FLAG_ASYNC    (0x0)
    1415 #define VRDP_USB_CAPS_FLAG_POLL     (0x1)
    1416 
    1417 #define VRDP_USB_CAPS_VALID_FLAGS   (VRDP_USB_CAPS_FLAG_POLL)
    1418 
    1419 typedef struct _VRDPUSBREQNEGOTIATERET
    1420 {
    1421     uint8_t flags;
    1422 } VRDPUSBREQNEGOTIATERET;
    1423 
    1424 #pragma pack()
    1425 
    1426 
    1427 #define VRDP_CLIPBOARD_FORMAT_NULL         (0x0)
    1428 #define VRDP_CLIPBOARD_FORMAT_UNICODE_TEXT (0x1)
    1429 #define VRDP_CLIPBOARD_FORMAT_BITMAP       (0x2)
    1430 #define VRDP_CLIPBOARD_FORMAT_HTML         (0x4)
    1431 
    1432 #define VRDP_CLIPBOARD_FUNCTION_FORMAT_ANNOUNCE (0)
    1433 #define VRDP_CLIPBOARD_FUNCTION_DATA_READ       (1)
    1434 #define VRDP_CLIPBOARD_FUNCTION_DATA_WRITE      (2)
    1435 
    1436 /**
    1437  * Called by the host when (VRDP_CLIPBOARD_FUNCTION_*):
    1438  *   - (0) guest announces available clipboard formats;
    1439  *   - (1) guest requests clipboard data;
    1440  *   - (2) guest responds to the client's request for clipboard data.
    1441  *
    1442  * @param hserver     The VRDP server handle.
    1443  * @param u32Function The cause of the call.
    1444  * @param u32Format   Bitmask of announced formats or the format of data.
    1445  * @param pvData      Points to: (1) buffer to be filled with clients data;
    1446  *                               (2) data from the host.
    1447  * @param cbData      Size of 'pvData' buffer in bytes.
    1448  * @param pcbActualRead Size of the copied data in bytes.
    1449  *
    1450  */
    1451 VRDPR3DECL(void) VRDPClipboard (HVRDPSERVER hserver,
    1452                                 uint32_t u32Function,
    1453                                 uint32_t u32Format,
    1454                                 void *pvData,
    1455                                 uint32_t cbData,
    1456                                 uint32_t *pcbActualRead);
    1457 
    1458 /**
    1459  * Sends a USB request.
    1460  *
    1461  * @param hserver      Handle of VRDP server instance.
    1462  * @param u32ClientId  An identifier that allows the server to find the corresponding client.
    1463  *                     The identifier is always passed by the server as a parameter
    1464  *                     of the FNVRDPUSBCALLBACK. Note that the value is the same as
    1465  *                     in the VRDPSERVERCALLBACK functions.
    1466  * @param pvParm       Function specific parameters buffer.
    1467  * @param cbParm       Size of the buffer.
    1468  */
    1469 VRDPR3DECL(void) VRDPSendUSBRequest (HVRDPSERVER hserver,
    1470                                      uint32_t u32ClientId,
    1471                                      void *pvParm,
    1472                                      uint32_t cbRarm);
    1473 
    1474 
    1475 /**
    1476  * Called by the server when a reply is received from a client.
    1477  *
    1478  * @param pvCallback  Callback specific value returned by VRDPSERVERCALLBACK::pfnInterceptUSB.
    1479  * @param u32ClientId Identifies the client that sent the reply.
    1480  * @param u8Code      The operation code VRDP_USB_REQ_*.
    1481  * @param pvRet       Points to data received from the client.
    1482  * @param cbRet       Size of the data in bytes.
    1483  *
    1484  * @return VBox error code.
    1485  */
    1486 typedef DECLCALLBACK(int) FNVRDPUSBCALLBACK (void *pvCallback,
    1487                                              uint32_t u32ClientId,
    1488                                              uint8_t u8Code,
    1489                                              const void *pvRet,
    1490                                              uint32_t cbRet);
    1491                                              
    1492 typedef FNVRDPUSBCALLBACK *PFNVRDPUSBCALLBACK;
    1493 
    1494 /**
    1495  * Called by the server when (VRDP_CLIPBOARD_FUNCTION_*):
    1496  *   - (0) client announces available clipboard formats;
    1497  *   - (1) client requests clipboard data.
    1498  *
    1499  * @param pvCallback  Callback specific value returned by VRDPSERVERCALLBACK::pfnInterceptClipboard.
    1500  * @param u32ClientId Identifies the RDP client that sent the reply.
    1501  * @param u32Function The cause of the callback.
    1502  * @param u32Format   Bitmask of reported formats or the format of received data.
    1503  * @param pvData      Reserved.
    1504  * @param cbData      Reserved.
    1505  *
    1506  * @return VBox error code.
    1507  */
    1508 typedef DECLCALLBACK(int) FNVRDPCLIPBOARDCALLBACK (void *pvCallback,
    1509                                                    uint32_t u32ClientId,
    1510                                                    uint32_t u32Function,
    1511                                                    uint32_t u32Format,
    1512                                                    const void *pvData,
    1513                                                    uint32_t cbData);
    1514                                              
    1515 typedef FNVRDPCLIPBOARDCALLBACK *PFNVRDPCLIPBOARDCALLBACK;
    1516 
    1517 #define VRDP_CLIENT_INTERCEPT_AUDIO     (0x1)
    1518 #define VRDP_CLIENT_INTERCEPT_USB       (0x2)
    1519 #define VRDP_CLIENT_INTERCEPT_CLIPBOARD (0x4)
    1520 
    1521 typedef struct _VRDPSERVERCALLBACK
    1522 {
    1523     /* A client is logging in.
    1524      *
    1525      * @param pvUser       The callback specific pointer.
    1526      * @param u32ClientId  An unique client identifier generated by the server.
    1527      * @param pszUser      The username.
    1528      * @param pszPassword  The password.
    1529      * @param pszDomain    The domain.
    1530      *
    1531      * @return VBox error code.
    1532      */
    1533     DECLR3CALLBACKMEMBER(int, pfnClientLogon, (void *pvUser,
    1534                                              uint32_t u32ClientId,
    1535                                              const char *pszUser,
    1536                                              const char *pszPassword,
    1537                                              const char *pszDomain));
    1538     /* The client has connected.
    1539      *
    1540      * @param pvUser       The callback specific pointer.
    1541      * @param u32ClientId  An unique client identifier generated by the server.
    1542      */
    1543     DECLR3CALLBACKMEMBER(void, pfnClientConnect, (void *pvUser,
    1544                                                 uint32_t u32ClientId));
    1545     /* The client has been disconnected.
    1546      *
    1547      * @param pvUser          The callback specific pointer.
    1548      * @param u32ClientId     An unique client identifier generated by the server.
    1549      * @param fu32Intercepted What was intercepted by the client (VRDP_CLIENT_INTERCEPT_*).
    1550      */
    1551     DECLR3CALLBACKMEMBER(void, pfnClientDisconnect, (void *pvUser,
    1552                                                    uint32_t u32ClientId,
    1553                                                    uint32_t fu32Intercepted));
    1554     /* The client supports audio channel.
    1555      */
    1556     DECLR3CALLBACKMEMBER(void, pfnInterceptAudio, (void *pvUser,
    1557                                                  uint32_t u32ClientId));
    1558     /* The client supports USB channel.
    1559      */
    1560     DECLR3CALLBACKMEMBER(void, pfnInterceptUSB, (void *pvUser,
    1561                                                uint32_t u32ClientId,
    1562                                                PFNVRDPUSBCALLBACK *ppfn,
    1563                                                void **ppv));
    1564     /* The client supports clipboard channel.
    1565      */
    1566     DECLR3CALLBACKMEMBER(void, pfnInterceptClipboard, (void *pvUser,
    1567                                                      uint32_t u32ClientId,
    1568                                                      PFNVRDPCLIPBOARDCALLBACK *ppfn,
    1569                                                      void **ppv));
    1570 } VRDPSERVERCALLBACK;
    1571 
    1572 /**
    1573  * Set a callback pointers table that will be called by the server in certain situations.
    1574  *
    1575  * @param hserver      Handle of VRDP server instance.
    1576  * @param pCallback    Pointer to VRDPSERVERCALLBACK structure with function pointers.
    1577  * @param pvUser       An pointer to be passed to the callback functions.
    1578  */
    1579 VRDPR3DECL(void) VRDPSetCallback (HVRDPSERVER hserver, VRDPSERVERCALLBACK *pCallback, void *pvUser);
    1580 
    1581 /** Indexes of information values. */
    1582 
    1583 /** Whether a client is connected at the moment.
    1584  * uint32_t
    1585  */
    1586 #define VRDP_QI_ACTIVE                 (0)
    1587 
    1588 /** How many times a client connected up to current moment.
    1589  * uint32_t
    1590  */
    1591 #define VRDP_QI_NUMBER_OF_CLIENTS      (1)
    1592 
    1593 /** When last connection was established.
    1594  * int64_t time in milliseconds since 1970-01-01 00:00:00 UTC
    1595  */
    1596 #define VRDP_QI_BEGIN_TIME             (2)
    1597 
    1598 /** When last connection was terminated or current time if connection still active.
    1599  * int64_t time in milliseconds since 1970-01-01 00:00:00 UTC
    1600  */
    1601 #define VRDP_QI_END_TIME               (3)
    1602 
    1603 /** How many bytes were sent in last (current) connection.
    1604  * uint64_t
    1605  */
    1606 #define VRDP_QI_BYTES_SENT             (4)
    1607 
    1608 /** How many bytes were sent in all connections.
    1609  * uint64_t
    1610  */
    1611 #define VRDP_QI_BYTES_SENT_TOTAL       (5)
    1612 
    1613 /** How many bytes were received in last (current) connection.
    1614  * uint64_t
    1615  */
    1616 #define VRDP_QI_BYTES_RECEIVED         (6)
    1617 
    1618 /** How many bytes were received in all connections.
    1619  * uint64_t
    1620  */
    1621 #define VRDP_QI_BYTES_RECEIVED_TOTAL   (7)
    1622 
    1623 /** Login user name supplied by the client.
    1624  * UTF8 nul terminated string.
    1625  */
    1626 #define VRDP_QI_USER                   (8)
    1627 
    1628 /** Login domain supplied by the client.
    1629  * UTF8 nul terminated string.
    1630  */
    1631 #define VRDP_QI_DOMAIN                 (9)
    1632 
    1633 /** The client name supplied by the client.
    1634  * UTF8 nul terminated string.
    1635  */
    1636 #define VRDP_QI_CLIENT_NAME            (10)
    1637 
    1638 /** IP address of the client.
    1639  * UTF8 nul terminated string.
    1640  */
    1641 #define VRDP_QI_CLIENT_IP              (11)
    1642 
    1643 /** The client software version number.
    1644  * uint32_t.
    1645  */
    1646 #define VRDP_QI_CLIENT_VERSION         (12)
    1647 
    1648 /** Public key exchange method used when connection was established.
    1649  *  Values: 0 - RDP4 public key exchange scheme.
    1650  *          1 - X509 sertificates were sent to client.
    1651  * uint32_t.
    1652  */
    1653 #define VRDP_QI_ENCRYPTION_STYLE       (13)
    1654 
    1655 /**
    1656  * Query various information from the VRDP server.
    1657  *
    1658  * @param index     VRDP_QI_* identifier of information to be returned.
    1659  * @param pvBuffer  Address of memory buffer to which the information must be written.
    1660  * @param cbBuffer  Size of the memory buffer in bytes.
    1661  * @param pcbOut    Size in bytes of returned information value.
    1662  *
    1663  * @remark The caller must check the *pcbOut. 0 there means no information was returned.
    1664  *         A value greater than cbBuffer means that information is too big to fit in the
    1665  *         buffer, in that case no information was placed to the buffer.
    1666  */
    1667 VRDPR3DECL(void) VRDPQueryInfo (HVRDPSERVER hserver, uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut);
    1668 #endif /* VRDP_NO_COM */
    1669954
    1670955__END_DECLS
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdp.c

    r5952 r5982  
    2020#include "driver.h"
    2121#include "vrdpbmp.h"
     22#include <VBox/VRDPOrders.h>
    2223
    2324#define VRDP_MAKE_OP(__c) (__c)
     
    440441    if (bytesPerPixel > 0)
    441442    {
    442         bRc = vrdpWriteHdr (ppdev, VRDP_MAKE_OP(VBVA_VRDP_DIRTY_RECT));
     443        bRc = vrdpWriteHdr (ppdev, VRDP_MAKE_OP(VRDP_ORDER_DIRTY_RECT));
    443444
    444445        if (bRc)
     
    523524    bounds.pt2.y = (int16_t)(prcl->bottom);
    524525
    525     return vrdpReportOrder (ppdev, &bounds, sizeof (bounds), VBVA_VRDP_BOUNDS);
     526    return vrdpReportOrder (ppdev, &bounds, sizeof (bounds), VRDP_ORDER_BOUNDS);
    526527}
    527528
     
    546547            repeat.bounds.pt2.y = (int16_t)(prcl->bottom);
    547548
    548             bRc = vrdpReportOrder (ppdev, &repeat, sizeof (repeat), VBVA_VRDP_REPEAT);
     549            bRc = vrdpReportOrder (ppdev, &repeat, sizeof (repeat), VRDP_ORDER_REPEAT);
    549550
    550551            if (!bRc)
     
    693694    order.rgb   = rgb;
    694695
    695     vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VBVA_VRDP_SOLIDRECT);
     696    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDP_ORDER_SOLIDRECT);
    696697}
    697698
     
    711712    order.rop   = rop3;
    712713
    713     vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VBVA_VRDP_SOLIDBLT);
     714    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDP_ORDER_SOLIDBLT);
    714715}
    715716
     
    761762    memcpy (order.pattern, pBrush->u.pat.au8Pattern, sizeof (order.pattern));
    762763
    763     vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VBVA_VRDP_PATBLTBRUSH);
     764    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDP_ORDER_PATBLTBRUSH);
    764765}
    765766
     
    777778    order.rop   = rop3;
    778779
    779     vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VBVA_VRDP_DSTBLT);
     780    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDP_ORDER_DSTBLT);
    780781}
    781782
     
    796797    order.rop   = rop3;
    797798
    798     vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VBVA_VRDP_SCREENBLT);
     799    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDP_ORDER_SCREENBLT);
    799800}
    800801
     
    819820    memcpy (order.hash, phash, sizeof (*phash));
    820821
    821     vrdpReportOrder (ppdev, &order, sizeof (order), VBVA_VRDP_MEMBLT);
     822    vrdpReportOrder (ppdev, &order, sizeof (order), VRDP_ORDER_MEMBLT);
    822823}
    823824
     
    863864    memcpy (order.hash, phash, sizeof (*phash));
    864865
    865     bRc = vrdpReportOrder (ppdev, &order, sizeof (order), VBVA_VRDP_CACHED_BITMAP);
     866    bRc = vrdpReportOrder (ppdev, &order, sizeof (order), VRDP_ORDER_CACHED_BITMAP);
    866867
    867868    if (bRc)
     
    888889    memcpy (order.hash, phash, sizeof (*phash));
    889890
    890     vrdpReportOrder (ppdev, &order, sizeof (order), VBVA_VRDP_DELETED_BITMAP);
     891    vrdpReportOrder (ppdev, &order, sizeof (order), VRDP_ORDER_DELETED_BITMAP);
    891892}
    892893
     
    12641265                    prclBounds->left, prclBounds->right, prclBounds->top, prclBounds->bottom, clipRects.rects.c));
    12651266
    1266         vrdpReportOrderGeneric (ppdev, &clipRects, &order, sizeof (order), VBVA_VRDP_LINE);
     1267        vrdpReportOrderGeneric (ppdev, &clipRects, &order, sizeof (order), VRDP_ORDER_LINE);
    12671268    }
    12681269}
     
    14271428    else if (ppo->fl & PO_ELLIPSE)
    14281429    {
    1429         if (vboxOrderSupported (ppdev, VBVA_VRDP_ELLIPSE))
     1430        if (vboxOrderSupported (ppdev, VRDP_ORDER_ELLIPSE))
    14301431        {
    14311432            VRDPORDERELLIPSE order;
     
    14401441            order.rgb = vrdpColor2RGB (pso, pbo->iSolidColor);
    14411442
    1442             vrdpReportOrderGeneric (ppdev, &clipRects, &order, sizeof (order), VBVA_VRDP_ELLIPSE);
     1443            vrdpReportOrderGeneric (ppdev, &clipRects, &order, sizeof (order), VRDP_ORDER_ELLIPSE);
    14431444        }
    14441445        else
     
    15131514                    DISPDBG((1, "vrdpStrokePath: Report order, points overflow.\n"));
    15141515
    1515                     vrdpReportOrderGenericBounds (ppdev, &clipRects, &bounds, &order, sizeof (order), VBVA_VRDP_POLYLINE);
     1516                    vrdpReportOrderGenericBounds (ppdev, &clipRects, &bounds, &order, sizeof (order), VRDP_ORDER_POLYLINE);
    15161517
    15171518                    order.points.c = 0;
     
    15431544                if (order.points.c > 0)
    15441545                {
    1545                     vrdpReportOrderGenericBounds (ppdev, &clipRects, &bounds, &order, sizeof (order), VBVA_VRDP_POLYLINE);
     1546                    vrdpReportOrderGenericBounds (ppdev, &clipRects, &bounds, &order, sizeof (order), VRDP_ORDER_POLYLINE);
    15461547                }
    15471548
     
    17101711            order.restore = 0;
    17111712
    1712             vrdpReportOrderGeneric (ppdev, NULL, &order, sizeof (order), VBVA_VRDP_SAVESCREEN);
     1713            vrdpReportOrderGeneric (ppdev, NULL, &order, sizeof (order), VRDP_ORDER_SAVESCREEN);
    17131714        } break;
    17141715
     
    17251726            order.restore = 1;
    17261727
    1727             if (vrdpReportOrderGeneric (ppdev, NULL, &order, sizeof (order), VBVA_VRDP_SAVESCREEN))
     1728            if (vrdpReportOrderGeneric (ppdev, NULL, &order, sizeof (order), VRDP_ORDER_SAVESCREEN))
    17281729            {
    17291730                uint8_t *pu8Bits;
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdpbmp.c

    r4071 r5982  
    2222#include "vrdpbmp.h"
    2323#include <iprt/crc64.h>
     24#include <VBox/VRDPOrders.h>
    2425
    2526/*
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r5743 r5982  
    457457}
    458458
    459 #ifdef VRDP_NO_COM
    460459int Console::VRDPClientLogon (uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain)
    461 #else
    462 DECLCALLBACK(int) Console::vrdp_ClientLogon (void *pvUser,
    463                                              uint32_t u32ClientId,
    464                                              const char *pszUser,
    465                                              const char *pszPassword,
    466                                              const char *pszDomain)
    467 #endif /* VRDP_NO_COM */
    468460{
    469461    LogFlowFuncEnter();
    470462    LogFlowFunc (("%d, %s, %s, %s\n", u32ClientId, pszUser, pszPassword, pszDomain));
    471463
    472 #ifdef VRDP_NO_COM
    473     Console *console = this;
    474 #else
    475     Console *console = static_cast <Console *> (pvUser);
    476 #endif /* VRDP_NO_COM */
    477     AssertReturn (console, VERR_INVALID_POINTER);
    478 
    479     AutoCaller autoCaller (console);
     464    AutoCaller autoCaller (this);
    480465    if (!autoCaller.isOk())
    481466    {
     
    487472
    488473    Guid uuid;
    489     HRESULT hrc = console->mMachine->COMGETTER (Id) (uuid.asOutParam());
     474    HRESULT hrc = mMachine->COMGETTER (Id) (uuid.asOutParam());
    490475    AssertComRCReturn (hrc, VERR_ACCESS_DENIED);
    491476
    492477    VRDPAuthType_T authType = VRDPAuthType_VRDPAuthNull;
    493     hrc = console->mVRDPServer->COMGETTER(AuthType) (&authType);
     478    hrc = mVRDPServer->COMGETTER(AuthType) (&authType);
    494479    AssertComRCReturn (hrc, VERR_ACCESS_DENIED);
    495480
    496481    ULONG authTimeout = 0;
    497     hrc = console->mVRDPServer->COMGETTER(AuthTimeout) (&authTimeout);
     482    hrc = mVRDPServer->COMGETTER(AuthTimeout) (&authTimeout);
    498483    AssertComRCReturn (hrc, VERR_ACCESS_DENIED);
    499484
     
    518503    /* Multiconnection check. */
    519504    BOOL allowMultiConnection = FALSE;
    520     hrc = console->mVRDPServer->COMGETTER(AllowMultiConnection) (&allowMultiConnection);
     505    hrc = mVRDPServer->COMGETTER(AllowMultiConnection) (&allowMultiConnection);
    521506    AssertComRCReturn (hrc, VERR_ACCESS_DENIED);
    522507
    523     LogFlowFunc(("allowMultiConnection %d, console->mcVRDPClients = %d\n", allowMultiConnection, console->mcVRDPClients));
     508    LogFlowFunc(("allowMultiConnection %d, mcVRDPClients = %d\n", allowMultiConnection, mcVRDPClients));
    524509
    525510    if (allowMultiConnection == FALSE)
     
    529514         * value is 0 for first client.
    530515         */
    531         if (console->mcVRDPClients > 0)
     516        if (mcVRDPClients > 0)
    532517        {
    533518            /* Reject. */
     
    548533        {
    549534            /* Call the external library. */
    550             result = console->mConsoleVRDPServer->Authenticate (uuid, guestJudgement, pszUser, pszPassword, pszDomain, u32ClientId);
     535            result = mConsoleVRDPServer->Authenticate (uuid, guestJudgement, pszUser, pszPassword, pszDomain, u32ClientId);
    551536
    552537            if (result != VRDPAuthDelegateToGuest)
     
    564549            guestJudgement = VRDPAuthGuestNotReacted;
    565550
    566             if (console->mVMMDev)
     551            if (mVMMDev)
    567552            {
    568553                /* Issue the request to guest. Assume that the call does not require EMT. It should not. */
     
    571556                uint32_t u32GuestFlags = VMMDEV_SETCREDENTIALS_JUDGE;
    572557
    573                 int rc = console->mVMMDev->getVMMDevPort()->pfnSetCredentials (console->mVMMDev->getVMMDevPort(),
     558                int rc = mVMMDev->getVMMDevPort()->pfnSetCredentials (mVMMDev->getVMMDevPort(),
    574559                             pszUser, pszPassword, pszDomain, u32GuestFlags);
    575560
     
    577562                {
    578563                    /* Wait for guest. */
    579                     rc = console->mVMMDev->WaitCredentialsJudgement (authTimeout, &u32GuestFlags);
     564                    rc = mVMMDev->WaitCredentialsJudgement (authTimeout, &u32GuestFlags);
    580565
    581566                    if (VBOX_SUCCESS (rc))
     
    607592                LogRel(("VRDPAUTH: Guest judgement %d.\n", guestJudgement));
    608593                LogFlowFunc (("External auth called again with guest judgement = %d\n", guestJudgement));
    609                 result = console->mConsoleVRDPServer->Authenticate (uuid, guestJudgement, pszUser, pszPassword, pszDomain, u32ClientId);
     594                result = mConsoleVRDPServer->Authenticate (uuid, guestJudgement, pszUser, pszPassword, pszDomain, u32ClientId);
    610595            }
    611596            else
     
    641626}
    642627
    643 #ifdef VRDP_NO_COM
    644628void Console::VRDPClientConnect (uint32_t u32ClientId)
    645 #else
    646 DECLCALLBACK(void) Console::vrdp_ClientConnect (void *pvUser,
    647                                                 uint32_t u32ClientId)
    648 #endif /* VRDP_NO_COM */
    649629{
    650630    LogFlowFuncEnter();
    651631
    652 #ifdef VRDP_NO_COM
    653     Console *console = this;
    654 #else
    655     Console *console = static_cast <Console *> (pvUser);
    656 #endif /* VRDP_NO_COM */
    657     AssertReturnVoid (console);
    658 
    659     AutoCaller autoCaller (console);
     632    AutoCaller autoCaller (this);
    660633    AssertComRCReturnVoid (autoCaller.rc());
    661634
    662635#ifdef VBOX_VRDP
    663     uint32_t u32Clients = ASMAtomicIncU32(&console->mcVRDPClients);
     636    uint32_t u32Clients = ASMAtomicIncU32(&mcVRDPClients);
    664637
    665638    if (u32Clients == 1)
    666639    {
    667         console->getVMMDev()->getVMMDevPort()->
    668             pfnVRDPChange (console->getVMMDev()->getVMMDevPort(),
     640        getVMMDev()->getVMMDevPort()->
     641            pfnVRDPChange (getVMMDev()->getVMMDevPort(),
    669642                           true, VRDP_EXPERIENCE_LEVEL_FULL); // @todo configurable
    670643    }
    671644
    672645    NOREF(u32ClientId);
    673     console->mDisplay->VideoAccelVRDP (true);
     646    mDisplay->VideoAccelVRDP (true);
    674647#endif /* VBOX_VRDP */
    675648
     
    678651}
    679652
    680 #ifdef VRDP_NO_COM
    681653void Console::VRDPClientDisconnect (uint32_t u32ClientId,
    682654                                    uint32_t fu32Intercepted)
    683 #else
    684 DECLCALLBACK(void) Console::vrdp_ClientDisconnect (void *pvUser,
    685                                                    uint32_t u32ClientId,
    686                                                    uint32_t fu32Intercepted)
    687 #endif /* VRDP_NO_COM */
    688655{
    689656    LogFlowFuncEnter();
    690657
    691 #ifdef VRDP_NO_COM
    692     Console *console = this;
    693 #else
    694     Console *console = static_cast <Console *> (pvUser);
    695 #endif /* VRDP_NO_COM */
    696     AssertReturnVoid (console);
    697 
    698     AutoCaller autoCaller (console);
     658    AutoCaller autoCaller (this);
    699659    AssertComRCReturnVoid (autoCaller.rc());
    700660
    701     AssertReturnVoid (console->mConsoleVRDPServer);
     661    AssertReturnVoid (mConsoleVRDPServer);
    702662
    703663#ifdef VBOX_VRDP
    704     uint32_t u32Clients = ASMAtomicDecU32(&console->mcVRDPClients);
     664    uint32_t u32Clients = ASMAtomicDecU32(&mcVRDPClients);
    705665
    706666    if (u32Clients == 0)
    707667    {
    708         console->getVMMDev()->getVMMDevPort()->
    709             pfnVRDPChange (console->getVMMDev()->getVMMDevPort(),
     668        getVMMDev()->getVMMDevPort()->
     669            pfnVRDPChange (getVMMDev()->getVMMDevPort(),
    710670                           false, 0);
    711671    }
    712672
    713     console->mDisplay->VideoAccelVRDP (false);
     673    mDisplay->VideoAccelVRDP (false);
    714674#endif /* VBOX_VRDP */
    715675
    716676    if (fu32Intercepted & VRDP_CLIENT_INTERCEPT_USB)
    717677    {
    718         console->mConsoleVRDPServer->USBBackendDelete (u32ClientId);
     678        mConsoleVRDPServer->USBBackendDelete (u32ClientId);
    719679    }
    720680
     
    722682    if (fu32Intercepted & VRDP_CLIENT_INTERCEPT_CLIPBOARD)
    723683    {
    724         console->mConsoleVRDPServer->ClipboardDelete (u32ClientId);
     684        mConsoleVRDPServer->ClipboardDelete (u32ClientId);
    725685    }
    726686
    727687    if (fu32Intercepted & VRDP_CLIENT_INTERCEPT_AUDIO)
    728688    {
    729         console->mcAudioRefs--;
    730 
    731         if (console->mcAudioRefs <= 0)
    732         {
    733             if (console->mAudioSniffer)
     689        mcAudioRefs--;
     690
     691        if (mcAudioRefs <= 0)
     692        {
     693            if (mAudioSniffer)
    734694            {
    735                 PPDMIAUDIOSNIFFERPORT port = console->mAudioSniffer->getAudioSnifferPort();
     695                PPDMIAUDIOSNIFFERPORT port = mAudioSniffer->getAudioSnifferPort();
    736696                if (port)
    737697                {
     
    744704
    745705    Guid uuid;
    746     HRESULT hrc = console->mMachine->COMGETTER (Id) (uuid.asOutParam());
     706    HRESULT hrc = mMachine->COMGETTER (Id) (uuid.asOutParam());
    747707    AssertComRC (hrc);
    748708
    749709    VRDPAuthType_T authType = VRDPAuthType_VRDPAuthNull;
    750     hrc = console->mVRDPServer->COMGETTER(AuthType) (&authType);
     710    hrc = mVRDPServer->COMGETTER(AuthType) (&authType);
    751711    AssertComRC (hrc);
    752712
    753713    if (authType == VRDPAuthType_VRDPAuthExternal)
    754         console->mConsoleVRDPServer->AuthDisconnect (uuid, u32ClientId);
     714        mConsoleVRDPServer->AuthDisconnect (uuid, u32ClientId);
    755715
    756716    LogFlowFuncLeave();
     
    758718}
    759719
    760 #ifdef VRDP_NO_COM
    761720void Console::VRDPInterceptAudio (uint32_t u32ClientId)
    762 #else
    763 DECLCALLBACK(void) Console::vrdp_InterceptAudio (void *pvUser,
    764                                                  uint32_t u32ClientId)
    765 #endif /* VRDP_NO_COM */
    766721{
    767722    LogFlowFuncEnter();
    768723
    769 #ifdef VRDP_NO_COM
    770     Console *console = this;
    771 #else
    772     Console *console = static_cast <Console *> (pvUser);
    773 #endif /* VRDP_NO_COM */
    774     AssertReturnVoid (console);
    775 
    776     AutoCaller autoCaller (console);
     724    AutoCaller autoCaller (this);
    777725    AssertComRCReturnVoid (autoCaller.rc());
    778726
    779727    LogFlowFunc (("mAudioSniffer %p, u32ClientId %d.\n",
    780                   console->mAudioSniffer, u32ClientId));
     728                  mAudioSniffer, u32ClientId));
    781729    NOREF(u32ClientId);
    782730
    783731#ifdef VBOX_VRDP
    784     console->mcAudioRefs++;
    785 
    786     if (console->mcAudioRefs == 1)
    787     {
    788         if (console->mAudioSniffer)
    789         {
    790             PPDMIAUDIOSNIFFERPORT port = console->mAudioSniffer->getAudioSnifferPort();
     732    mcAudioRefs++;
     733
     734    if (mcAudioRefs == 1)
     735    {
     736        if (mAudioSniffer)
     737        {
     738            PPDMIAUDIOSNIFFERPORT port = mAudioSniffer->getAudioSnifferPort();
    791739            if (port)
    792740            {
     
    801749}
    802750
    803 #ifdef VRDP_NO_COM
    804751void Console::VRDPInterceptUSB (uint32_t u32ClientId, void **ppvIntercept)
    805 #else
    806 DECLCALLBACK(void) Console::vrdp_InterceptUSB (void *pvUser,
    807                                                uint32_t u32ClientId,
    808                                                PFNVRDPUSBCALLBACK *ppfn,
    809                                                void **ppv)
    810 #endif /* VRDP_NO_COM */
    811752{
    812753    LogFlowFuncEnter();
    813754
    814 #ifdef VRDP_NO_COM
    815     Console *console = this;
    816 #else
    817     Console *console = static_cast <Console *> (pvUser);
    818 #endif /* VRDP_NO_COM */
    819     AssertReturnVoid (console);
    820 
    821     AutoCaller autoCaller (console);
     755    AutoCaller autoCaller (this);
    822756    AssertComRCReturnVoid (autoCaller.rc());
    823757
    824     AssertReturnVoid (console->mConsoleVRDPServer);
    825 
    826 #ifdef VRDP_NO_COM
     758    AssertReturnVoid (mConsoleVRDPServer);
     759
    827760    mConsoleVRDPServer->USBBackendCreate (u32ClientId, ppvIntercept);
    828 #else
    829     console->mConsoleVRDPServer->USBBackendCreate (u32ClientId, ppfn, ppv);
    830 #endif /* VRDP_NO_COM */
    831761
    832762    LogFlowFuncLeave();
     
    834764}
    835765
    836 #ifdef VRDP_NO_COM
    837766void Console::VRDPInterceptClipboard (uint32_t u32ClientId)
    838 #else
    839 DECLCALLBACK(void) Console::vrdp_InterceptClipboard (void *pvUser,
    840                                                      uint32_t u32ClientId,
    841                                                      PFNVRDPCLIPBOARDCALLBACK *ppfn,
    842                                                      void **ppv)
    843 #endif /* VRDP_NO_COM */
    844767{
    845768    LogFlowFuncEnter();
    846769
    847 #ifdef VRDP_NO_COM
    848     Console *console = this;
    849 #else
    850     Console *console = static_cast <Console *> (pvUser);
    851 #endif /* VRDP_NO_COM */
    852     AssertReturnVoid (console);
    853 
    854     AutoCaller autoCaller (console);
     770    AutoCaller autoCaller (this);
    855771    AssertComRCReturnVoid (autoCaller.rc());
    856772
    857     AssertReturnVoid (console->mConsoleVRDPServer);
     773    AssertReturnVoid (mConsoleVRDPServer);
    858774
    859775#ifdef VBOX_VRDP
    860 #ifdef VRDP_NO_COM
    861776    mConsoleVRDPServer->ClipboardCreate (u32ClientId);
    862 #else
    863     console->mConsoleVRDPServer->ClipboardCreate (u32ClientId, ppfn, ppv);
    864 #endif /* VRDP_NO_COM */
    865777#endif /* VBOX_VRDP */
    866778
     
    869781}
    870782
    871 
    872 #ifdef VRDP_NO_COM
    873 #else
    874 // static
    875 VRDPSERVERCALLBACK Console::sVrdpServerCallback =
    876 {
    877     vrdp_ClientLogon,
    878     vrdp_ClientConnect,
    879     vrdp_ClientDisconnect,
    880     vrdp_InterceptAudio,
    881     vrdp_InterceptUSB,
    882     vrdp_InterceptClipboard
    883 };
    884 #endif /* VRDP_NO_COM */
    885783
    886784//static
     
    32753173            else
    32763174            {
    3277 #ifdef VRDP_NO_COM
    32783175                mConsoleVRDPServer->EnableConnections ();
    3279 #else
    3280                 mConsoleVRDPServer->SetCallback ();
    3281 #endif /* VRDP_NO_COM */
    32823176            }
    32833177        }
     
    58825776
    58835777#ifdef VBOX_VRDP
    5884         {
    5885             /* Enable client connections to the server. */
    5886             ConsoleVRDPServer *server = console->consoleVRDPServer();
    5887 #ifdef VRDP_NO_COM
    5888             server->EnableConnections ();
    5889 #else
    5890             server->SetCallback ();
    5891 #endif /* VRDP_NO_COM */
    5892         }
     5778        /* Enable client connections to the server. */
     5779        console->consoleVRDPServer()->EnableConnections ();
    58935780#endif /* VBOX_VRDP */
    58945781
  • trunk/src/VBox/Main/ConsoleVRDPServer.cpp

    r5782 r5982  
    1919#include "ConsoleImpl.h"
    2020#include "DisplayImpl.h"
    21 #ifdef VRDP_NO_COM
    2221#include "KeyboardImpl.h"
    2322#include "MouseImpl.h"
    24 #include <VBox/VRDPOrders.h>
    25 #endif /* VRDP_NO_COM */
    2623
    2724#include "Logging.h"
     
    3229
    3330#include <VBox/err.h>
    34 
    35 #ifdef VRDP_NO_COM
     31#include <VBox/VRDPOrders.h>
     32
    3633class VRDPConsoleCallback : public IConsoleCallback
    3734{
     
    569566    return S_OK;
    570567}
    571 #endif /* VRDP_NO_COM */
    572568
    573569
     
    578574RTLDRMOD ConsoleVRDPServer::mVRDPLibrary;
    579575
    580 #ifdef VRDP_NO_COM
    581576PFNVRDPCREATESERVER ConsoleVRDPServer::mpfnVRDPCreateServer = NULL;
    582577
     
    599594    ConsoleVRDPServer::VRDPCallbackVideoModeHint
    600595};
    601 #else
    602 int  (VBOXCALL *ConsoleVRDPServer::mpfnVRDPStartServer)     (IConsole *pConsole, IVRDPServer *pVRDPServer, HVRDPSERVER *phServer);
    603 int  (VBOXCALL *ConsoleVRDPServer::mpfnVRDPSetFramebuffer)  (HVRDPSERVER hServer, IFramebuffer *pFramebuffer, uint32_t fFlags);
    604 void (VBOXCALL *ConsoleVRDPServer::mpfnVRDPSetCallback)     (HVRDPSERVER hServer, VRDPSERVERCALLBACK *pcallback, void *pvUser);
    605 void (VBOXCALL *ConsoleVRDPServer::mpfnVRDPShutdownServer)  (HVRDPSERVER hServer);
    606 void (VBOXCALL *ConsoleVRDPServer::mpfnVRDPSendUpdateBitmap)(HVRDPSERVER hServer, unsigned uScreenId, unsigned x, unsigned y, unsigned w, unsigned h);
    607 void (VBOXCALL *ConsoleVRDPServer::mpfnVRDPSendResize)      (HVRDPSERVER hServer);
    608 void (VBOXCALL *ConsoleVRDPServer::mpfnVRDPSendAudioSamples)(HVRDPSERVER hserver, void *pvSamples, uint32_t cSamples, VRDPAUDIOFORMAT format);
    609 void (VBOXCALL *ConsoleVRDPServer::mpfnVRDPSendAudioVolume) (HVRDPSERVER hserver, uint16_t left, uint16_t right);
    610 void (VBOXCALL *ConsoleVRDPServer::mpfnVRDPSendUSBRequest)  (HVRDPSERVER hserver, uint32_t u32ClientId, void *pvParms, uint32_t cbParms);
    611 void (VBOXCALL *ConsoleVRDPServer::mpfnVRDPSendUpdate)      (HVRDPSERVER hServer, unsigned uScreenId, void *pvUpdate, uint32_t cbUpdate);
    612 void (VBOXCALL *ConsoleVRDPServer::mpfnVRDPQueryInfo)       (HVRDPSERVER hserver, uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut);
    613 void (VBOXCALL *ConsoleVRDPServer::mpfnVRDPClipboard)       (HVRDPSERVER hserver, uint32_t u32Function, uint32_t u32Format, const void *pvData, uint32_t cbData, uint32_t *pcbActualRead);
    614 #endif /* VRDP_NO_COM */
    615596#endif /* VBOX_VRDP */
    616597
    617 #ifdef VRDP_NO_COM
    618598DECLCALLBACK(int)  ConsoleVRDPServer::VRDPCallbackQueryProperty (void *pvCallback, uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut)
    619599{
     
    10201000    server->mConsole->getDisplay ()->SetVideoModeHint(cWidth, cHeight, cBitsPerPixel, uScreenId);
    10211001}
    1022 #endif /* VRDP_NO_COM */
    10231002
    10241003ConsoleVRDPServer::ConsoleVRDPServer (Console *console)
     
    10441023    mhServer = 0;
    10451024
    1046 #ifdef VRDP_NO_COM
    10471025    m_fGuestWantsAbsolute = false;
    10481026    m_mousex = 0;
     
    10651043    mConsoleCallback->AddRef();
    10661044    console->RegisterCallback(mConsoleCallback);
    1067 #endif /* VRDP_NO_COM */
    10681045#endif /* VBOX_VRDP */
    10691046
     
    10751052    Stop ();
    10761053
    1077 #ifdef VRDP_NO_COM
    10781054    if (mConsoleCallback)
    10791055    {
     
    10921068        }
    10931069    }
    1094 #endif /* VRDP_NO_COM */
     1070
    10951071    if (RTCritSectIsInitialized (&mCritSect))
    10961072    {
     
    11161092        && loadVRDPLibrary ())
    11171093    {
    1118 #ifdef VRDP_NO_COM
    11191094        rc = mpfnVRDPCreateServer (&mCallbacks.header, this, (VRDPINTERFACEHDR **)&mpEntryPoints, &mhServer);
    1120 #else
    1121         rc = mpfnVRDPStartServer(mConsole, vrdpserver, &mhServer);
    1122 #endif /* VRDP_NO_COM */
    11231095
    11241096        if (VBOX_SUCCESS(rc))
     
    11381110}
    11391111
    1140 #ifdef VRDP_NO_COM
    11411112void ConsoleVRDPServer::EnableConnections (void)
    11421113{
     
    11681139#endif /* VBOX_VRDP */
    11691140}
    1170 #else
    1171 void ConsoleVRDPServer::SetCallback (void)
    1172 {
    1173 #ifdef VBOX_VRDP
    1174     /* This is called after VM is created and allows the server to accept client connection. */
    1175     if (mhServer && mpfnVRDPSetCallback)
    1176     {
    1177         mpfnVRDPSetCallback (mhServer, mConsole->getVrdpServerCallback (), mConsole);
    1178     }
    1179 #endif /* VBOX_VRDP */
    1180 }
    1181 #endif /* VRDP_NO_COM */
    11821141
    11831142void ConsoleVRDPServer::Stop (void)
     
    11931152        mhServer = 0;
    11941153
    1195 #ifdef VRDP_NO_COM
    11961154        if (mpEntryPoints && hServer)
    11971155        {
    11981156            mpEntryPoints->VRDPDestroy (hServer);
    11991157        }
    1200 #else
    1201         mpfnVRDPShutdownServer (hServer);
    1202 #endif /* VRDP_NO_COM */
    12031158    }
    12041159#endif /* VBOX_VRDP */
     
    15431498        {
    15441499            /* The guest announces clipboard formats. This must be delivered to all clients. */
    1545 #ifdef VRDP_NO_COM
    15461500            if (mpEntryPoints && pServer->mhServer)
    15471501            {
     
    15531507                                              NULL);
    15541508            }
    1555 #else
    1556             if (mpfnVRDPClipboard)
    1557             {
    1558                 mpfnVRDPClipboard (pServer->mhServer,
    1559                                    VRDP_CLIPBOARD_FUNCTION_FORMAT_ANNOUNCE,
    1560                                    pParms->u32Format,
    1561                                    NULL,
    1562                                    0,
    1563                                    NULL);
    1564             }
    1565 #endif /* VRDP_NO_COM */
    15661509        } break;
    15671510
     
    15721515             * announced the requested format most recently.
    15731516             */
    1574 #ifdef VRDP_NO_COM
    15751517            if (mpEntryPoints && pServer->mhServer)
    15761518            {
     
    15821524                                              &pParms->cbData);
    15831525            }
    1584 #else
    1585             if (mpfnVRDPClipboard)
    1586             {
    1587                 mpfnVRDPClipboard (pServer->mhServer,
    1588                                    VRDP_CLIPBOARD_FUNCTION_DATA_READ,
    1589                                    pParms->u32Format,
    1590                                    pParms->pvData,
    1591                                    pParms->cbData,
    1592                                    &pParms->cbData);
    1593             }
    1594 #endif /* VRDP_NO_COM */
    15951526        } break;
    15961527
    15971528        case VBOX_CLIPBOARD_EXT_FN_DATA_WRITE:
    15981529        {
    1599 #ifdef VRDP_NO_COM
    16001530            if (mpEntryPoints && pServer->mhServer)
    16011531            {
     
    16071537                                              NULL);
    16081538            }
    1609 #else
    1610             if (mpfnVRDPClipboard)
    1611             {
    1612                 mpfnVRDPClipboard (pServer->mhServer,
    1613                                    VRDP_CLIPBOARD_FUNCTION_DATA_WRITE,
    1614                                    pParms->u32Format,
    1615                                    pParms->pvData,
    1616                                    pParms->cbData,
    1617                                    NULL);
    1618             }
    1619 #endif /* VRDP_NO_COM */
    16201539        } break;
    16211540
     
    16281547}
    16291548
    1630 #ifdef VRDP_NO_COM
    16311549void ConsoleVRDPServer::ClipboardCreate (uint32_t u32ClientId)
    1632 #else
    1633 void ConsoleVRDPServer::ClipboardCreate (uint32_t u32ClientId, PFNVRDPCLIPBOARDCALLBACK *ppfn, void **ppv)
    1634 #endif /* VRDP_NO_COM */
    16351550{
    16361551    int rc = lockConsoleVRDPServer ();
     
    16471562            }
    16481563        }
    1649 
    1650 #ifdef VRDP_NO_COM
    1651 #else
    1652         if (VBOX_SUCCESS (rc))
    1653         {
    1654             *ppfn = ClipboardCallback;
    1655             *ppv = this;
    1656         }
    1657 #endif /* VRDP_NO_COM */
    16581564
    16591565        unlockConsoleVRDPServer ();
     
    16811587 * The ConsoleVRDPServer keeps a list of created backend instances.
    16821588 */
    1683 #ifdef VRDP_NO_COM
    16841589void ConsoleVRDPServer::USBBackendCreate (uint32_t u32ClientId, void **ppvIntercept)
    1685 #else
    1686 void ConsoleVRDPServer::USBBackendCreate (uint32_t u32ClientId, PFNVRDPUSBCALLBACK *ppfn, void **ppv)
    1687 #endif /* VRDP_NO_COM */
    16881590{
    16891591#ifdef VBOX_WITH_USB
     
    17161618            unlockConsoleVRDPServer ();
    17171619
    1718 #ifdef VRDP_NO_COM
    17191620            if (ppvIntercept)
    17201621            {
    17211622                *ppvIntercept = pRemoteUSBBackend;
    17221623            }
    1723 #else
    1724             pRemoteUSBBackend->QueryVRDPCallbackPointer (ppfn, ppv);
    1725 #endif /* VRDP_NO_COM */
    17261624        }
    17271625
     
    19451843{
    19461844#ifdef VBOX_VRDP
    1947 #ifdef VRDP_NO_COM
    19481845    if (mpEntryPoints && mhServer)
    19491846    {
    19501847        mpEntryPoints->VRDPUpdate (mhServer, uScreenId, pvUpdate, cbUpdate);
    19511848    }
    1952 #else
    1953     if (mpfnVRDPSendUpdate)
    1954         mpfnVRDPSendUpdate (mhServer, uScreenId, pvUpdate, cbUpdate);
    1955 #endif /* VRDP_NO_COM */
    19561849#endif
    19571850}
     
    19601853{
    19611854#ifdef VBOX_VRDP
    1962 #ifdef VRDP_NO_COM
    19631855    if (mpEntryPoints && mhServer)
    19641856    {
    19651857        mpEntryPoints->VRDPResize (mhServer);
    19661858    }
    1967 #else
    1968     if (mpfnVRDPSendResize)
    1969         mpfnVRDPSendResize (mhServer);
    1970 #endif /* VRDP_NO_COM */
    19711859#endif
    19721860}
     
    19751863{
    19761864#ifdef VBOX_VRDP
    1977 #ifdef VRDP_NO_COM
    19781865    VRDPORDERHDR update;
    19791866    update.x = x;
     
    19851872        mpEntryPoints->VRDPUpdate (mhServer, uScreenId, &update, sizeof (update));
    19861873    }
    1987 #else
    1988     if (mpfnVRDPSendUpdateBitmap)
    1989         mpfnVRDPSendUpdateBitmap (mhServer, uScreenId, x, y, w, h);
    1990 #endif /* VRDP_NO_COM */
    19911874#endif
    19921875}
    19931876
    1994 #ifdef VRDP_NO_COM
    1995 #else
    1996 void ConsoleVRDPServer::SetFramebuffer (IFramebuffer *framebuffer, uint32_t fFlags) const
     1877void ConsoleVRDPServer::SendAudioSamples (void *pvSamples, uint32_t cSamples, VRDPAUDIOFORMAT format) const
    19971878{
    19981879#ifdef VBOX_VRDP
    1999     if (mpfnVRDPSetFramebuffer)
    2000         mpfnVRDPSetFramebuffer (mhServer, framebuffer, fFlags);
     1880    if (mpEntryPoints && mhServer)
     1881    {
     1882        mpEntryPoints->VRDPAudioSamples (mhServer, pvSamples, cSamples, format);
     1883    }
    20011884#endif
    20021885}
    2003 #endif /* VRDP_NO_COM */
    2004 
    2005 void ConsoleVRDPServer::SendAudioSamples (void *pvSamples, uint32_t cSamples, VRDPAUDIOFORMAT format) const
     1886
     1887void ConsoleVRDPServer::SendAudioVolume (uint16_t left, uint16_t right) const
    20061888{
    20071889#ifdef VBOX_VRDP
    2008 #ifdef VRDP_NO_COM
    20091890    if (mpEntryPoints && mhServer)
    20101891    {
    2011         mpEntryPoints->VRDPAudioSamples (mhServer, pvSamples, cSamples, format);
    2012     }
    2013 #else
    2014     if (mpfnVRDPSendAudioSamples)
    2015         mpfnVRDPSendAudioSamples (mhServer, pvSamples, cSamples, format);
    2016 #endif /* VRDP_NO_COM */
     1892        mpEntryPoints->VRDPAudioVolume (mhServer, left, right);
     1893    }
    20171894#endif
    20181895}
    20191896
    2020 void ConsoleVRDPServer::SendAudioVolume (uint16_t left, uint16_t right) const
     1897void ConsoleVRDPServer::SendUSBRequest (uint32_t u32ClientId, void *pvParms, uint32_t cbParms) const
    20211898{
    20221899#ifdef VBOX_VRDP
    2023 #ifdef VRDP_NO_COM
    20241900    if (mpEntryPoints && mhServer)
    20251901    {
    2026         mpEntryPoints->VRDPAudioVolume (mhServer, left, right);
    2027     }
    2028 #else
    2029     if (mpfnVRDPSendAudioVolume)
    2030         mpfnVRDPSendAudioVolume (mhServer, left, right);
    2031 #endif /* VRDP_NO_COM */
     1902        mpEntryPoints->VRDPUSBRequest (mhServer, u32ClientId, pvParms, cbParms);
     1903    }
    20321904#endif
    20331905}
    20341906
    2035 void ConsoleVRDPServer::SendUSBRequest (uint32_t u32ClientId, void *pvParms, uint32_t cbParms) const
     1907void ConsoleVRDPServer::QueryInfo (uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut) const
    20361908{
    20371909#ifdef VBOX_VRDP
    2038 #ifdef VRDP_NO_COM
    20391910    if (mpEntryPoints && mhServer)
    20401911    {
    2041         mpEntryPoints->VRDPUSBRequest (mhServer, u32ClientId, pvParms, cbParms);
    2042     }
    2043 #else
    2044     if (mpfnVRDPSendUSBRequest)
    2045         mpfnVRDPSendUSBRequest (mhServer, u32ClientId, pvParms, cbParms);
    2046 #endif /* VRDP_NO_COM */
    2047 #endif
    2048 }
    2049 
    2050 void ConsoleVRDPServer::QueryInfo (uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut) const
    2051 {
    2052 #ifdef VBOX_VRDP
    2053 #ifdef VRDP_NO_COM
    2054     if (mpEntryPoints && mhServer)
    2055     {
    20561912        mpEntryPoints->VRDPQueryInfo (mhServer, index, pvBuffer, cbBuffer, pcbOut);
    20571913    }
    2058 #else
    2059     if (mpfnVRDPQueryInfo)
    2060         mpfnVRDPQueryInfo (mhServer, index, pvBuffer, cbBuffer, pcbOut);
    2061 #endif /* VRDP_NO_COM */
    20621914#endif
    20631915}
     
    20851937            #define DEFSYMENTRY(a) { #a, (void**)&mpfn##a }
    20861938
    2087 #ifdef VRDP_NO_COM
    20881939            static const struct SymbolEntry symbols[] =
    20891940            {
    20901941                DEFSYMENTRY(VRDPCreateServer)
    20911942            };
    2092 #else
    2093             static const struct SymbolEntry symbols[] =
    2094             {
    2095                 DEFSYMENTRY(VRDPStartServer),
    2096                 DEFSYMENTRY(VRDPSetCallback),
    2097                 DEFSYMENTRY(VRDPShutdownServer),
    2098                 DEFSYMENTRY(VRDPSendUpdate),
    2099                 DEFSYMENTRY(VRDPSendUpdateBitmap),
    2100                 DEFSYMENTRY(VRDPSendResize),
    2101                 DEFSYMENTRY(VRDPSendAudioSamples),
    2102                 DEFSYMENTRY(VRDPSendAudioVolume),
    2103                 DEFSYMENTRY(VRDPSendUSBRequest),
    2104                 DEFSYMENTRY(VRDPQueryInfo),
    2105                 DEFSYMENTRY(VRDPClipboard)
    2106             };
    2107 #endif /* VRDP_NO_COM */
    21081943
    21091944            #undef DEFSYMENTRY
  • trunk/src/VBox/Main/Makefile.kmk

    r5976 r5982  
    279279ifdef VBOX_WITH_VRDP
    280280VBoxC_DEFS += VBOX_VRDP IN_VRDP_R3
    281 ifdef VBOX_WITH_VRDP_NO_COM
    282 VBoxC_DEFS += VRDP_NO_COM
    283 endif
    284281endif
    285282ifdef VBOX_WITH_HGCM
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r5741 r5982  
    180180    AudioSniffer *getAudioSniffer () { return mAudioSniffer; }
    181181
    182 #ifdef VRDP_NO_COM
    183182    int VRDPClientLogon (uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain);
    184183    void VRDPClientConnect (uint32_t u32ClientId);
     
    187186    void VRDPInterceptUSB (uint32_t u32ClientId, void **ppvIntercept);
    188187    void VRDPInterceptClipboard (uint32_t u32ClientId);
    189 #else
    190     static VRDPSERVERCALLBACK *getVrdpServerCallback () { return &sVrdpServerCallback; };
    191 #endif /* VRDP_NO_COM */
    192188
    193189    void processRemoteUSBDevices (uint32_t u32ClientId, VRDPUSBDEVICEDESC *pDevList, uint32_t cbDevList);
     
    442438    volatile uint32_t mcVRDPClients;
    443439
    444 #ifdef VRDP_NO_COM
    445 #else
    446     static DECLCALLBACK(int)    vrdp_ClientLogon (void *pvUser, uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain);
    447     static DECLCALLBACK(void)   vrdp_ClientConnect (void *pvUser, uint32_t u32ClientId);
    448     static DECLCALLBACK(void)   vrdp_ClientDisconnect (void *pvUser, uint32_t u32ClientId, uint32_t fu32Intercepted);
    449     static DECLCALLBACK(void)   vrdp_InterceptAudio (void *pvUser, uint32_t u32ClientId);
    450     static DECLCALLBACK(void)   vrdp_InterceptUSB (void *pvUser, uint32_t u32ClientId, PFNVRDPUSBCALLBACK *ppfn, void **ppv);
    451     static DECLCALLBACK(void)   vrdp_InterceptClipboard (void *pvUser, uint32_t u32ClientId, PFNVRDPCLIPBOARDCALLBACK *ppfn, void **ppv);
    452 
    453     static VRDPSERVERCALLBACK   sVrdpServerCallback;
    454 #endif /* VRDP_NO_COM */
    455 
    456440    static const char *sSSMConsoleUnit;
    457441    static uint32_t sSSMConsoleVer;
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r5782 r5982  
    2626#include <VBox/HostServices/VBoxClipboardExt.h>
    2727
    28 #ifdef VRDP_NO_COM
    2928#include "SchemaDefs.h"
    30 #endif /* VRDP_NO_COM */
    3129
    3230// ConsoleVRDPServer
    3331///////////////////////////////////////////////////////////////////////////////
    3432
    35 #ifdef VRDP_NO_COM
    3633typedef struct _VRDPInputSynch
    3734{
     
    4744    bool fClientScrollLock;
    4845} VRDPInputSynch;
    49 #endif /* VRDP_NO_COM */
    5046
    5147/* Member of Console. Helper class for VRDP server management. Not a COM class. */
     
    5753
    5854    int Launch (void);
    59 #ifdef VRDP_NO_COM
     55
    6056    void NotifyAbsoluteMouse (bool fGuestWantsAbsolute)
    6157    {
     
    8884    void MousePointerUpdate (const VRDPCOLORPOINTER *pPointer);
    8985    void MousePointerHide (void);
    90 #else
    91     void SetCallback (void);
    92 #endif /* VRDP_NO_COM */
     86
    9387    void Stop (void);
    9488
     
    9993    void AuthDisconnect (const Guid &uuid, uint32_t u32ClientId);
    10094
    101 #ifdef VRDP_NO_COM
    10295    void USBBackendCreate (uint32_t u32ClientId, void **ppvIntercept);
    103 #else
    104     void USBBackendCreate (uint32_t u32ClientId, PFNVRDPUSBCALLBACK *ppfn, void **ppv);
    105 #endif /* VRDP_NO_COM */
    10696    void USBBackendDelete (uint32_t u32ClientId);
    10797   
     
    119109    void waitRemoteUSBThreadEvent (unsigned cMillies);
    120110   
    121 #ifdef VRDP_NO_COM
    122111    void ClipboardCreate (uint32_t u32ClientId);
    123 #else
    124     void ClipboardCreate (uint32_t u32ClientId, PFNVRDPCLIPBOARDCALLBACK *ppfn, void **ppv);
    125 #endif /* VRDP_NO_COM */
    126112    void ClipboardDelete (uint32_t u32ClientId);
    127113
     
    132118    void SendResize (void) const;
    133119    void SendUpdateBitmap (unsigned uScreenId, uint32_t x, uint32_t y, uint32_t w, uint32_t h) const;
    134 #ifdef VRDP_NO_COM
    135 #else
    136     void SetFramebuffer (IFramebuffer *framebuffer, uint32_t fFlags) const;
    137 #endif /* VRDP_NO_COM */
    138120
    139121    void SendAudioSamples (void *pvSamples, uint32_t cSamples, VRDPAUDIOFORMAT format) const;
     
    157139    static RTLDRMOD mVRDPLibrary;
    158140
    159 #ifdef VRDP_NO_COM
    160141    static PFNVRDPCREATESERVER mpfnVRDPCreateServer;
    161142   
     
    185166
    186167    VRDPInputSynch m_InputSynch;
    187 #else
    188     // VRDP API function pointers
    189     static int  (VBOXCALL *mpfnVRDPStartServer)     (IConsole *pConsole, IVRDPServer *pVRDPServer, HVRDPSERVER *phServer);
    190     static int  (VBOXCALL *mpfnVRDPSetFramebuffer)  (HVRDPSERVER hServer, IFramebuffer *pFramebuffer, uint32_t fFlags);
    191     static void (VBOXCALL *mpfnVRDPSetCallback)     (HVRDPSERVER hServer, VRDPSERVERCALLBACK *pcallback, void *pvUser);
    192     static void (VBOXCALL *mpfnVRDPShutdownServer)  (HVRDPSERVER hServer);
    193     static void (VBOXCALL *mpfnVRDPSendUpdateBitmap)(HVRDPSERVER hServer, unsigned uScreenId, unsigned x, unsigned y, unsigned w, unsigned h);
    194     static void (VBOXCALL *mpfnVRDPSendResize)      (HVRDPSERVER hServer);
    195     static void (VBOXCALL *mpfnVRDPSendAudioSamples)(HVRDPSERVER hserver, void *pvSamples, uint32_t cSamples, VRDPAUDIOFORMAT format);
    196     static void (VBOXCALL *mpfnVRDPSendAudioVolume) (HVRDPSERVER hserver, uint16_t left, uint16_t right);
    197     static void (VBOXCALL *mpfnVRDPSendUSBRequest)  (HVRDPSERVER hserver, uint32_t u32ClientId, void *pvParms, uint32_t cbParms);
    198     static void (VBOXCALL *mpfnVRDPSendUpdate)      (HVRDPSERVER hServer, unsigned uScreenId, void *pvUpdate, uint32_t cbUpdate);
    199     static void (VBOXCALL *mpfnVRDPQueryInfo)       (HVRDPSERVER hserver, uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut);
    200     static void (VBOXCALL *mpfnVRDPClipboard)       (HVRDPSERVER hserver, uint32_t u32Function, uint32_t u32Format, const void *pvData, uint32_t cbData, uint32_t *pcbActualRead);
    201 #endif /* VRDP_NO_COM */
    202168#endif /* VBOX_VRDP */
    203169
  • trunk/src/VBox/Main/include/RemoteUSBBackend.h

    r4071 r5982  
    3434class ConsoleVRDPServer;
    3535
    36 #ifdef VRDP_NO_COM
    3736DECLCALLBACK(int) USBClientResponseCallback (void *pv, uint32_t u32ClientId, uint8_t code, const void *pvRet, uint32_t cbRet);
    38 #endif /* VRDP_NO_COM */
    3937
    4038
     
    6462        void AddRef (void);
    6563        void Release (void);
    66        
    67 #ifdef VRDP_NO_COM
    68 #else
    69         void QueryVRDPCallbackPointer (PFNVRDPUSBCALLBACK *ppfn, void **ppv);
    70 #endif /* VRDP_NO_COM */
    7164       
    7265        REMOTEUSBCALLBACK *GetBackendCallbackPointer (void) { return &mCallback; }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette