33#ifndef API_MIP_CLOUD_DISCOVERY_DELEGATE_H_
34#define API_MIP_CLOUD_DISCOVERY_DELEGATE_H_
63 : mServiceType(serviceType),
66 mAuthority(authority) {
81 std::string
GetUrl()
const {
return mUrl; }
100 std::string mResource;
101 std::string mAuthority;
146 const std::string& domainInfo,
147 const std::shared_ptr<void>& context) = 0;
157 const std::string& domainInfo,
158 const std::shared_ptr<void>& context,
159 const std::function<
void(
const std::shared_ptr<CloudDiscoveryResult>& )>& callbackFn) = 0;
171 const mip::Cloud cloud,
172 const mip::DataBoundary dataBoundary,
173 const std::shared_ptr<void>& context) = 0;
184 const mip::Cloud cloud,
185 const mip::DataBoundary dataBoundary,
186 const std::shared_ptr<void>& context,
187 const std::function<
void(
const std::shared_ptr<CloudDiscoveryResult>& )>& callbackFn) = 0;
198 const std::string& domainInfo,
199 const std::shared_ptr<void>& context) = 0;
209 const std::string& domainInfo,
210 const std::shared_ptr<void>& context,
211 const std::function<
void(
const std::shared_ptr<CloudDiscoveryResult>& )>& callbackFn) = 0;
Interface for overriding cloud discovery.
virtual bool IsOffline() const =0
if this cloud discovery delegate is offline only.
virtual void IsSovereignCloudAsync(const std::string &domainInfo, const std::shared_ptr< void > &context, const std::function< void(const std::shared_ptr< CloudDiscoveryResult > &)> &callbackFn)=0
Asynchronously detect if the given domain info is a sovereign cloud.
virtual ServicesInfo GetServicesInfo(const mip::Cloud cloud, const mip::DataBoundary dataBoundary, const std::shared_ptr< void > &context)=0
Get all services information for the given cloud and data boundary.
virtual void GetServicesInfoAsync(const std::string &domainInfo, const std::shared_ptr< void > &context, const std::function< void(const std::shared_ptr< CloudDiscoveryResult > &)> &callbackFn)=0
Asynchronously get all services information for the given domain info.
virtual ServicesInfo GetServicesInfo(const std::string &domainInfo, const std::shared_ptr< void > &context)=0
Get all services information for the given domain info.
virtual bool IsSovereignCloud(const std::string &domainInfo, const std::shared_ptr< void > &context)=0
detect if the given domain info is a sovereign cloud.
virtual void GetServicesInfoAsync(const mip::Cloud cloud, const mip::DataBoundary dataBoundary, const std::shared_ptr< void > &context, const std::function< void(const std::shared_ptr< CloudDiscoveryResult > &)> &callbackFn)=0
Asynchronously get all services information for the given cloud and data boundary.
Interface for the result of cloud discovery.
virtual bool IsSovereignCloud() const =0
detect if the given domain info is a sovereign cloud.
virtual ServicesInfo GetServicesInfo() const =0
Get the services information ServicesInfo.
Service information returned by cloud discovery.
ServiceInfo(ServiceType serviceType, std::string url, std::string resource, std::string authority)
std::string GetUrl() const
Gets the service URL like https://api.aadrm.com.
std::string GetAuthority() const
Gets the authority string for authentication.
ServiceType GetServiceType() const
Gets the service type of this ServiceInfo, like Protection, Policy, Telemetry, etc.
std::string GetResource() const
Gets the resource string for authentication.
ServiceInfo(ServiceType serviceType, std::string url)
std::vector< ServiceInfo > ServicesInfo
A file Containing the common types used by the upe, file and protection modules.
ServiceType
Service type identifier.