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.

116 lines
5.7 KiB

  1. ////////////////////////////////////////////////////////////////////////
  2. //
  3. // IMsgContainer
  4. //
  5. // Manages internet message headers
  6. //
  7. ////////////////////////////////////////////////////////////////////////
  8. #ifndef _INC_IMSGCONT_H
  9. #define _INC_IMSGCONT_H
  10. #include "columns.h"
  11. typedef struct tagFINDMSG FINDMSG;
  12. // from inc\storbase.h
  13. typedef DWORD MSGID;
  14. // Used for MarkThread()
  15. typedef enum {
  16. MARK_THD_NO_SUPERPARENT = 0x0001,
  17. MARK_THD_FOR_DL = 0x0002,
  18. MARK_THD_NO_DL = 0x0004,
  19. MARK_THD_AS_READ = 0x0008,
  20. MARK_THD_AS_UNREAD = 0x0010
  21. } MARKTHREADTYPE;
  22. // Used in RemoveHeaders() and by the view
  23. typedef enum {
  24. FILTER_NONE = 0x0001, // show all (cannot be used w/ other flags)
  25. FILTER_READ = 0x0002, // hide read messages
  26. FILTER_NOBODY = 0x0004, // hide messages without dl'd bodies
  27. FILTER_SHOWFILTERED = 0x0008, // display filtered messages
  28. FILTER_SHOWDELETED = 0x0010, // display deleted messages
  29. PRUNE_NONREPLIES = 0x0020, // hide threads that are not replies to sender
  30. } FILTERTYPE;
  31. // Generic flags for IMessageCont methods
  32. // use these if there is no specific set below
  33. #define IMC_BYMSGID 0x0000 // dwIndex is a msgid (DEFAULT)
  34. #define IMC_BYROW 0x0001 // dwIndex specifies a row
  35. #define IMC_COMMONFLAGS 0x0002 // the mask, state, dword, whatever is SCFS_ flags (otherwise ARF_ or MSG_)
  36. #define IMC_CONVERTARFTOMSG 0x0004
  37. // Used by HrGetNext
  38. #define GNM_NEXT 0x0000 // get next (DEFAULT)
  39. // 0x0001 reserved for IMC_BYROW
  40. // IMC_COMMONFLAGS not accepted
  41. #define GNM_PREV 0x0004 // get previous instead of next (can't be used with GNM_UNREAD or GNM_THREAD)
  42. #define GNM_UNREAD 0x0008 // get next unread (can't be used with GNM_PREV)
  43. #define GNM_THREAD 0x0010 // get next thread (can't be used with GNM_PREV)
  44. #define GNM_SKIPMAIL 0x0020 // skip over mail messages
  45. #define GNM_SKIPNEWS 0x0040 // skip over news messages
  46. #define GNM_SKIPUNSENT 0x0080 // skip unsent messages
  47. // Used by GetMsgBy
  48. #define GETMSG_SECURE (TRUE)
  49. #define GETMSG_INSECURE (FALSE)
  50. // State and mask flags for SetCachedFlags
  51. // NOTE: we list here only the flags that are easily convertable
  52. // between ARF_ and MSG_. Our flag situation is very annoying.
  53. #define SCFS_NOSECUI 0x0001
  54. #define SCFS_ALLFLAGS 0x0001 // do not use explicitly
  55. DECLARE_INTERFACE(IMsgContainer)
  56. {
  57. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  58. STDMETHOD_(ULONG, Release) (THIS) PURE;
  59. STDMETHOD(Advise) (THIS_ HWND hwndAdvise) PURE;
  60. STDMETHOD(CollapseBranch) (THIS_ DWORD dwRow, LPDWORD pdwCount) PURE;
  61. STDMETHOD(ExpandAllThreads) (THIS_ BOOL fExpand) PURE;
  62. STDMETHOD(ExpandBranch) (THIS_ DWORD dwRow, LPDWORD pdwCount) PURE;
  63. STDMETHOD_(ULONG, GetCount) (THIS) PURE;
  64. STDMETHOD(GetDisplayInfo) (THIS_ LV_DISPINFO *plvdi, COLUMN_ID idColumn) PURE;
  65. STDMETHOD_(int, GetIndex) (THIS_ DWORD dwMsgId, BOOL fForceUnthreadedSearch = FALSE) PURE;
  66. STDMETHOD_(BOOL, GetMsgId) (THIS_ DWORD dwRow, LPDWORD pdwMsgId) PURE;
  67. STDMETHOD(GetMsgByIndex) (THIS_ DWORD dwRow, LPMIMEMESSAGE *ppMsg, HWND hwnd, BOOL *pfCached, BOOL fDownload, BOOL fSecure) PURE;
  68. STDMETHOD(GetMsgByMsgId) (THIS_ MSGID msgid, LPMIMEMESSAGE *ppMsg, HWND hwnd, BOOL *pfCached, BOOL fDownload, BOOL fSecure) PURE;
  69. STDMETHOD(HrFindItem) (THIS_ LPCSTR szSearch, ULONG *puRow) PURE;
  70. STDMETHOD(HrGetNext) (THIS_ DWORD dwIndex, LPDWORD pdwMsgId, DWORD dwFlags) PURE;
  71. STDMETHOD_(BOOL, FFlagState) (THIS_ DWORD dwIndex, DWORD dwMask, DWORD dwFlags) PURE;
  72. STDMETHOD_(BOOL, IsCollapsedThread) (THIS_ DWORD dwRow) PURE;
  73. STDMETHOD_(BOOL, HasBody) (THIS_ DWORD dwRow) PURE;
  74. STDMETHOD_(BOOL, HasKids) (THIS_ DWORD dwRow) PURE;
  75. STDMETHOD_(BOOL, IsRowRead) (THIS_ DWORD dwRow) PURE;
  76. STDMETHOD_(BOOL, IsRowOrChildUnread) (THIS_ DWORD dwRow) PURE;
  77. STDMETHOD_(BOOL, IsRowFiltered) (THIS_ DWORD dwRow) PURE;
  78. STDMETHOD_(void, MarkAll) (THIS_ BOOL fRead) PURE;
  79. STDMETHOD_(void, MarkAllDL) (THIS_ BOOL fDL) PURE;
  80. STDMETHOD_(void, MarkSelected) (THIS_ HWND hwndList, MARKTHREADTYPE mtt) PURE;
  81. STDMETHOD_(void, MarkOne) (THIS_ BOOL fRead, DWORD dwMsgId) PURE;
  82. STDMETHOD_(void, MarkOneRow) (THIS_ BOOL fRead, DWORD dwRow) PURE;
  83. STDMETHOD_(void, MarkOneRowDL) (THIS_ BOOL fDL, DWORD dwRow) PURE;
  84. STDMETHOD(MarkThread) (THIS_ DWORD mtType, DWORD dwRow) PURE;
  85. STDMETHOD_(void, SetFilterState) (THIS_ DWORD dwFilterState) PURE;
  86. STDMETHOD_(void, SetViewWindow) (THIS_ HWND hwnd, BOOL fNoUI) PURE;
  87. STDMETHOD_(void, Sort) (THIS_ COLUMN_ID idSort, BOOL fReverse, BOOL fThread) PURE;
  88. STDMETHOD(Unadvise) (THIS_ HWND hwndAdvise) PURE;
  89. STDMETHOD(HrFindNext) (THIS_ FINDMSG *pfmsg, DWORD dwRow, BOOL fIgnoreFirst) PURE;
  90. STDMETHOD(CreateDragObject) (THIS_ HWND hwndList, DWORD *pdwEffectOk, IDataObject **ppDataObject) PURE;
  91. STDMETHOD(Delete) (THIS_ DWORD dwMsgId, BOOL fForce) PURE;
  92. STDMETHOD(SetCachedFlagsBy) (THIS_ DWORD dwIndex, DWORD dwState, DWORD dwStateMask, DWORD *pdwNewFlags, DWORD dwFlags) PURE;
  93. STDMETHOD(SetMsgViewLanguage) (THIS_ MSGID msgid, DWORD dwCodePage) PURE;
  94. STDMETHOD(GetMsgViewLanguage) (THIS_ MSGID msgid, DWORD *pdwCodePage) PURE;
  95. STDMETHOD_(void, SetUIMode) (THIS_ BOOL fUI) PURE;
  96. STDMETHOD_(int, GetItemParent) (THIS_ DWORD dwRow) PURE;
  97. STDMETHOD_(int, GetFirstChild) (THIS_ DWORD dwRow) PURE;
  98. STDMETHOD_(int, GetEmptyFolderString) (THIS) PURE;
  99. STDMETHOD_(BOOL, IsRowDeleted) (THIS_ DWORD dwRow) PURE;
  100. STDMETHOD_(WORD, GetRowHighlight) (THIS_ DWORD dwRow) PURE;
  101. STDMETHOD_(void, UpdateAdvises)(THIS_ DWORD dwMsgId) PURE;
  102. };
  103. #endif // _INC_IMSGCONT_H