Partager via


2.2.12 TRKSVR_MESSAGE_UNION

The TRKSVR_MESSAGE_UNION structure is used in LnkSvrMessage method calls to request services. A single LnkSvrMessage method call can contain one type of message request, and the type-dependent data for a message request is stored in the TRKSVR_MESSAGE_UNION structure. The type of the message is indicated in the MessageType field, and the message data is stored in the MessageUnion field. The format of the MessageUnion field depends on the MessageType field. See section 2.2.11 for the definition of the TRKSVR_MESSAGE_TYPE enumeration used by the MessageType field. See section 3.1.4.1 for more information on the LnkSvrMessage method.

 typedef struct {
   TRKSVR_MESSAGE_TYPE MessageType;
   TRKSVR_MESSAGE_PRIORITY Priority;
   [switch_is(MessageType)] union {
     [case(old_SEARCH)] 
       old_TRKSVR_CALL_SEARCH old_Search;
     [case(MOVE_NOTIFICATION)] 
       TRKSVR_CALL_MOVE_NOTIFICATION MoveNotification;
     [case(REFRESH)] 
       TRKSVR_CALL_REFRESH Refresh;
     [case(SYNC_VOLUMES)] 
       TRKSVR_CALL_SYNC_VOLUMES SyncVolumes;
     [case(DELETE_NOTIFY)] 
       TRKSVR_CALL_DELETE Delete;
     [case(STATISTICS)] 
       TRKSVR_STATISTICS Statistics;
     [case(SEARCH)] 
       TRKSVR_CALL_SEARCH Search;
     [case(WKS_CONFIG)] 
       TRKWKS_CONFIG WksConfig;
     [case(WKS_VOLUME_REFRESH)] 
       unsigned long WksRefresh;
   };
   [string] WCHAR* ptszMachineID;
 } TRKSVR_MESSAGE_UNION;

MessageType: The type of message to be selected from the TRKSVR_MESSAGE_TYPE enumeration. The value of this field indicates the format of the MessageUnion field.

Priority: The priority level of the operation. Valid values are defined in TRKSVR_MESSAGE_PRIORITY. Section 3.2.5.2 and 3.2.5.3, and subsections of section 3.2.6 specify how this field is set for different events.

(unnamed union): The message data for this message request. The MessageType field indicates which of these fields is used to format the data. (see section 2.2.11 for more information on the TRKSVR_MESSAGE_TYPE enumeration used by the MessageType field). The fields are defined as follows:

old_Search: Unused.

MoveNotification: If MessageType is MOVE_NOTIFICATION, this field contains message data for a MOVE_NOTIFICATION message, with the data formatted in the TRKSVR_CALL_MOVE_NOTIFICATION structure.

Refresh: If MessageType is REFRESH, this field contains message data for a REFRESH message, with the data formatted in the TRKSVR_CALL_REFRESH structure.

SyncVolumes: If MessageType is SYNC_VOLUMES, this field contains message data for a SYNC_VOLUMES message, with the data formatted in the TRKSVR_CALL_SYNC_VOLUMES structure.

Delete: If MessageType is DELETE_NOTIFY, this field contains message data for a DELETE_NOTIFY message, with the data formatted in the TRKSVR_CALL_DELETE structure.

Statistics: If MessageType is STATISTICS, this field contains message data for a STATISTICS message, with the data formatted in a TRKSVR_STATISTICS structure. This message type is not used in this protocol, but is included in this specification because it affects the size of the TRKSVR_MESSAGE_UNION structure as it is transmitted over the RPC Protocol.

Search: If MessageType is SEARCH, this field contains message data for a SEARCH message, with the data formatted in a TRKSVR_CALL_SEARCH structure.

WksConfig: Unused.

WksRefresh: Unused.

ptszMachineID: Unused. MUST be set to 0 and ignored on receipt.