Microsoft Information Protection (MIP) SDK for C++: Reference 1.16
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
FileProfile::Settings Class Reference

Settings used by FileProfile during its creation and throughout its lifetime. More...

#include <src/api/mip/file/file_profile.h>

Collaboration diagram for FileProfile::Settings:

Public Member Functions

bool CanCacheLicenses () const
 Gets whether or not end user licenses (EULs) are cached locally.
 
CacheStorageType GetCacheStorageType () const
 Get whether caches are stored in memory or on disk.
 
std::shared_ptr< ConsentDelegateGetConsentDelegate () const
 Gets the consent delegate used to request user consent connecting to services.
 
DnsRedirection GetDnsRedirection () const
 Gets the dns redirect mode.
 
std::shared_ptr< HttpDelegateGetHttpDelegate () const
 Get the HTTP delegate (if any) provided by the application.
 
const std::shared_ptr< void > & GetLoggerContext () const
 Get logger context that will be opaquely passed to the logger delegate for logs associated with the created profile.
 
std::shared_ptr< MipContextGetMipContext () const
 Get MIP context which represents shared state across all profiles.
 
std::shared_ptr< ObserverGetObserver () const
 Gets the observer that receives notifications of events related to FileProfile.
 
const std::string & GetSessionId () const
 Gets the session ID.
 
std::shared_ptr< TaskDispatcherDelegateGetTaskDispatcherDelegate () const
 Get the TaskDispatcher delegate (if any) provided by the application.
 
void SetCanCacheLicenses (bool canCacheLicenses)
 Configures whether or not end user licenses (EULs) will be cached locally.
 
void SetDnsRedirection (DnsRedirection dnsRedirection)
 Sets the dns redirection mode that controls how redirection is handled during online operations.
 
void SetHttpDelegate (const std::shared_ptr< HttpDelegate > &httpDelegate)
 Override default HTTP stack with client's own.
 
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 the created profile.
 
void SetSessionId (const std::string &sessionId)
 Sets the session ID.
 
void SetTaskDispatcherDelegate (const std::shared_ptr< TaskDispatcherDelegate > &taskDispatcherDelegate)
 Override default asynchonous task dispatching handling with client's own.
 
 Settings (const std::shared_ptr< MipContext > &mipContext, CacheStorageType cacheStorageType, std::shared_ptr< ConsentDelegate > consentDelegate, std::shared_ptr< Observer > observer)
 FileProfile::Settings constructor.
 

Private Attributes

CacheStorageType mCacheStorageType
 
bool mCanCacheLicenses
 
std::shared_ptr< ConsentDelegatemConsentDelegate
 
DnsRedirection mDnsRedirection
 
std::shared_ptr< HttpDelegatemHttpDelegate
 
std::shared_ptr< void > mLoggerContext
 
std::shared_ptr< MipContextmMipContext
 
std::shared_ptr< ObservermObserver
 
std::string mPath
 
std::string mSessionId
 
std::shared_ptr< TaskDispatcherDelegatemTaskDispatcherDelegate
 

Detailed Description

Settings used by FileProfile during its creation and throughout its lifetime.

Definition at line 153 of file file_profile.h.

Constructor & Destructor Documentation

◆ Settings()

FileProfile::Settings::Settings ( const std::shared_ptr< MipContext > & mipContext,
CacheStorageType cacheStorageType,
std::shared_ptr< ConsentDelegate > consentDelegate,
std::shared_ptr< Observer > observer )
inline

FileProfile::Settings constructor.

Parameters
mipContextGlobal context settings
cacheStorageTypeStore any cached state in memory or on disk
consentDelegateDelegate used to obtain user permission to access external resources
observerObserver instance that will receive notifications of events related to FileProfile

Definition at line 163 of file file_profile.h.

168 : mMipContext(mipContext),
169 mCacheStorageType(cacheStorageType),
170 mConsentDelegate(consentDelegate),
171 mObserver(observer),
172 mCanCacheLicenses(true),
DnsRedirection mDnsRedirection
std::shared_ptr< ConsentDelegate > mConsentDelegate
std::shared_ptr< MipContext > mMipContext
CacheStorageType mCacheStorageType
std::shared_ptr< Observer > mObserver

Member Function Documentation

◆ CanCacheLicenses()

