Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2245 lines
62 KiB

  1. /*
  2. * mcsuser.h
  3. *
  4. * Copyright (c) 1995 by DataBeam Corporation, Lexington, KY
  5. *
  6. * Abstract:
  7. * An instance of this class represents a Conference object's user
  8. * attachment to MCS. This is a fairly complex class that handles a lot of
  9. * conference establishment details such as creating a User attachment to
  10. * MCS and joining all the appropriate MCS channels. After everything is
  11. * established the User object is responsible for encoding and decoding
  12. * certain PDUs as well as management of a data queue which can hold a
  13. * number of outgoing PDUs. The MCSUser object is designed so that it
  14. * knows very little about any object other than the MCS Interface object
  15. * which it uses to send out PDUs. This class only deals with data PDUs
  16. * (or GCC PDUs) as opposed to connect PDUs. These GCC PDUs are sent and
  17. * received through channels joined by the GCC user attachment.
  18. *
  19. * When an MCSUser object is first instantiated it goes through a number of
  20. * steps to establish its links to MCS. First, an MCSUser object
  21. * immediately creates an MCS user attachment in its constructor. After
  22. * the MCS_ATTACH_USER_CONFIRM is received it begins joining all of the
  23. * appropriate channels. The channels it joins varies depending on the
  24. * node type which is passed in through the MCSUser objects constructor.
  25. * After all channels have been successfully joined, the MCSUser object
  26. * issues an owner callback informing the Conference object that it is
  27. * completely initiated and ready to service requests.
  28. *
  29. * The MCSUser object can handle a number of different requests that can
  30. * result in PDU traffic being generated. Therefore, the user object has
  31. * the ability (within certain requests) to encode outgoing PDUs. Many of
  32. * the more complex PDUs are handled by the class that contains the
  33. * information needed to build the PDU such as the ConferenceRoster and the
  34. * ApplicationRoster. All PDU traffic received by an MCSUser object is
  35. * directly decoded by this class and immediately sent back to the owner
  36. * object (a Conference object) through an owner callback.
  37. *
  38. * An MCSUser object has the ability to Terminate itself when an
  39. * unrecoverable resource error occurs. This is handled through an owner
  40. * callback message informing the Owner Object to do the delete.
  41. *
  42. * Caveats:
  43. * None.
  44. *
  45. * Author:
  46. * blp
  47. */
  48. #ifndef _GCC_MCS_USER_
  49. #define _GCC_MCS_USER_
  50. /** include files **/
  51. #include "mcsdllif.h"
  52. #include "pktcoder.h"
  53. #include "userdata.h"
  54. #include "password.h"
  55. #include "alarm.h"
  56. #include "regkey.h"
  57. #include "regitem.h"
  58. #include "netaddr.h"
  59. #include "invoklst.h"
  60. #include "clists.h"
  61. // was defined in gcmdtar.h
  62. typedef UINT_PTR TagNumber;
  63. /*
  64. * Result types for attach user and channel joins performed by the user object
  65. */
  66. typedef enum
  67. {
  68. USER_RESULT_SUCCESSFUL,
  69. USER_ATTACH_FAILURE,
  70. USER_CHANNEL_JOIN_FAILURE
  71. }UserResultType;
  72. /*
  73. * This enum defines all the possible types of nodes that can exists
  74. * in a GCC conference. Note that this is an internal definition and
  75. * is not the save the the T.124 node type.
  76. */
  77. typedef enum
  78. {
  79. TOP_PROVIDER_NODE,
  80. CONVENER_NODE,
  81. TOP_PROVIDER_AND_CONVENER_NODE,
  82. JOINED_NODE,
  83. INVITED_NODE,
  84. JOINED_CONVENER_NODE
  85. } ConferenceNodeType;
  86. /*
  87. ** The structures defined below are used to pack the data associated with
  88. ** all the above owner callback messages. A pointer to one of these
  89. ** structures is passed in the LPVOID parameter of the owner callback.
  90. */
  91. // USER_CREATE_CONFIRM data structure
  92. typedef struct
  93. {
  94. UserID user_id;
  95. UserResultType create_result;
  96. }
  97. UserCreateConfirmInfo, *PUserCreateConfirmInfo;
  98. // USER_CONFERENCE_JOIN_REQUEST data structure
  99. typedef struct
  100. {
  101. CPassword *convener_password;
  102. CPassword *password_challenge;
  103. LPWSTR pwszCallerID;
  104. CUserDataListContainer *user_data_list;
  105. UserID sender_id;
  106. }
  107. UserJoinRequestInfo, *PUserJoinRequestInfo;
  108. // USER_CONFERENCE_JOIN_RESPONSE data structure
  109. typedef struct
  110. {
  111. CPassword *password_challenge;
  112. CUserDataListContainer *user_data_list;
  113. ConnectionHandle connection_handle;
  114. GCCResult result;
  115. }
  116. UserJoinResponseInfo, *PUserJoinResponseInfo;
  117. // USER_TIME_REMAINING_INDICATION data structure
  118. typedef struct
  119. {
  120. UserID source_node_id;
  121. UserID node_id;
  122. UINT time_remaining;
  123. }
  124. UserTimeRemainingInfo, *PUserTimeRemainingInfo;
  125. // USER_CONFERENCE_EXTEND_INDICATION data structure
  126. typedef struct
  127. {
  128. UINT extension_time;
  129. BOOL time_is_conference_wide;
  130. UserID source_node_id;
  131. }
  132. UserTimeExtendInfo, *PUserTimeExtendInfo;
  133. // USER_TERMINATE_REQUEST data structure
  134. typedef struct
  135. {
  136. UserID requester_id;
  137. GCCReason reason;
  138. }
  139. UserTerminateRequestInfo, *PUserTerminateRequestInfo;
  140. // USER_NODE_EJECTION_REQUEST data structure
  141. typedef struct
  142. {
  143. UserID requester_id;
  144. UserID node_to_eject;
  145. GCCReason reason;
  146. }
  147. UserEjectNodeRequestInfo, *PUserEjectNodeRequestInfo;
  148. // USER_NODE_EJECTION_RESPONSE data structure
  149. typedef struct
  150. {
  151. UserID node_to_eject;
  152. GCCResult result;
  153. }
  154. UserEjectNodeResponseInfo, *PUserEjectNodeResponseInfo;
  155. // USER_REGISTRY_CHANNEL_REQUEST data structure
  156. typedef struct
  157. {
  158. CRegKeyContainer *registry_key;
  159. ChannelID channel_id;
  160. EntityID requester_entity_id;
  161. }
  162. UserRegistryChannelRequestInfo, *PUserRegistryChannelRequestInfo;
  163. // USER_REGISTRY_SET_PARAMETER_REQUEST data structure
  164. typedef struct
  165. {
  166. CRegKeyContainer *registry_key;
  167. LPOSTR parameter_value;
  168. GCCModificationRights modification_rights;
  169. EntityID requester_entity_id;
  170. }
  171. UserRegistrySetParameterRequestInfo, *PUserRegistrySetParameterRequestInfo;
  172. /*
  173. ** Data structure associated with the following:
  174. **
  175. ** USER_REGISTRY_TOKEN_REQUEST,
  176. ** USER_REGISTRY_RETRIEVE_REQUEST,
  177. ** USER_REGISTRY_DELETE_REQUEST,
  178. ** USER_REGISTRY_MONITOR_REQUEST.
  179. */
  180. typedef struct
  181. {
  182. CRegKeyContainer *registry_key;
  183. EntityID requester_entity_id;
  184. }
  185. UserRegistryRequestInfo, *PUserRegistryRequestInfo;
  186. // USER_REGISTRY_RESPONSE data structure
  187. typedef struct
  188. {
  189. RegistryResponsePrimitiveType primitive_type;
  190. CRegKeyContainer *registry_key;
  191. CRegItem *registry_item;
  192. GCCModificationRights modification_rights;
  193. EntityID owner_node_id;
  194. EntityID owner_entity_id;
  195. EntityID requester_entity_id;
  196. GCCResult result;
  197. }
  198. UserRegistryResponseInfo, *PUserRegistryResponseInfo;
  199. // USER_REGISTRY_MONITOR_INDICATION data structure
  200. typedef struct
  201. {
  202. CRegKeyContainer *registry_key;
  203. CRegItem *registry_item;
  204. GCCModificationRights modification_rights;
  205. EntityID owner_node_id;
  206. EntityID owner_entity_id;
  207. }
  208. UserRegistryMonitorInfo, *PUserRegistryMonitorInfo;
  209. /*
  210. ** Data structure associated with the following:
  211. **
  212. ** USER_REGISTRY_ALLOCATE_HANDLE_REQUEST,
  213. ** USER_REGISTRY_ALLOCATE_HANDLE_RESPONSE.
  214. */
  215. typedef struct
  216. {
  217. EntityID requester_entity_id;
  218. USHORT number_of_handles;
  219. UINT first_handle;
  220. GCCResult result;
  221. }
  222. UserRegistryAllocateHandleInfo, *PUserRegistryAllocateHandleInfo;
  223. // USER_CONDUCTOR_PERMIT_GRANT_INDICATION data structure
  224. typedef struct
  225. {
  226. USHORT number_granted;
  227. PUserID granted_node_list;
  228. USHORT number_waiting;
  229. PUserID waiting_node_list;
  230. }
  231. UserPermissionGrantIndicationInfo, *PUserPermissionGrantIndicationInfo;
  232. // USER_USER_ID_INDICATION data structure
  233. typedef struct
  234. {
  235. UserID sender_id;
  236. TagNumber tag;
  237. }
  238. UserIDIndicationInfo, *PUserIDIndicationInfo;
  239. // USER_TIME_INQUIRE_INDICATION data structure
  240. typedef struct
  241. {
  242. UserID sender_id;
  243. BOOL time_is_node_specific;
  244. }
  245. TimeInquireIndicationInfo, *PTimeInquireIndicationInfo;
  246. // USER_CONDUCTOR_ASSIGN_INDICATION data structure
  247. typedef struct
  248. {
  249. UserID sender_id;
  250. UserID conductor_id;
  251. }
  252. ConductorAssignIndicationInfo, *PConductorAssignIndicationInfo;
  253. // USER_CONDUCTOR_PERMIT_ASK_INDICATION data structure
  254. typedef struct
  255. {
  256. UserID sender_id;
  257. BOOL permission_is_granted;
  258. }
  259. PermitAskIndicationInfo, *PPermitAskIndicationInfo;
  260. // USER_DETACH_INDICATION data structure
  261. typedef struct
  262. {
  263. UserID detached_user;
  264. GCCReason reason;
  265. }
  266. DetachIndicationInfo, *PDetachIndicationInfo;
  267. /*
  268. ** Data structure associated with the following:
  269. **
  270. ** USER_CONFERENCE_TRANSFER_REQUEST,
  271. ** USER_CONFERENCE_TRANSFER_INDICATION,
  272. ** USER_CONFERENCE_TRANSFER_RESPONSE.
  273. */
  274. typedef struct
  275. {
  276. GCCConferenceName destination_conference_name;
  277. GCCNumericString destination_conference_modifier;
  278. CNetAddrListContainer *destination_address_list;
  279. USHORT number_of_destination_nodes;
  280. PUserID destination_node_list;
  281. CPassword *password;
  282. UserID requesting_node_id;
  283. GCCResult result;
  284. }
  285. TransferInfo, *PTransferInfo;
  286. // USER_CONFERENCE_ADD_REQUEST data structure
  287. typedef struct
  288. {
  289. CNetAddrListContainer *network_address_list;
  290. CUserDataListContainer *user_data_list;
  291. UserID adding_node;
  292. TagNumber add_request_tag;
  293. UserID requesting_node;
  294. }
  295. AddRequestInfo, *PAddRequestInfo;
  296. // USER_CONFERENCE_ADD_RESPONSE data structure
  297. typedef struct
  298. {
  299. CUserDataListContainer *user_data_list;
  300. TagNumber add_request_tag;
  301. GCCResult result;
  302. }
  303. AddResponseInfo, *PAddResponseInfo;
  304. /******************** End of callback data structures *********************/
  305. /*
  306. * Structure to hold send data information (besides the actual data packet),
  307. * when the send data request is queued to be sent during the heartbeat.
  308. */
  309. typedef struct
  310. {
  311. ChannelID channel_id;
  312. Priority priority;
  313. BOOL uniform_send;
  314. PPacket packet;
  315. }
  316. SEND_DATA_REQ_INFO;
  317. /*
  318. * This structure holds information as to which channels the user object
  319. * has joined at a particular instance of time. Also it indicates whether
  320. * there has been an error in joining any of these channels or not.
  321. */
  322. typedef struct
  323. {
  324. BOOL convener_channel_joined;
  325. BOOL user_channel_joined;
  326. BOOL broadcast_channel_joined;
  327. BOOL channel_join_error;
  328. }
  329. ChannelJoinedFlag, *PChannelJoinedFlag;
  330. /*
  331. ** Queue of structures (SendDataMessages) to be flushed during a
  332. ** heartbeat.
  333. */
  334. class COutgoingPDUQueue : public CQueue
  335. {
  336. DEFINE_CQUEUE(COutgoingPDUQueue, SEND_DATA_REQ_INFO*);
  337. };
  338. /*
  339. ** List to maintain sequence number in the response with sender's userid
  340. ** to be able to route the response to the correct gcc provider.
  341. */
  342. class CConfJoinResponseList2 : public CList2
  343. {
  344. DEFINE_CLIST2_(CConfJoinResponseList2, TagNumber, UserID);
  345. };
  346. /*
  347. ** List to hold the user ids of users in this provider's subtree
  348. ** This list is used to match outstanding user IDs
  349. */
  350. class CConnHandleUidList2 : public CList2
  351. {
  352. DEFINE_CLIST2___(CConnHandleUidList2, USHORT)
  353. };
  354. /*
  355. ** This list holds alarms used to disconnect any misbehaving nodes. If an
  356. ** alarm is placed in this list, the node has a specified amount of time to
  357. ** disconnect before this node will disconnect it.
  358. */
  359. class CAlarmUidList2 : public CList2
  360. {
  361. DEFINE_CLIST2_(CAlarmUidList2, PAlarm, UserID)
  362. };
  363. // The class definition.
  364. class CConf;
  365. class MCSUser : public CRefCount
  366. {
  367. friend class MCSDLLInterface;
  368. public:
  369. MCSUser(CConf *,
  370. GCCNodeID nidTopProvider,
  371. GCCNodeID nidParent,
  372. PGCCError);
  373. ~MCSUser(void);
  374. void SendUserIDRequest(TagNumber);
  375. void SetChildUserIDAndConnection(UserID, ConnectionHandle);
  376. /*
  377. * Called by conference of intermediate node to send join request
  378. * over to the top provider.
  379. */
  380. GCCError ConferenceJoinRequest(
  381. CPassword *convener_password,
  382. CPassword *password_challange,
  383. LPWSTR pwszCallerID,
  384. CUserDataListContainer *user_data_list,
  385. ConnectionHandle connection_handle);
  386. /*
  387. ** Called by conference of top provider to send the response
  388. ** back to the intermediate node.
  389. */
  390. void ConferenceJoinResponse(
  391. UserID receiver_id,
  392. BOOL password_is_in_the_clear,
  393. BOOL conference_locked,
  394. BOOL conference_listed,
  395. GCCTerminationMethod termination_method,
  396. CPassword *password_challenge,
  397. CUserDataListContainer *user_data_list,
  398. GCCResult result);
  399. GCCError SendConferenceLockRequest(void);
  400. GCCError SendConferenceLockResponse(UserID uidSource, GCCResult);
  401. GCCError SendConferenceUnlockRequest(void);
  402. GCCError SendConferenceUnlockResponse(UserID uidSource, GCCResult);
  403. GCCError SendConferenceLockIndication(BOOL fUniformSend, UserID uidSource);
  404. GCCError SendConferenceUnlockIndication(BOOL fUniformSend, UserID uidSource);
  405. // Calls related to conference termination
  406. void ConferenceTerminateRequest(GCCReason);
  407. void ConferenceTerminateResponse(UserID uidRequester, GCCResult);
  408. void ConferenceTerminateIndication(GCCReason);
  409. GCCError EjectNodeFromConference(UserID uidEjected, GCCReason);
  410. GCCError SendEjectNodeResponse(UserID uidRequester, UserID uidEject, GCCResult);
  411. // Roster related calls
  412. void RosterUpdateIndication(PGCCPDU, BOOL send_update_upward);
  413. // Registry related calls
  414. void RegistryRegisterChannelRequest(CRegKeyContainer *, ChannelID, EntityID);
  415. void RegistryAssignTokenRequest(CRegKeyContainer *, EntityID);
  416. void RegistrySetParameterRequest(CRegKeyContainer *,
  417. LPOSTR,
  418. GCCModificationRights,
  419. EntityID);
  420. void RegistryRetrieveEntryRequest(CRegKeyContainer *, EntityID);
  421. void RegistryDeleteEntryRequest(CRegKeyContainer *, EntityID);
  422. void RegistryMonitorRequest(CRegKeyContainer *, EntityID);
  423. void RegistryAllocateHandleRequest(UINT, EntityID);
  424. void RegistryAllocateHandleResponse(UINT cHandles, UINT registry_handle,
  425. EntityID eidRequester, UserID uidRequester, GCCResult);
  426. void RegistryResponse(
  427. RegistryResponsePrimitiveType primitive_type,
  428. UserID requester_owner_id,
  429. EntityID requester_entity_id,
  430. CRegKeyContainer *registry_key_data,
  431. CRegItem *registry_item_data,
  432. GCCModificationRights modification_rights,
  433. UserID entry_owner_id,
  434. EntityID entry_entity_id,
  435. GCCResult result);
  436. void RegistryMonitorEntryIndication (
  437. CRegKeyContainer *registry_key_data,
  438. CRegItem *registry_item,
  439. UserID entry_owner_id,
  440. EntityID entry_entity_id,
  441. GCCModificationRights modification_rights);
  442. GCCError AppInvokeIndication(CInvokeSpecifierListContainer *, GCCSimpleNodeList *);
  443. GCCError TextMessageIndication(LPWSTR pwszTextMsg, UserID uidDst);
  444. GCCError ConferenceAssistanceIndication(UINT cElements, PGCCUserData *);
  445. GCCError ConferenceTransferRequest (
  446. PGCCConferenceName destination_conference_name,
  447. GCCNumericString destination_conference_modifier,
  448. CNetAddrListContainer *destination_address_list,
  449. UINT number_of_destination_nodes,
  450. PUserID destination_node_list,
  451. CPassword *password);
  452. GCCError ConferenceTransferIndication (
  453. PGCCConferenceName destination_conference_name,
  454. GCCNumericString destination_conference_modifier,
  455. CNetAddrListContainer *destination_address_list,
  456. UINT number_of_destination_nodes,
  457. PUserID destination_node_list,
  458. CPassword *password);
  459. GCCError ConferenceTransferResponse (
  460. UserID requesting_node_id,
  461. PGCCConferenceName destination_conference_name,
  462. GCCNumericString destination_conference_modifier,
  463. UINT number_of_destination_nodes,
  464. PUserID destination_node_list,
  465. GCCResult result);
  466. GCCError ConferenceAddRequest(
  467. TagNumber conference_add_tag,
  468. UserID requesting_node,
  469. UserID adding_node,
  470. UserID target_node,
  471. CNetAddrListContainer *network_address_container,
  472. CUserDataListContainer *user_data_container);
  473. GCCError ConferenceAddResponse(
  474. TagNumber add_request_tag,
  475. UserID requesting_node,
  476. CUserDataListContainer *user_data_container,
  477. GCCResult result);
  478. // Calls related to conductorship
  479. GCCError ConductorTokenGrab(void);
  480. GCCError ConductorTokenRelease(void);
  481. GCCError ConductorTokenPlease(void);
  482. GCCError ConductorTokenGive(UserID uidRecipient);
  483. GCCError ConductorTokenGiveResponse(Result);
  484. GCCError ConductorTokenTest(void);
  485. GCCError SendConductorAssignIndication(UserID uidConductor);
  486. GCCError SendConductorReleaseIndication(void);
  487. GCCError SendConductorPermitAsk(BOOL fGranted);
  488. GCCError SendConductorPermitGrant(UINT cGranted, PUserID granted_node_list,
  489. UINT cWaiting, PUserID waiting_node_list);
  490. // Miscelaneous calls
  491. GCCError TimeRemainingRequest(UINT time_remaining, UserID);
  492. GCCError TimeInquireRequest(BOOL time_is_conference_wide);
  493. GCCError ConferenceExtendIndication(UINT extension_time, BOOL time_is_conference_wide);
  494. void CheckEjectedNodeAlarms(void);
  495. BOOL FlushOutgoingPDU(void);
  496. GCCNodeID GetMyNodeID(void) { return(m_nidMyself); }
  497. GCCNodeID GetTopNodeID(void) { return(m_nidTopProvider); }
  498. GCCNodeID GetParentNodeID(void) { return(m_nidParent); }
  499. UserID GetUserIDFromConnection(ConnectionHandle);
  500. void UserDisconnectIndication(UserID);
  501. protected:
  502. UINT ProcessAttachUserConfirm(
  503. Result result,
  504. UserID user_id);
  505. UINT ProcessChannelJoinConfirm(
  506. Result result,
  507. ChannelID channel_id);
  508. UINT ProcessDetachUserIndication(
  509. Reason mcs_reason,
  510. UserID detached_user);
  511. UINT ProcessSendDataIndication(
  512. PSendData send_data_info);
  513. UINT ProcessUniformSendDataIndication(
  514. PSendData send_data_info);
  515. void ProcessConferenceJoinRequestPDU(
  516. PConferenceJoinRequest join_request,
  517. PSendData send_data_info);
  518. void ProcessConferenceJoinResponsePDU(
  519. PConferenceJoinResponse join_response);
  520. void ProcessConferenceTerminateRequestPDU(
  521. PConferenceTerminateRequest terminate_request,
  522. PSendData send_data_info);
  523. void ProcessConferenceTerminateResponsePDU(
  524. PConferenceTerminateResponse
  525. terminate_response);
  526. void ProcessConferenceTerminateIndicationPDU (
  527. PConferenceTerminateIndication
  528. terminate_indication,
  529. UserID sender_id);
  530. #ifdef JASPER
  531. void ProcessTimeRemainingIndicationPDU (
  532. PConferenceTimeRemainingIndication
  533. time_remaining_indication,
  534. UserID sender_id);
  535. #endif // JASPER
  536. #ifdef JASPER
  537. void ProcessConferenceAssistanceIndicationPDU(
  538. PConferenceAssistanceIndication
  539. conf_assistance_indication,
  540. UserID sender_id);
  541. #endif // JASPER
  542. #ifdef JASPER
  543. void ProcessConferenceExtendIndicationPDU(
  544. PConferenceTimeExtendIndication
  545. conf_time_extend_indication,
  546. UserID sender_id);
  547. #endif // JASPER
  548. void ProcessConferenceEjectUserRequestPDU(
  549. PConferenceEjectUserRequest
  550. eject_user_request,
  551. PSendData send_data_info);
  552. void ProcessConferenceEjectUserResponsePDU(
  553. PConferenceEjectUserResponse
  554. eject_user_request);
  555. void ProcessConferenceEjectUserIndicationPDU (
  556. PConferenceEjectUserIndication
  557. eject_user_indication,
  558. UserID sender_id);
  559. void ProcessRegistryRequestPDU(
  560. PGCCPDU gcc_pdu,
  561. PSendData send_data_info);
  562. void ProcessRegistryAllocateHandleRequestPDU(
  563. PRegistryAllocateHandleRequest
  564. allocate_handle_request,
  565. PSendData send_data_info);
  566. void ProcessRegistryAllocateHandleResponsePDU(
  567. PRegistryAllocateHandleResponse
  568. allocate_handle_response);
  569. void ProcessRegistryResponsePDU(
  570. PRegistryResponse registry_response);
  571. void ProcessRegistryMonitorIndicationPDU(
  572. PRegistryMonitorEntryIndication
  573. monitor_indication,
  574. UserID sender_id);
  575. void ProcessTransferRequestPDU (
  576. PConferenceTransferRequest
  577. conference_transfer_request,
  578. PSendData send_data_info);
  579. #ifdef JASPER
  580. void ProcessTransferIndicationPDU (
  581. PConferenceTransferIndication
  582. conference_transfer_indication);
  583. #endif // JASPER
  584. #ifdef JASPER
  585. void ProcessTransferResponsePDU (
  586. PConferenceTransferResponse
  587. conference_transfer_response);
  588. #endif // JASPER
  589. void ProcessAddRequestPDU (
  590. PConferenceAddRequest conference_add_request,
  591. PSendData send_data_info);
  592. void ProcessAddResponsePDU (
  593. PConferenceAddResponse
  594. conference_add_response);
  595. void ProcessPermissionGrantIndication(
  596. PConductorPermissionGrantIndication
  597. permission_grant_indication,
  598. UserID sender_id);
  599. void ProcessApplicationInvokeIndication(
  600. PApplicationInvokeIndication
  601. invoke_indication,
  602. UserID sender_id);
  603. #ifdef JASPER
  604. GCCError ProcessTextMessageIndication(
  605. PTextMessageIndication text_message_indication,
  606. UserID sender_id);
  607. #endif // JASPER
  608. void ProcessFunctionNotSupported (
  609. UINT request_choice);
  610. void ProcessTokenGrabConfirm(TokenID, Result);
  611. void ProcessTokenGiveIndication(TokenID, UserID);
  612. void ProcessTokenGiveConfirm(TokenID, Result);
  613. #ifdef JASPER
  614. void ProcessTokenPleaseIndication(TokenID, UserID);
  615. #endif // JASPER
  616. #ifdef JASPER
  617. void ProcessTokenReleaseConfirm(TokenID, Result);
  618. #endif // JASPER
  619. void ProcessTokenTestConfirm(TokenID, TokenStatus);
  620. private:
  621. void AddToMCSMessageQueue(
  622. PPacket packet,
  623. ChannelID channel_id,
  624. Priority priority,
  625. BOOL uniform_send);
  626. GCCError InitiateEjectionFromConference (
  627. GCCReason reason);
  628. MCSError JoinUserAndBroadCastChannels();
  629. MCSError JoinConvenerChannel();
  630. BOOL AreAllChannelsJoined();
  631. void ResourceFailureHandler(void);
  632. private:
  633. CConf *m_pConf;
  634. PIMCSSap m_pMCSSap;
  635. GCCNodeID m_nidMyself;
  636. GCCNodeID m_nidTopProvider;
  637. GCCNodeID m_nidParent;
  638. BOOL m_fEjectionPending;
  639. GCCReason m_eEjectReason;
  640. ChannelJoinedFlag m_ChannelJoinedFlags;
  641. CConnHandleUidList2 m_ChildUidConnHdlList2;
  642. COutgoingPDUQueue m_OutgoingPDUQueue;
  643. CConfJoinResponseList2 m_ConfJoinResponseList2;
  644. CAlarmUidList2 m_EjectedNodeAlarmList2;
  645. CUidList m_EjectedNodeList;
  646. };
  647. typedef MCSUser * PMCSUser;
  648. /*
  649. * MCSUser( UINT owner_message_base,
  650. * GCCConferenceID conference_id,
  651. * ConferenceNodeType conference_node_type,
  652. * UserID top_provider,
  653. * UserID parent_user_id,
  654. * PGCCError return_value)
  655. *
  656. * Public Function Description
  657. * This is the MCSUser object constructor. It is responsible for
  658. * initializing all the instance variables used by this class. The
  659. * constructor is responsible for establishing the user attachment to
  660. * the MCS domain defined by the conference ID. It also kicks off the
  661. * process of joining all the appropriate channels.
  662. *
  663. * Formal Parameters:
  664. * conference_id - (i) Conference ID associated with this user also
  665. * defines the domain to attach to.
  666. * conference_node_type- (i) Internal Node type (see above enumeration).
  667. * top_provider - (i) User ID of top provider node. Zero if this
  668. * is the top provider.
  669. * parent_user_id - (i) User ID of parent node. Zero if this is the
  670. * top provider node.
  671. * return_value - (o) Return value for constructor.
  672. *
  673. * Return Value
  674. * GCC_NO_ERROR - No error occured.
  675. * GCC_FAILURE_ATTACHING_TO_MCS - Failure to attach to MCS.
  676. *
  677. * Side Effects
  678. * The constructor kicks off a sequence of events that culminates in
  679. * a USER_CREATE_CONFIRM message being returned to the owner object.
  680. * This includes attaching to MCS and joining all the appropriate channels.
  681. *
  682. * Caveats
  683. * None.
  684. */
  685. /*
  686. * ~MCSUser ()
  687. *
  688. * Public Function Description
  689. * This is the MCSUser object destructor. It is responsible for freeing
  690. * up all the internal data allocated by this object. It also performs
  691. * the detach from GCC and leaves all the appropriate channels.
  692. *
  693. * Formal Parameters:
  694. * None.
  695. *
  696. * Return Value
  697. * None.
  698. *
  699. * Side Effects
  700. * None.
  701. *
  702. * Caveats
  703. * None.
  704. */
  705. /*
  706. * void SendUserIDRequest(
  707. * TagNumber tag_number)
  708. *
  709. * Public Function Description
  710. * This routine maps directly to a GCC PDU that delivers the this
  711. * nodes user ID to the appropriate node. The tag number matches the
  712. * tag specified by the other node.
  713. *
  714. * Formal Parameters:
  715. * tag_number - (i) Tag number that matches the request to the
  716. * reponse for the user ID.
  717. *
  718. * Return Value
  719. * GCC_NO_ERROR - No error occured.
  720. * GCC_FAILURE_ATTACHING_TO_MCS - Failure to attach to MCS.
  721. *
  722. * Side Effects
  723. * None.
  724. *
  725. * Caveats
  726. * None.
  727. */
  728. /*
  729. * void SetChildUserIDAndConnection (
  730. * UserID child_user_id,
  731. * ConnectionHandle child_connection_handle)
  732. *
  733. * Public Function Description
  734. * This routine is used to set the child user id associated with a
  735. * particular logical connection. This information is saved by the
  736. * MCSUser object in an internal list. This is typical called after
  737. * receiving a user ID indication back from a child node.
  738. *
  739. * Formal Parameters:
  740. * child_user_id - (i) User ID associated with child connection
  741. * child_connection_handle - (i) Logical connection assoicated with
  742. * specified user id.
  743. *
  744. * Return Value
  745. * None.
  746. *
  747. * Side Effects
  748. * None.
  749. *
  750. * Caveats
  751. * None.
  752. */
  753. /*
  754. * GCCError ConferenceJoinRequest(
  755. * CPassword *convener_password,
  756. * CPassword *password_challange,
  757. * LPWSTR pwszCallerID,
  758. * CUserDataListContainer *user_data_list,
  759. * ConnectionHandle connection_handle);
  760. *
  761. * Public Function Description:
  762. * This function is used to pass a join request on up to the Top Provider.
  763. * It is called by a conference at an intermediate node. This routine is
  764. * not used if the joining node is directly connected to the top
  765. * provider.
  766. *
  767. * Formal Parameters:
  768. * convener_password - (i) Convener password included with the
  769. * original join request.
  770. * password_challenge - (i) Password challenge included with the
  771. * original join request.
  772. * pwszCallerID - (i) Caller ID used in original join request.
  773. * user_data_list - (i) User data included in original join
  774. * request.
  775. * connection_handle - (i) This is the logical connection handle
  776. * on which the original join came in. It is
  777. * used here as a tag to match the request
  778. * with the response.
  779. *
  780. * Return Value
  781. * GCC_NO_ERROR - No error occured.
  782. * GCC_ALLOCATION_FAILURE - A resource error occured.
  783. *
  784. * Side Effects
  785. * None.
  786. *
  787. * Caveats
  788. * None.
  789. */
  790. /*
  791. * void ConferenceJoinResponse(
  792. * UserID receiver_id,
  793. * BOOL password_is_in_the_clear,
  794. * BOOL conference_locked,
  795. * BOOL conference_listed,
  796. * GCCTerminationMethod termination_method,
  797. * CPassword *password_challenge,
  798. * CUserDataListContainer *user_data_list,
  799. * GCCResult result);
  800. *
  801. * Public Function Description:
  802. * This routine is used to send a join response back to a node that is
  803. * joining through an intermediate nodes.
  804. *
  805. * Formal Parameters:
  806. * receiver_id - (i) This is the intermediate node id that made
  807. * the request to the top provider.
  808. * password_is_in_the_clear(i) Flag indicating password in the clear
  809. * status of the conference.
  810. * conference_locked - (i) Lock state of the conference.
  811. * conference_listed - (i) Listed state of the conference.
  812. * termination_method - (i) Termination method of the conference.
  813. * password_challenge - (i) Password challenge to pass back to the
  814. * joining node.
  815. * user_data_list - (i) User data to pass back to the joining node.
  816. * request.
  817. * result - (i) The result of the join request.
  818. *
  819. * Return Value
  820. * None.
  821. *
  822. * Side Effects
  823. * None.
  824. *
  825. * Caveats
  826. * None.
  827. */
  828. /*
  829. * GCCError SendConferenceLockRequest()
  830. *
  831. * Public Function Description:
  832. * This routine is used to issue a conference lock request to the
  833. * top provider.
  834. *
  835. * Formal Parameters:
  836. * None.
  837. *
  838. * Return Value
  839. * GCC_NO_ERROR - No error occured.
  840. * GCC_ALLOCATION_FAILURE - A resource error occured.
  841. *
  842. * Side Effects
  843. * None.
  844. *
  845. * Caveats
  846. * None.
  847. */
  848. /*
  849. * GCCError SendConferenceLockResponse(
  850. * UserID source_node,
  851. * GCCResult result)
  852. *
  853. * Public Function Description:
  854. * This routine is used to issue the conference lock response back to the
  855. * original requester.
  856. *
  857. * Formal Parameters:
  858. * source_node - (i) Node ID of node that made the original request.
  859. * result - (i) Result of the lock request.
  860. *
  861. * Return Value
  862. * GCC_NO_ERROR - No error occured.
  863. * GCC_ALLOCATION_FAILURE - A resource error occured.
  864. *
  865. * Side Effects
  866. * None.
  867. *
  868. * Caveats
  869. * None.
  870. */
  871. /*
  872. * GCCError SendConferenceUnlockRequest()
  873. *
  874. * Public Function Description:
  875. * This routine is used to issue a conference unlock request to the
  876. * top provider.
  877. *
  878. * Formal Parameters:
  879. * None.
  880. *
  881. * Return Value
  882. * GCC_NO_ERROR - No error occured.
  883. * GCC_ALLOCATION_FAILURE - A resource error occured.
  884. *
  885. * Side Effects
  886. * None.
  887. *
  888. * Caveats
  889. * None.
  890. */
  891. /*
  892. * GCCError SendConferenceUnlockResponse(
  893. * UserID source_node,
  894. * GCCResult result)
  895. *
  896. * Public Function Description:
  897. * This routine is used to issue the conference lock response back to the
  898. * original requester.
  899. *
  900. * Formal Parameters:
  901. * source_node - (i) Node ID of node that made the original request.
  902. * result - (i) Result of the lock request.
  903. *
  904. * Return Value
  905. * GCC_NO_ERROR - No error occured.
  906. * GCC_ALLOCATION_FAILURE - A resource error occured.
  907. *
  908. * Side Effects
  909. * None.
  910. *
  911. * Caveats
  912. * None.
  913. */
  914. /*
  915. * GCCError SendConferenceLockIndication(
  916. * BOOL uniform_send,
  917. * UserID source_node)
  918. *
  919. * Public Function Description:
  920. * This routine is used by the Top Provider to issue a conference lock
  921. * indication to either everyone in the conference or to a specific node.
  922. *
  923. * Formal Parameters:
  924. * uniform_send - (i) Flag indicating whether this indication
  925. * should be sent to everyone or to a
  926. * specific node (TRUE for everyone).
  927. * source_node - (i) Specific node to send it to. uniform_send
  928. * must equal FALSE to use this.
  929. *
  930. * Return Value
  931. * GCC_NO_ERROR - No error occured.
  932. * GCC_ALLOCATION_FAILURE - A resource error occured.
  933. *
  934. * Side Effects
  935. * None.
  936. *
  937. * Caveats
  938. * None.
  939. */
  940. /*
  941. * GCCError SendConferenceUnlockIndication(
  942. * BOOL uniform_send,
  943. * UserID source_node)
  944. *
  945. * Public Function Description:
  946. * This routine is used by the Top Provider to issue a conference unlock
  947. * indication to either everyone in the conference or to a specific node.
  948. *
  949. * Formal Parameters:
  950. * uniform_send - (i) Flag indicating whether this indication
  951. * should be sent to everyone or to a
  952. * specific node (TRUE for everyone).
  953. * source_node - (i) Specific node to send it to. uniform_send
  954. * must equal FALSE to use this.
  955. *
  956. * Return Value
  957. * GCC_NO_ERROR - No error occured.
  958. * GCC_ALLOCATION_FAILURE - A resource error occured.
  959. *
  960. * Side Effects
  961. * None.
  962. *
  963. * Caveats
  964. * None.
  965. */
  966. /*
  967. * void ConferenceTerminateRequest(
  968. * GCCReason reason)
  969. *
  970. * Public Function Description:
  971. * This routine is used by a node subordinate to the top provider to
  972. * request that the conference by terminated.
  973. *
  974. * Formal Parameters:
  975. * reason - (i) Reason for the terminate.
  976. *
  977. * Return Value
  978. * None.
  979. *
  980. * Side Effects
  981. * None.
  982. *
  983. * Caveats
  984. * None.
  985. */
  986. /*
  987. * void ConferenceTerminateResponse (
  988. * UserID requester_id,
  989. * GCCResult result)
  990. *
  991. * Public Function Description:
  992. * This routine is used by the top provider to respond to a terminate
  993. * request issued by a subordinate node. The result indicates if the
  994. * requesting node had the correct privileges.
  995. *
  996. * Formal Parameters:
  997. * requester_id - (i) Node ID of node to send the response back to.
  998. * result - (i) Result of terminate request.
  999. *
  1000. * Return Value
  1001. * None.
  1002. *
  1003. * Side Effects
  1004. * None.
  1005. *
  1006. * Caveats
  1007. * None.
  1008. */
  1009. /*
  1010. * void ConferenceTerminateIndication (
  1011. * GCCReason reason)
  1012. *
  1013. * Public Function Description:
  1014. * This routine is used by the top provider to send out a terminate
  1015. * indication to every node in the conference.
  1016. *
  1017. * Formal Parameters:
  1018. * reason - (i) Reason for the terminate.
  1019. *
  1020. * Return Value
  1021. * None.
  1022. *
  1023. * Side Effects
  1024. * None.
  1025. *
  1026. * Caveats
  1027. * None.
  1028. */
  1029. /*
  1030. * GCCError EjectNodeFromConference (
  1031. * UserID ejected_node_id,
  1032. * GCCReason reason)
  1033. *
  1034. * Public Function Description:
  1035. * This routine is used when attempting to eject a node from the
  1036. * conference.
  1037. *
  1038. * Formal Parameters:
  1039. * ejected_node_id - (i) Node ID of node to eject.
  1040. * reason - (i) Reason for node being ejected.
  1041. *
  1042. * Return Value
  1043. * GCC_NO_ERROR - No error occured.
  1044. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1045. *
  1046. * Side Effects
  1047. * None.
  1048. *
  1049. * Caveats
  1050. * None.
  1051. */
  1052. /*
  1053. * GCCError SendEjectNodeResponse (
  1054. * UserID requester_id,
  1055. * UserID node_to_eject,
  1056. * GCCResult result)
  1057. *
  1058. * Public Function Description:
  1059. * This routine is used by the top provider to respond to an eject
  1060. * user request.
  1061. *
  1062. * Formal Parameters:
  1063. * requester_id - (i) Node ID of node that requested the eject.
  1064. * node_to_eject - (i) Node that was requested to eject.
  1065. * result - (i) Result of the eject request.
  1066. *
  1067. * Return Value
  1068. * GCC_NO_ERROR - No error occured.
  1069. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1070. *
  1071. * Side Effects
  1072. * None.
  1073. *
  1074. * Caveats
  1075. * None.
  1076. */
  1077. /*
  1078. * void RosterUpdateIndication (
  1079. * PGCCPDU gcc_pdu,
  1080. * BOOL send_update_upward)
  1081. *
  1082. * Public Function Description:
  1083. * This routine is used to forward a roster update indication either
  1084. * upward to the parent node or downward as a full refresh to all nodes
  1085. * in the conference.
  1086. *
  1087. * Formal Parameters:
  1088. * gcc_pdu - (i) Pointer to the roster update PDU structure
  1089. * to send.
  1090. * send_update_upward - (i) Flag indicating if this indication should
  1091. * be sent upward to the parent node or
  1092. * downward to all nodes (TRUE is upward).
  1093. *
  1094. * Return Value
  1095. * None.
  1096. *
  1097. * Side Effects
  1098. * None.
  1099. *
  1100. * Caveats
  1101. * None.
  1102. */
  1103. /*
  1104. * void RegistryRegisterChannelRequest (
  1105. * CRegKeyContainer *registry_key_data,
  1106. * ChannelID channel_id,
  1107. * EntityID entity_id)
  1108. *
  1109. * Public Function Description:
  1110. * This routine is used when an APE wishes to register a channel in
  1111. * the application registry.
  1112. *
  1113. * Formal Parameters:
  1114. * registry_key_data - (i) Registry key associated with the channel
  1115. * to register.
  1116. * channel_id - (i) Channel ID to add to the registry.
  1117. * entity_id - (i) Entity ID associated with the APE that is
  1118. * registering the channel.
  1119. *
  1120. * Return Value
  1121. * None.
  1122. *
  1123. * Side Effects
  1124. * None.
  1125. *
  1126. * Caveats
  1127. * None.
  1128. */
  1129. /*
  1130. * void RegistryAssignTokenRequest (
  1131. * CRegKeyContainer *registry_key_data,
  1132. * EntityID entity_id)
  1133. *
  1134. * Public Function Description:
  1135. * This routine is used when an APE wishes to register a token in
  1136. * the application registry. Note that there is no token ID included in
  1137. * this request. The token ID is allocated at the top provider.
  1138. *
  1139. * Formal Parameters:
  1140. * registry_key_data - (i) Registry key associated with the token
  1141. * to register.
  1142. * entity_id - (i) Entity ID associated with the APE that is
  1143. * registering the token.
  1144. *
  1145. * Return Value
  1146. * None.
  1147. *
  1148. * Side Effects
  1149. * None.
  1150. *
  1151. * Caveats
  1152. * None.
  1153. */
  1154. /*
  1155. * void RegistrySetParameterRequest (
  1156. * CRegKeyContainer *registry_key_data,
  1157. * LPOSTR parameter_value,
  1158. * GCCModificationRights modification_rights,
  1159. * EntityID entity_id);
  1160. *
  1161. * Public Function Description:
  1162. * This routine is used when an APE wishes to register a parameter in
  1163. * the application registry. Note that parameter to be registered is
  1164. * included in this request.
  1165. *
  1166. * Formal Parameters:
  1167. * registry_key_data - (i) Registry key associated with the parameter
  1168. * to register.
  1169. * parameter_value - (i) The parameter string to register.
  1170. * modification_rights - (i) The modification rights associated with the
  1171. * parameter being registered.
  1172. * entity_id - (i) Entity ID associated with the APE that is
  1173. * registering the parameter.
  1174. *
  1175. * Return Value
  1176. * None.
  1177. *
  1178. * Side Effects
  1179. * None.
  1180. *
  1181. * Caveats
  1182. * None.
  1183. */
  1184. /*
  1185. * void RegistryRetrieveEntryRequest (
  1186. * CRegKeyContainer *registry_key_data,
  1187. * EntityID entity_id)
  1188. *
  1189. * Public Function Description:
  1190. * This routine is used when an APE wishes to retrieve an registry item
  1191. * from the registry.
  1192. *
  1193. * Formal Parameters:
  1194. * registry_key_data - (i) Registry key associated with the registry
  1195. * entry to retrieve.
  1196. * entity_id - (i) Entity ID associated with the APE that is
  1197. * requesting the registry entry.
  1198. *
  1199. * Return Value
  1200. * None.
  1201. *
  1202. * Side Effects
  1203. * None.
  1204. *
  1205. * Caveats
  1206. * None.
  1207. */
  1208. /*
  1209. * void RegistryDeleteEntryRequest (
  1210. * CRegKeyContainer *registry_key_data,
  1211. * EntityID entity_id)
  1212. *
  1213. * Public Function Description:
  1214. * This routine is used when an APE wishes to delete a registry item
  1215. * from the registry.
  1216. *
  1217. * Formal Parameters:
  1218. * registry_key_data - (i) Registry key associated with the registry
  1219. * entry to delete.
  1220. * entity_id - (i) Entity ID associated with the APE that is
  1221. * making the delete request.
  1222. *
  1223. * Return Value
  1224. * None.
  1225. *
  1226. * Side Effects
  1227. * None.
  1228. *
  1229. * Caveats
  1230. * None.
  1231. */
  1232. /*
  1233. * void RegistryMonitorRequest (
  1234. * CRegKeyContainer *registry_key_data,
  1235. * EntityID entity_id)
  1236. *
  1237. * Public Function Description:
  1238. * This routine is used when an APE wishes to monitor a registry item
  1239. * in the registry.
  1240. *
  1241. * Formal Parameters:
  1242. * registry_key_data - (i) Registry key associated with the registry
  1243. * entry to monitor.
  1244. * entity_id - (i) Entity ID associated with the APE that is
  1245. * making the monitor request.
  1246. *
  1247. * Return Value
  1248. * None.
  1249. *
  1250. * Side Effects
  1251. * None.
  1252. *
  1253. * Caveats
  1254. * None.
  1255. */
  1256. /*
  1257. * void RegistryAllocateHandleRequest (
  1258. * USHORT number_of_handles,
  1259. * EntityID entity_id )
  1260. *
  1261. * Public Function Description:
  1262. * This routine is used when an APE wishes to allocate a number of
  1263. * handles from the application registry.
  1264. *
  1265. * Formal Parameters:
  1266. * number_of_handles - (i) Number of handles to allocate.
  1267. * entity_id - (i) Entity ID associated with the APE that is
  1268. * making the request.
  1269. *
  1270. * Return Value
  1271. * None.
  1272. *
  1273. * Side Effects
  1274. * None.
  1275. *
  1276. * Caveats
  1277. * None.
  1278. */
  1279. /*
  1280. * void RegistryAllocateHandleResponse (
  1281. * USHORT number_of_handles,
  1282. * UINT registry_handle,
  1283. * EntityID requester_entity_id,
  1284. * UserID requester_node_id,
  1285. * GCCResult result)
  1286. *
  1287. * Public Function Description:
  1288. * This routine is used by the Top Provider to respond to an allocate
  1289. * handle request from an APE at a remote node. The allocated handles
  1290. * are passed back here.
  1291. *
  1292. * Formal Parameters:
  1293. * number_of_handles - (i) Number of handles allocated.
  1294. * registry_handle - (i) The first handle in the list of contiguously
  1295. * allocated handles.
  1296. * requester_entity_id - (i) Entity ID associated with the APE that made
  1297. * the request.
  1298. * requester_node_id - (i) Node ID of node that made the request.
  1299. * result - (i) Result of the request.
  1300. *
  1301. * Return Value
  1302. * None.
  1303. *
  1304. * Side Effects
  1305. * None.
  1306. *
  1307. * Caveats
  1308. * None.
  1309. */
  1310. /*
  1311. * void RegistryResponse (
  1312. * RegistryResponsePrimitiveType primitive_type,
  1313. * UserID requester_owner_id,
  1314. * EntityID requester_entity_id,
  1315. * CRegKeyContainer *registry_key_data,
  1316. * CRegItem *registry_item_data,
  1317. * GCCModificationRights modification_rights,
  1318. * UserID entry_owner_id,
  1319. * EntityID entry_entity_id,
  1320. * GCCResult result)
  1321. *
  1322. * Public Function Description:
  1323. * This routine is used to respond to all the registry request except
  1324. * allocate handle. It formulates the response PDU and queues it for
  1325. * delivery.
  1326. *
  1327. * Formal Parameters:
  1328. * primitive_type - (i) This is the type of response being issued.
  1329. * (i.e. register channel response, register
  1330. * token response, etc.).
  1331. * requester_owner_id - (i) Node ID of APE making the original request.
  1332. * requester_entity_id - (i) Entity ID of APE making the original
  1333. * request.
  1334. * registry_key_data - (i) Registry key associated with registry
  1335. * entry info being included in the response.
  1336. * registry_item_data - (i) Registry item data associated with registry
  1337. * entry info being included in the response.
  1338. * modification_rights - (i) Modification rights associated with registry
  1339. * entry info being included in the response.
  1340. * entry_owner_id - (i) Node ID associated with registry entry
  1341. * info being included in the response.
  1342. * entry_entity_id - (i) APE Entity ID associated with registry entry
  1343. * info being included in the response.
  1344. * result - (i) Result to be sent back in the response.
  1345. *
  1346. * Return Value
  1347. * None.
  1348. *
  1349. * Side Effects
  1350. * None.
  1351. *
  1352. * Caveats
  1353. * None.
  1354. */
  1355. /*
  1356. * void RegistryMonitorEntryIndication (
  1357. * CRegKeyContainer *registry_key_data,
  1358. * CRegItem *registry_item,
  1359. * UserID entry_owner_id,
  1360. * EntityID entry_entity_id,
  1361. * GCCModificationRights modification_rights)
  1362. *
  1363. * Public Function Description:
  1364. * This routine is used by the top provider to issue a monitor
  1365. * indication anytime a registry entry that is being monitored changes.
  1366. *
  1367. * Formal Parameters:
  1368. * registry_key_data - (i) Registry key associated with registry
  1369. * entry being monitored.
  1370. * registry_item - (i) Registry item data associated with registry
  1371. * entry being monitored.
  1372. * entry_owner_id - (i) Node ID associated with registry entry
  1373. * info being monitored.
  1374. * entry_entity_id - (i) APE Entity ID associated with registry entry
  1375. * info being monitored.
  1376. * modification_rights - (i) Modification rights associated with registry
  1377. * entry info being monitored.
  1378. *
  1379. * Return Value
  1380. * None.
  1381. *
  1382. * Side Effects
  1383. * None.
  1384. *
  1385. * Caveats
  1386. * None.
  1387. */
  1388. /*
  1389. * GCCError AppInvokeIndication(
  1390. * CInvokeSpecifierListContainer *invoke_specifier_list,
  1391. * USHORT number_of_destination_nodes,
  1392. * UserID * list_of_destination_nodes)
  1393. *
  1394. * Public Function Description:
  1395. * This routine is used to send an application invoke indication to
  1396. * every node in the conference.
  1397. *
  1398. * Formal Parameters:
  1399. * invoke_specifier_list - (i) List of applications to invoke.
  1400. * number_of_destination_nodes - (i) Number of nodes in the destination
  1401. * node list.
  1402. * list_of_destination_nodes - (i) List of nodes that should process
  1403. * invoke indication.
  1404. *
  1405. * Return Value
  1406. * GCC_NO_ERROR - No error occured.
  1407. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1408. *
  1409. * Side Effects
  1410. * None.
  1411. *
  1412. * Caveats
  1413. * None.
  1414. */
  1415. /*
  1416. * GCCError TextMessageIndication (
  1417. * LPWSTR pwszTextMsg,
  1418. * UserID destination_node )
  1419. *
  1420. * Public Function Description:
  1421. * This routine is used to send a text message to either a specific node
  1422. * or to every node in the conference.
  1423. *
  1424. * Formal Parameters:
  1425. * pwszTextMsg - (i) Text message string to send.
  1426. * destination_node - (i) Node to receive the text message. If zero
  1427. * the text message is sent to every node in
  1428. * the conference.
  1429. *
  1430. * Return Value
  1431. * GCC_NO_ERROR - No error occured.
  1432. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1433. *
  1434. * Side Effects
  1435. * None.
  1436. *
  1437. * Caveats
  1438. * None.
  1439. */
  1440. /*
  1441. * GCCError ConferenceAssistanceIndication (
  1442. * USHORT number_of_user_data_members,
  1443. * PGCCUserData * user_data_list)
  1444. *
  1445. * Public Function Description:
  1446. * This routine is used to send a conference assistance indication to
  1447. * every node in the conference.
  1448. *
  1449. * Formal Parameters:
  1450. * number_of_user_data_members - (i) Number of entries in the user data
  1451. * list passed into this routine.
  1452. * user_data_list - (i) This list holds pointers to the
  1453. * user data to send out in the
  1454. * indication.
  1455. *
  1456. * Return Value
  1457. * GCC_NO_ERROR - No error occured.
  1458. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1459. *
  1460. * Side Effects
  1461. * None.
  1462. *
  1463. * Caveats
  1464. * None.
  1465. */
  1466. /*
  1467. * GCCError ConferenceTransferRequest (
  1468. * PGCCConferenceName destination_conference_name,
  1469. * GCCNumericString destination_conference_modifier,
  1470. * CNetAddrListContainer *destination_address_list,
  1471. * USHORT number_of_destination_nodes,
  1472. * PUserID destination_node_list,
  1473. * CPassword *password);
  1474. *
  1475. * Public Function Description:
  1476. * This routine is used to send a conference transfer request to the
  1477. * top provider in the conference.
  1478. *
  1479. * Formal Parameters:
  1480. * destination_conference_name - (i) The conference name to transfer to.
  1481. * destination_conference_modifier (i) The conference modifier to
  1482. * transfer to.
  1483. * destination_address_list - (i) Network address list used to
  1484. * determine address of node to
  1485. * transfer to.
  1486. * number_of_destination_nodes - (i) Number of nodes in the list
  1487. * of nodes that should transfer.
  1488. * destination_node_list - (i) List of node IDs that should perform
  1489. * the transfer.
  1490. * password - (i) Password to use to join the
  1491. * new conference.
  1492. *
  1493. * Return Value
  1494. * GCC_NO_ERROR - No error occured.
  1495. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1496. *
  1497. * Side Effects
  1498. * None.
  1499. *
  1500. * Caveats
  1501. * None.
  1502. */
  1503. /*
  1504. * GCCError ConferenceTransferIndication (
  1505. * PGCCConferenceName destination_conference_name,
  1506. * GCCNumericString destination_conference_modifier,
  1507. * CNetAddrListContainer *destination_address_list,
  1508. * USHORT number_of_destination_nodes,
  1509. * PUserID destination_node_list,
  1510. * CPassword *password)
  1511. *
  1512. * Public Function Description:
  1513. * This routine is used by the top provider to send out the transfer
  1514. * indication to every node in the conference. It is each nodes
  1515. * responsiblity to search the destination node list to see if
  1516. * it should transfer.
  1517. *
  1518. * Formal Parameters:
  1519. * destination_conference_name - (i) The conference name to transfer to.
  1520. * destination_conference_modifier (i) The conference modifier to
  1521. * transfer to.
  1522. * destination_address_list - (i) Network address list used to
  1523. * determine address of node to
  1524. * transfer to.
  1525. * number_of_destination_nodes - (i) Number of nodes in the list
  1526. * of nodes that should transfer.
  1527. * destination_node_list - (i) List of node IDs that should perform
  1528. * the transfer.
  1529. * password - (i) Password to use to join the
  1530. * new conference.
  1531. *
  1532. * Return Value
  1533. * GCC_NO_ERROR - No error occured.
  1534. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1535. *
  1536. * Side Effects
  1537. * None.
  1538. *
  1539. * Caveats
  1540. * None.
  1541. */
  1542. /*
  1543. * GCCError ConferenceTransferResponse (
  1544. * UserID requesting_node_id,
  1545. * PGCCConferenceName destination_conference_name,
  1546. * GCCNumericString destination_conference_modifier,
  1547. * USHORT number_of_destination_nodes,
  1548. * PUserID destination_node_list,
  1549. * GCCResult result)
  1550. *
  1551. *
  1552. * Public Function Description:
  1553. * This routine is used by the top provider to send back a response to
  1554. * the node that made a transfer request. The info specified in the
  1555. * request is included in the response to match request to response.
  1556. *
  1557. * Formal Parameters:
  1558. * requesting_node_id - (i) The node ID of the node that made
  1559. * the original transfer request.
  1560. * destination_conference_name - (i) The conference name to transfer to.
  1561. * destination_conference_modifier (i) The conference modifier to
  1562. * transfer to.
  1563. * number_of_destination_nodes - (i) Number of nodes in the list
  1564. * of nodes that should transfer.
  1565. * destination_node_list - (i) List of node IDs that should perform
  1566. * the transfer.
  1567. * result - (i) Result of the transfer request.
  1568. *
  1569. * Return Value
  1570. * GCC_NO_ERROR - No error occured.
  1571. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1572. *
  1573. * Side Effects
  1574. * None.
  1575. *
  1576. * Caveats
  1577. * None.
  1578. */
  1579. /*
  1580. * GCCError ConferenceAddRequest(
  1581. * TagNumber conference_add_tag,
  1582. * UserID requesting_node,
  1583. * UserID adding_node,
  1584. * UserID target_node,
  1585. * CNetAddrListContainer *network_address_container,
  1586. * CUserDataListContainer *user_data_container)
  1587. *
  1588. *
  1589. * Public Function Description:
  1590. * This routine is used to send a conference add request to the appropriate
  1591. * node. This call can be made by the requesting node or by the top
  1592. * provider to pass the add request on to the adding node.
  1593. *
  1594. * Formal Parameters:
  1595. * conference_add_tag - (i) Tag that is returned in the
  1596. * response to match request and
  1597. * response.
  1598. * requesting_node - (i) Node ID of node that made the
  1599. * original request.
  1600. * adding_node - (i) Node ID of node that is to do
  1601. * the invite request to the new node.
  1602. * target_node - (i) Node ID of node that this request
  1603. * should be sent to.
  1604. * network_address_container - (i) Network address list that can be
  1605. * used when inviting the new node.
  1606. * user_data_container - (i) User data to pass on to the
  1607. * adding node.
  1608. *
  1609. * Return Value
  1610. * GCC_NO_ERROR - No error occured.
  1611. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1612. *
  1613. * Side Effects
  1614. * None.
  1615. *
  1616. * Caveats
  1617. * None.
  1618. */
  1619. /*
  1620. * GCCError ConferenceAddResponse(
  1621. * TagNumber add_request_tag,
  1622. * UserID requesting_node,
  1623. * CUserDataListContainer *user_data_container,
  1624. * GCCResult result)
  1625. *
  1626. * Public Function Description:
  1627. * This routine is used to send a conference add request to the appropriate
  1628. * node. This call can be made by the requesting node or by the top
  1629. * provider to pass the add request on to the adding node.
  1630. *
  1631. * Formal Parameters:
  1632. * add_request_tag - (i) Tag number that was specified in the
  1633. * original add request.
  1634. * requesting_node - (i) Node ID of node that made the original
  1635. * request.
  1636. * user_data_container - (i) User data to pass back to the requesting
  1637. * node.
  1638. * result - (i) Final result of the add request.
  1639. *
  1640. * Return Value
  1641. * GCC_NO_ERROR - No error occured.
  1642. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1643. *
  1644. * Side Effects
  1645. * None.
  1646. *
  1647. * Caveats
  1648. * None.
  1649. */
  1650. /*
  1651. * GCCError ConductorTokenGrab();
  1652. *
  1653. * Public Function Description:
  1654. * This routine makes the MCS calls to grab the conductor token.
  1655. *
  1656. * Formal Parameters:
  1657. * None.
  1658. *
  1659. * Return Value
  1660. * GCC_NO_ERROR - No error occured.
  1661. *
  1662. * Side Effects
  1663. * None.
  1664. *
  1665. * Caveats
  1666. * None.
  1667. */
  1668. /*
  1669. * GCCError ConductorTokenRelease();
  1670. *
  1671. * Public Function Description:
  1672. * This routine makes the MCS calls to release the conductor token.
  1673. *
  1674. * Formal Parameters:
  1675. * None.
  1676. *
  1677. * Return Value
  1678. * GCC_NO_ERROR - No error occured.
  1679. *
  1680. * Side Effects
  1681. * None.
  1682. *
  1683. * Caveats
  1684. * None.
  1685. */
  1686. /*
  1687. * GCCError ConductorTokenPlease();
  1688. *
  1689. * Public Function Description:
  1690. * This routine makes the MCS calls to request the conductor token from
  1691. * the current conductor.
  1692. *
  1693. * Formal Parameters:
  1694. * None.
  1695. *
  1696. * Return Value
  1697. * GCC_NO_ERROR - No error occured.
  1698. *
  1699. * Side Effects
  1700. * None.
  1701. *
  1702. * Caveats
  1703. * None.
  1704. */
  1705. /*
  1706. * GCCError ConductorTokenGive (
  1707. * UserID recipient_user_id)
  1708. *
  1709. * Public Function Description:
  1710. * This routine makes the MCS calls to give the conductor token to the
  1711. * specified node.
  1712. *
  1713. * Formal Parameters:
  1714. * recipient_user_id - (i) Node ID of node to give the token to.
  1715. *
  1716. * Return Value
  1717. * GCC_NO_ERROR - No error occured.
  1718. *
  1719. * Side Effects
  1720. * None.
  1721. *
  1722. * Caveats
  1723. * None.
  1724. */
  1725. /*
  1726. * GCCError ConductorTokenGiveResponse(
  1727. * Result result)
  1728. *
  1729. * Public Function Description:
  1730. * This routine makes the MCS calls to respond to a conductor give
  1731. * request.
  1732. *
  1733. * Formal Parameters:
  1734. * result - (i) Did this node accept the token or not?
  1735. *
  1736. * Return Value
  1737. * GCC_NO_ERROR - No error occured.
  1738. *
  1739. * Side Effects
  1740. * None.
  1741. *
  1742. * Caveats
  1743. * None.
  1744. */
  1745. /*
  1746. * GCCError ConductorTokenTest()
  1747. *
  1748. * Public Function Description:
  1749. * This routine is used to test the current state of the conductor token
  1750. * (is it grabbed or not).
  1751. *
  1752. * Formal Parameters:
  1753. * None.
  1754. *
  1755. * Return Value
  1756. * GCC_NO_ERROR - No error occured.
  1757. *
  1758. * Side Effects
  1759. * None.
  1760. *
  1761. * Caveats
  1762. * None.
  1763. */
  1764. /*
  1765. * GCCError SendConductorAssignIndication(
  1766. * UserID conductor_user_id)
  1767. *
  1768. * Public Function Description:
  1769. * This routine sends a conductor assign indication to all the
  1770. * nodes in the conference.
  1771. *
  1772. * Formal Parameters:
  1773. * conductor_user_id - (i) The Node ID of the new Conductor.
  1774. *
  1775. * Return Value
  1776. * GCC_NO_ERROR - No error occured.
  1777. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1778. *
  1779. * Side Effects
  1780. * None.
  1781. *
  1782. * Caveats
  1783. * None.
  1784. */
  1785. /*
  1786. * GCCError SendConductorReleaseIndication()
  1787. *
  1788. * Public Function Description:
  1789. * This routine sends a conductor release indication to all the
  1790. * nodes in the conference.
  1791. *
  1792. * Formal Parameters:
  1793. * None.
  1794. *
  1795. * Return Value
  1796. * GCC_NO_ERROR - No error occured.
  1797. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1798. *
  1799. * Side Effects
  1800. * None.
  1801. *
  1802. * Caveats
  1803. * None.
  1804. */
  1805. /*
  1806. * GCCError SendConductorPermitAsk (
  1807. * BOOL grant_permission)
  1808. *
  1809. * Public Function Description:
  1810. * This routine sends a conductor permission ask request directly to the
  1811. * conductor node.
  1812. *
  1813. * Formal Parameters:
  1814. * grant_permission - (i) The flag indicates if permission is
  1815. * being requested or given up.
  1816. *
  1817. * Return Value
  1818. * GCC_NO_ERROR - No error occured.
  1819. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1820. *
  1821. * Side Effects
  1822. * None.
  1823. *
  1824. * Caveats
  1825. * None.
  1826. */
  1827. /*
  1828. * GCCError SendConductorPermitGrant (
  1829. * USHORT number_granted,
  1830. * PUserID granted_node_list,
  1831. * USHORT number_waiting,
  1832. * PUserID waiting_node_list)
  1833. *
  1834. * Public Function Description:
  1835. * This routine sends a conductor permission grant indication to every
  1836. * node in the conference. Usually issued when permissions change.
  1837. *
  1838. * Formal Parameters:
  1839. * number_granted - (i) Number of nodes in the permission granted
  1840. * list.
  1841. * granted_node_list - (i) List of nodes that have been granted
  1842. * permission.
  1843. * number_waiting - (i) Number of nodes in the list of nodes
  1844. * waiting to be granted permission.
  1845. * waiting_node_list - (i) List of nodes waiting.
  1846. *
  1847. * Return Value
  1848. * GCC_NO_ERROR - No error occured.
  1849. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1850. *
  1851. * Side Effects
  1852. * None.
  1853. *
  1854. * Caveats
  1855. * None.
  1856. */
  1857. /*
  1858. * GCCError TimeRemainingRequest (
  1859. * UINT time_remaining,
  1860. * UserID node_id)
  1861. *
  1862. * Public Function Description:
  1863. * This routine sends out an indication to every node in the
  1864. * conference informing how much time is remaining in the conference.
  1865. *
  1866. * Formal Parameters:
  1867. * time_remaining - (i) Time in seconds left in the conference.
  1868. * node_id - (i) If a value other than zero, it is which node
  1869. * to send the time remaining indication to. If
  1870. * zero send it to every node in the conference.
  1871. *
  1872. * Return Value
  1873. * GCC_NO_ERROR - No error occured.
  1874. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1875. *
  1876. * Side Effects
  1877. * None.
  1878. *
  1879. * Caveats
  1880. * None.
  1881. */
  1882. /*
  1883. * GCCError TimeInquireRequest (
  1884. * BOOL time_is_conference_wide)
  1885. *
  1886. * Public Function Description:
  1887. * This routine sends out a request for a time remaing update.
  1888. *
  1889. * Formal Parameters:
  1890. * time_is_conference_wide - (i) Flag indicating if the request is
  1891. * for the time conference wide.
  1892. *
  1893. * Return Value
  1894. * GCC_NO_ERROR - No error occured.
  1895. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1896. *
  1897. * Side Effects
  1898. * None.
  1899. *
  1900. * Caveats
  1901. * None.
  1902. */
  1903. /*
  1904. * GCCError ConferenceExtendIndication (
  1905. * UINT extension_time,
  1906. * BOOL time_is_conference_wide)
  1907. *
  1908. *
  1909. * Public Function Description:
  1910. * This routine sends out an indication informing conference participants
  1911. * of an extension.
  1912. *
  1913. * Formal Parameters:
  1914. * extension_time - (i) Amount of time that the conference is
  1915. * extended.
  1916. * time_is_conference_wide - (i) Flag indicating if the extension time
  1917. * is conference wide.
  1918. *
  1919. * Return Value
  1920. * GCC_NO_ERROR - No error occured.
  1921. * GCC_ALLOCATION_FAILURE - A resource error occured.
  1922. *
  1923. * Side Effects
  1924. * None.
  1925. *
  1926. * Caveats
  1927. * None.
  1928. */
  1929. /*
  1930. * ULONG OwnerCallback ( UINT message,
  1931. * PVoid parameter1,
  1932. * ULONG parameter2);
  1933. *
  1934. * Public Function Description
  1935. * This function overides the base class function and is used to
  1936. * receive all owner callback information from the MCS Interface object.
  1937. *
  1938. * Formal Parameters:
  1939. * message - (i) Message number including base offset.
  1940. * parameter1 - (i) void pointer of message data.
  1941. * parameter2 - (i) Long holding message data.
  1942. *
  1943. * Return Value
  1944. * GCC_NO_ERROR is always returned from this.
  1945. *
  1946. * Side Effects
  1947. * None.
  1948. *
  1949. * Caveats
  1950. * None.
  1951. */
  1952. /*
  1953. * BOOL FlushOutgoingPDU();
  1954. *
  1955. * Public Function Description
  1956. * This function gives the user object a chance to flush all the PDUs
  1957. * queued up for delivery. GCC PDUs are only delivered during this call.
  1958. *
  1959. * Formal Parameters:
  1960. * None.
  1961. *
  1962. * Return Value
  1963. * TRUE, if there remain un-processed msgs in the MCS message queue
  1964. * FALSE, if all the msgs in the MCS msg queue were processed.
  1965. *
  1966. * Side Effects
  1967. * None.
  1968. *
  1969. * Caveats
  1970. * None.
  1971. */
  1972. /*
  1973. * GCCNodeID GetMyNodeID()
  1974. *
  1975. * Public Function Description
  1976. * This function returns the Node ID for this node.
  1977. *
  1978. * Formal Parameters:
  1979. * None.
  1980. *
  1981. * Return Value
  1982. * This nodes Node ID.
  1983. *
  1984. * Side Effects
  1985. * None.
  1986. *
  1987. * Caveats
  1988. * None.
  1989. */
  1990. /*
  1991. * GCCNodeID GetTopNodeID ()
  1992. *
  1993. * Public Function Description
  1994. * This function returns the Top Provider's Node ID.
  1995. *
  1996. * Formal Parameters:
  1997. * None.
  1998. *
  1999. * Return Value
  2000. * The Top Providers node ID.
  2001. *
  2002. * Side Effects
  2003. * None.
  2004. *
  2005. * Caveats
  2006. * None.
  2007. */
  2008. /*
  2009. * GCCNodeID GetParentNodeID ()
  2010. *
  2011. * Public Function Description
  2012. * This function returns the Node ID of this nodes Parent Node.
  2013. * It returns zero if this is the top provider.
  2014. *
  2015. * Formal Parameters:
  2016. * None.
  2017. *
  2018. * Return Value
  2019. * The Parent Node ID or zero if Top Provider.
  2020. *
  2021. * Side Effects
  2022. * None.
  2023. *
  2024. * Caveats
  2025. * None.
  2026. */
  2027. /*
  2028. * UserID GetUserIDFromConnection(
  2029. * ConnectionHandle connection_handle)
  2030. *
  2031. * Public Function Description
  2032. * This function returns the Node ID associated with the specified
  2033. * connection handle. It returns zero if the connection handle is
  2034. * not a child connection of this node.
  2035. *
  2036. * Formal Parameters:
  2037. * connection_handle - (i) Connection Handle to search on.
  2038. *
  2039. * Return Value
  2040. * The Node ID associated with the passed in connection handle or
  2041. * ZERO if connection is not a child connection.
  2042. *
  2043. * Side Effects
  2044. * None.
  2045. *
  2046. * Caveats
  2047. * None.
  2048. */
  2049. /*
  2050. * void UserDisconnectIndication (
  2051. * UserID disconnected_user)
  2052. *
  2053. * Public Function Description
  2054. * This function informs the user object when a Node disconnects from
  2055. * the conference. This gives the user object a chance to clean up
  2056. * its internal information base.
  2057. *
  2058. * Formal Parameters:
  2059. * disconnected_user - (i) User ID of user that disconnected.
  2060. *
  2061. * Return Value
  2062. * None.
  2063. *
  2064. * Side Effects
  2065. * None.
  2066. *
  2067. * Caveats
  2068. * None.
  2069. */
  2070. #endif // _MCS_USER_H_