共用方式為


class ProtectionEngine

管理與特定身分識別相關的保護相關動作。

摘要

成員 Description
public const 設定& Get 設定() const 取得引擎設定。
public std::shared_ptr AsyncControl GetTemplatesAsync(const std::shared_ptr<ProtectionEngine::Observer>& observer, const std::shared_ptr<void>& context, const std::shared_ptr<const GetTemplates 設定& template 設定>)>< 取得使用者可用的範本集合。
public std::shared_ptr<AsyncControl> GetTemplatesAsync(const std::shared_ptr<ProtectionEngine::Observer& observer>, const std::shared_ptr<void>& context) 取得使用者可用的範本集合。
public std::vector std::shared_ptr TemplateDescriptor<>> GetTemplates(const std::shared_ptr void>& context, const std::shared_ptr<<const GetTemplates 設定& template 設定>)< 取得使用者可用的範本集合。
public std::vector<std::shared_ptr<TemplateDescriptor>> GetTemplates(const std::shared_ptr<void>& context) 取得使用者可用的範本集合。
public bool IsFeatureSupported(FeatureId featureId) 支援檢查功能。
public std::shared_ptr AsyncControl> GetRightsForLabelIdAsync(const std::string& documentId, const std::string& labelId, const std::string& ownerEmail, const std::string& delegatedUserEmail, const std::shared_ptr ProtectionEngine::Observer>& observer, const std::shared_ptr<void>& context, const ProtectionCommon 設定&<settings<) 取得使用者可取得標籤標識碼的許可權集合。
public std::vector<std::string> GetRightsForLabelId(const std::string& documentId, const std::string& labelId, const std::string& ownerEmail, const std::string& delegatedUserEmail, const std::shared_ptr<void>& context, const ProtectionCommon 設定& settings) 取得使用者可取得 labelId 的許可權集合。
public std::shared_ptr AsyncControl> CreateProtectionHandlerForPublishingAsync(const ProtectionHandler::P ublishing 設定& settings, const std::shared_ptr ProtectionHandler::Observer>& observer, const std::shared_ptr<void>& context)<< 建立將許可權/角色指派給特定用戶的保護處理程式。
public std::shared_ptr<ProtectionHandler CreateProtectionHandlerForPublishing>(const ProtectionHandler::P ublishing 設定& settings, const std::shared_ptr<void>& context) 建立將許可權/角色指派給特定用戶的保護處理程式。
public std::shared_ptr AsyncControl> CreateProtectionHandlerForConsumptionAsync(const ProtectionHandler::Consumption 設定& settings, const std::shared_ptr ProtectionHandler::Observer& observer>, const std::shared_ptr<void>& context)<< 建立將許可權/角色指派給特定用戶的保護處理程式。
public std::shared_ptr<ProtectionHandler CreateProtectionHandlerForConsumption>(const ProtectionHandler::Consumption 設定& settings, const std::shared_ptr<void>& context) 建立將許可權/角色指派給特定用戶的保護處理程式。
public bool LoadUserCert(const std::shared_ptr<void>& context, const ProtectionCommon 設定& settings) 先發制人地載入使用者授權憑證,在背景載入時很有用,否則使用預先授權可能會導致額外的網路呼叫。
public std::shared_ptr AsyncControl LoadUserCertAsync(const std::shared_ptr ProtectionEngine::Observer>& observer, const std::shared_ptr<<void>& context, const ProtectionCommon 設定& settings)>< 先發制人地載入使用者授權憑證,在背景載入時很有用,否則使用預先授權可能會導致額外的網路呼叫。
public void RegisterContentForTrackingAndRevocation(const std::vector<uint8_t>& serializedPublishingLicense, const std::string& contentName, bool isOwnerNotificationEnabled, const std::shared_ptr<void>& context, const ProtectionCommon 設定& settings) 註冊文件追蹤和撤銷的發佈授權(PL)。
public std::shared_ptr AsyncControl RegisterContentForTrackingAndRevocationAsync(const std::vector<uint8_t>& serializedPublishingLicense, const std::string& contentName, bool isOwnerNotificationEnabled, const std::shared_ptr ProtectionEngine::Observer& observer>, const std::shared_ptr<<void>& context, const ProtectionCommon 設定&> settings)< 註冊文件追蹤和撤銷的發佈授權(PL)。
public void RevokeContent(const std::vector<uint8_t>& serializedPublishingLicense, const std::shared_ptr<void>& context, const ProtectionCommon 設定& settings) 執行內容的撤銷。
public std::shared_ptr AsyncControl RevokeContentAsync(const std::vector uint8_t& serializedPublishingLicense, const std::shared_ptr<ProtectionEngine::Observer>& observer, const std::shared_ptr<void>& context, const ProtectionCommon 設定& settings)><>< 執行內容的撤銷。
public std::vector<std::shared_ptr<DelegationLicense CreateDelegationLicenses>>(const DelegationLicense 設定& settings, const std::shared_ptr<void>& context) 建立委派的授權。
public std::shared_ptr AsyncControl> CreateDelegationLicensesAsync(const DelegationLicense 設定& settings, const std::shared_ptr ProtectionEngine::Observer>& observer, const std::shared_ptr<void>& context)<< 建立委派的授權。
public std::shared_ptr<TenantInformation GetTenantInformation>(const ProtectionCommon 設定& settings, const std::shared_ptr<void>& context) 載入使用者授權憑證,並傳回租使用者的相關信息。
public std::shared_ptr AsyncControl GetTenantInformationAsync(const ProtectionCommon 設定& settings, const std::shared_ptr<ProtectionEngine::Observer>& observer, const std::shared_ptr<void>& context)>< 載入使用者授權憑證,並傳回租使用者的相關信息。
public std::shared_ptr<LicenseRightsData GetLicenseRightsData>(const std::vector<uint8_t>& serializedPublishingLicense, const std::shared_ptr<void>& context, const ProtectionCommon 設定& settings) 取得授權許可權數據。
public std::shared_ptr AsyncControl> GetLicenseRightsDataAsync(const std::vector<uint8_t<>& serializedPublishingLicense, const std::shared_ptr<ProtectionEngine::Observer>& observer, const std::shared_ptr<void>& context, const ProtectionCommon 設定& settings) 取得授權許可權數據。

