28#ifndef API_MIP_FILE_FILE_PROFILE_H_
29#define API_MIP_FILE_FILE_PROFILE_H_
70 const std::shared_ptr<mip::FileProfile>& profile,
71 const std::shared_ptr<void>& context) { UNUSED(profile); UNUSED(context); }
76 virtual void OnLoadFailure(
const std::exception_ptr& error,
const std::shared_ptr<void>& context) {
77 UNUSED(error); UNUSED(context); }
83 const std::vector<std::string>& engineIds,
84 const std::shared_ptr<void>& context) { UNUSED(engineIds); UNUSED(context); }
90 const std::exception_ptr& error,
91 const std::shared_ptr<void>& context) { UNUSED(error); UNUSED(context); }
102 const std::exception_ptr& error,
103 const std::shared_ptr<void>& context) { UNUSED(error); UNUSED(context); }
109 const std::shared_ptr<mip::FileEngine>& engine,
110 const std::shared_ptr<void>& context) { UNUSED(engine); UNUSED(context); }
115 virtual void OnAddEngineFailure(
const std::exception_ptr& error,
const std::shared_ptr<void>& context) {
116 UNUSED(error); UNUSED(context); }
127 const std::exception_ptr& error,
128 const std::shared_ptr<void>& context) { UNUSED(error); UNUSED(context); }
164 const std::shared_ptr<MipContext>& mipContext,
166 std::shared_ptr<ConsentDelegate> consentDelegate,
167 std::shared_ptr<Observer> observer)
279#if !defined(SWIG) && !defined(SWIG_DIRECTORS)
337 const std::shared_ptr<void>& context);
361 virtual std::shared_ptr<AsyncControl>
ListEnginesAsync(
const std::shared_ptr<void>& context) = 0;
370 const std::string&
id,
371 const std::shared_ptr<void>& context) = 0;
380 const FileEngine::Settings& settings,
381 const std::shared_ptr<void>& context) = 0;
390 const std::string&
id,
391 const std::shared_ptr<void>& context) = 0;
Observer interface for clients to get notifications for profile related events.
Definition file_profile.h:62
virtual void OnDeleteEngineSuccess(const std::shared_ptr< void > &context)
Called when an engine was deleted successfully.
Definition file_profile.h:121
virtual void OnListEnginesSuccess(const std::vector< std::string > &engineIds, const std::shared_ptr< void > &context)
Called when list of engines was generated successfully.
Definition file_profile.h:82
virtual void OnLoadSuccess(const std::shared_ptr< mip::FileProfile > &profile, const std::shared_ptr< void > &context)
Called when profile was loaded successfully.
Definition file_profile.h:69
virtual void OnAddPolicyEngineStarting(bool requiresPolicyFetch)
Called prior to engine creation to describe whether or not the policy engine's policy data must be fe...
Definition file_profile.h:144
virtual void OnAddEngineFailure(const std::exception_ptr &error, const std::shared_ptr< void > &context)
Called when adding a new engine caused an error.
Definition file_profile.h:115
virtual void OnAddEngineSuccess(const std::shared_ptr< mip::FileEngine > &engine, const std::shared_ptr< void > &context)
Called when a new engine was added successfully.
Definition file_profile.h:108
virtual void OnUnloadEngineFailure(const std::exception_ptr &error, const std::shared_ptr< void > &context)
Called when unloading an engine caused an error.
Definition file_profile.h:101
virtual void OnListEnginesFailure(const std::exception_ptr &error, const std::shared_ptr< void > &context)
Called when listing engines caused an error.
Definition file_profile.h:89
virtual void OnLoadFailure(const std::exception_ptr &error, const std::shared_ptr< void > &context)
Called when loading a profile caused an error.
Definition file_profile.h:76
virtual void OnDeleteEngineFailure(const std::exception_ptr &error, const std::shared_ptr< void > &context)
Called when deleting an engine caused an error.
Definition file_profile.h:126
virtual ~Observer()
Definition file_profile.h:64
virtual void OnUnloadEngineSuccess(const std::shared_ptr< void > &context)
Called when an engine was unloaded successfully.
Definition file_profile.h:96
Observer()
Definition file_profile.h:147
virtual void OnPolicyChanged(const std::string &engineId)
Called when the policy has changed for the engine with the given ID.
Definition file_profile.h:133
Settings used by FileProfile during its creation and throughout its lifetime.
Definition file_profile.h:153
void SetCanCacheLicenses(bool canCacheLicenses)
Configures whether or not end user licenses (EULs) will be cached locally.
Definition file_profile.h:266
CacheStorageType GetCacheStorageType() const
Get whether caches are stored in memory or on disk.
Definition file_profile.h:184
DnsRedirection mDnsRedirection
Definition file_profile.h:326
std::shared_ptr< HttpDelegate > mHttpDelegate
Definition file_profile.h:322
void SetTaskDispatcherDelegate(const std::shared_ptr< TaskDispatcherDelegate > &taskDispatcherDelegate)
Override default asynchonous task dispatching handling with client's own.
Definition file_profile.h:236
std::shared_ptr< Observer > GetObserver() const
Gets the observer that receives notifications of events related to FileProfile.
Definition file_profile.h:198
std::string mSessionId
Definition file_profile.h:321
std::shared_ptr< ConsentDelegate > mConsentDelegate
Definition file_profile.h:319
std::shared_ptr< TaskDispatcherDelegate > mTaskDispatcherDelegate
Definition file_profile.h:323
void SetHttpDelegate(const std::shared_ptr< HttpDelegate > &httpDelegate)
Override default HTTP stack with client's own.
Definition file_profile.h:219
std::string mPath
Definition file_profile.h:317
Settings(const std::shared_ptr< MipContext > &mipContext, CacheStorageType cacheStorageType, std::shared_ptr< ConsentDelegate > consentDelegate, std::shared_ptr< Observer > observer)
FileProfile::Settings constructor.
Definition file_profile.h:163
std::shared_ptr< MipContext > mMipContext
Definition file_profile.h:316
CacheStorageType mCacheStorageType
Definition file_profile.h:318
bool CanCacheLicenses() const
Gets whether or not end user licenses (EULs) are cached locally.
Definition file_profile.h:275
bool mCanCacheLicenses
Definition file_profile.h:324
const std::string & GetSessionId() const
Gets the session ID.
Definition file_profile.h:254
std::shared_ptr< ConsentDelegate > GetConsentDelegate() const
Gets the consent delegate used to request user consent connecting to services.
Definition file_profile.h:191
DnsRedirection GetDnsRedirection() const
Gets the dns redirect mode.
Definition file_profile.h:302
void SetSessionId(const std::string &sessionId)
Sets the session ID.
Definition file_profile.h:245
std::shared_ptr< MipContext > GetMipContext() const
Get MIP context which represents shared state across all profiles.
Definition file_profile.h:205
std::shared_ptr< void > mLoggerContext
Definition file_profile.h:325
std::shared_ptr< Observer > mObserver
Definition file_profile.h:320
const std::shared_ptr< void > & GetLoggerContext() const
Get logger context that will be opaquely passed to the logger delegate for logs associated with the c...
Definition file_profile.h:285
std::shared_ptr< HttpDelegate > GetHttpDelegate() const
Get the HTTP delegate (if any) provided by the application.
Definition file_profile.h:212
void SetDnsRedirection(DnsRedirection dnsRedirection)
Sets the dns redirection mode that controls how redirection is handled during online operations.
Definition file_profile.h:311
std::shared_ptr< TaskDispatcherDelegate > GetTaskDispatcherDelegate() const
Get the TaskDispatcher delegate (if any) provided by the application.
Definition file_profile.h:226
void SetLoggerContext(const std::shared_ptr< void > &loggerContext)
Sets the logger context that will be opaquely passed to the logger delegate for logs associated with ...
Definition file_profile.h:293
FileProfile class is the root class for using the Microsoft Information Protection operations.
Definition file_profile.h:53
virtual std::shared_ptr< AsyncControl > ListEnginesAsync(const std::shared_ptr< void > &context)=0
Starts list engines operation.
virtual void AcquirePolicyAuthToken(Cloud cloud, const std::shared_ptr< AuthDelegate > &authDelegate) const =0
Trigger an authentication callback for policy.
static FILE_API std::shared_ptr< AsyncControl > __CDECL LoadAsync(const Settings &settings, const std::shared_ptr< void > &context)
Starts loading a profile based on the provided |settings|.
virtual std::shared_ptr< AsyncControl > DeleteEngineAsync(const std::string &id, const std::shared_ptr< void > &context)=0
Starts deleting the file engine with the given ID. All data for the given profile will be deleted.
virtual const Settings & GetSettings() const =0
Returns the profile settings.
virtual std::shared_ptr< AsyncControl > UnloadEngineAsync(const std::string &id, const std::shared_ptr< void > &context)=0
Starts unloading the file engine with the given ID.
virtual std::shared_ptr< AsyncControl > AddEngineAsync(const FileEngine::Settings &settings, const std::shared_ptr< void > &context)=0
Starts adding a new file engine to the profile.
static FILE_API const char *__CDECL GetVersion()
Gets library version.
A file Containing the common types used by the upe, file and protection modules.
Cloud
Azure cloud identifier.
Definition common_types.h:728
CacheStorageType
Storage type for the caches.
Definition common_types.h:710
A file Containing types used to control dns redirection.
DnsRedirection
Storage type for the caches.
Definition dns_redirection.h:43
A file containing the MIP SDK error types.
#define FILE_API
Definition file_export.h:49
Contains HttpDelegate interface definition used to override MIP HTTP stack.
A file containing the LoggerDelegate class to be used to override MIP logger.
File containing definition of MipContext.
A file containing the TaskDispatcherDelegate interface to be used to override MIP async task executor...