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.

294 lines
7.3 KiB

  1. //+------------------------------------------------------------
  2. //
  3. // Copyright (C) 1998, Microsoft Corporation
  4. //
  5. // File: icatitem.h
  6. //
  7. // Contents: Implementation of ICategorizerItem
  8. //
  9. // Classes: CCategorizerItemIMP
  10. //
  11. // Functions:
  12. //
  13. // History:
  14. // jstamerj 980515 12:46:36: Created.
  15. //
  16. //-------------------------------------------------------------
  17. #ifndef __ICATITEM_H__
  18. #define __ICATITEM_H__
  19. #include <windows.h>
  20. #include <dbgtrace.h>
  21. #include <smtpevent.h>
  22. #include "icatprops.h"
  23. #include <baseobj.h>
  24. #define CICATEGORIZERITEMIMP_SIGNATURE (DWORD)'ICIM'
  25. #define CICATEGORIZERITEMIMP_SIGNATURE_FREE (DWORD)'XCIM'
  26. class CICategorizerItemIMP :
  27. public CICategorizerPropertiesIMP,
  28. public CBaseObject,
  29. public ICategorizerItem
  30. {
  31. public:
  32. STDMETHOD (QueryInterface) (
  33. REFIID iid,
  34. LPVOID *ppv);
  35. STDMETHOD_(ULONG, AddRef) ()
  36. {
  37. return CBaseObject::AddRef();
  38. }
  39. STDMETHOD_(ULONG, Release) ()
  40. {
  41. return CBaseObject::Release();
  42. }
  43. //
  44. // We have multiple inheritence of GetStringA/etc happening -- the
  45. // pure virtual inheritence from ICategorizerItem and the
  46. // implemented inheritence from CICategorizerPropertiesIMP. Solve
  47. // this problem by defining wrappers here
  48. //
  49. public:
  50. //ICategorizerItem
  51. STDMETHOD (GetStringA) (
  52. DWORD dwPropId,
  53. DWORD cch,
  54. LPSTR pszValue)
  55. {
  56. return CICategorizerPropertiesIMP::GetStringA(
  57. dwPropId,
  58. cch,
  59. pszValue);
  60. }
  61. STDMETHOD (PutStringA) (
  62. DWORD dwPropId,
  63. LPSTR pszValue)
  64. {
  65. return CICategorizerPropertiesIMP::PutStringA(
  66. dwPropId,
  67. pszValue);
  68. }
  69. STDMETHOD (GetDWORD) (
  70. DWORD dwPropId,
  71. DWORD *pdwValue)
  72. {
  73. return CICategorizerPropertiesIMP::GetDWORD(
  74. dwPropId,
  75. pdwValue);
  76. }
  77. STDMETHOD (PutDWORD) (
  78. DWORD dwPropId,
  79. DWORD dwValue)
  80. {
  81. return CICategorizerPropertiesIMP::PutDWORD(
  82. dwPropId,
  83. dwValue);
  84. }
  85. STDMETHOD (GetHRESULT) (
  86. DWORD dwPropId,
  87. HRESULT *phrValue)
  88. {
  89. return CICategorizerPropertiesIMP::GetHRESULT(
  90. dwPropId,
  91. phrValue);
  92. }
  93. STDMETHOD (PutHRESULT) (
  94. DWORD dwPropId,
  95. HRESULT hrValue)
  96. {
  97. return CICategorizerPropertiesIMP::PutHRESULT(
  98. dwPropId,
  99. hrValue);
  100. }
  101. STDMETHOD (GetBool) (
  102. DWORD dwPropId,
  103. BOOL *pfValue)
  104. {
  105. return CICategorizerPropertiesIMP::GetBool(
  106. dwPropId,
  107. pfValue);
  108. }
  109. STDMETHOD (PutBool) (
  110. DWORD dwPropId,
  111. BOOL fValue)
  112. {
  113. return CICategorizerPropertiesIMP::PutBool(
  114. dwPropId,
  115. fValue);
  116. }
  117. STDMETHOD (GetPVoid) (
  118. DWORD dwPropId,
  119. PVOID *ppv)
  120. {
  121. return CICategorizerPropertiesIMP::GetPVoid(
  122. dwPropId,
  123. ppv);
  124. }
  125. STDMETHOD (PutPVoid) (
  126. DWORD dwPropId,
  127. PVOID pvValue)
  128. {
  129. return CICategorizerPropertiesIMP::PutPVoid(
  130. dwPropId,
  131. pvValue);
  132. }
  133. STDMETHOD (GetIUnknown) (
  134. DWORD dwPropId,
  135. IUnknown **ppUnknown)
  136. {
  137. return CICategorizerPropertiesIMP::GetIUnknown(
  138. dwPropId,
  139. ppUnknown);
  140. }
  141. STDMETHOD (PutIUnknown) (
  142. DWORD dwPropId,
  143. IUnknown *pUnknown)
  144. {
  145. return CICategorizerPropertiesIMP::PutIUnknown(
  146. dwPropId,
  147. pUnknown);
  148. }
  149. STDMETHOD (GetIMailMsgProperties) (
  150. DWORD dwPropId,
  151. IMailMsgProperties **ppIMailMsgProperties)
  152. {
  153. return CICategorizerPropertiesIMP::GetIMailMsgProperties(
  154. dwPropId,
  155. ppIMailMsgProperties);
  156. }
  157. STDMETHOD (PutIMailMsgProperties) (
  158. DWORD dwPropId,
  159. IMailMsgProperties *ppIMailMsgProperties)
  160. {
  161. return CICategorizerPropertiesIMP::PutIMailMsgProperties(
  162. dwPropId,
  163. ppIMailMsgProperties);
  164. }
  165. STDMETHOD (GetIMailMsgRecipientsAdd) (
  166. DWORD dwPropId,
  167. IMailMsgRecipientsAdd **ppIMsgRecipientsAdd)
  168. {
  169. return CICategorizerPropertiesIMP::GetIMailMsgRecipientsAdd(
  170. dwPropId,
  171. ppIMsgRecipientsAdd);
  172. }
  173. STDMETHOD (PutIMailMsgRecipientsAdd) (
  174. DWORD dwPropId,
  175. IMailMsgRecipientsAdd *pIMsgRecipientsAdd)
  176. {
  177. return CICategorizerPropertiesIMP::PutIMailMsgRecipientsAdd(
  178. dwPropId,
  179. pIMsgRecipientsAdd);
  180. }
  181. STDMETHOD (GetICategorizerItemAttributes) (
  182. DWORD dwPropId,
  183. ICategorizerItemAttributes **ppICategorizerItemAttributes)
  184. {
  185. return CICategorizerPropertiesIMP::GetICategorizerItemAttributes(
  186. dwPropId,
  187. ppICategorizerItemAttributes);
  188. }
  189. STDMETHOD (PutICategorizerItemAttributes) (
  190. DWORD dwPropId,
  191. ICategorizerItemAttributes *pICategorizerItemAttributes)
  192. {
  193. return CICategorizerPropertiesIMP::PutICategorizerItemAttributes(
  194. dwPropId,
  195. pICategorizerItemAttributes);
  196. }
  197. STDMETHOD (GetICategorizerListResolve) (
  198. DWORD dwPropId,
  199. ICategorizerListResolve **ppICategorizerListResolve)
  200. {
  201. return CICategorizerPropertiesIMP::GetICategorizerListResolve(
  202. dwPropId,
  203. ppICategorizerListResolve);
  204. }
  205. STDMETHOD (PutICategorizerListResolve) (
  206. DWORD dwPropId,
  207. ICategorizerListResolve *pICategorizerListResolve)
  208. {
  209. return CICategorizerPropertiesIMP::PutICategorizerListResolve(
  210. dwPropId,
  211. pICategorizerListResolve);
  212. }
  213. STDMETHOD (GetICategorizerMailMsgs) (
  214. DWORD dwPropId,
  215. ICategorizerMailMsgs **ppICategorizerMailMsgs)
  216. {
  217. return CICategorizerPropertiesIMP::GetICategorizerMailMsgs(
  218. dwPropId,
  219. ppICategorizerMailMsgs);
  220. }
  221. STDMETHOD (PutICategorizerMailMsgs) (
  222. DWORD dwPropId,
  223. ICategorizerMailMsgs *pICategorizerMailMsgs)
  224. {
  225. return CICategorizerPropertiesIMP::PutICategorizerMailMsgs(
  226. dwPropId,
  227. pICategorizerMailMsgs);
  228. }
  229. STDMETHOD (GetICategorizerItem) (
  230. DWORD dwPropId,
  231. ICategorizerItem **ppICategorizerItem)
  232. {
  233. return CICategorizerPropertiesIMP::GetICategorizerItem(
  234. dwPropId,
  235. ppICategorizerItem);
  236. }
  237. STDMETHOD (PutICategorizerItem) (
  238. DWORD dwPropId,
  239. ICategorizerItem *pICategorizerItem)
  240. {
  241. return CICategorizerPropertiesIMP::PutICategorizerItem(
  242. dwPropId,
  243. pICategorizerItem);
  244. }
  245. STDMETHOD (UnSetPropId) (
  246. DWORD dwPropId)
  247. {
  248. return CICategorizerPropertiesIMP::UnSetPropId(
  249. dwPropId);
  250. }
  251. private:
  252. CICategorizerItemIMP();
  253. virtual ~CICategorizerItemIMP();
  254. DWORD m_dwSignature;
  255. friend class CCatAddr;
  256. friend class CIMsgRecipListAddr;
  257. friend class CICategorizerListResolveIMP;
  258. friend class CICategorizerDLListResolveIMP;
  259. };
  260. #endif //__ICATITEM_H__