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.

120 lines
3.9 KiB

  1. /*****************************************************************************
  2. *
  3. * $Workfile: MibABC.h $
  4. *
  5. * Copyright (C) 1997 Hewlett-Packard Company.
  6. * Copyright (C) 1997 Microsoft Corporation.
  7. * All rights reserved.
  8. *
  9. * 11311 Chinden Blvd.
  10. * Boise, Idaho 83714
  11. *
  12. *****************************************************************************/
  13. #ifndef INC_TCPMIBABC_H
  14. #define INC_TCPMIBABC_H
  15. #include <snmp.h>
  16. #include <mgmtapi.h>
  17. #include <winspool.h>
  18. // error codes -- device type operation
  19. #define ERROR_DEVICE_NOT_FOUND 10000
  20. #define SUCCESS_DEVICE_SINGLE_PORT 10001
  21. #define SUCCESS_DEVICE_MULTI_PORT 10002
  22. #define SUCCESS_DEVICE_UNKNOWN 10003
  23. class CTcpMibABC;
  24. typedef CTcpMibABC* (CALLBACK *RPARAM_1) ( void );
  25. #ifndef DllExport
  26. #define DllExport __declspec(dllexport)
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. // return the pointer to the interface
  32. CTcpMibABC* GetTcpMibPtr( void );
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. /*****************************************************************************
  37. *
  38. * Important Note: This abstract base class defines the interface for the CTcpMib
  39. * class. Changing this interface will cause problems for the existing DLLs that
  40. * uses the TcpMib.dll & CTcpMib class.
  41. *
  42. *****************************************************************************/
  43. class DllExport CTcpMibABC
  44. #if defined _DEBUG || defined DEBUG
  45. // , public CMemoryDebug
  46. #endif
  47. {
  48. public:
  49. CTcpMibABC() { };
  50. virtual ~CTcpMibABC() { };
  51. virtual BOOL SupportsPrinterMib( LPCSTR pHost,
  52. LPCSTR pCommunity,
  53. DWORD dwDevIndex,
  54. PBOOL pbSupported) = 0;
  55. virtual DWORD GetDeviceDescription(LPCSTR pHost,
  56. LPCSTR pCommunity,
  57. DWORD dwDevIndex,
  58. LPTSTR pszPortDescription,
  59. DWORD dwDescLen) = 0;
  60. virtual DWORD GetDeviceStatus ( LPCSTR pHost,
  61. LPCSTR pCommunity,
  62. DWORD dwDevIndex) = 0;
  63. virtual DWORD GetJobStatus ( LPCSTR pHost,
  64. LPCSTR pCommunity,
  65. DWORD dwDevIndex) = 0;
  66. virtual DWORD GetDeviceHWAddress( LPCSTR pHost,
  67. LPCSTR pCommunity,
  68. DWORD dwDevIndex,
  69. DWORD dwSize, // Size in characters of the dest hardware address
  70. LPTSTR psztHWAddress) = 0;
  71. virtual DWORD GetDeviceName ( LPCSTR pHost,
  72. LPCSTR pCommunity,
  73. DWORD dwDevIndex,
  74. DWORD dwSize, // Size in characters of the dest psztDescription
  75. LPTSTR psztDescription) = 0;
  76. virtual DWORD SnmpGet( LPCSTR pHost,
  77. LPCSTR pCommunity,
  78. DWORD dwDevIndex,
  79. AsnObjectIdentifier *pMibObjId,
  80. RFC1157VarBindList *pVarBindList) = 0;
  81. virtual DWORD SnmpWalk( LPCSTR pHost,
  82. LPCSTR pCommunity,
  83. DWORD dwDevIndex,
  84. AsnObjectIdentifier *pMibObjId,
  85. RFC1157VarBindList *pVarBindList) = 0;
  86. virtual DWORD SnmpGetNext( LPCSTR pHost,
  87. LPCSTR pCommunity,
  88. DWORD dwDevIndex,
  89. AsnObjectIdentifier *pMibObjId,
  90. RFC1157VarBindList *pVarBindList) = 0;
  91. virtual BOOL SNMPToPortStatus( const DWORD in dwStatus,
  92. PPORT_INFO_3 pPortInfo ) = 0;
  93. virtual DWORD SNMPToPrinterStatus( const DWORD in dwStatus) = 0;
  94. private:
  95. }; // class CTcpMibABC
  96. #endif // INC_DLLINTERFACE_H