bool FileProfile::Settings::CanCacheLicenses ( ) const
inline

Gets whether or not end user licenses (EULs) are cached locally.

Returns
License caching configuration

Definition at line 275 of file file_profile.h.

275 {
276 return mCanCacheLicenses;
277 }

References mCanCacheLicenses.

◆ GetCacheStorageType()

CacheStorageType FileProfile::Settings::GetCacheStorageType ( ) const
inline

Get whether caches are stored in memory or on disk.

Returns
storage type used

Definition at line 184 of file file_profile.h.

184{ return mCacheStorageType; }

References mCacheStorageType.

◆ GetConsentDelegate()

std::shared_ptr< ConsentDelegate > FileProfile::Settings::GetConsentDelegate ( ) const
inline

Gets the consent delegate used to request user consent connecting to services.

Returns
Consent delegate used for requesting user consent

Definition at line 191 of file file_profile.h.

191{ return mConsentDelegate; }

References mConsentDelegate.

◆ GetDnsRedirection()

DnsRedirection FileProfile::Settings::GetDnsRedirection ( ) const
inline

Gets the dns redirect mode.

Returns
The redirect mode used

Definition at line 302 of file file_profile.h.

302 {
303 return mDnsRedirection;
304 }

References mDnsRedirection.

◆ GetHttpDelegate()

std::shared_ptr< HttpDelegate > FileProfile::Settings::GetHttpDelegate ( ) const
inline

Get the HTTP delegate (if any) provided by the application.

Returns
HTTP delegate to be used for HTTP operations

Definition at line 212 of file file_profile.h.

212{ return mHttpDelegate; }
std::shared_ptr< HttpDelegate > mHttpDelegate

References mHttpDelegate.

◆ GetLoggerContext()

const std::shared_ptr< void > & FileProfile::Settings::GetLoggerContext ( ) const
inline

Get logger context that will be opaquely passed to the logger delegate for logs associated with the created profile.

Returns
The logger context

Definition at line 285 of file file_profile.h.

285{ return mLoggerContext; }
std::shared_ptr< void > mLoggerContext

References mLoggerContext.

◆ GetMipContext()

std::shared_ptr< MipContext > FileProfile::Settings::GetMipContext ( ) const
inline

Get MIP context which represents shared state across all profiles.

Returns
MIP context

Definition at line 205 of file file_profile.h.

205{ return mMipContext; }

References mMipContext.

◆ GetObserver()

std::shared_ptr< Observer > FileProfile::Settings::GetObserver ( ) const
inline

Gets the observer that receives notifications of events related to FileProfile.

Returns
Observer that receives notifications of events related to FileProfile

Definition at line 198 of file file_profile.h.

198{ return mObserver; }

References mObserver.

◆ GetSessionId()

const std::string & FileProfile::Settings::GetSessionId ( ) const
inline

Gets the session ID.

Returns
Session ID that will be used to correlate logs/telemetry

Definition at line 254 of file file_profile.h.

254 {
255 return mSessionId;
256 }

References mSessionId.

◆ GetTaskDispatcherDelegate()

std::shared_ptr< TaskDispatcherDelegate > FileProfile::Settings::GetTaskDispatcherDelegate ( ) const
inline

Get the TaskDispatcher delegate (if any) provided by the application.

Returns
TaskDispatcher delegate to be used for executing asynchronous tasks

Definition at line 226 of file file_profile.h.

226{ return mTaskDispatcherDelegate; }
std::shared_ptr< TaskDispatcherDelegate > mTaskDispatcherDelegate

References mTaskDispatcherDelegate.

◆ SetCanCacheLicenses()

void FileProfile::Settings::SetCanCacheLicenses ( bool canCacheLicenses)
inline

Configures whether or not end user licenses (EULs) will be cached locally.

Parameters
canCacheLicensesWhether or not engine should cache a license when opening protected content
Note
If true, opening protected content will cache the associated license locally. If false, opening protected content will always perform HTTP operation to acquire the license from the RMS service.

Definition at line 266 of file file_profile.h.

266 {
267 mCanCacheLicenses = canCacheLicenses;
268 }

References mCanCacheLicenses.

◆ SetDnsRedirection()

void FileProfile::Settings::SetDnsRedirection ( DnsRedirection dnsRedirection)
inline

Sets the dns redirection mode that controls how redirection is handled during online operations.

Parameters
dnsRedirectionThe redirection mode to use

Definition at line 311 of file file_profile.h.

311 {
312 mDnsRedirection = dnsRedirection;
313 }

References mDnsRedirection.

◆ SetHttpDelegate()

void FileProfile::Settings::SetHttpDelegate ( const std::shared_ptr< HttpDelegate > & httpDelegate)
inline

Override default HTTP stack with client's own.

Parameters
httpDelegateHTTP callback interface implemented by client application

Definition at line 219 of file file_profile.h.

219{ mHttpDelegate = httpDelegate; }

References mHttpDelegate.

◆ SetLoggerContext()

void FileProfile::Settings::SetLoggerContext ( const std::shared_ptr< void > & loggerContext)
inline

Sets the logger context that will be opaquely passed to the logger delegate for logs associated with the created profile.

Parameters
loggerContextThe logger context

Definition at line 293 of file file_profile.h.

293 {
294 mLoggerContext = loggerContext;
295 }

References mLoggerContext.

◆ SetSessionId()

void FileProfile::Settings::SetSessionId ( const std::string & sessionId)
inline

Sets the session ID.

Parameters
sessionIdSession ID that will be used to correlate logs/telemetry

Definition at line 245 of file file_profile.h.

245 {
246 mSessionId = sessionId;
247 }

References mSessionId.

◆ SetTaskDispatcherDelegate()

void FileProfile::Settings::SetTaskDispatcherDelegate ( const std::shared_ptr< TaskDispatcherDelegate > & taskDispatcherDelegate)
inline

Override default asynchonous task dispatching handling with client's own.

Parameters
taskDispatcherDelegateTask dispatching callback interface implemented by client application
Note
tasks can reference profile objects preventing its destruction as a result taskdispatcher queues should not be shared.

Definition at line 236 of file file_profile.h.

236 {
237 mTaskDispatcherDelegate = taskDispatcherDelegate;
238 }

References mTaskDispatcherDelegate.

Member Data Documentation

◆ mCacheStorageType

CacheStorageType FileProfile::Settings::mCacheStorageType
private

Definition at line 318 of file file_profile.h.

Referenced by GetCacheStorageType().

◆ mCanCacheLicenses

bool FileProfile::Settings::mCanCacheLicenses
private

Definition at line 324 of file file_profile.h.

Referenced by CanCacheLicenses(), and SetCanCacheLicenses().

◆ mConsentDelegate

std::shared_ptr<ConsentDelegate> FileProfile::Settings::mConsentDelegate
private

Definition at line 319 of file file_profile.h.

Referenced by GetConsentDelegate().

◆ mDnsRedirection

DnsRedirection FileProfile::Settings::mDnsRedirection
private

Definition at line 326 of file file_profile.h.

Referenced by GetDnsRedirection(), and SetDnsRedirection().

◆ mHttpDelegate

std::shared_ptr<HttpDelegate> FileProfile::Settings::mHttpDelegate
private

Definition at line 322 of file file_profile.h.

Referenced by GetHttpDelegate(), and SetHttpDelegate().

◆ mLoggerContext

std::shared_ptr<void> FileProfile::Settings::mLoggerContext
private

Definition at line 325 of file file_profile.h.

Referenced by GetLoggerContext(), and SetLoggerContext().

◆ mMipContext

std::shared_ptr<MipContext> FileProfile::Settings::mMipContext
private

Definition at line 316 of file file_profile.h.

Referenced by GetMipContext().

◆ mObserver

std::shared_ptr<Observer> FileProfile::Settings::mObserver
private

Definition at line 320 of file file_profile.h.

Referenced by GetObserver().

◆ mPath

std::string FileProfile::Settings::mPath
private

Definition at line 317 of file file_profile.h.

◆ mSessionId

std::string FileProfile::Settings::mSessionId
private

Definition at line 321 of file file_profile.h.

Referenced by GetSessionId(), and SetSessionId().

◆ mTaskDispatcherDelegate

std::shared_ptr<TaskDispatcherDelegate> FileProfile::Settings::mTaskDispatcherDelegate
private

Definition at line 323 of file file_profile.h.

Referenced by GetTaskDispatcherDelegate(), and SetTaskDispatcherDelegate().


The documentation for this class was generated from the following file: