testSuite.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef _NULLSOFT_WINAMP_GEN_DEVICE_PROVIDER_TEST_SUITE_HEADER
  2. #define _NULLSOFT_WINAMP_GEN_DEVICE_PROVIDER_TEST_SUITE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #include <vector>
  8. #include "./device.h"
  9. class TestSuite
  10. {
  11. public:
  12. TestSuite();
  13. ~TestSuite();
  14. public:
  15. BOOL AddDevice(Device *device);
  16. size_t GetDeviceCount();
  17. Device *GetDevice(size_t index);
  18. Device *GetRandomDevice();
  19. Device *CreateDeviceCopy(Device *source);
  20. Device *GetDeviceByName(const char *name);
  21. BOOL RegisterDevices(api_devicemanager *manager);
  22. BOOL UnregisterDevices(api_devicemanager *manager);
  23. BOOL AddType(ifc_devicetype *type);
  24. size_t GetTypeCount();
  25. ifc_devicetype *GetType(size_t index);
  26. BOOL RegisterTypes(api_devicemanager *manager);
  27. BOOL UnregisterTypes(api_devicemanager *manager);
  28. BOOL AddConnection(ifc_deviceconnection *connection);
  29. size_t GetConnectionCount();
  30. ifc_deviceconnection *GetConnection(size_t index);
  31. BOOL RegisterConnections(api_devicemanager *manager);
  32. BOOL UnregisterConnections(api_devicemanager *manager);
  33. BOOL AddCommand(ifc_devicecommand *command);
  34. size_t GetCommandCount();
  35. ifc_devicecommand *GetCommand(size_t index);
  36. BOOL RegisterCommands(api_devicemanager *manager);
  37. BOOL UnregisterCommands(api_devicemanager *manager);
  38. BOOL SetIconBase(const wchar_t *path);
  39. BOOL SetConnectList(char **devices, size_t count);
  40. private:
  41. typedef std::vector<Device*> DeviceList;
  42. typedef std::vector<ifc_devicetype*> TypeList;
  43. typedef std::vector<ifc_deviceconnection*> ConnectionList;
  44. typedef std::vector<ifc_devicecommand*> CommandList;
  45. typedef std::vector<char*> NameList;
  46. private:
  47. DeviceList deviceList;
  48. TypeList typeList;
  49. ConnectionList connectionList;
  50. CommandList commandList;
  51. NameList insertList;
  52. };
  53. #endif // _NULLSOFT_WINAMP_GEN_DEVICE_PROVIDER_TEST_SUITE_HEADER