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.

190 lines
5.0 KiB

  1. //+------------------------------------------------------------
  2. //
  3. // Copyright (C) 1998, Microsoft Corporation
  4. //
  5. // File: icatitemattr.h
  6. //
  7. // Contents: EMailIDLdapStore implementation of ICategorizerItemAttributes
  8. //
  9. // Classes:
  10. // CLdapResultWrap
  11. // CICategorizerItemAttributesIMP
  12. //
  13. // Functions:
  14. //
  15. // History:
  16. // jstamerj 1998/07/01 13:20:21: Created.
  17. //
  18. //-------------------------------------------------------------
  19. #ifndef _ICATITEMATTR_H_
  20. #define _ICATITEMATTR_H_
  21. #include <windows.h>
  22. #include <winldap.h>
  23. #include "smtpevent.h"
  24. #include <catdefs.h>
  25. #include <ldapconn.h>
  26. //
  27. // The guid indicating this ICategorizerItemAttributes was generated
  28. // by the one true categorizer (not some sink)
  29. //
  30. CatDebugClass(CLdapResultWrap)
  31. {
  32. public:
  33. CLdapResultWrap(
  34. ISMTPServerEx *pISMTPServerEx,
  35. CPLDAPWrap *pLDAPWrap,
  36. PLDAPMessage pMessage);
  37. LONG AddRef();
  38. LONG Release();
  39. ISMTPServerEx *GetISMTPServerEx()
  40. {
  41. return m_pISMTPServerEx;
  42. }
  43. private:
  44. ~CLdapResultWrap();
  45. LONG m_lRefCount;
  46. CPLDAPWrap *m_pCPLDAPWrap;
  47. PLDAPMessage m_pLDAPMessage;
  48. ISMTPServerEx *m_pISMTPServerEx;
  49. };
  50. // {283430CA-1850-11d2-9E03-00C04FA322BA}
  51. static const GUID GUID_NT5CAT =
  52. { 0x283430ca, 0x1850, 0x11d2, { 0x9e, 0x3, 0x0, 0xc0, 0x4f, 0xa3, 0x22, 0xba } };
  53. #define CICATEGORIZERITEMATTRIBUTESIMP_SIGNATURE (DWORD)'ICIA'
  54. #define CICATEGORIZERITEMATTRIBUTESIMP_SIGNATURE_INVALID (DWORD)'XCIA'
  55. CatDebugClass(CICategorizerItemAttributesIMP),
  56. public ICategorizerItemAttributes,
  57. public ICategorizerItemRawAttributes,
  58. public ICategorizerUTF8Attributes
  59. {
  60. public:
  61. //IUnknown
  62. STDMETHOD (QueryInterface) (REFIID iid, LPVOID *ppv);
  63. STDMETHOD_(ULONG, AddRef) ();
  64. STDMETHOD_(ULONG, Release) ();
  65. public:
  66. //ICategorizerItemAttributes
  67. STDMETHOD (BeginAttributeEnumeration) (
  68. IN LPCSTR pszAttributeName,
  69. IN PATTRIBUTE_ENUMERATOR penumerator);
  70. STDMETHOD (GetNextAttributeValue) (
  71. IN PATTRIBUTE_ENUMERATOR penumerator,
  72. OUT LPSTR *ppszAttributeValue);
  73. STDMETHOD (RewindAttributeEnumeration) (
  74. IN PATTRIBUTE_ENUMERATOR penumerator);
  75. STDMETHOD (EndAttributeEnumeration) (
  76. IN PATTRIBUTE_ENUMERATOR penumerator);
  77. STDMETHOD (BeginAttributeNameEnumeration) (
  78. IN PATTRIBUTE_ENUMERATOR penumerator);
  79. STDMETHOD (GetNextAttributeName) (
  80. IN PATTRIBUTE_ENUMERATOR penumerator,
  81. OUT LPSTR *ppszAttributeName);
  82. STDMETHOD (EndAttributeNameEnumeration) (
  83. IN PATTRIBUTE_ENUMERATOR penumerator);
  84. STDMETHOD_(GUID, GetTransportSinkID) ()
  85. {
  86. return GUID_NT5CAT;
  87. }
  88. STDMETHOD (AggregateAttributes) (
  89. IN ICategorizerItemAttributes *pICatItemAttributes);
  90. STDMETHOD (GetAllAttributeValues) (
  91. IN LPCSTR pszAttributeName,
  92. IN PATTRIBUTE_ENUMERATOR penumerator,
  93. IN LPSTR **prgpszAttributeValues);
  94. STDMETHOD (ReleaseAllAttributeValues) (
  95. IN PATTRIBUTE_ENUMERATOR penumerator);
  96. STDMETHOD (CountAttributeValues) (
  97. IN PATTRIBUTE_ENUMERATOR penumerator,
  98. OUT DWORD *pdwCount);
  99. public:
  100. //ICategorizerItemRawAttributes
  101. STDMETHOD (BeginRawAttributeEnumeration) (
  102. IN LPCSTR pszAttributeName,
  103. IN PATTRIBUTE_ENUMERATOR penumerator);
  104. STDMETHOD (GetNextRawAttributeValue) (
  105. IN PATTRIBUTE_ENUMERATOR penumerator,
  106. OUT PDWORD pdwcb,
  107. OUT LPVOID *pvAttributeValue);
  108. STDMETHOD (RewindRawAttributeEnumeration) (
  109. IN PATTRIBUTE_ENUMERATOR penumerator);
  110. STDMETHOD (EndRawAttributeEnumeration) (
  111. IN PATTRIBUTE_ENUMERATOR penumerator);
  112. STDMETHOD (CountRawAttributeValues) (
  113. IN PATTRIBUTE_ENUMERATOR penumerator,
  114. OUT DWORD *pdwCount);
  115. public:
  116. //ICategorizerUTF8Attributes
  117. STDMETHOD (BeginUTF8AttributeEnumeration) (
  118. IN LPCSTR pszAttributeName,
  119. IN PATTRIBUTE_ENUMERATOR penumerator);
  120. STDMETHOD (GetNextUTF8AttributeValue) (
  121. IN PATTRIBUTE_ENUMERATOR penumerator,
  122. OUT LPSTR *ppszAttributeValue);
  123. STDMETHOD (RewindUTF8AttributeEnumeration) (
  124. IN PATTRIBUTE_ENUMERATOR penumerator);
  125. STDMETHOD (EndUTF8AttributeEnumeration) (
  126. IN PATTRIBUTE_ENUMERATOR penumerator);
  127. STDMETHOD (CountUTF8AttributeValues) (
  128. IN PATTRIBUTE_ENUMERATOR penumerator,
  129. OUT DWORD *pdwCount);
  130. public:
  131. ISMTPServerEx *GetISMTPServerEx()
  132. {
  133. return m_pResultWrap->GetISMTPServerEx();
  134. }
  135. private:
  136. CICategorizerItemAttributesIMP(
  137. PLDAP pldap,
  138. PLDAPMessage pldapmessage,
  139. CLdapResultWrap *pResultWrap);
  140. ~CICategorizerItemAttributesIMP();
  141. DWORD m_dwSignature;
  142. ULONG m_cRef;
  143. PLDAP m_pldap;
  144. PLDAPMessage m_pldapmessage;
  145. CLdapResultWrap * m_pResultWrap;
  146. friend class CLdapConnection;
  147. };
  148. #endif //_ICATITEMATTR_H_