#pragma once #include #include using ProjectId = std::int64_t; using GsId = std::int64_t; using TmId = std::int64_t; using ComponentId = std::int64_t; struct TmInfo { public: TmInfo(const std::string name, const std::uint64_t id = 0) :id_(id), name_(name) {} public: TmId id_; std::string name_; }; struct GsInfo { public: GsInfo(const std::string name, const std::uint64_t id = 0) :id_(id), name_(name) {} public: GsId id_; std::string name_; std::vector tm_list_; }; struct ProjectInfo { public: ProjectInfo(const std::string name, const std::uint64_t id = 0) :id_(id), name_(name) {} public: ProjectId id_; std::string name_; std::vector gs_list_; }; #ifdef GEOMATIVESDK_EXPORTS class __declspec(dllexport) GeoMetaHelper { #else class __declspec(dllimport) GeoMetaHelper { #endif public: GeoMetaHelper() :error_code_(GeoMetaCode::code_200) {}; ~GeoMetaHelper() = default; public: enum class GeoMetaCode { code_200 = 200, code_system_failure = -1 }; enum class GeoMetaSceneId { id_seis = 30 }; public: GeoMetaCode ErrorCode() { return error_code_; } bool Login(const std::string& name, const std::string& password); bool RefreshToken(const std::string& refresh_token); bool GetProjectList(GeoMetaSceneId scene_id, std::vector& project_list); bool GetGsList(ProjectId id, std::vector& gs_list); bool GetTmList(GsId gs_id, ComponentId component_id, std::vector& gs_list); protected: bool IsOK() { return error_code_ == GeoMetaCode::code_200; } private: GeoMetaCode error_code_; };