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.

111 lines
4.0 KiB

  1. #ifndef _PARAM_H_
  2. #define _PARAM_H_
  3. /* CFaxApiFinctionParameterInfo class definition file. */
  4. #define MAX_PARAM_VALUE_STRING_LENGTH 500
  5. /* Parameter type enumeration */
  6. enum eParamType
  7. {
  8. // symbol // datatype
  9. eBOOL, // BOOL
  10. eDWORD, // DWORD
  11. eHANDLE, // HANDLE
  12. eHDC, // HDC
  13. ePHDC, // HDC *
  14. eLPBYTE, // LPBYTE
  15. ePLPBYTE, // LPBYTE *
  16. eLPDWORD, // LPDWORD
  17. eLPHANDLE, // LPHANDLE
  18. eLPSTR, // LPSTR
  19. eLPVOID, // LPVOID
  20. eLPWSTR, // LPWSTR
  21. ePFAX_CONFIGURATIONA, // PFAX_CONFIGURATIONA
  22. ePPFAX_CONFIGURATIONA, // PFAX_CONFIGURATIONA *
  23. ePFAX_CONFIGURATIONW, // PFAX_CONFIGURATIONW
  24. ePPFAX_CONFIGURATIONW, // PFAX_CONFIGURATIONW *
  25. ePFAX_COVERPAGE_INFOA, // PFAX_COVERPAGE_INFOA
  26. ePFAX_COVERPAGE_INFOW, // PFAX_COVERPAGE_INFOW
  27. ePPFAX_DEVICE_STATUSA, // PFAX_DEVICE_STATUSA *
  28. ePPFAX_DEVICE_STATUSW, // PFAX_DEVICE_STATUSW *
  29. ePFAX_JOB_ENTRYA, // PFAX_JOB_ENTRYA
  30. ePPFAX_JOB_ENTRYA, // PFAX_JOB_ENTRYA *
  31. ePFAX_JOB_ENTRYW, // PFAX_JOB_ENTRYW
  32. ePPFAX_JOB_ENTRYW, // PFAX_JOB_ENTRYW *
  33. ePFAX_JOB_PARAMA, // PFAX_JOB_PARAMA
  34. ePFAX_JOB_PARAMW, // PFAX_JOB_PARAMW
  35. ePFAX_LOG_CATEGORY, // PFAX_LOG_CATEGORY
  36. ePPFAX_LOG_CATEGORY, // PFAX_LOG_CATEGORY *
  37. ePFAX_PORT_INFOA, // PFAX_PORT_INFOA
  38. ePPFAX_PORT_INFOA, // PFAX_PORT_INFOA *
  39. ePFAX_PORT_INFOW, // PFAX_PORT_INFOW
  40. ePPFAX_PORT_INFOW, // PFAX_PORT_INFOW *
  41. ePFAX_PRINT_INFOA, // PFAX_PRINT_INFOA
  42. ePFAX_PRINT_INFOW, // PFAX_PRINT_INFOW
  43. ePPFAX_ROUTING_METHODA, // PFAX_ROUTING_METHODA *
  44. ePPFAX_ROUTING_METHODW, // PFAX_ROUTING_METHODW *
  45. eUnknownParamType, // indicates that the parameter type is
  46. // not recognized;
  47. };
  48. /* The CFaxApiFunctionParameterInfo class manages all of the information */
  49. /* pertaining to the parameter list for a Fax API function. */
  50. class CFaxApiFunctionParameterInfo : public CObject
  51. {
  52. public:
  53. CFaxApiFunctionParameterInfo(); // constructor
  54. ~CFaxApiFunctionParameterInfo(); // destructor
  55. /* member functions */
  56. void InitParameterInfoMember( const CString & rcsFunctionName );
  57. void FormatParameterValueForOutput( int xParameterIndex, CString & rcsParameterValue );
  58. void * GetParameterValuePointer( int xParameterIndex );
  59. int GetNumberOfParameters();
  60. CString GetParameterName( int xParameterIndex );
  61. CString GetParameterTypeString( int xParameterIndex );
  62. CString GetParameterDescription( int xParameterIndex );
  63. BOOL StoreParameterValue( int xParameterIndex, CString & rcsParameterValue );
  64. eParamType GetParameterTypeEnum( int xParameterIndex );
  65. private:
  66. void * AllocateStorageForParameterEntity( eParamType eParameterType );
  67. eParamType GetParameterTypeEnum( const CString & rcsParameterType );
  68. CString PreProcessParameterValueString( const CString & rcsParameterValue );
  69. private:
  70. /* data members */
  71. int m_xNumberOfParameters;
  72. CStringArray m_csaParameterName;
  73. CStringArray m_csaParameterDescription;
  74. CUIntArray m_cuiaParameterTypeEnum;
  75. /* Since the type of each parameter is probably different, the storage */
  76. /* for each parameter and the associated range variables must be allocated */
  77. /* dynamically. The following members are arrays of pointers to the */
  78. /* actual storage locations. */
  79. CPtrArray m_cpaParameterValue;
  80. CPtrArray m_cpaParameterRange1;
  81. CPtrArray m_cpaParameterRange2;
  82. };
  83. #endif // _PARAM_H_