Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProtectionDescriptorBuilder is missing static member functions (C++) #1519

Open
lvkv opened this issue Apr 11, 2023 · 0 comments
Open

ProtectionDescriptorBuilder is missing static member functions (C++) #1519

lvkv opened this issue Apr 11, 2023 · 0 comments

Comments

@lvkv
Copy link
Contributor

lvkv commented Apr 11, 2023

All static member functions of class ProtectionDescriptorBuilder are missing from mip/develop/reference/class_mip_protectiondescriptorbuilder.md. These members are public and useful; could we add them? I've copied the missing functions below from the MIP SDK 1.12.101 protection_descriptor_builder.h header for your convenience:

  /**
   * @brief Creates a ProtectionDescriptorBuilder whose access permissions are defined by users and rights
   * 
   * @param usersAndRights Collection of users-to-rights mappings
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromUserRights(
      const std::vector<UserRights>& usersAndRights);

  /**
   * @brief Creates a ProtectionDescriptorBuilder whose access permissions are defined by users and roles
   * 
   * @param usersAndRoles Collection of users-to-roles mappings
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromUserRoles(
      const std::vector<UserRoles>& usersAndRoles);

  /**
   * @brief Creates a ProtectionDescriptorBuilder whose access permissions are defined by the protection template
   * 
   * @param templateId protection template ID
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromTemplate(const std::string& templateId);

  /**
   * @brief Creates a ProtectionDescriptorBuilder whose access permissions are defined by the protection template
   * 
   * @param serializedTemplate protection template
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromSerializedTemplate(
    const std::vector<uint8_t>& serializedTemplate);

  /**
   * @brief Creates a ProtectionDescriptorBuilder whose access permissions are defined by a protection descriptor
   * 
   * @param protectionDescriptor protection descriptor
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromProtectionDescriptor(const ProtectionDescriptor& protectionDescriptor);

  /**
   * @brief Creates a ProtectionDescriptorBuilder for a license type with the specified users
   * 
   * @param licenseType The license type to create this ProtectionDescriptorBuilder for
   * @param usersWithDefaultRights Collection of users to add to the license with default rights for the specific type
   * @param additionalUsersAndRights Optional additional collection of users-to-rights mappings
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromLicenseType(
      LicenseType licenseType,
      const std::vector<std::string>& usersWithDefaultRights,
      const std::vector<UserRights>& additionalUsersAndRights);

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant