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.

231 lines
7.1 KiB

  1. #ifndef __IMSGSITE_H__
  2. #define __IMSGSITE_H__
  3. interface IListSelector;
  4. interface IHeaderSite;
  5. // Message Flags
  6. enum {
  7. OEMF_REPLIED = 0x00000001,
  8. OEMF_FORWARDED = 0x00000002,
  9. OEMF_FLAGGED = 0x00000004,
  10. OEMF_DISABLE_SECUI = 0x00000008,
  11. };
  12. // Message Status Flags
  13. enum {
  14. // Flags saying what functions are available 0x00000XXX
  15. OEMSF_CAN_DELETE = 0x00000001,
  16. OEMSF_CAN_PREV = 0x00000002,
  17. OEMSF_CAN_NEXT = 0x00000004,
  18. OEMSF_CAN_COPY = 0x00000008,
  19. OEMSF_CAN_MOVE = 0x00000010,
  20. OEMSF_CAN_SAVE = 0x00000020,
  21. OEMSF_CAN_MARK = 0x00000040,
  22. // Flags from message and Folder 0x00XXX000
  23. OEMSF_SEC_UI_ENABLED = 0x00001000,
  24. OEMSF_THREADING_ENABLED = 0x00002000,
  25. OEMSF_UNSENT = 0x00004000,
  26. OEMSF_BASEISNEWS = 0x00008000,
  27. OEMSF_RULESNOTENABLED = 0x00010000,
  28. OEMSF_UNREAD = 0x00020000,
  29. //Flags for return receipts
  30. OEMSF_MDN_REQUEST = 0x00040000,
  31. OEMSF_SIGNED = 0x00080000,
  32. // Origin flags 0xXX000000
  33. OEMSF_FROM_STORE = 0x01000000,
  34. OEMSF_FROM_FAT = 0x02000000,
  35. OEMSF_FROM_MSG = 0x04000000,
  36. OEMSF_VIRGIN = 0x08000000,
  37. };
  38. // Flags used when calling DoNextPrev
  39. enum {
  40. // These flags will be ignored if doing previous
  41. OENF_UNREAD = 0x00000001, // get next unread
  42. OENF_THREAD = 0x00000002, // get next thread
  43. // Don't know if need these or want to use them. Keep them here for now.
  44. OENF_SKIPMAIL = 0x00000004, // skip over mail messages
  45. OENF_SKIPNEWS = 0x00000008, // skip over news messages
  46. };
  47. // Notifications used with Notify
  48. enum {
  49. OEMSN_UPDATE_PREVIEW = 0x00000001,
  50. OEMSN_TOGGLE_READRCPT_REQ,
  51. OEMSN_PROCESS_READRCPT_REQ,
  52. OEMSN_PROCESS_RCPT_IF_NOT_SIGNED,
  53. };
  54. // Flags used when saving message
  55. enum {
  56. OESF_UNSENT = 0x00000001,
  57. OESF_READ = 0x00000002,
  58. OESF_SAVE_IN_ORIG_FOLDER= 0x00000004,
  59. OESF_FORCE_LOCAL_DRAFT = 0x00000008,
  60. };
  61. // Flags when getting message
  62. enum {
  63. OEGM_ORIGINAL = 0x00000001,
  64. OEGM_AS_ATTACH = 0x00000002,
  65. };
  66. // Message Site init type
  67. enum {
  68. OEMSIT_MSG_TABLE = 1,
  69. OEMSIT_STORE,
  70. OEMSIT_FAT,
  71. OEMSIT_MSG,
  72. OEMSIT_VIRGIN,
  73. };
  74. typedef struct tagINIT_BY_STORE {
  75. MESSAGEID msgID;
  76. } INIT_BY_STORE;
  77. typedef struct tagINIT_BY_TABLE {
  78. IMessageTable *pMsgTable;
  79. IListSelector *pListSelect;
  80. ROWINDEX rowIndex;
  81. } INIT_BY_TABLE;
  82. typedef struct tagINIT_MSGSITE_STRUCT {
  83. DWORD dwInitType;
  84. FOLDERID folderID;
  85. union
  86. {
  87. INIT_BY_TABLE initTable;
  88. INIT_BY_STORE initStore;
  89. LPWSTR pwszFile;
  90. IMimeMessage *pMsg;
  91. };
  92. } INIT_MSGSITE_STRUCT, *LPINIT_MSGSITE_STRUCT;
  93. interface IOEMsgSite : public IUnknown
  94. {
  95. public:
  96. virtual HRESULT STDMETHODCALLTYPE Init(
  97. /* [in] */ INIT_MSGSITE_STRUCT *pInitStruct) PURE;
  98. virtual HRESULT STDMETHODCALLTYPE GetStatusFlags(
  99. /* [out] */ DWORD *dwStatusFlags) PURE;
  100. virtual HRESULT STDMETHODCALLTYPE GetFolderID(
  101. /* [out] */ FOLDERID *folderID) PURE;
  102. virtual HRESULT STDMETHODCALLTYPE Delete(
  103. /* [in] */ DELETEMESSAGEFLAGS dwFlags) PURE;
  104. virtual HRESULT STDMETHODCALLTYPE DoNextPrev(
  105. /* [in] */ BOOL fNext,
  106. /* [in] */ DWORD dwFlags) PURE;
  107. virtual HRESULT STDMETHODCALLTYPE DoCopyMoveToFolder(
  108. /* [in] */ BOOL fCopy,
  109. /* [in] */ IMimeMessage *pMsg,
  110. /* [in] */ BOOL fUnSent) PURE;
  111. virtual HRESULT STDMETHODCALLTYPE Save(
  112. /* [in] */ IMimeMessage *pMsg,
  113. /* [in] */ DWORD dwFlags,
  114. /* [in] */ IImnAccount *pAcct) PURE;
  115. virtual HRESULT STDMETHODCALLTYPE SendToOutbox(
  116. /* [in] */ IMimeMessage *pMsg,
  117. /* [in] */ BOOL fSendImmediate
  118. #ifdef SMIME_V3
  119. , /* [in] */ IHeaderSite *pHeaderSite
  120. #endif // SMIME_V3
  121. ) PURE;
  122. virtual HRESULT STDMETHODCALLTYPE MarkMessage(
  123. /* [in] */ MARK_TYPE dwType,
  124. /* [in] */ APPLYCHILDRENTYPE dwApplyType) PURE;
  125. virtual HRESULT STDMETHODCALLTYPE GetMessageFlags(
  126. /* [out] */ MESSAGEFLAGS *pdwFlags) PURE;
  127. virtual HRESULT STDMETHODCALLTYPE GetDefaultAccount(
  128. /* [in] */ ACCTTYPE acctType,
  129. /* [out] */ IImnAccount **ppAcct) PURE;
  130. virtual HRESULT STDMETHODCALLTYPE GetMessage(
  131. /* [out] */ IMimeMessage **ppMsg,
  132. /* [out] */ BOOL *fJustHeader,
  133. /* [in] */ DWORD dwMessageFlags,
  134. /* [out] */ HRESULT *phr) PURE;
  135. virtual HRESULT STDMETHODCALLTYPE Close(void) PURE;
  136. virtual HRESULT STDMETHODCALLTYPE SetStoreCallback(
  137. /* [in] */ IStoreCallback *pStoreCB) PURE;
  138. virtual HRESULT STDMETHODCALLTYPE GetLocation(
  139. /* [out] */ LPWSTR rgwchLocation,
  140. DWORD cchSize) PURE;
  141. virtual HRESULT STDMETHODCALLTYPE SwitchLanguage(
  142. /* [in] */ HCHARSET hOldCharset,
  143. /* [in] */ HCHARSET hNewCharset) PURE;
  144. // ptyNewOp will be either SOT_INVALID or
  145. // the new final state for the OnComplete in the note
  146. virtual HRESULT STDMETHODCALLTYPE OnComplete(
  147. /* [in] */ STOREOPERATIONTYPE tyOperation,
  148. /* [in] */ HRESULT hrComplete,
  149. /* [out] */ STOREOPERATIONTYPE *ptyNewOp) PURE;
  150. virtual HRESULT STDMETHODCALLTYPE UpdateCallbackInfo(
  151. /* [in] */ LPSTOREOPERATIONINFO pOpInfo) PURE;
  152. virtual HRESULT STDMETHODCALLTYPE Notify(
  153. /* [in] */ DWORD dwNotifyID) PURE;
  154. };
  155. enum {
  156. OENA_READ = 0,
  157. OENA_COMPOSE,
  158. OENA_REPLYTOAUTHOR,
  159. OENA_REPLYTONEWSGROUP,
  160. OENA_REPLYALL,
  161. OENA_FORWARD,
  162. OENA_FORWARDBYATTACH,
  163. OENA_WEBPAGE,
  164. OENA_STATIONERY,
  165. OENA_MAX,
  166. };
  167. // Note Creation Flags
  168. enum{
  169. // Used to say creating a news note. Will now be used to
  170. // say what is the default set of wells to create in header.
  171. // This will also be used to say that this is a newsnote for now
  172. OENCF_NEWSFIRST = 0x00000001,
  173. OENCF_NEWSONLY = 0x00000002,
  174. OENCF_SENDIMMEDIATE = 0x00000004,
  175. OENCF_NOSTATIONERY = 0x00000008,
  176. OENCF_NOSIGNATURE = 0x00000010,
  177. OENCF_MODAL = 0x00000020,
  178. OENCF_USESTATIONERYFONT = 0x00000040,
  179. };
  180. interface IOENote : public IUnknown {
  181. // Init will automatically load message from pMsgSite
  182. STDMETHOD(Init) (DWORD dwAction, DWORD dwCreateFlags, RECT *prc, HWND hwnd,
  183. INIT_MSGSITE_STRUCT *pInitStruct, IOEMsgSite *pMsgSite,
  184. IUnknown *punkPump) PURE;
  185. STDMETHOD(Show) (void) PURE;
  186. virtual HRESULT(ToggleToolbar) (void) PURE;
  187. };
  188. #endif