#pragma once
#include <string>
#include <memory>
#include <map>  
#include "iTunesApi/simpleApi.h"
namespace aid2 {
    class DeviceManager {
    public:
        //deviceHandleȡudid
        static std::string get_udid(AMDeviceRef deviceHandle);
		//deviceHandleȡӷʽ
		static ConnectMode get_connect_mode(AMDeviceRef deviceHandle);
        // ȡ豸ʵ
        static std::shared_ptr<class iOSDevice> get_device(AMDeviceRef deviceHandle);
        /*ǹmapķ*/
        // udid豸ӳ
        static void add_device(const std::string& udid, AMDeviceRef deviceHandle);
		// ɾudidɾӳ
        static void remove_device(const std::string& udid);
        //udidmapȡdeviceHandle
        static AMDeviceRef get_handle(const std::string& udid);
        // udidmapȡ豸ʵ,ûҵnullptr
        static std::shared_ptr<class iOSDevice> get_device(const std::string& udid);
    private:
        static std::map<std::string, AMDeviceRef> m_udid;
    };
}