类 ProtectionProfile::Settings
设置 ProtectionProfile 在其创建期间及其整个生命周期内使用。
总结
成员 | 说明 |
---|---|
public 设置(const std::shared_ptr<MipContext& mipContext>, Cache存储Type cache存储Type, const std::shared_ptr<ConsentDelegate& consentDelegate>, const std::shared_ptr<ProtectionProfile::Observer>& observer) | ProtectionProfile::设置 构造函数,该构造函数指定要用于异步操作的观察程序。 |
public 设置(const std::shared_ptr<MipContext& mipContext>, Cache存储Type cache存储Type, const std::shared_ptr<ConsentDelegate>& consentDelegate) | ProtectionProfile::设置 构造函数,用于同步操作。 |
public CacheStorageType GetCacheStorageType() const | 获取缓存是存储在内存中还是存储在磁盘上。 |
public std::shared_ptr<ConsentDelegate> GetConsentDelegate() const | 获取用于连接到服务的同意委托。 |
public std::shared_ptr<ProtectionProfile::Observer> GetObserver() const | 获取接收与 ProtectionProfile 相关的事件的通知的观察程序。 |
public std::shared_ptr<MipContext> GetMipContext() const | 获取表示在所有配置文件之间共享的状态的 MIP 上下文。 |
public std::shared_ptr<HttpDelegate> GetHttpDelegate() const | 获取应用程序提供的 HTTP 委托(如果有)。 |
public void SetHttpDelegate(const std::shared_ptr<HttpDelegate>& httpDelegate) | 使用客户端自己的替代默认 HTTP 堆栈。 |
public std::shared_ptr<StorageDelegate> GetStorageDelegate() const | 获取应用程序提供的 StorageDelegate(如果有)。 |
public void Set存储Delegate(const std::shared_ptr<存储Delegate>& storageDelegate) | 使用客户端自己的实现替代默认存储缓存。 |
public std::shared_ptr<TaskDispatcherDelegate> GetTaskDispatcherDelegate() const | 获取应用程序提供的 TaskDispatcher 委托(如果有)。 |
public void SetTaskDispatcherDelegate(const std::shared_ptr<TaskDispatcherDelegate>& taskDispatcherDelegate) | 使用客户端自己的异步任务调度处理替代默认异步任务调度处理。 |
public void SetSessionId(const std::string& sessionId) | 设置会话 ID。 |
public const std::string& GetSessionId() const | 获取会话 ID。 |
public void SetCanCacheLicenses(bool canCacheLicenses) | 配置是否在本地缓存最终用户许可证 (EUL)。 |
public bool CanCacheLicenses() const | 获取是否在本地缓存最终用户许可证 (EUL)。 |
public void SetCustom设置(const std::vector<std::p air<std::string, std::string>>& custom设置) | 设置用于功能检查和测试的自定义设置。 |
public const std::vector<std::p air<std::string, std::string>>& GetCustom设置() const | 获取用于功能检查和测试的自定义设置。 |
public const std::shared_ptr<void>& GetLoggerContext() const | 获取记录器上下文,该上下文将被不透明地传递给与创建的配置文件关联的日志记录器委托。 |
public void SetLoggerContext(const std::shared_ptr<void>& loggerContext) | 设置记录器上下文,该上下文将被不透明地传递给与创建的配置文件关联的日志记录器委托。 |
public void AddRedirectionUri(const std::string& originalUri, const std::string& redirectUri) | 添加重定向 URI。 |
public const std::map<std::string, std::string>& GetRedirectionUris() const | 获取重定向 URI。 |
public DnsRedirection GetDnsRedirection() const | 获取 dns 重定向模式。 |
public void SetDnsRedirection(DnsRedirection dnsRedirection) | 设置 dns 重定向模式,用于控制在联机操作期间如何处理重定向。 |
成员
Settings 函数
ProtectionProfile::设置 构造函数,该构造函数指定要用于异步操作的观察程序。
参数:
mipContext:全局上下文设置
cacheStorageType:将任何缓存状态存储在内存中或磁盘上
consentDelegate:用于获取用户权限以访问外部资源的委托
观察者:将接收与 ProtectionProfile 相关的事件的通知的观察程序实例
applicationInfo:有关使用保护 SDK 的应用程序的信息
Settings 函数
ProtectionProfile::设置 构造函数,用于同步操作。
参数:
mipContext:全局上下文设置
cacheStorageType:将任何缓存状态存储在内存中或磁盘上
consentDelegate:用于获取用户权限以访问外部资源的委托
applicationInfo:有关使用保护 SDK 的应用程序的信息
GetCacheStorageType 函数
获取缓存是存储在内存中还是存储在磁盘上。
返回结果:使用的存储类型
GetConsentDelegate 函数
获取用于连接到服务的同意委托。
返回:用于连接到服务的同意委托
GetObserver 函数
获取接收与 ProtectionProfile 相关的事件的通知的观察程序。
返回:接收与 ProtectionProfile 相关的事件的通知的观察者
GetMipContext 函数
获取表示在所有配置文件之间共享的状态的 MIP 上下文。
返回结果:MIP 上下文
GetHttpDelegate 函数
获取应用程序提供的 HTTP 委托(如果有)。
返回:要用于 HTTP 操作的 HTTP 委托
SetHttpDelegate 函数
使用客户端自己的替代默认 HTTP 堆栈。
参数:
- httpDelegate:客户端应用程序实现的 HTTP 回调接口
GetStorageDelegate 函数
获取应用程序提供的 StorageDelegate(如果有)。
返回结果:要用于缓存的 StorageDelegate
SetStorageDelegate 函数
使用客户端自己的实现替代默认存储缓存。
参数:
- storageDelegate:由客户端应用程序实现的 StorageDelegate 接口
GetTaskDispatcherDelegate 函数
获取应用程序提供的 TaskDispatcher 委托(如果有)。
返回结果:要用于执行异步任务的 TaskDispatcher 委托
SetTaskDispatcherDelegate 函数
使用客户端自己的异步任务调度处理替代默认异步任务调度处理。
参数:
- taskDispatcherDelegate:客户端应用程序实现的任务调度回调接口
任务可以引用阻止其析构的配置文件对象,因此不应共享 taskdispatcher 队列。
SetSessionId 函数
设置会话 ID。
参数:
- sessionId:将用于关联日志/遥测的会话 ID
GetSessionId 函数
获取会话 ID。
返回:将用于关联日志/遥测的会话 ID
SetCanCacheLicenses 函数
配置是否在本地缓存最终用户许可证 (EUL)。
参数:
- canCacheLicenses:打开受保护内容时引擎是否应缓存许可证
如果为 True,则打开受保护的内容将在本地缓存关联的许可证。 如果为 False,则打开受保护的内容将始终执行 HTTP 操作,从 RMS 服务获取许可证。
CanCacheLicenses 函数
获取是否在本地缓存最终用户许可证 (EUL)。
返回结果:许可证缓存配置
SetCustomSettings 函数
设置用于功能检查和测试的自定义设置。
参数:
- customSettings:名称/值对列表。
GetCustomSettings 函数
获取用于功能检查和测试的自定义设置。
返回:名称/值对的列表。
GetLoggerContext 函数
获取记录器上下文,该上下文将被不透明地传递给与创建的配置文件关联的日志记录器委托。
返回结果:记录器上下文
SetLoggerContext 函数
设置记录器上下文,该上下文将被不透明地传递给与创建的配置文件关联的日志记录器委托。
参数:
- loggerContext:记录器上下文
AddRedirectionUri 函数
添加重定向 URI。
参数:
originalUri:应从其重定向的 URI
redirectUri:将取代 originalUri 的 URI
使用此函数提供一个域,该域应重定向到另一个 URI。originalUri 将在与当前请求的域进行比较之前进行规范化。 如果当前请求的域与 originalUri 的域匹配,则会改用 redirectUri。此重定向发生在 DNS 查找重定向之前
GetRedirectionUris 函数
获取重定向 URI。
返回结果:重定向 URI 的对应关系
GetDnsRedirection 函数
获取 dns 重定向模式。
返回:使用的重定向模式
SetDnsRedirection 函数
设置 dns 重定向模式,用于控制在联机操作期间如何处理重定向。
参数:
- dnsRedirection:要使用的重定向模式
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