成員

Get 設定 函式

取得引擎設定。

回:引擎設定

GetTemplatesAsync 函式

取得使用者可用的範本集合。

參數:

  • observer:實作 ProtectionEngine::Observer 介面的類別

  • context:將不透明地傳回觀察者和選擇性 HttpDelegate 的用戶端內容

  • template 設定:取得範本時要使用的 設定

回:異步控件物件。

GetTemplatesAsync 函式

取得使用者可用的範本集合。

參數:

  • observer:實作 ProtectionEngine::Observer 介面的類別

  • context:將不透明地傳回觀察者和選擇性 HttpDelegate 的用戶端內容

回:異步控件物件。

GetTemplates 函式

取得使用者可用的範本集合。

參數:

  • context:將不透明傳遞至選擇性 HttpDelegate 的客戶端內容

  • template 設定:取得範本時要使用的 設定

回:範本識別碼清單

GetTemplates 函式

取得使用者可用的範本集合。

參數:

  • context:將不透明傳遞至選擇性 HttpDelegate 的客戶端內容

回:範本識別碼清單

IsFeatureSupported 函式

支援檢查功能。

參數:

  • featureId:要檢查的功能識別碼

傳回:布爾結果

GetRightsForLabelIdAsync 函式

取得使用者可取得標籤標識碼的許可權集合。

參數:

  • documentId:與文件元數據相關聯的文件標識碼

  • labelId:與檔建立之文件元數據相關聯的標籤標識碼

  • ownerEmail:文件的擁有者

  • :當驗證使用者/應用程式代表其他使用者執行時,會指定委派的使用者,如果沒有,則為空白

  • observer:實作 ProtectionEngine::Observer 介面的類別

  • context:此相同內容將會轉送至 ProtectionEngine::Observer::OnGetRightsForLabelIdSuccess 或 ProtectionEngine::Observer::OnGetRightsForLabelIdFailure

回:異步控件物件。

GetRightsForLabelId 函式

取得使用者可取得 labelId 的許可權集合。

參數:

  • documentId:與文件元數據相關聯的文件標識碼

  • labelId:與檔建立之文件元數據相關聯的標籤標識碼

  • ownerEmail:文件的擁有者

  • :當驗證使用者/應用程式代表其他使用者執行時,會指定委派的使用者,如果沒有,則為空白

  • context:此相同內容將會轉送至選擇性 HttpDelegate

回:許可權清單

CreateProtectionHandlerForPublishingAsync 函式

建立將許可權/角色指派給特定用戶的保護處理程式。

參數:

  • 設定:保護設定

  • observer:實作 ProtectionHandler::Observer 介面的類別

  • context:將不透明轉送至觀察者和選擇性 HttpDelegate 的用戶端內容

回:異步控件物件。 如果設定僅脫機,引擎必須先前稱為 GetTemplatesAsync 和 LoadUserCertAsync

CreateProtectionHandlerForPublishing 函式

建立將許可權/角色指派給特定用戶的保護處理程式。

參數:

  • 設定:保護設定

  • context:將不透明轉送至選擇性 HttpDelegate 的客戶端內容

傳回:ProtectionHandler 如果設定僅脫機,引擎必須先前稱為 GetTemplates 和 LoadUserCert

CreateProtectionHandlerForConsumptionAsync 函式

建立將許可權/角色指派給特定用戶的保護處理程式。

參數:

  • 設定:保護設定

  • observer:實作 ProtectionHandler::Observer 介面的類別

  • context:將不透明轉送至觀察者和選擇性 HttpDelegate 的用戶端內容

