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.

149 lines
5.4 KiB

  1. #ifndef _FUNCTION_H_
  2. #define _FUNCTION_H_
  3. /* CFaxApiFunctionInfo class definition file. */
  4. #include "param.h"
  5. /* Function index enumeration. */
  6. /* Note that the function index enum is not related to the index into the */
  7. /* Fax Api Function listbox. It is used by the Execute() member function */
  8. /* of the CFaxApiFunctionInfo class (and possibly others). */
  9. enum eFunctionIndex
  10. {
  11. // symbol // Function Name
  12. eFaxAbort, // FaxAbort
  13. eFaxClose, // FaxClose
  14. eFaxConnectFaxServerA, // FaxConnectFaxServerA
  15. eFaxConnectFaxServerW, // FaxConnectFaxServerW
  16. eFaxEnableRoutingMethodA, // FaxEnableRoutingMethodA
  17. eFaxEnableRoutingMethodW, // FaxEnableRoutingMethodW
  18. eFaxEnumJobsA, // FaxEnumJobsA
  19. eFaxEnumJobsW, // FaxEnumJobsW
  20. eFaxEnumPortsA, // FaxEnumPortsA
  21. eFaxEnumPortsW, // FaxEnumPortsW
  22. eFaxEnumRoutingMethodsA, // FaxEnumRoutingMethodsA
  23. eFaxEnumRoutingMethodsW, // FaxEnumRoutingMethodsW
  24. eFaxFreeBuffer, // FaxFreeBuffer
  25. eFaxGetConfigurationA, // FaxGetConfigurationA
  26. eFaxGetConfigurationW, // FaxGetConfigurationW
  27. eFaxGetDeviceStatusA, // FaxGetDeviceStatusA
  28. eFaxGetDeviceStatusW, // FaxGetDeviceStatusW
  29. eFaxGetJobA, // FaxGetJobA
  30. eFaxGetJobW, // FaxGetJobW
  31. eFaxGetLoggingCategoriesA, // FaxGetLoggingCategoriesA
  32. eFaxGetLoggingCategoriesW, // FaxGetLoggingCategoriesW
  33. eFaxGetPageData, // FaxGetPageData
  34. eFaxGetPortA, // FaxGetPortA
  35. eFaxGetPortW, // FaxGetPortW
  36. eFaxGetRoutingInfoA, // FaxGetRoutingInfoA
  37. eFaxGetRoutingInfoW, // FaxGetRoutingInfoW
  38. eFaxInitializeEventQueue, // FaxInitializeEventQueue
  39. #ifdef ELIMINATED_FROM_API
  40. eFaxOpenJob, // FaxOpenJob
  41. #endif // ELIMINATED_FROM_API
  42. eFaxOpenPort, // FaxOpenPort
  43. eFaxPrintCoverPageA, // FaxPrintCoverPageA
  44. eFaxPrintCoverPageW, // FaxPrintCoverPageW
  45. eFaxReceiveDocumentA, // FaxReceiveDocumentA
  46. eFaxReceiveDocumentW, // FaxReceiveDocumentW
  47. eFaxSendDocumentA, // FaxSendDocumentA
  48. eFaxSendDocumentW, // FaxSendDocumentW
  49. eFaxSetConfigurationA, // FaxSetConfigurationA
  50. eFaxSetConfigurationW, // FaxSetConfigurationW
  51. eFaxSetJobA, // FaxSetJobA
  52. eFaxSetJobW, // FaxSetJobW
  53. eFaxSetLoggingCategoriesA, // FaxSetLoggingCategoriesA
  54. eFaxSetLoggingCategoriesW, // FaxSetLoggingCategoriesW
  55. eFaxSetPortA, // FaxSetPortA
  56. eFaxSetPortW, // FaxSetPortW
  57. eFaxSetRoutingInfoA, // FaxSetRoutingInfoA
  58. eFaxSetRoutingInfoW, // FaxSetRoutingInfoW
  59. eFaxStartPrintJobA, // FaxStartPrintJobA
  60. eFaxStartPrintJobW, // FaxStartPrintJobW
  61. eIllegalFunctionIndex // indicates that the function
  62. // index is illegal
  63. };
  64. /* The CFaxApiFunctionInfo class is used to manage all of the information */
  65. /* pertaining to a single Fax API function. */
  66. class CFaxApiFunctionInfo : public CObject
  67. {
  68. public:
  69. CFaxApiFunctionInfo(); // constructor
  70. CFaxApiFunctionInfo( const CString & rcsFunctionName,
  71. const CString & rcsFunctionPrototype,
  72. const CString & rcsReturnType,
  73. const CString & rcsReturnValueDescription,
  74. const CString & rcsRemarks );
  75. ~CFaxApiFunctionInfo(); // destructor
  76. void SetFunctionName( CString & rcsFunctionName );
  77. CString & GetFunctionName();
  78. CString & GetFunctionPrototype();
  79. CString & GetReturnValueDescription();
  80. CString & GetRemarks();
  81. void GetParameterName( int xParameterIndex, CString & rcsParameterName );
  82. void FormatParameterValueForOutput( int xParameterIndex, CString & rcsParameterValue );
  83. void * GetParameterValuePointer( int xParameterIndex );
  84. int GetNumberOfParameters();
  85. int GetMaxParamValueStringLength( int xParameterIndex );
  86. BOOL StoreParameterValue( int xParameterIndex, const CString & rcsParameterValue );
  87. eParamType GetParameterTypeEnum( int xParameterIndex );
  88. CString GetParameterTypeString( int xParameterIndex );
  89. CString GetParameterDescription( int xParameterIndex );
  90. void FormatReturnValueForOutput( CString & csReturnValue );
  91. void Execute();
  92. private:
  93. void * AllocateStorageForReturnValue( const CString & rcsReturnType );
  94. eFunctionIndex GetFunctionIndexEnum( const CString & rcsFunctionName );
  95. private:
  96. /* data members */
  97. CString m_csFunctionName;
  98. CString m_csFunctionPrototype;
  99. CString m_csReturnType;
  100. CString m_csReturnValueDescription;
  101. CString m_csRemarks;
  102. eFunctionIndex m_eFunctionIndex;
  103. /* Since we don't know what type the return value is (each API function */
  104. /* may be different) the storage must be allocated dynamically. The */
  105. /* following data member is a pointer to the storage for the return */
  106. /* value. */
  107. void * m_pvReturnValue;
  108. CFaxApiFunctionParameterInfo m_cParameterInfo;
  109. };
  110. #endif // _FUNCTION_H_