Source code of Windows XP (NT5)
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.

187 lines
7.1 KiB

  1. /*
  2. * AWCPESUP . H
  3. *
  4. * Microsoft AtWork Fax for Windows
  5. * Copyright (C) 1993-1994, Microsoft Corporation
  6. *
  7. * Information in this document is subject to change without notice and does
  8. * not represent a commitment on the part of Microsoft Corporation.
  9. */
  10. /*
  11. * Constants
  12. */
  13. // Recipient properties
  14. #define CPE_RECIPIENT_NAME (0x80000001)
  15. #define CPE_RECIPIENT_TITLE (0x80000002)
  16. #define CPE_RECIPIENT_DEPARTMENT (0x80000003)
  17. #define CPE_RECIPIENT_OFFICE_LOCATION (0x80000004)
  18. #define CPE_RECIPIENT_COMPANY (0x80000005)
  19. #define CPE_RECIPIENT_STREET_ADDRESS (0x80000006)
  20. #define CPE_RECIPIENT_POST_OFFICE_BOX (0x80000007)
  21. #define CPE_RECIPIENT_LOCALITY (0x80000008)
  22. #define CPE_RECIPIENT_STATE_OR_PROVINCE (0x80000009)
  23. #define CPE_RECIPIENT_POSTAL_CODE (0x80000010)
  24. #define CPE_RECIPIENT_COUNTRY (0x80000011)
  25. #define CPE_RECIPIENT_HOME_PHONE (0x80000012)
  26. #define CPE_RECIPIENT_WORK_PHONE (0x80000013)
  27. #define CPE_RECIPIENT_FAX_PHONE (0x80000014)
  28. // Sender properties
  29. #define CPE_SENDER_NAME (0x08000001)
  30. #define CPE_SENDER_TITLE (0x08000002)
  31. #define CPE_SENDER_DEPARTMENT (0x08000003)
  32. #define CPE_SENDER_OFFICE_LOCATION (0x08000004)
  33. #define CPE_SENDER_COMPANY (0x08000005)
  34. #define CPE_SENDER_ADDRESS (0x08000006)
  35. #define CPE_SENDER_HOME_PHONE (0x08000007)
  36. #define CPE_SENDER_WORK_PHONE (0x08000008)
  37. #define CPE_SENDER_FAX_PHONE (0x08000009)
  38. #define CPE_RECIPIENT_TO_LIST (0x0800000A)
  39. #define CPE_RECIPIENT_CC_LIST (0x0800000B)
  40. // Message related properties
  41. #define CPE_MESSAGE_SUBJECT (0x00800001)
  42. #define CPE_MESSAGE_SUBMISSION_TIME (0x00800002)
  43. #define CPE_MESSAGE_BILLING_CODE (0x00800003)
  44. // Miscellanous message properties
  45. #define CPE_MISC_ATTACHMENT_NAME_LIST (0x00800004)// ; delimeted list of attachment names
  46. #define CPE_MISC_USER_DEFINED (0x00800005)// lpvBuf contains LPSPropValue
  47. // Count type properties
  48. #define CPE_COUNT_RECIPIENTS (0x00800006)// Total count of recipients
  49. #define CPE_COUNT_ATTACHMENTS (0x00800007)// Total number of attachments
  50. #define CPE_COUNT_PAGES (0x00800008)// total number of pages
  51. // Derived property so CPE can get at PR_BODY data
  52. // using the tempfile copy of PR_BODY
  53. #define CPE_MESSAGE_BODY_FILENAME (0x00800009)// Temp filename for PR_BODY text
  54. // Configuration properties
  55. #define CPE_CONFIG_CPE_TEMPLATE (0x00080004)
  56. #define CPE_CONFIG_PRINT_DEVICE (0x00080005)// The device to print to
  57. // Finish modes
  58. #define CPE_FINISH_PAGE (0x00008001) //This is used when the
  59. //CPE finishes a page with out an error
  60. #define CPE_FINISH_ERROR (0x00008002) // This is used when the
  61. //CPE encounters an error.
  62. //This causes the process to end and
  63. //no further processing should take place
  64. // Finish return values
  65. #define CPE_NEXT_PAGE (0x00000001)
  66. #define CPE_DONE (0x80000001)
  67. #define CPE_ERROR (0x80000002)
  68. //Version info
  69. #define AWCPESUPPORT_VERSION (0x00010000)
  70. /*
  71. * CPESupport Interface
  72. */
  73. typedef ULONG FAR *LPULONG;
  74. #undef INTERFACE
  75. #define INTERFACE IAWCPESupport
  76. DECLARE_INTERFACE_(IAWCPESupport, IUnknown)
  77. {
  78. // *** IUnknown methods ***
  79. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  80. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  81. STDMETHOD_(ULONG,Release) (THIS) PURE;
  82. // *** ICPESupport methods ***
  83. STDMETHOD(GetVersion) (THIS_ LPULONG lpulVer) PURE;
  84. /* This function is used for version checking,
  85. it is currently not implemented */
  86. STDMETHOD(GetProp) (THIS_ ULONG ulProp, LPULONG lpulBufSize, LPVOID lpvBuf) PURE;
  87. /* This function is used to retrieve properties for the Cover Page.
  88. ulProp is one of the property constants above.
  89. lpulBufSize is a pointer to the size of the buffer pointed to by lpvBuf.
  90. lpvBuf is a buffer where the property value is returned. If this value is NULL,
  91. the size needed to hold the property is returned in lpulBufSize.
  92. */
  93. STDMETHOD(SetProp) (THIS_ ULONG ulProp, LPVOID lpvBuf) PURE;
  94. /* This function is used to set properties On the message.
  95. ulProp is one of the property constants above.
  96. lpvBuf is the buffer where the property value is.
  97. */
  98. STDMETHOD(GetCount) (THIS_ ULONG ulCntProp, LPULONG lpulCount) PURE;
  99. /* This function is used to retrieve the count of certain attributes, such
  100. as thee number of recipients.
  101. ulCntProp is one of the Count properties listed above.
  102. lpulCount is where the count value is returned.
  103. */
  104. STDMETHOD(SetCount) (THIS_ ULONG ulCntProp, LPULONG lpulCount) PURE;
  105. /* This function is used to set the count of certain attributes, such
  106. as the number of recipients.
  107. ulCntProp is one of the Count properties listed above.
  108. lpulCount is the count value.
  109. */
  110. STDMETHOD(Finish) (THIS_ ULONG ulMode) PURE;
  111. /* This function get called when the CPE finishes a page or encounters an error.
  112. The CPE passes one of the finish codes from above to the function to signal
  113. which case is finishing, either the page or the CPE encountered an error.
  114. ulMode is one of the pre defined modes.
  115. The function can return three modes other than normal errors:
  116. CPE_NEXT_PAGE Finish returns this to signal the CPE to start printing
  117. the next page.
  118. CPE_DONE Finish returns this to signal the CPE that all of the
  119. Cover pages ahve been printed.
  120. CPE_ERROR Finish returns this to signal that an error ocurred in
  121. the transport subsystem. The CPE should exit with out UI
  122. and without calling finish again.
  123. */
  124. };
  125. typedef IAWCPESupport FAR * LPAWCPESUPPORT;
  126. // Service Entry definition
  127. extern "C" {
  128. typedef LONG (WINAPI *AWCPESUPPORTPROC)(DWORD dwSesID, LPAWCPESUPPORT FAR* lppCPESup);
  129. }
  130. typedef AWCPESUPPORTPROC FAR* LPAWCPESUPPORTPROC;
  131. /*
  132. * GUIDs
  133. */
  134. DEFINE_GUID(IID_IAWCPESupport, 0xd1ac6c20,0x91d4,0x101b,0xae,0xcc,0x00,0x00,0x0b,0x69,0x1f,0x18);
  135. /*
  136. * Registry key locations
  137. */
  138. // THESE MUST BE IDENTICAL TO THE ONES IN FAXCOVER.H!!!!!!! $BUGBUG this needs to be removed before release
  139. // This is the root level key where the CPE specific sub keys are stored
  140. #define CPE_SUPPORT_ROOT_KEY ("Software\\Microsoft\\At Work Fax\\Transport Service Provider")
  141. // This is the location where the CPE puts the command line to used when calling it to print
  142. // cover pages at send time. The format is total at the CPE's discretion. The transport will
  143. // look for the string "SESS_ID" and replace it with the current session id. The session ID is
  144. // a DWORD.
  145. #define CPE_COMMAND_LINE_KEY ("Cover Page Editor")
  146. // This key contains the DLL name that the CPE loads to get the Support Object
  147. #define CPE_SUPPORT_DLL_KEY ("CPE Support DLL")
  148. //This is the key that holds the name of the function in the Support DLL that is the actual "Service Entry"
  149. #define CPE_SUPPORT_FUNCTION_NAME_KEY ("CPE Support Function Name")
  150. // END IDENTICAL