回:異步控件物件。

CreateProtectionHandlerForConsumption 函式

建立將許可權/角色指派給特定用戶的保護處理程式。

參數:

  • 設定:保護設定

  • context:將不透明轉送至選擇性 HttpDelegate 的客戶端內容

回:ProtectionHandler

LoadUserCert 函式

先發制人地載入使用者授權憑證,在背景載入時很有用,否則使用預先授權可能會導致額外的網路呼叫。

參數:

  • context:將不透明轉送至選擇性 HttpDelegate 的客戶端內容

傳回:如果載入成功,則為 True,否則為 false。

LoadUserCertAsync 函式

先發制人地載入使用者授權憑證,在背景載入時很有用,否則使用預先授權可能會導致額外的網路呼叫。

參數:

  • observer:實作 ProtectionHandler::Observer 介面的類別

  • context:將不透明轉送至觀察者和選擇性 HttpDelegate 的用戶端內容

回:異步控件物件。

RegisterContentForTrackingAndRevocation 函式

註冊文件追蹤和撤銷的發佈授權(PL)。

參數:

  • contentName:與 serializedPublishingLicense 所指定之內容相關聯的名稱。 如果 serializedPublishingLicense 指定內容名稱,該值將會優先使用。

  • isOwnerNotificationEnabled:設定為 true 以在檔解密時透過電子郵件通知擁有者,或設定為 false 以不傳送通知。

  • context:將不透明轉送至選擇性 HttpDelegate 的客戶端內容

RegisterContentForTrackingAndRevocationAsync 函式

註冊文件追蹤和撤銷的發佈授權(PL)。

參數:

  • serializedPublishingLicense:從受保護的內容串行化發佈授權

  • contentName:與 serializedPublishingLicense 所指定之內容相關聯的名稱。 如果 serializedPublishingLicense 指定內容名稱,該值會優先使用

  • isOwnerNotificationEnabled:設定為 true 以在檔解密時透過電子郵件通知擁有者,或設定為 false 以不傳送通知。

  • observer:實作 ProtectionHandler::Observer 介面的類別

  • context:將不透明轉送至觀察者和選擇性 HttpDelegate 的用戶端內容

回:異步控件物件。

RevokeContent 函式

執行內容的撤銷。

參數:

  • serializedPublishingLicense:從受保護的內容串行化發佈授權

  • context:將不透明轉送至選擇性 HttpDelegate 的客戶端內容

RevokeContentAsync 函式

執行內容的撤銷。

參數:

  • serializedPublishingLicense:從受保護的內容串行化發佈授權

  • observer:實作 ProtectionHandler::Observer 介面的類別

  • context:將不透明轉送至觀察者和選擇性 HttpDelegate 的用戶端內容

回:異步控件物件。

CreateDelegationLicenses 函式

建立委派的授權。

參數:

  • 設定:委派設定

  • context:將不透明轉送至觀察者和選擇性 HttpDelegate 的用戶端內容

回:委派授權的向量 使用此方法為使用者清單建立授權

CreateDelegationLicensesAsync 函式

建立委派的授權。

參數:

  • 設定:委派設定

  • observer:實作 ProtectionHandler::Observer 介面的類別

  • context:將不透明轉送至觀察者和選擇性 HttpDelegate 的用戶端內容

回:異步控件物件。 使用此方法建立使用者清單的授權。 在回呼 OnCreateDelegatedLicensesSuccess Failures 中接收 DelegationLicense 向量會在 OnCreateDelegatedLicensesFailure 中傳送

GetTenantInformation 函式

載入使用者授權憑證,並傳回租使用者的相關信息。

參數:

  • 設定:一般設定

  • context:將不透明轉送至選擇性 HttpDelegate 的客戶端內容

回:TenantInformation

GetTenantInformationAsync 函式

載入使用者授權憑證,並傳回租使用者的相關信息。

參數:

  • 設定:一般設定

  • observer:實作 ProtectionHandler::Observer 介面的類別

  • context:將不透明轉送至觀察者和選擇性 HttpDelegate 的用戶端內容

回:異步控件物件。

  • ProtectionEngine::Observer::OnGetTenantInformationAsyncSuccess 將會在失敗時呼叫 ProtectionEngine::Observer::OnGetTenantInformationAsyncFailure

GetLicenseRightsData 函式

取得授權許可權數據。

參數:

  • serializedPublishingLicense:從受保護的內容串行化發佈授權

  • context:將不透明轉送至選擇性 HttpDelegate 的客戶端內容

  • 設定:一般設定

回:授權許可權數據

GetLicenseRightsDataAsync 函式

取得授權許可權數據。

參數:

  • serializedPublishingLicense:從受保護的內容串行化發佈授權

  • observer:實作 ProtectionHandler::Observer 介面的類別

  • context:將不透明轉送至觀察者和選擇性 HttpDelegate 的用戶端內容

  • 設定:一般設定

回:異步控件物件。