HWConfig_API.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef __HWCONFIG_API__
  2. #define __HWCONFIG_API__
  3. #ifdef HWCONFIG_EXPORTS
  4. #define HWCONFIG_API _declspec(dllexport)
  5. #else
  6. #define HWCONFIG_API _declspec(dllimport)
  7. #endif
  8. #include <list>
  9. using namespace std;
  10. //-----------------------------------------------------------------
  11. class ASConfig
  12. {
  13. public:
  14. virtual int GetASNumber( ) = 0;
  15. virtual wchar_t* GetASName( int nASID )=0;
  16. virtual wchar_t* GetAngle(int nASID) =0;
  17. };
  18. class GroupConfig
  19. {
  20. public:
  21. virtual int GetGroupID( wchar_t chTypeCode ) = 0;
  22. virtual wchar_t* GetDeviceTypeByGroupID( int nGroupID )=0;
  23. };
  24. //-----------------------------------------------------------------
  25. class WS
  26. {
  27. public:
  28. virtual const wchar_t* ConfigPath() = 0;
  29. virtual const wchar_t* IndexString() = 0;
  30. virtual int Index() = 0;
  31. };
  32. class ConfigProfile : public list<WS*>
  33. {
  34. public:
  35. virtual const wchar_t* ProcessName() = 0;
  36. virtual const wchar_t* MSMQName() = 0;
  37. virtual const wchar_t* HostName() = 0;
  38. virtual bool WSExist( int index ) = 0;
  39. };
  40. class DeviceConfig : public list<ConfigProfile*>
  41. {
  42. public:
  43. //virtual ConfigProfile* getProfileByName( const wchar_t* strProcName ) = 0;
  44. virtual int CurrIndex() = 0;
  45. virtual int CurrWS() = 0;
  46. virtual const wchar_t* CurrDeviceType()=0;
  47. };
  48. //-----------------------------------------------------------------
  49. class DeviceList : public list<DeviceConfig*> {};
  50. //-----------------------------------------------------------------
  51. extern HWCONFIG_API DeviceList* g_pDeviceList;
  52. extern HWCONFIG_API GroupConfig* g_pGroupConfig;
  53. extern HWCONFIG_API ASConfig * g_pASConifg;
  54. //-----------------------------------------------------------------
  55. extern "C"
  56. {
  57. HWCONFIG_API void SetConfRootPath( const wchar_t* strConfPath );
  58. HWCONFIG_API void SetCurrAS( const wchar_t* strASName );
  59. HWCONFIG_API wchar_t* GetValueByKey( const wchar_t* strASName,const wchar_t* strKey );
  60. };
  61. #endif //__HWCONFIG_API__