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.

92 lines
4.5 KiB

  1. #ifndef _IBODYOPT_H
  2. #define _IBODYOPT_H
  3. #include <unknwn.h>
  4. /*
  5. * IBodyOptions
  6. *
  7. * this interface is implemented by clients of IBodyObj. It is used to provide instance-specific options to
  8. * the body. Thus the body does not need to know about internal Athena options. They can be provided by the client
  9. * this will ease moving the body object out into an activeX control at some later date, reducing dependancy on the body.
  10. * also the body doesn't need to know the difference between a news message and mail message who have different settings
  11. *
  12. * The RootStream builder will call back into the body options to ask for various options as it is building the HTML
  13. * only the host knows what mode the UI is in and sets the options accordingly.
  14. *
  15. * NB: implementors, must implement all of the members.
  16. */
  17. enum
  18. {
  19. BOPTF_COMPOSEFONT = 0x00000001,
  20. BOPTF_QUOTECHAR = 0x00000002,
  21. BOPTF_REPLYTICKCOLOR = 0x00000004
  22. };
  23. typedef struct BODYOPTINFO_tag
  24. {
  25. DWORD dwMask;
  26. DWORD dwReplyTickColor;
  27. TCHAR rgchComposeFont[LF_FACESIZE + 50];
  28. TCHAR chQuote;
  29. } BODYOPTINFO, *LPBODYOPTINFO;
  30. interface IBodyOptions : public IUnknown
  31. {
  32. public:
  33. virtual HRESULT STDMETHODCALLTYPE SignatureEnabled(BOOL fAuto) PURE;
  34. // pdwSigOptions == SIGOPT_ from rootstm.h
  35. virtual HRESULT STDMETHODCALLTYPE GetSignature(LPCSTR szSigID, LPDWORD pdwSigOptions, BSTR *pbstr) PURE;
  36. virtual HRESULT STDMETHODCALLTYPE GetMarkAsReadTime(LPDWORD pdwSecs) PURE;
  37. virtual HRESULT STDMETHODCALLTYPE GetFlags(LPDWORD pdwFlags) PURE;
  38. virtual HRESULT STDMETHODCALLTYPE GetInfo(BODYOPTINFO *pBOI) PURE;
  39. virtual HRESULT STDMETHODCALLTYPE GetAccount(IImnAccount **ppAcct) PURE;
  40. };
  41. // IID_IBodyOptions:: {9D39DE30-4E3D-11d0-A5A5-00C04FD61319}
  42. DEFINE_GUID(IID_IBodyOptions, 0x9d39de30, 0x4e3d, 0x11d0, 0xa5, 0xa5, 0x0, 0xc0, 0x4f, 0xd6, 0x13, 0x19);
  43. enum // Flags for HrGetFlags
  44. {
  45. BOPT_INCLUDEMSG = 0x00000001, // include the message when building the rootstream
  46. BOPT_HTML = 0x00000002, // set if HTML is enabled
  47. BOPT_AUTOINLINE = 0x00000004, // set if images can be auto-inlined
  48. BOPT_SENDIMAGES = 0x00000008, // set if images to packaged as MTHML at sendtime
  49. BOPT_AUTOTEXT = 0x00000010, // set for compose notes, if some form of autotext needs to be inserted at the caret
  50. BOPT_NOFONTTAG = 0x00000020, // set if we don't want compose font tags emitted, ie. use the stationery default
  51. BOPT_BLOCKQUOTE = 0x00000040, // block quote the text after inserting it.
  52. BOPT_SENDEXTERNALS = 0x00000080, // set is external URL are to be packed
  53. BOPT_SPELLINGOREORIGINAL = 0x00000100, // set if ignore original text in reply&forward.
  54. BOPT_SECURITYUIENABLED = 0x00000200, // set if message should use security UI if message is secure
  55. BOPT_FROMSTORE = 0x00000400, // set if the message is from the store
  56. BOPT_USEREPLYHEADER = 0x00000800, // set if should use a reply header
  57. BOPT_MAIL = 0x00001000, // set if body is mail (instead of news)
  58. BOPT_REPLYORFORWARD = 0x00002000, // set if action is replay or forward
  59. BOPT_MULTI_MSGS_SELECTED = 0x00004000, // set if there are more than one messages selected
  60. BOPT_UNREAD = 0x00008000, // set if the msg is not read as of yet
  61. BOPT_FROM_NOTE = 0x00010000, // set if need to mark immediate (as is the case with the note)
  62. BOPT_SIGNED = 0x00020000, // set if the message is signed
  63. };
  64. enum // flags for keeping track of the header type
  65. {
  66. HDRSTYLE_NONE=0, // no reply header
  67. HDRSTYLE_NEWS, // news-style reply header: "On <date>, <author> wrote:"
  68. HDRSTYLE_MAIL // MSMail-style reply header
  69. };
  70. enum // flags for pdwSigOptions in HrGetSignature
  71. {
  72. SIGOPT_PLAIN = 0x00000000, // signature is plain-text, needs conversion.
  73. SIGOPT_TOP = 0x00000001, // signature at the top of the document (default)
  74. SIGOPT_PREFIX = 0x00000002, // use signature prefix ("-- ") only a std for news
  75. SIGOPT_BOTTOM = 0x00000004, // signature at the bottom of document
  76. SIGOPT_CLOSING = 0x00000008, // news messages, close themselves with a '-----' at the end
  77. SIGOPT_HTML = 0x00000010 // signature is in HTML already
  78. };
  79. #endif //_IBODYOPT_H