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.

83 lines
3.1 KiB

  1. #ifndef __MCS_ATTACHMENT_H__
  2. #define __MCS_ATTACHMENT_H__
  3. typedef enum
  4. {
  5. USER_ATTACHMENT, // local attachment
  6. CONNECT_ATTACHMENT // remote attachment
  7. }
  8. ATTACHMENT_TYPE;
  9. class CAttachmentList : public CList
  10. {
  11. DEFINE_CLIST(CAttachmentList, CAttachment*)
  12. PUser IterateUser(void);
  13. PConnection IterateConn(void);
  14. BOOL FindUser(PUser pUser) { return Find((CAttachment *) pUser); }
  15. BOOL FindConn(PConnection pConn) { return Find((CAttachment *) pConn); }
  16. BOOL AppendUser(PUser pUser) { return Append((CAttachment *) pUser); }
  17. BOOL AppendConn(PConnection pConn) { return Append((CAttachment *) pConn); }
  18. };
  19. class CAttachmentQueue : public CQueue
  20. {
  21. DEFINE_CQUEUE(CAttachmentQueue, CAttachment*)
  22. PUser IterateUser(void);
  23. PConnection IterateConn(void);
  24. BOOL FindUser(PUser pUser) { return Find((CAttachment *) pUser); }
  25. BOOL FindConn(PConnection pConn) { return Find((CAttachment *) pConn); }
  26. BOOL AppendUser(PUser pUser) { return Append((CAttachment *) pUser); }
  27. BOOL AppendConn(PConnection pConn) { return Append((CAttachment *) pConn); }
  28. };
  29. class CAttachment
  30. {
  31. public:
  32. CAttachment(ATTACHMENT_TYPE eAttmntType) : m_eAttmntType(eAttmntType) { }
  33. // ~CAttachment(void) { }
  34. ATTACHMENT_TYPE GetAttachmentType(void) { return m_eAttmntType; }
  35. BOOL IsUserAttachment(void) { return (USER_ATTACHMENT == m_eAttmntType); }
  36. BOOL IsConnAttachment(void) { return (CONNECT_ATTACHMENT == m_eAttmntType); }
  37. virtual void PlumbDomainIndication(ULONG height_limit) = 0;
  38. virtual void PurgeChannelsIndication(CUidList *, CChannelIDList *) = 0;
  39. virtual void PurgeTokensIndication(PDomain, CTokenIDList *) = 0;
  40. virtual void DisconnectProviderUltimatum(Reason) = 0;
  41. virtual void AttachUserConfirm(Result, UserID uidInitiator) = 0;
  42. virtual void DetachUserIndication(Reason, CUidList *) = 0;
  43. virtual void ChannelJoinConfirm(Result, UserID uidInitiator, ChannelID requested_id, ChannelID) = 0;
  44. virtual void ChannelConveneConfirm(Result, UserID uidInitiator, ChannelID) = 0;
  45. virtual void ChannelDisbandIndication(ChannelID) = 0;
  46. virtual void ChannelAdmitIndication(UserID uidInitiator, ChannelID, CUidList *) = 0;
  47. virtual void ChannelExpelIndication(ChannelID, CUidList *) = 0;
  48. virtual void SendDataIndication(UINT message_type, PDataPacket data_packet) = 0;
  49. virtual void TokenGrabConfirm(Result, UserID uidInitiator, TokenID, TokenStatus) = 0;
  50. virtual void TokenInhibitConfirm(Result, UserID uidInitiator, TokenID, TokenStatus) = 0;
  51. virtual void TokenGiveIndication(PTokenGiveRecord) = 0;
  52. virtual void TokenGiveConfirm(Result, UserID uidInitiator, TokenID, TokenStatus) = 0;
  53. virtual void TokenReleaseConfirm(Result, UserID uidInitiator, TokenID, TokenStatus) = 0;
  54. virtual void TokenPleaseIndication(UserID uidInitiator, TokenID) = 0;
  55. virtual void TokenTestConfirm(UserID uidInitiator, TokenID, TokenStatus) = 0;
  56. virtual void MergeDomainIndication(MergeStatus) = 0;
  57. private:
  58. ATTACHMENT_TYPE m_eAttmntType;
  59. };
  60. #endif // __MCS_ATTACHMENT_H__