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.
 
 
 
 
 
SMX_PGE/sdk/Windows/SMXDeviceSearch.h

33 lines
833 B

#ifndef SMXDeviceSearch_h
#define SMXDeviceSearch_h
#include <memory>
#include <string>
#include <vector>
#include <set>
#include <map>
using namespace std;
#include "Helpers.h"
namespace SMX {
class SMXDeviceSearch
{
public:
// Return a list of connected devices. If the same device stays connected and this
// is called multiple times, the same handle will be returned.
vector<shared_ptr<AutoCloseHandle>> GetDevices(wstring &error);
// After a device is opened and then closed, tell this class that the device was closed.
// We'll discard our record of it, so we'll notice a new device plugged in on the same
// path.
void DeviceWasClosed(shared_ptr<AutoCloseHandle> pDevice);
private:
set<wstring> m_setLastDevicePaths;
map<wstring, shared_ptr<AutoCloseHandle>> m_Devices;
};
}
#endif