Source code of Windows XP (NT5)
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.

1733 lines
52 KiB

  1. /*
  2. * user.h
  3. *
  4. * Copyright (c) 1993 - 1995 by DataBeam Corporation, Lexington, KY
  5. *
  6. * Abstract:
  7. * This is the interface file for the User class. Instances of this class
  8. * represent attachments between user applications and domains within MCS.
  9. *
  10. * This class inherits from CommandTarget. This means that all message
  11. * traffic between this class and other CommandTarget classes is in MCS
  12. * commands. Not all commands need to be handled (some are not relevant
  13. * for user attachments). For example, a user attachment should never
  14. * receive a SendDataRequest. It should only receive indications,
  15. * confirms, and ultimatums.
  16. *
  17. * Messages coming from the application pass through one of these objects,
  18. * where they are translated into MCS commands before being sent to the
  19. * domain to which this user is attached. This usually involves adding
  20. * the correct user ID, as well as a fair amount of error checking and
  21. * parameter validation.
  22. *
  23. * It is worth noting that this class contains two types of public member
  24. * functions. The first type represent messages flowing from the user
  25. * application into MCS. All of these member functions are inherited from the
  26. * IMCSSap interface. These are converted as memntioned above, and sent
  27. * into the appropriate domain if everything checks out. The second type
  28. * of public member function represents messages flowing from within MCS
  29. * to the user application. All of these member function are overrides
  30. * of virtual functions defined in class CommandTarget, and are not
  31. * prefixed with anything.
  32. *
  33. * Messages coming from the domain are translated into T.122 indications
  34. * and confirms, and sent to the proper application interface object via
  35. * the owner callback mechanism.
  36. *
  37. * A third duty of this class is to post indications and confirms to user
  38. * applications using a client window. The client must dispatch messages
  39. * to receive these indications/confirms. It also
  40. * prevents a user application from having to worry about receiving an
  41. * indication or confirm before they have even returned from the request
  42. * that caused it.
  43. *
  44. * Caveats:
  45. * None.
  46. *
  47. * Author:
  48. * James P. Galvin, Jr.
  49. */
  50. #ifndef _USER_
  51. #define _USER_
  52. /*
  53. * Interface files.
  54. */
  55. #include "pktcoder.h"
  56. #include "imcsapp.h"
  57. #include "attmnt.h"
  58. /*
  59. * These types are used to keep track of what users have attached to MCS
  60. * within a given process, as well as pertinent information about that
  61. * attachment.
  62. *
  63. * BufferRetryInfo
  64. * In cases where MCSSendDataRequest and MCSUniformSendDataRequest fail
  65. * due to a lack of resources, this structure will be used to capture
  66. * appropriate information such that follow-up resource level checks can
  67. * be performed during timer events.
  68. */
  69. typedef struct
  70. {
  71. ULong user_data_length;
  72. UINT_PTR timer_id;
  73. } BufferRetryInfo;
  74. typedef BufferRetryInfo * PBufferRetryInfo;
  75. /*
  76. * These are the owner callback functions that a user object can send to an
  77. * object whose public interface is unknown to it. The first one is sent to
  78. * the controller when a user object detects the need to delete itself. The
  79. * rest are sent to an application interface object as part of communicating
  80. * with the user application (the proper application interface object is
  81. * identified to this class as one of its constructor parameters).
  82. *
  83. * When an object instantiates a user object (or any other object that uses
  84. * owner callbacks), it is accepting the responsibility of receiving and
  85. * handling those callbacks. For that reason, any object that issues owner
  86. * callbacks will have those callbacks defined as part of the interface file
  87. * (since they really are part of a bi-directional interface).
  88. *
  89. * Each owner callback function, along with a description of how its parameters
  90. * are packed, is described in the following section.
  91. */
  92. /*
  93. * This macro is used to pack callback parameters into a single long word
  94. * for delivery to the user application.
  95. */
  96. #define PACK_PARAMETER(l,h) ((ULong) (((UShort) (l)) | \
  97. (((ULong) ((UShort) (h))) << 16)))
  98. /*
  99. * TIMER_PROCEDURE_TIMEOUT
  100. * This macro specifies the granularity, in milliseconds, of any timer
  101. * which may be created to recheck resource levels following a call to
  102. * MCSSendDataRequest or MCSUniformSendDataRequest which returned
  103. * MCS_TRANSMIT_BUFFER_FULL.
  104. * CLASS_NAME_LENGTH
  105. * The class name of the window class for all User-related windows. These
  106. * are the client windows that receive messages related to MCS indications and
  107. * confirms that have to be delivered to the client apps.
  108. */
  109. #define TIMER_PROCEDURE_TIMEOUT 300
  110. #define CLASS_NAME_LENGTH 35
  111. /*
  112. * This is the function signature of the timer procedure. Timer messages will
  113. * be routed to this function as a result of timer events which have been set
  114. * up to recheck resource levels. This would happen following a call to either
  115. * SendData or GetBuffer call which resulted in a return
  116. * value of MCS_TRANSMIT_BUFFER_FULL.
  117. */
  118. Void CALLBACK TimerProc (HWND, UINT, UINT, DWORD);
  119. /* Client window procedure declarations
  120. *
  121. * UserWindowProc
  122. * Declaration of the window procedure used to deliver all MCS messages
  123. * to MCS apps (clients). The MCS main thread sends msgs to a client
  124. * window with this window procedure. The window procedure is then
  125. * responsible to deliver the callback to the MCS client.
  126. */
  127. LRESULT CALLBACK UserWindowProc (HWND, UINT, WPARAM, LPARAM);
  128. // Data packet queue
  129. class CDataPktQueue : public CQueue
  130. {
  131. DEFINE_CQUEUE(CDataPktQueue, PDataPacket)
  132. };
  133. // timer user object list
  134. class CTimerUserList2 : public CList2
  135. {
  136. DEFINE_CLIST2(CTimerUserList2, PUser, UINT_PTR) // timerID
  137. };
  138. // memory and buffer list
  139. class CMemoryBufferList2 : public CList2
  140. {
  141. DEFINE_CLIST2(CMemoryBufferList2, PMemory, LPVOID)
  142. };
  143. /*
  144. * This is the actual class definition for the User class. It inherits from
  145. * CommandTarget (which in turn inherits from Object). It has only one
  146. * constructor, which tells the newly created object who it is, who the
  147. * controller is, and who the proper application interface object is. It also
  148. * has a destructor, to clean up after itself. Most importantly, it has
  149. * one public member function for each MCS command that it must handle.
  150. */
  151. class User: public CAttachment, public CRefCount, public IMCSSap
  152. {
  153. friend Void CALLBACK TimerProc (HWND, UINT, UINT, DWORD);
  154. friend LRESULT CALLBACK UserWindowProc (HWND, UINT, WPARAM, LPARAM);
  155. public:
  156. User (PDomain, PMCSError);
  157. virtual ~User ();
  158. static BOOL InitializeClass (void);
  159. static void CleanupClass (void);
  160. /* ------- IMCSSap interface -------- */
  161. MCSAPI ReleaseInterface(void);
  162. MCSAPI GetBuffer (UINT, PVoid *);
  163. MCSAPI_(void) FreeBuffer (PVoid);
  164. MCSAPI ChannelJoin (ChannelID);
  165. MCSAPI ChannelLeave (ChannelID);
  166. MCSAPI ChannelConvene ();
  167. MCSAPI ChannelDisband (ChannelID);
  168. MCSAPI ChannelAdmit (ChannelID, PUserID, UINT);
  169. MCSAPI SendData (DataRequestType, ChannelID, Priority, unsigned char *, ULong, SendDataFlags);
  170. MCSAPI TokenGrab (TokenID);
  171. MCSAPI TokenInhibit (TokenID);
  172. MCSAPI TokenGive (TokenID, UserID);
  173. MCSAPI TokenGiveResponse (TokenID, Result);
  174. MCSAPI TokenPlease (TokenID);
  175. MCSAPI TokenRelease (TokenID);
  176. MCSAPI TokenTest (TokenID);
  177. #ifdef USE_CHANNEL_EXPEL_REQUEST
  178. MCSError MCSChannelExpelRequest (ChannelID, PMemory, UINT);
  179. #endif // USE_CHANNEL_EXPEL_REQUEST
  180. void SetDomainParameters (PDomainParameters);
  181. virtual void PlumbDomainIndication(ULONG height_limit) { };
  182. virtual void PurgeChannelsIndication (CUidList *, CChannelIDList *);
  183. virtual void PurgeTokensIndication(PDomain, CTokenIDList *) { };
  184. virtual void DisconnectProviderUltimatum (Reason);
  185. virtual void AttachUserConfirm (Result, UserID);
  186. virtual void DetachUserIndication (Reason, CUidList *);
  187. virtual void ChannelJoinConfirm (Result, UserID, ChannelID, ChannelID);
  188. void ChannelLeaveIndication (Reason, ChannelID);
  189. virtual void ChannelConveneConfirm (Result, UserID, ChannelID);
  190. virtual void ChannelDisbandIndication (ChannelID);
  191. virtual void ChannelAdmitIndication (UserID, ChannelID, CUidList *);
  192. virtual void ChannelExpelIndication (ChannelID, CUidList *);
  193. virtual void SendDataIndication (UINT, PDataPacket);
  194. virtual void TokenGrabConfirm (Result, UserID, TokenID, TokenStatus);
  195. virtual void TokenInhibitConfirm (Result, UserID, TokenID, TokenStatus);
  196. virtual void TokenGiveIndication (PTokenGiveRecord);
  197. virtual void TokenGiveConfirm (Result, UserID, TokenID, TokenStatus);
  198. virtual void TokenPleaseIndication (UserID, TokenID);
  199. void TokenReleaseIndication (Reason, TokenID);
  200. virtual void TokenReleaseConfirm (Result, UserID, TokenID, TokenStatus);
  201. virtual void TokenTestConfirm (UserID, TokenID, TokenStatus);
  202. virtual void MergeDomainIndication (MergeStatus);
  203. void RegisterUserAttachment (MCSCallBack, PVoid, UINT);
  204. void IssueDataIndication (UINT, PDataPacket);
  205. private:
  206. MCSError ValidateUserRequest ();
  207. void CreateRetryTimer (ULong);
  208. MCSError ChannelJLCD (int, ChannelID);
  209. void ChannelConfInd (UINT, ChannelID, UINT);
  210. MCSError TokenGIRPT (int, TokenID);
  211. void TokenConfInd (UINT, TokenID, UINT);
  212. void PurgeMessageQueue ();
  213. // Static member variables
  214. static CTimerUserList2 *s_pTimerUserList2;
  215. static HINSTANCE s_hInstance;
  216. PDomain m_pDomain;
  217. UserID User_ID;
  218. UserID m_originalUser_ID;
  219. BOOL Merge_In_Progress;
  220. BOOL Deletion_Pending;
  221. ULong Maximum_User_Data_Length;
  222. HWND m_hWnd;
  223. MCSCallBack m_MCSCallback;
  224. PVoid m_UserDefined;
  225. BOOL m_fDisconnectInDataLoss;
  226. BOOL m_fFreeDataIndBuffer;
  227. CDataPktQueue m_DataPktQueue;
  228. CDataPktQueue m_PostMsgPendingQueue;
  229. CMemoryBufferList2 m_DataIndMemoryBuf2;
  230. PBufferRetryInfo m_BufferRetryInfo;
  231. };
  232. /*
  233. * User (PCommandTarget top_provider)
  234. *
  235. * Functional Description:
  236. * This is the constructor for the user object. Its primary purpose is
  237. * to "insert" itself into the layered structure built by the controller.
  238. * To do this it must register itself with the objects above and below it.
  239. *
  240. * It first registers itself with the application interface object
  241. * identified as one of the parameters. This assures that any traffic
  242. * from the application will get to this object correctly.
  243. *
  244. * It then issues an attach user request to the domain object identified
  245. * by another of the parameters. This informs the domain of the users
  246. * presence and also kicks off the process of attaching to that domain.
  247. * Note that the object is not really attached to the domain until it
  248. * receives a successful attach user confirm.
  249. *
  250. * Formal Parameters:
  251. * top_provider (i)
  252. * This is a pointer to the domain object to which this user should
  253. * attach.
  254. *
  255. * Return Value:
  256. * None.
  257. *
  258. * Side Effects:
  259. * None.
  260. *
  261. * Caveats:
  262. * None.
  263. */
  264. /*
  265. * ~User ()
  266. *
  267. * Functional Description:
  268. * This is the destructor for the user class. It detaches itself from the
  269. * objects above and below it, and frees any outstanding resources that
  270. * it may holding in conjunction with unsent user messages.
  271. *
  272. * Formal Parameters:
  273. * None.
  274. *
  275. * Return Value:
  276. * None.
  277. *
  278. * Side Effects:
  279. * None.
  280. *
  281. * Caveats:
  282. * None.
  283. */
  284. /*
  285. * MCSError DetachUser ()
  286. *
  287. * Functional Description:
  288. * This request comes from the application interface object in response
  289. * to the same request from a user application. This object can then
  290. * re-package the request as an MCS command and send it to the domain
  291. * object. It will also cause the user object to destroy itself.
  292. *
  293. * Formal Parameters:
  294. * None.
  295. *
  296. * Return Value:
  297. * MCS_NO_ERROR
  298. * Everything worked fine.
  299. * MCS_TRANSMIT_BUFFER_FULL
  300. * The request could not be processed due to a resource shortage
  301. * within MCS. The application is responsible for re-trying the
  302. * request at a later time.
  303. * MCS_DOMAIN_MERGING
  304. * This operation could not be performed due to a local merge operation
  305. * in progress. The user application must retry at a later time.
  306. *
  307. * Side Effects:
  308. * None.
  309. *
  310. * Caveats:
  311. * None.
  312. */
  313. /*
  314. * MCSError ChannelJoin (
  315. * ChannelID channel_id)
  316. *
  317. * Functional Description:
  318. * This request comes from the application interface object in response
  319. * to the same request from a user application. This object can then
  320. * re-package the request as an MCS command and send it to the domain
  321. * object.
  322. *
  323. * Formal Parameters:
  324. * channel_id (i)
  325. * This is the channel that the user application wishes to join.
  326. *
  327. * Return Value:
  328. * MCS_NO_ERROR
  329. * Everything worked fine.
  330. * MCS_TRANSMIT_BUFFER_FULL
  331. * The request could not be processed due to a resource shortage
  332. * within MCS. The application is responsible for re-trying the
  333. * request at a later time.
  334. * MCS_USER_NOT_ATTACHED
  335. * The user is not attached to the domain. This could indicate that
  336. * the user application issued a request without waiting for the
  337. * attach user confirm.
  338. * MCS_DOMAIN_MERGING
  339. * This operation could not be performed due to a local merge operation
  340. * in progress. The user application must retry at a later time.
  341. *
  342. * Side Effects:
  343. * None.
  344. *
  345. * Caveats:
  346. * None.
  347. */
  348. /*
  349. * MCSError ChannelLeave (
  350. * ChannelID channel_id)
  351. *
  352. * Functional Description:
  353. * This request comes from the application interface object in response
  354. * to the same request from a user application. This object can then
  355. * re-package the request as an MCS command and send it to the domain
  356. * object.
  357. *
  358. * Formal Parameters:
  359. * channel_id (i)
  360. * This is the channel that the user application wishes to leave.
  361. *
  362. * Return Value:
  363. * MCS_NO_ERROR
  364. * Everything worked fine.
  365. * MCS_TRANSMIT_BUFFER_FULL
  366. * The request could not be processed due to a resource shortage
  367. * within MCS. The application is responsible for re-trying the
  368. * request at a later time.
  369. * MCS_USER_NOT_ATTACHED
  370. * The user is not attached to the domain. This could indicate that
  371. * the user application issued a request without waiting for the
  372. * attach user confirm.
  373. * MCS_DOMAIN_MERGING
  374. * This operation could not be performed due to a local merge operation
  375. * in progress. The user application must retry at a later time.
  376. *
  377. * Side Effects:
  378. * None.
  379. *
  380. * Caveats:
  381. * None.
  382. */
  383. /*
  384. * MCSError ChannelConvene ()
  385. *
  386. * Functional Description:
  387. * This request comes from the application interface object in response
  388. * to the same request from a user application. This object can then
  389. * re-package the request as an MCS command and send it to the domain
  390. * object.
  391. *
  392. * Formal Parameters:
  393. * None.
  394. *
  395. * Return Value:
  396. * MCS_NO_ERROR
  397. * Everything worked fine.
  398. * MCS_TRANSMIT_BUFFER_FULL
  399. * The request could not be processed due to a resource shortage
  400. * within MCS. The application is responsible for re-trying the
  401. * request at a later time.
  402. * MCS_USER_NOT_ATTACHED
  403. * The user is not attached to the domain. This could indicate that
  404. * the user application issued a request without waiting for the
  405. * attach user confirm.
  406. * MCS_DOMAIN_MERGING
  407. * This operation could not be performed due to a local merge operation
  408. * in progress. The user application must retry at a later time.
  409. *
  410. * Side Effects:
  411. * None.
  412. *
  413. * Caveats:
  414. * None.
  415. */
  416. /*
  417. * MCSError ChannelDisband (
  418. * ChannelID channel_id)
  419. *
  420. * Functional Description:
  421. * This request comes from the application interface object in response
  422. * to the same request from a user application. This object can then
  423. * re-package the request as an MCS command and send it to the domain
  424. * object.
  425. *
  426. * Formal Parameters:
  427. * channel_id (i)
  428. * This is the channel that the user wishes to disband.
  429. *
  430. * Return Value:
  431. * MCS_NO_ERROR
  432. * Everything worked fine.
  433. * MCS_TRANSMIT_BUFFER_FULL
  434. * The request could not be processed due to a resource shortage
  435. * within MCS. The application is responsible for re-trying the
  436. * request at a later time.
  437. * MCS_USER_NOT_ATTACHED
  438. * The user is not attached to the domain. This could indicate that
  439. * the user application issued a request without waiting for the
  440. * attach user confirm.
  441. * MCS_DOMAIN_MERGING
  442. * This operation could not be performed due to a local merge operation
  443. * in progress. The user application must retry at a later time.
  444. *
  445. * Side Effects:
  446. * None.
  447. *
  448. * Caveats:
  449. * None.
  450. */
  451. /*
  452. * MCSError ChannelAdmit (
  453. * ChannelID channel_id,
  454. * PUserID user_id_list,
  455. * UINT user_id_count)
  456. *
  457. * Functional Description:
  458. * This request comes from the application interface object in response
  459. * to the same request from a user application. This object can then
  460. * re-package the request as an MCS command and send it to the domain
  461. * object.
  462. *
  463. * Formal Parameters:
  464. * channel_id (i)
  465. * This is the private channel for which the user wishes to expand
  466. * the authorized user list.
  467. * user_id_list (i)
  468. * This is an array containing the user IDs of the users to be added
  469. * to the authorized user list.
  470. * user_id_count (i)
  471. * This is the number of user IDs in the above array.
  472. *
  473. * Return Value:
  474. * MCS_NO_ERROR
  475. * Everything worked fine.
  476. * MCS_TRANSMIT_BUFFER_FULL
  477. * The request could not be processed due to a resource shortage
  478. * within MCS. The application is responsible for re-trying the
  479. * request at a later time.
  480. * MCS_USER_NOT_ATTACHED
  481. * The user is not attached to the domain. This could indicate that
  482. * the user application issued a request without waiting for the
  483. * attach user confirm.
  484. * MCS_DOMAIN_MERGING
  485. * This operation could not be performed due to a local merge operation
  486. * in progress. The user application must retry at a later time.
  487. *
  488. * Side Effects:
  489. * None.
  490. *
  491. * Caveats:
  492. * None.
  493. */
  494. /*
  495. * MCSError ChannelExpel (
  496. * ChannelID channel_id,
  497. * PUserID user_id_list,
  498. * UINT user_id_count)
  499. *
  500. * Functional Description:
  501. * This request comes from the application interface object in response
  502. * to the same request from a user application. This object can then
  503. * re-package the request as an MCS command and send it to the domain
  504. * object.
  505. *
  506. * Formal Parameters:
  507. * channel_id (i)
  508. * This is the private channel for which the user wishes to shrink
  509. * the authorized user list.
  510. * user_id_list (i)
  511. * This is an array containing the user IDs of the users to be removed
  512. * from the authorized user list.
  513. * user_id_count (i)
  514. * This is the number of user IDs in the above array.
  515. *
  516. * Return Value:
  517. * MCS_NO_ERROR
  518. * Everything worked fine.
  519. * MCS_TRANSMIT_BUFFER_FULL
  520. * The request could not be processed due to a resource shortage
  521. * within MCS. The application is responsible for re-trying the
  522. * request at a later time.
  523. * MCS_USER_NOT_ATTACHED
  524. * The user is not attached to the domain. This could indicate that
  525. * the user application issued a request without waiting for the
  526. * attach user confirm.
  527. * MCS_DOMAIN_MERGING
  528. * This operation could not be performed due to a local merge operation
  529. * in progress. The user application must retry at a later time.
  530. *
  531. * Side Effects:
  532. * None.
  533. *
  534. * Caveats:
  535. * None.
  536. */
  537. /*
  538. * MCSError SendData (
  539. * ChannelID channel_id,
  540. * Priority priority,
  541. * PUChar user_data,
  542. * ULong user_data_length)
  543. *
  544. * Functional Description:
  545. * This request comes from the application interface object in response
  546. * to the same request from a user application. This object can then
  547. * re-package the request as an MCS command and send it to the domain
  548. * object.
  549. *
  550. * Formal Parameters:
  551. * channel_id (i)
  552. * This is the channel that the user application wishes to transmit
  553. * data on.
  554. * priority (i)
  555. * This is the priority at which the data is to be transmitted.
  556. * user_data (i)
  557. * This is the address of the data to be transmitted.
  558. * user_data_length (i)
  559. * This is the length of the data to be transmitted.
  560. *
  561. * Return Value:
  562. * MCS_NO_ERROR
  563. * Everything worked fine.
  564. * MCS_TRANSMIT_BUFFER_FULL
  565. * The request has failed because the required memory could not be
  566. * allocated. It is the responsibility of the user application to
  567. * repeat the request at a later time.
  568. * MCS_USER_NOT_ATTACHED
  569. * The user is not attached to the domain. This could indicate that
  570. * the user application issued a request without waiting for the
  571. * attach user confirm.
  572. * MCS_DOMAIN_MERGING
  573. * This operation could not be performed due to a local merge operation
  574. * in progress. The user application must retry at a later time.
  575. *
  576. * Side Effects:
  577. * None.
  578. *
  579. * Caveats:
  580. * None.
  581. */
  582. /*
  583. * MCSError TokenGrab (
  584. * TokenID token_id)
  585. *
  586. * Functional Description:
  587. * This request comes from the application interface object in response
  588. * to the same request from a user application. This object can then
  589. * re-package the request as an MCS command and send it to the domain
  590. * object.
  591. *
  592. * Formal Parameters:
  593. * token_id (i)
  594. * This is the token the user application wishes to grab.
  595. *
  596. * Return Value:
  597. * MCS_NO_ERROR
  598. * Everything worked fine.
  599. * MCS_TRANSMIT_BUFFER_FULL
  600. * The request could not be processed due to a resource shortage
  601. * within MCS. The application is responsible for re-trying the
  602. * request at a later time.
  603. * MCS_INVALID_PARAMETER
  604. * The user attempted to perform an operation on token 0, which is not
  605. * a valid token.
  606. * MCS_USER_NOT_ATTACHED
  607. * The user is not attached to the domain. This could indicate that
  608. * the user application issued a request without waiting for the
  609. * attach user confirm.
  610. * MCS_DOMAIN_MERGING
  611. * This operation could not be performed due to a local merge operation
  612. * in progress. The user application must retry at a later time.
  613. *
  614. * Side Effects:
  615. * None.
  616. *
  617. * Caveats:
  618. * None.
  619. */
  620. /*
  621. * MCSError TokenInhibit (
  622. * TokenID token_id)
  623. *
  624. * Functional Description:
  625. * This request comes from the application interface object in response
  626. * to the same request from a user application. This object can then
  627. * re-package the request as an MCS command and send it to the domain
  628. * object.
  629. *
  630. * Formal Parameters:
  631. * token_id (i)
  632. * This is the token the user application wishes to inhibit.
  633. *
  634. * Return Value:
  635. * MCS_NO_ERROR
  636. * Everything worked fine.
  637. * MCS_TRANSMIT_BUFFER_FULL
  638. * The request could not be processed due to a resource shortage
  639. * within MCS. The application is responsible for re-trying the
  640. * request at a later time.
  641. * MCS_INVALID_PARAMETER
  642. * The user attempted to perform an operation on token 0, which is not
  643. * a valid token.
  644. * MCS_USER_NOT_ATTACHED
  645. * The user is not attached to the domain. This could indicate that
  646. * the user application issued a request without waiting for the
  647. * attach user confirm.
  648. * MCS_DOMAIN_MERGING
  649. * This operation could not be performed due to a local merge operation
  650. * in progress. The user application must retry at a later time.
  651. *
  652. * Side Effects:
  653. * None.
  654. *
  655. * Caveats:
  656. * None.
  657. */
  658. /*
  659. * MCSError TokenGive (
  660. * TokenID token_id,
  661. * UserID receiver_id)
  662. *
  663. * Functional Description:
  664. * This request comes from the application interface object in response
  665. * to the same request from a user application. This object can then
  666. * re-package the request as an MCS command and send it to the domain
  667. * object.
  668. *
  669. * Formal Parameters:
  670. * token_id (i)
  671. * This is the token the user application wishes to give away.
  672. * receiver_id (i)
  673. * This is the ID of the user to receive the token.
  674. *
  675. * Return Value:
  676. * MCS_NO_ERROR
  677. * Everything worked fine.
  678. * MCS_TRANSMIT_BUFFER_FULL
  679. * The request could not be processed due to a resource shortage
  680. * within MCS. The application is responsible for re-trying the
  681. * request at a later time.
  682. * MCS_INVALID_PARAMETER
  683. * The user attempted to perform an operation on token 0, which is not
  684. * a valid token.
  685. * MCS_USER_NOT_ATTACHED
  686. * The user is not attached to the domain. This could indicate that
  687. * the user application issued a request without waiting for the
  688. * attach user confirm.
  689. * MCS_DOMAIN_MERGING
  690. * This operation could not be performed due to a local merge operation
  691. * in progress. The user application must retry at a later time.
  692. *
  693. * Side Effects:
  694. * None.
  695. *
  696. * Caveats:
  697. * None.
  698. */
  699. /*
  700. * MCSError TokenGiveResponse (
  701. * TokenID token_id,
  702. * Result result)
  703. *
  704. * Functional Description:
  705. * This request comes from the application interface object in response
  706. * to the same request from a user application. This object can then
  707. * re-package the request as an MCS command and send it to the domain
  708. * object.
  709. *
  710. * Formal Parameters:
  711. * token_id (i)
  712. * This is the token that the user application is either accepting or
  713. * rejecting in response to a previous give indication from another
  714. * user.
  715. * result (i)
  716. * This parameter specifies whether or not the token was accepted.
  717. * Success indicates acceptance while anything else indicates that the
  718. * token was not accepted.
  719. *
  720. * Return Value:
  721. * MCS_NO_ERROR
  722. * Everything worked fine.
  723. * MCS_TRANSMIT_BUFFER_FULL
  724. * The request could not be processed due to a resource shortage
  725. * within MCS. The application is responsible for re-trying the
  726. * request at a later time.
  727. * MCS_INVALID_PARAMETER
  728. * The user attempted to perform an operation on token 0, which is not
  729. * a valid token.
  730. * MCS_USER_NOT_ATTACHED
  731. * The user is not attached to the domain. This could indicate that
  732. * the user application issued a request without waiting for the
  733. * attach user confirm.
  734. * MCS_DOMAIN_MERGING
  735. * This operation could not be performed due to a local merge operation
  736. * in progress. The user application must retry at a later time.
  737. *
  738. * Side Effects:
  739. * None.
  740. *
  741. * Caveats:
  742. * None.
  743. */
  744. /*
  745. * MCSError TokenPlease (
  746. * TokenID token_id)
  747. *
  748. * Functional Description:
  749. * This request comes from the application interface object in response
  750. * to the same request from a user application. This object can then
  751. * re-package the request as an MCS command and send it to the domain
  752. * object.
  753. *
  754. * Formal Parameters:
  755. * token_id (i)
  756. * This is the token the user application wishes to ask for.
  757. *
  758. * Return Value:
  759. * MCS_NO_ERROR
  760. * Everything worked fine.
  761. * MCS_TRANSMIT_BUFFER_FULL
  762. * The request could not be processed due to a resource shortage
  763. * within MCS. The application is responsible for re-trying the
  764. * request at a later time.
  765. * MCS_INVALID_PARAMETER
  766. * The user attempted to perform an operation on token 0, which is not
  767. * a valid token.
  768. * MCS_USER_NOT_ATTACHED
  769. * The user is not attached to the domain. This could indicate that
  770. * the user application issued a request without waiting for the
  771. * attach user confirm.
  772. * MCS_DOMAIN_MERGING
  773. * This operation could not be performed due to a local merge operation
  774. * in progress. The user application must retry at a later time.
  775. *
  776. * Side Effects:
  777. * None.
  778. *
  779. * Caveats:
  780. * None.
  781. */
  782. /*
  783. * MCSError TokenRelease (
  784. * TokenID token_id)
  785. *
  786. * Functional Description:
  787. * This request comes from the application interface object in response
  788. * to the same request from a user application. This object can then
  789. * re-package the request as an MCS command and send it to the domain
  790. * object.
  791. *
  792. * Formal Parameters:
  793. * token_id (i)
  794. * This is the token the user application wishes to release.
  795. *
  796. * Return Value:
  797. * MCS_NO_ERROR
  798. * Everything worked fine.
  799. * MCS_TRANSMIT_BUFFER_FULL
  800. * The request could not be processed due to a resource shortage
  801. * within MCS. The application is responsible for re-trying the
  802. * request at a later time.
  803. * MCS_INVALID_PARAMETER
  804. * The user attempted to perform an operation on token 0, which is not
  805. * a valid token.
  806. * MCS_USER_NOT_ATTACHED
  807. * The user is not attached to the domain. This could indicate that
  808. * the user application issued a request without waiting for the
  809. * attach user confirm.
  810. * MCS_DOMAIN_MERGING
  811. * This operation could not be performed due to a local merge operation
  812. * in progress. The user application must retry at a later time.
  813. *
  814. * Side Effects:
  815. * None.
  816. *
  817. * Caveats:
  818. * None.
  819. */
  820. /*
  821. * MCSError TokenTest(
  822. * TokenID token_id)
  823. *
  824. * Functional Description:
  825. * This request comes from the application interface object in response
  826. * to the same request from a user application. This object can then
  827. * re-package the request as an MCS command and send it to the domain
  828. * object.
  829. *
  830. * Formal Parameters:
  831. * token_id (i)
  832. * This is the token the user application wishes to test the state of.
  833. *
  834. * Return Value:
  835. * MCS_NO_ERROR
  836. * Everything worked fine.
  837. * MCS_TRANSMIT_BUFFER_FULL
  838. * The request could not be processed due to a resource shortage
  839. * within MCS. The application is responsible for re-trying the
  840. * request at a later time.
  841. * MCS_INVALID_PARAMETER
  842. * The user attempted to perform an operation on token 0, which is not
  843. * a valid token.
  844. * MCS_USER_NOT_ATTACHED
  845. * The user is not attached to the domain. This could indicate that
  846. * the user application issued a request without waiting for the
  847. * attach user confirm.
  848. * MCS_DOMAIN_MERGING
  849. * This operation could not be performed due to a local merge operation
  850. * in progress. The user application must retry at a later time.
  851. *
  852. * Side Effects:
  853. * None.
  854. *
  855. * Caveats:
  856. * None.
  857. */
  858. /*
  859. * Void SetDomainParameters (
  860. * PDomainParameters domain_parameters)
  861. *
  862. * Functional Description:
  863. * This member function is called whenever the domain parameters change
  864. * as the result of accepting a first connection. It informs the user
  865. * object of a change in the maximum PDU size, which is used when creating
  866. * outbound data PDUs.
  867. *
  868. * Formal Parameters:
  869. * domain_parameters (i)
  870. * Pointer to a structure that contains the current domain parameters
  871. * (those that are in use).
  872. *
  873. * Return Value:
  874. * None.
  875. *
  876. * Side Effects:
  877. * None.
  878. *
  879. * Caveats:
  880. * None.
  881. */
  882. /*
  883. * Void PlumbDomainIndication (
  884. * PCommandTarget originator,
  885. * ULong height_limit)
  886. *
  887. * Functional Description:
  888. * This command is issued by the domain object during a plumb domain
  889. * operation. This is not relevant to user objects, and should be ignored.
  890. *
  891. * Formal Parameters:
  892. * originator (i)
  893. * This identifies the CommandTarget from which the command came (which
  894. * should be the domain object).
  895. * height_limit (i)
  896. * This is height value passed through during the plumb operation.
  897. *
  898. * Return Value:
  899. * None.
  900. *
  901. * Side Effects:
  902. * None.
  903. *
  904. * Caveats:
  905. * None.
  906. */
  907. /*
  908. * Void PurgeChannelsIndication (
  909. * PCommandTarget originator,
  910. * CUidList *purge_user_list,
  911. * CChannelIDList *purge_channel_list)
  912. *
  913. * Functional Description:
  914. * This command is issued by the domain object when purging channels
  915. * from the lower domain during a domain merge operation.
  916. *
  917. * The user object will issue one MCS_DETACH_USER_INDICATION object for
  918. * each user in the user list. Furthermore, if the user objects finds
  919. * its own user ID in the list, it will destroy itself.
  920. *
  921. * Formal Parameters:
  922. * originator (i)
  923. * This identifies the CommandTarget from which the command came (which
  924. * should be the domain object).
  925. * purge_user_list (i)
  926. * This is a list of user IDs that are to be purged from the lower
  927. * domain.
  928. * purge_channel_list (i)
  929. * This is a list of channel IDs that are to be purged from the lower
  930. * domain.
  931. *
  932. * Return Value:
  933. * None.
  934. *
  935. * Side Effects:
  936. * None.
  937. *
  938. * Caveats:
  939. * None.
  940. */
  941. /*
  942. * Void PurgeTokensIndication (
  943. * PCommandTarget originator,
  944. * CTokenIDList *token_id_list)
  945. *
  946. * Functional Description:
  947. * This command is issued by the domain object when purging tokens from
  948. * the lower domain during a domain merge operation. IT is not relevant
  949. * to a user object, and is therefore ignored.
  950. *
  951. * Formal Parameters:
  952. * originator (i)
  953. * This identifies the CommandTarget from which the command came (which
  954. * should be the domain object).
  955. * token_id (i)
  956. * This is the ID of the token that is being purged.
  957. *
  958. * Return Value:
  959. * None.
  960. *
  961. * Side Effects:
  962. * None.
  963. *
  964. * Caveats:
  965. * None.
  966. */
  967. /*
  968. * Void DisconnectProviderUltimatum (
  969. * PCommandTarget originator,
  970. * Reason reason)
  971. *
  972. * Functional Description:
  973. * This command is issued by the domain object when it is necessary to
  974. * force a user from the domain. This usually happens in response to
  975. * the purging of an entire domain (either this user was in the bottom
  976. * of a disconnected domain or the domain was deleted locally by user
  977. * request).
  978. *
  979. * If the user was already attached to the domain, this will result in a
  980. * DETACH_USER_INDICATION with the local user ID. Otherwise this will
  981. * result is an ATTACH_USER_CONFIRM with a result of UNSPECIFIED_FAILURE.
  982. *
  983. * Formal Parameters:
  984. * originator (i)
  985. * This identifies the CommandTarget from which the command came (which
  986. * should be the domain object).
  987. * reason (i)
  988. * This is the reason parameter to be issued to the local user
  989. * application. See "mcatmcs.h" for a complete list of possible reaons.
  990. *
  991. * Return Value:
  992. * None.
  993. *
  994. * Side Effects:
  995. * None.
  996. *
  997. * Caveats:
  998. * None.
  999. */
  1000. /*
  1001. * Void AttachUserConfirm (
  1002. * PCommandTarget originator,
  1003. * Result result,
  1004. * UserID uidInitiator)
  1005. *
  1006. * Functional Description:
  1007. * This command is issued by the domain object in response to the
  1008. * attach user request issued by this object during construction. If the
  1009. * result is successful, then this user is now attached and may request
  1010. * MCS services through this attachment.
  1011. *
  1012. * An ATTACH_USER_CONFIRM will be issued to the user application. If the
  1013. * result is not successful, this object will delete itself.
  1014. *
  1015. * Formal Parameters:
  1016. * originator (i)
  1017. * This identifies the CommandTarget from which the command came (which
  1018. * should be the domain object).
  1019. * result (i)
  1020. * This is the result of the attach request.
  1021. * uidInitiator (i)
  1022. * If the result was successful, this is the new user ID associated
  1023. * with this attachment.
  1024. *
  1025. * Return Value:
  1026. * None.
  1027. *
  1028. * Side Effects:
  1029. * None.
  1030. *
  1031. * Caveats:
  1032. * None.
  1033. */
  1034. /*
  1035. * Void DetachUserIndication (
  1036. * PCommandTarget originator,
  1037. * Reason reason,
  1038. * CUidList *user_id_list)
  1039. *
  1040. * Functional Description:
  1041. * This command is issued by the domain object when one or more users leave
  1042. * the domain.
  1043. *
  1044. * An MCS_DETACH_USER_INDICATION is issued to the user application for each
  1045. * user in the list. Furthermore, if the user finds its own ID in the
  1046. * list, then it will destroy itself.
  1047. *
  1048. * Formal Parameters:
  1049. * originator (i)
  1050. * This identifies the CommandTarget from which the command came (which
  1051. * should be the domain object).
  1052. * reason (i)
  1053. * This is the reason for the detachment. Possible values are listed
  1054. * in "mcatmcs.h".
  1055. * user_id_list (i)
  1056. * This is a list user IDs of the users that are leaving.
  1057. *
  1058. * Return Value:
  1059. * None.
  1060. *
  1061. * Side Effects:
  1062. * None.
  1063. *
  1064. * Caveats:
  1065. * None.
  1066. */
  1067. /*
  1068. * Void ChannelJoinConfirm (
  1069. * PCommandTarget originator,
  1070. * Result result,
  1071. * UserID uidInitiator,
  1072. * ChannelID requested_id,
  1073. * ChannelID channel_id)
  1074. *
  1075. * Functional Description:
  1076. * This command is issued by the domain object in response to a previous
  1077. * channel join request.
  1078. *
  1079. * A CHANNEL_JOIN_CONFIRM is issued to the user application. Note that a
  1080. * user is not really considered to be joined to a channel until a
  1081. * successful confirm is received.
  1082. *
  1083. * Formal Parameters:
  1084. * originator (i)
  1085. * This identifies the CommandTarget from which the command came (which
  1086. * should be the domain object).
  1087. * result (i)
  1088. * This is the result from the join request. If successful, then the
  1089. * user is now joined to the channel.
  1090. * uidInitiator (i)
  1091. * This is the user ID of the requestor. It will be the same as the
  1092. * local user ID (or else this command would not have gotten here).
  1093. * requested_id (i)
  1094. * This is the ID of the channel that the user originally requested
  1095. * to join. This will differ from the ID of the channel actually
  1096. * joined only if this ID is 0 (which identifies a request to join an
  1097. * assigned channel).
  1098. * channel_id (i)
  1099. * This is the channel that is now joined. This is important for
  1100. * two reasons. First, it is possible for a user to have more than
  1101. * one outstanding join request, in which case this parameter
  1102. * identifies which channel this confirm is for. Second, if the
  1103. * request is for channel 0 (zero), then this parameter identifies
  1104. * which assigned channel the user has successfully joined.
  1105. *
  1106. * Return Value:
  1107. * None.
  1108. *
  1109. * Side Effects:
  1110. * None.
  1111. *
  1112. * Caveats:
  1113. * None.
  1114. */
  1115. /*
  1116. * Void ChannelLeaveIndication (
  1117. * PCommandTarget originator,
  1118. * Reason reason,
  1119. * ChannelID channel_id)
  1120. *
  1121. * Functional Description:
  1122. * This command is issued by the domain object when a user loses its right
  1123. * to use a channel.
  1124. *
  1125. * A CHANNEL_LEAVE_INDICATION is issued to the user application.
  1126. *
  1127. * Formal Parameters:
  1128. * originator (i)
  1129. * This identifies the CommandTarget from which the command came (which
  1130. * should be the domain object).
  1131. * reason (i)
  1132. * This is the reason for the lost channel. Possible values are listed
  1133. * in "mcatmcs.h".
  1134. * channel (i)
  1135. * This is the channel that the user can no longer use.
  1136. *
  1137. * Return Value:
  1138. * None.
  1139. *
  1140. * Side Effects:
  1141. * None.
  1142. *
  1143. * Caveats:
  1144. * None.
  1145. */
  1146. /*
  1147. * Void ChannelConveneConfirm (
  1148. * PCommandTarget originator,
  1149. * Result result,
  1150. * UserID uidInitiator,
  1151. * ChannelID channel_id)
  1152. *
  1153. * Functional Description:
  1154. * This command is issued by the domain object in response to a previous
  1155. * channel convene request.
  1156. *
  1157. * A CHANNEL_CONVENE_CONFIRM is issued to the user application.
  1158. *
  1159. * Formal Parameters:
  1160. * originator (i)
  1161. * This identifies the CommandTarget from which the command came (which
  1162. * should be the domain object).
  1163. * result (i)
  1164. * This is the result from the convene request. If successful, then
  1165. * a private channel has been created, with this user as the manager.
  1166. * uidInitiator (i)
  1167. * This is the user ID of the requestor. It will be the same as the
  1168. * local user ID (or else this command would not have gotten here).
  1169. * channel_id (i)
  1170. * This is the channel ID for the newly created private channel.
  1171. *
  1172. * Return Value:
  1173. * None.
  1174. *
  1175. * Side Effects:
  1176. * None.
  1177. *
  1178. * Caveats:
  1179. * None.
  1180. */
  1181. /*
  1182. * Void ChannelDisbandIndication (
  1183. * PCommandTarget originator,
  1184. * ChannelID channel_id)
  1185. *
  1186. * Functional Description:
  1187. * This command is issued by the domain object to the manager of a private
  1188. * channel when MCS determines the need to disband the channel. This will
  1189. * usually be done only if the channel is purged during a domain merger.
  1190. *
  1191. * A CHANNEL_DISBAND_INDICATION is issued to the user application.
  1192. *
  1193. * Formal Parameters:
  1194. * originator (i)
  1195. * This identifies the CommandTarget from which the command came (which
  1196. * should be the domain object).
  1197. * channel_id (i)
  1198. * This is the channel ID of the private channel that is being
  1199. * disbanded.
  1200. *
  1201. * Return Value:
  1202. * None.
  1203. *
  1204. * Side Effects:
  1205. * None.
  1206. *
  1207. * Caveats:
  1208. * None.
  1209. */
  1210. /*
  1211. * Void ChannelAdmitIndication (
  1212. * PCommandTarget originator,
  1213. * UserID uidInitiator,
  1214. * ChannelID channel_id,
  1215. * CUidList *user_id_list)
  1216. *
  1217. * Functional Description:
  1218. * This command is issued by the domain object when a user is admitted to
  1219. * a private channel by the manager of that channel. It informs the user
  1220. * that the channel can be used.
  1221. *
  1222. * A CHANNEL_ADMIT_INDICATION is issued to the user application.
  1223. *
  1224. * Formal Parameters:
  1225. * originator (i)
  1226. * This identifies the CommandTarget from which the command came (which
  1227. * should be the domain object).
  1228. * uidInitiator (i)
  1229. * This is the user ID of the private channel manager.
  1230. * channel_id (i)
  1231. * This is the channel ID of the private channel to which the user has
  1232. * been admitted.
  1233. * user_id_list (i)
  1234. * This is a container holding the IDs of the users that have been
  1235. * admitted. By the time this reaches a particular user, that user
  1236. * should be the only one in the list (since the list is broken apart
  1237. * and forwarded in the direction of the contained users, recursively).
  1238. *
  1239. * Return Value:
  1240. * None.
  1241. *
  1242. * Side Effects:
  1243. * None.
  1244. *
  1245. * Caveats:
  1246. * None.
  1247. */
  1248. /*
  1249. * Void ChannelExpelIndication (
  1250. * PCommandTarget originator,
  1251. * ChannelID channel_id,
  1252. * CUidList *user_id_list)
  1253. *
  1254. * Functional Description:
  1255. * This command is issued by the domain object when a user is expelled from
  1256. * a private channel by the manager of that channel. It informs the user
  1257. * that the channel can no longer be used.
  1258. *
  1259. * A CHANNEL_EXPEL_INDICATION is issued to the user application.
  1260. *
  1261. * Formal Parameters:
  1262. * originator (i)
  1263. * This identifies the CommandTarget from which the command came (which
  1264. * should be the domain object).
  1265. * channel_id (i)
  1266. * This is the channel ID of the private channel from which the user
  1267. * has been expelled.
  1268. * user_id_list (i)
  1269. * This is a container holding the IDs of the users that have been
  1270. * expelled. By the time this reaches a particular user, that user
  1271. * should be the only one in the list (since the list is broken apart
  1272. * and forwarded in the direction of the contained users, recursively).
  1273. *
  1274. * Return Value:
  1275. * None.
  1276. *
  1277. * Side Effects:
  1278. * None.
  1279. *
  1280. * Caveats:
  1281. * None.
  1282. */
  1283. /*
  1284. * Void SendDataIndication (
  1285. * PCommandTarget originator,
  1286. * UINT message_type,
  1287. * PDataPacket data_packet)
  1288. *
  1289. * Functional Description:
  1290. * This command is issued by the domain object when non-uniform data
  1291. * data is received on a channel to which this user is joined.
  1292. *
  1293. * A SEND_DATA_INDICATION is issued to the user application.
  1294. *
  1295. * Formal Parameters:
  1296. * originator (i)
  1297. * This identifies the CommandTarget from which the command came (which
  1298. * should be the domain object).
  1299. * message_type (i)
  1300. * normal or uniform send data indication
  1301. * data_packet (i)
  1302. * This is a pointer to a DataPacket object containing the channel
  1303. * ID, the User ID of the data sender, segmentation flags, priority of
  1304. * the data packet and a pointer to the packet to be sent.
  1305. *
  1306. * Return Value:
  1307. * None.
  1308. *
  1309. * Side Effects:
  1310. * None.
  1311. *
  1312. * Caveats:
  1313. * None.
  1314. */
  1315. /*
  1316. * Void TokenGrabConfirm (
  1317. * PCommandTarget originator,
  1318. * Result result,
  1319. * UserID uidInitiator,
  1320. * TokenID token_id,
  1321. * TokenStatus token_status)
  1322. *
  1323. * Functional Description:
  1324. * This command is issued by the domain object in response to a previous
  1325. * token grab request.
  1326. *
  1327. * A TOKEN_GRAB_CONFIRM is issued to the user application.
  1328. *
  1329. * Formal Parameters:
  1330. * originator (i)
  1331. * This identifies the CommandTarget from which the command came (which
  1332. * should be the domain object).
  1333. * result (i)
  1334. * This is the result of the grab request. If successful, the user
  1335. * now exclusively owns the token.
  1336. * uidInitiator (i)
  1337. * This is the user ID of the user that made the grab request. This
  1338. * will be the same as the local user ID (or else this command would
  1339. * not have gotten here).
  1340. * token_id (i)
  1341. * This is the ID of the token which the grab confirm is for. It
  1342. * is possible to have more than one outstanding grab request, so this
  1343. * parameter tells the user application which request has been
  1344. * satisfied by this confirm.
  1345. * token_status (i)
  1346. * This is the status of the token at the time the Top Provider
  1347. * serviced the grab request. This will be SELF_GRABBED if the grab
  1348. * request was successful. It will be something else if not (see
  1349. * "mcatmcs.h" for a list of possible token status values).
  1350. *
  1351. * Return Value:
  1352. * None.
  1353. *
  1354. * Side Effects:
  1355. * None.
  1356. *
  1357. * Caveats:
  1358. * None.
  1359. */
  1360. /*
  1361. * Void TokenInhibitConfirm (
  1362. * PCommandTarget originator,
  1363. * Result result,
  1364. * UserID uidInitiator,
  1365. * TokenID token_id,
  1366. * TokenStatus token_status)
  1367. *
  1368. * Functional Description:
  1369. * This command is issued by the domain object in response to a previous
  1370. * token inhibit request.
  1371. *
  1372. * A TOKEN_INHIBIT_CONFIRM is issued to the user application.
  1373. *
  1374. * Formal Parameters:
  1375. * originator (i)
  1376. * This identifies the CommandTarget from which the command came (which
  1377. * should be the domain object).
  1378. * result (i)
  1379. * This is the result of the inhibit request. If successful, the user
  1380. * now non-exclusively owns the token.
  1381. * uidInitiator (i)
  1382. * This is the user ID of the user that made the inhibit request. This
  1383. * will be the same as the local user ID (or else this command would
  1384. * not have gotten here).
  1385. * token_id (i)
  1386. * This is the ID of the token which the inihibit confirm is for.
  1387. * It is possible to have more than one outstanding inihibit request,
  1388. * so this parameter tells the user application which request has been
  1389. * satisfied by this confirm.
  1390. * token_status (i)
  1391. * This is the status of the token at the time the Top Provider
  1392. * serviced the inhibit request. This will be SELF_INHIBITED if the
  1393. * inhibit request was successful. It will be something else if not
  1394. * (see "mcatmcs.h" for a list of possible token status values).
  1395. *
  1396. * Return Value:
  1397. * None.
  1398. *
  1399. * Side Effects:
  1400. * None.
  1401. *
  1402. * Caveats:
  1403. * None.
  1404. */
  1405. /*
  1406. * Void TokenGiveIndication (
  1407. * PCommandTarget originator,
  1408. * PTokenGiveRecord pTokenGiveRec)
  1409. *
  1410. * Functional Description:
  1411. * This command is issued by the domain object in response to a remote
  1412. * token give request (with the local user listed as the desired receiver).
  1413. *
  1414. * A TOKEN_GIVE_INDICATION is issued to the user application.
  1415. *
  1416. * Formal Parameters:
  1417. * originator (i)
  1418. * This identifies the CommandTarget from which the command came (which
  1419. * should be the domain object).
  1420. * pTokenGiveRec (i)
  1421. * This is the address of a structure containing the following information:
  1422. * The ID of the user attempting to give away the token.
  1423. * The ID of the token being given.
  1424. * The ID of the user that the token is being given to.
  1425. *
  1426. * Return Value:
  1427. * None.
  1428. *
  1429. * Side Effects:
  1430. * None.
  1431. *
  1432. * Caveats:
  1433. * None.
  1434. */
  1435. /*
  1436. * Void TokenGiveConfirm (
  1437. * PCommandTarget originator,
  1438. * Result result,
  1439. * UserID uidInitiator,
  1440. * TokenID token_id,
  1441. * TokenStatus token_status)
  1442. *
  1443. * Functional Description:
  1444. * This command is issued by the domain object in response to a previous
  1445. * token give request.
  1446. *
  1447. * A TOKEN_GIVE_CONFIRM is issued to the user application.
  1448. *
  1449. * Formal Parameters:
  1450. * originator (i)
  1451. * This identifies the CommandTarget from which the command came (which
  1452. * should be the domain object).
  1453. * result (i)
  1454. * This is the result of the give request. If successful, the user
  1455. * no longer owns the token.
  1456. * uidInitiator (i)
  1457. * This is the user ID of the user that made the give request. This
  1458. * will be the same as the local user ID (or else this command would
  1459. * not have gotten here).
  1460. * token_id (i)
  1461. * This is the ID of the token which the give confirm is for.
  1462. * token_status (i)
  1463. * This is the status of the token at the time the Top Provider
  1464. * serviced the give request.
  1465. *
  1466. * Return Value:
  1467. * None.
  1468. *
  1469. * Side Effects:
  1470. * None.
  1471. *
  1472. * Caveats:
  1473. * None.
  1474. */
  1475. /*
  1476. * Void TokenPleaseIndication (
  1477. * PCommandTarget originator,
  1478. * UserID uidInitiator,
  1479. * TokenID token_id)
  1480. *
  1481. * Functional Description:
  1482. * This command is issued by the domain object to all owners of a token
  1483. * when a user issues a token please request for that token.
  1484. *
  1485. * A TOKEN_PLEASE_INDICATION is issued to the user application.
  1486. *
  1487. * Formal Parameters:
  1488. * originator (i)
  1489. * This identifies the CommandTarget from which the command came (which
  1490. * should be the domain object).
  1491. * uidInitiator (i)
  1492. * This is the user ID of the user that made the please request.
  1493. * token_id (i)
  1494. * This is the ID of the token which the please request is for.
  1495. *
  1496. * Return Value:
  1497. * None.
  1498. *
  1499. * Side Effects:
  1500. * None.
  1501. *
  1502. * Caveats:
  1503. * None.
  1504. */
  1505. /*
  1506. * Void TokenReleaseIndication (
  1507. * PCommandTarget originator,
  1508. * Reason reason,
  1509. * TokenID token_id)
  1510. *
  1511. * Functional Description:
  1512. * This command is issued by the domain object when a token is taken
  1513. * away from its current owner.
  1514. *
  1515. * A TOKEN_RELEASE_INDICATION is issued to the user application.
  1516. *
  1517. * Formal Parameters:
  1518. * originator (i)
  1519. * This identifies the CommandTarget from which the command came (which
  1520. * should be the domain object).
  1521. * reason (i)
  1522. * This is the reason the token is being taken away.
  1523. * token_id (i)
  1524. * This is the ID of the token that is being taken away.
  1525. *
  1526. * Return Value:
  1527. * None.
  1528. *
  1529. * Side Effects:
  1530. * None.
  1531. *
  1532. * Caveats:
  1533. * None.
  1534. */
  1535. /*
  1536. * Void TokenReleaseConfirm (
  1537. * PCommandTarget originator,
  1538. * Result result,
  1539. * UserID uidInitiator,
  1540. * TokenID token_id,
  1541. * TokenStatus token_status)
  1542. *
  1543. * Functional Description:
  1544. * This command is issued by the domain object in response to a previous
  1545. * token release request.
  1546. *
  1547. * A TOKEN_RELEASE_CONFIRM is issued to the user application.
  1548. *
  1549. * Formal Parameters:
  1550. * originator (i)
  1551. * This identifies the CommandTarget from which the command came (which
  1552. * should be the domain object).
  1553. * result (i)
  1554. * This is the result of the release request. If successful, the user
  1555. * no longer owns the token (if it ever did)
  1556. * uidInitiator (i)
  1557. * This is the user ID of the user that made the release request. This
  1558. * will be the same as the local user ID (or else this command would
  1559. * not have gotten here).
  1560. * token_id (i)
  1561. * This is the ID of the token which the release confirm is for.
  1562. * It is possible to have more than one outstanding release request,
  1563. * so this parameter tells the user application which request has been
  1564. * satisfied by this confirm.
  1565. * token_status (i)
  1566. * This is the status of the token at the time the Top Provider
  1567. * serviced the release request. This will be NOT_IN_USE or
  1568. * OTHER_INHIBITED if the release request was successful. It will be
  1569. * something else if not (see "mcatmcs.h" for a list of possible token
  1570. * status values).
  1571. *
  1572. * Return Value:
  1573. * None.
  1574. *
  1575. * Side Effects:
  1576. * None.
  1577. *
  1578. * Caveats:
  1579. * None.
  1580. */
  1581. /*
  1582. * Void TokenTestConfirm (
  1583. * PCommandTarget originator,
  1584. * UserID uidInitiator,
  1585. * TokenID token_id,
  1586. * TokenStatus token_status)
  1587. *
  1588. * Functional Description:
  1589. * This command is issued by the domain object in response to a previous
  1590. * token test request.
  1591. *
  1592. * A TOKEN_TEST_CONFIRM is issued to the user application.
  1593. *
  1594. * Formal Parameters:
  1595. * originator (i)
  1596. * This identifies the CommandTarget from which the command came (which
  1597. * should be the domain object).
  1598. * uidInitiator (i)
  1599. * This is the user ID of the user that made the test request. This
  1600. * will be the same as the local user ID (or else this command would
  1601. * not have gotten here).
  1602. * token_id (i)
  1603. * This is the ID of the token which the test confirm is for.
  1604. * It is possible to have more than one outstanding test request,
  1605. * so this parameter tells the user application which request has been
  1606. * satisfied by this confirm.
  1607. * token_status (i)
  1608. * This is the status of the token at the time the Top Provider
  1609. * serviced the test request (see "mcatmcs.h" for a list of possible
  1610. * token status values).
  1611. *
  1612. * Return Value:
  1613. * None.
  1614. *
  1615. * Side Effects:
  1616. * None.
  1617. *
  1618. * Caveats:
  1619. * None.
  1620. */
  1621. /*
  1622. * Void MergeDomainIndication (
  1623. * PCommandTarget originator,
  1624. * MergeStatus merge_status)
  1625. *
  1626. * Functional Description:
  1627. * This command is issued by a domain when it begins a merge operation.
  1628. * It is issued again when the merge operation is complete.
  1629. *
  1630. * A MERGE_DOMAIN_INDICATION is issued to the user application.
  1631. *
  1632. * Formal Parameters:
  1633. * originator (i)
  1634. * This identifies the CommandTarget from which the command came (which
  1635. * should be the domain object).
  1636. * merge_status (i)
  1637. * This is the current merge status. It will indicate either that the
  1638. * merge operation is in progress, or that it is complete.
  1639. *
  1640. * Return Value:
  1641. * None.
  1642. *
  1643. * Side Effects:
  1644. * None.
  1645. *
  1646. * Caveats:
  1647. * None.
  1648. */
  1649. /*
  1650. * Void FlushMessageQueue (
  1651. * Void)
  1652. *
  1653. * Functional Description:
  1654. * This function is periodically called by the controller to allocate a
  1655. * time slice to the user object. It is during this time slice that this
  1656. * object will issue its queued messages to the user application.
  1657. *
  1658. * Formal Parameters:
  1659. * None.
  1660. *
  1661. * Return Value:
  1662. * None.
  1663. *
  1664. * Side Effects:
  1665. * None.
  1666. *
  1667. * Caveats:
  1668. * None.
  1669. */
  1670. #endif
  1671.