Microsoft Information Protection SDK - C++ 1.17
API Reference Documentation for C++
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
common_types.h File Reference

A file Containing the common types used by the upe, file and protection modules. More...

#include <cstring>
#include <exception>
#include <map>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "mip/mip_namespace.h"

Go to the source code of this file.

Classes

struct  UniqueIdsAndContentFormats
 
class  Identity
 Abstraction for identity. More...
 
class  AuthDelegate
 Delegate for auth related operations. More...
 
class  AuthDelegate::OAuth2Challenge
 a class that contains all the information required from the calling application in order to generate an oauth2 token. More...
 
class  AuthDelegate::OAuth2Token
 A class containing access token info provided by an application. More...
 
class  ConsentDelegate
 Delegate for consent related operations. More...
 
struct  ApplicationInfo
 A struct that includes application specific information. More...
 
class  AsyncControl
 Class used to cancel async operation. More...
 

Typedefs

typedef LabelFilterType FunctionalityFilterType
 Name change within the cpp workspace to imply the filters has greater scope than just label behavior. Avoided changing name fully to prevent breaking on client operations.
 
typedef std::map< mip::Classifier, UniqueIdsAndContentFormatsClassifierUniqueIdsAndContentFormats
 

Enumerations

enum class  WatermarkLayout : unsigned int { HORIZONTAL = 0 , DIAGONAL = 1 }
 Layout for watermarks. More...
 
enum class  ContentMarkAlignment : unsigned int { LEFT = 0 , RIGHT = 1 , CENTER = 2 }
 Alignment for content marks (content header or content footer). More...
 
enum class  AssignmentMethod : unsigned int { STANDARD = 0 , PRIVILEGED = 1 , AUTO = 2 }
 The assignment method of the label on the document. Whether the Assignment of the label was done automatically, standard or as a privileged operation (The equivalent to an administrator operation). More...
 
enum class  ActionSource : unsigned int { MANUAL , AUTOMATIC , RECOMMENDED , DEFAULT }
 defines what triggered the SetLabel event More...
 
enum class  DataState : unsigned int { REST , MOTION , USE }
 Defines what state of the data is the application acting upon. More...
 
enum  LabelFilterType : unsigned int {
  None = 0 , CustomProtection = 1 << 0 , TemplateProtection = 1 << 1 , DoNotForwardProtection = 1 << 2 ,
  AdhocProtection = 1 << 3 , HyokProtection = 1 << 4 , PredefinedTemplateProtection = 1 << 5 , DoubleKeyProtection = 1 << 6 ,
  DoubleKeyUserDefinedProtection = 1 << 7 , EncryptOnlyProtection = 1 << 8 , SensitiveInformationClassifier = 1 << 9 , MachineLearningClassifier = 1 << 10 ,
  ExtendedSensitiveInformationClassifier = 1 << 11
}
 Label filter types, optional set of properties that can be used to filter labels or label behavior when calling list sensitivity labels or autoclassifying data. More...
 
enum class  FeatureId : unsigned int { EncryptOnly }
 Defines new features by name. More...
 
enum class  VariableTextMarkingType : unsigned int { Default = 0 , PassThrough = 1 , None = 2 }
 various dynamic fields can be set into the text message of the application Some known: ${Item.Label} ${Item.Name} ${Item.Location} ${User.Name} ${User.PrincipalName} ${Event.DateTime} Others are still not defined: The sdk will replace them with correct values using these control flags. More...
 
enum class  Classifier : unsigned int { SensitiveInformation = 0 , MachineLearning = 1 , ExtendedSensitiveInformation = 2 }
 The type of classification the application should be running on the data to determine autolabeling status. More...
 
enum class  Workload : unsigned int { Office = 0 , Purview = 1 }
 The workload the application is working on, used primary to check for consent. More...
 
enum class  Consent : unsigned int { AcceptAlways , Accept , Reject }
 A user's response when consent is requested to connect to a service endpoint. More...
 
enum class  CacheStorageType : unsigned int { InMemory = 0 , OnDisk = 1 , OnDiskEncrypted = 2 }
 Storage type for the caches. More...
 
enum class  PFileExtensionBehavior { Default = 0 , PFileSuffix = 1 , PPrefix = 2 }
 Describes PFile extensions behavior. More...
 
enum class  Cloud {
  Unknown = 0 , Custom = 1 , Test = 2 , Commercial = 3 ,
  Germany = 4 , US_DoD = 5 , US_GCC = 6 , US_GCC_High = 7 ,
  US_Sec = 8 , US_Nat = 9 , China_01 = 10
}
 Azure cloud identifier. More...
 
enum class  DataBoundary {
  Default = 0 , United_States = 1 , North_America = 1 , European_Union = 2 ,
  Germany = 3 , Europe_MiddleEast_Africa = 3 , Japan = 4 , Asia = 4 ,
  Australia = 5
}
 Diagnostic region identifier. More...
 

Functions

const std::string & GetFileContentFormat ()
 
const std::string & GetEmailContentFormat ()
 
FunctionalityFilterType operator| (FunctionalityFilterType firstFilter, FunctionalityFilterType secondFilter)
 
FunctionalityFilterType operator& (FunctionalityFilterType firstFilter, FunctionalityFilterType secondFilter)
 
FunctionalityFilterType operator~ (FunctionalityFilterType filter)
 
std::string GetAssignmentMethodString (AssignmentMethod method)
 Converts AssignmentMethod enum to a string description.
 
static std::string GetActionSourceString (ActionSource actionSource)
 Get the action source name.
 
static std::string GetDataStateString (DataState state)
 Get the content state name.
 
const std::string & GetSqliteExtension ()
 
const std::string & GetMemoryDatabasePath ()
 
constexpr const char * GetCustomSettingPolicyDataName ()
 Name of the setting to explicitly specify policy data.
 
constexpr const char * GetCustomSettingExportPolicyFileName ()
 Name of the setting to explicitly specify file path to export SCC policy data to.
 
constexpr const char * GetCustomSettingSensitivityTypesDataName ()
 Name of the setting to explicitly specify sensitivity data.
 
constexpr const char * GetCustomSettingPolicyDataFile ()
 Name of the setting to explicitly specify policy data file path.
 
constexpr const char * GetCustomSettingSensitivityTypesDataFile ()
 Name of the setting to explicitly specify sensitivity types data file path.
 
constexpr const char * GetCustomSettingLabelCustomPropertiesSyncEnabled ()
 Name of the setting that allows to enable label by custom properties and custom properties by label features.
 
constexpr const char * GetCustomSettingPolicyTtlDays ()
 Name of the setting that enables overriding policy ttl in days be default it will be 30 days. Values should be set as string integers i < 0 means infinite time to live.
 
constexpr const char * GetCustomSettingSensitivityPolicyTtlDays ()
 Name of the setting that enables overriding sensitivity policy ttl in days be default it will be 30 days. Values should be set as string integers i < 0 means infinite time to live.
 

Detailed Description

A file Containing the common types used by the upe, file and protection modules.

Typedef Documentation

◆ ClassifierUniqueIdsAndContentFormats

◆ FunctionalityFilterType

Name change within the cpp workspace to imply the filters has greater scope than just label behavior. Avoided changing name fully to prevent breaking on client operations.

Enumeration Type Documentation

◆ ActionSource

enum class ActionSource : unsigned int
strong

defines what triggered the SetLabel event

Enumerator
MANUAL 

Selected manually by user

AUTOMATIC 

Set by policy conditions

RECOMMENDED 

Set by user after label was recommended by policy conditions

DEFAULT 

Set by default in policy

◆ AssignmentMethod

enum class AssignmentMethod : unsigned int
strong

The assignment method of the label on the document. Whether the Assignment of the label was done automatically, standard or as a privileged operation (The equivalent to an administrator operation).

Enumerator
STANDARD 

Label assignment method is standard

PRIVILEGED 

Label assignment method is privileged

AUTO 

Label assignment method is automatic

◆ CacheStorageType

enum class CacheStorageType : unsigned int
strong

Storage type for the caches.

Enumerator
InMemory 

In Memory storage

OnDisk 

On Disk storage

OnDiskEncrypted 

On Disk storage with internal encryption (if supported by the platform)

◆ Classifier

enum class Classifier : unsigned int
strong

The type of classification the application should be running on the data to determine autolabeling status.

Enumerator
SensitiveInformation 
MachineLearning 
ExtendedSensitiveInformation 

◆ Cloud

enum class Cloud
strong

Azure cloud identifier.

Enumerator
Unknown 

Cloud not specified or URL not recognized as an Azure cloud

Custom 

Custom cloud: endpoint base URL manually specified by application

Test 

Test cloud

Commercial 

Global commercial cloud

Germany 

Germany sovereign cloud

US_DoD 

US sovereign cloud (DoD)

US_GCC 

US sovereign cloud (GCC)

US_GCC_High 

US sovereign cloud (GCC-High)

US_Sec 

US sovereign cloud (Sec)

US_Nat 

US sovereign cloud (Nat)

China_01 

China sovereign cloud

◆ Consent

enum class Consent : unsigned int
strong

A user's response when consent is requested to connect to a service endpoint.

Enumerator
AcceptAlways 

Consent, and remember this decision

Accept 

Consent, just one time

Reject 

Do not consent

◆ ContentMarkAlignment

enum class ContentMarkAlignment : unsigned int
strong

Alignment for content marks (content header or content footer).

Enumerator
LEFT 

Content marking is aligned to the left

RIGHT 

Content marking is aligned to the right

CENTER 

Content marking is centered

◆ DataBoundary

enum class DataBoundary
strong

Diagnostic region identifier.

Enumerator
Default 

Region is not specified

United_States 

United States region. Previously North America region

North_America 

DEPRECATED North America region

European_Union 

European Union region

Germany 

Germany region. Maps to European Union. Previously used for Europe, MiddleEast, and Africa

Europe_MiddleEast_Africa 

DEPRECATED Europe, Middle East & Africa region

Japan 

Japan region. Previously Asia region

Asia 

DEPRECATED Asia region

Australia 

Australia region

◆ DataState

enum class DataState : unsigned int
strong

Defines what state of the data is the application acting upon.

Enumerator
REST 

Inactive data stored physically in databases/file/warehouses

MOTION 

Data traversing a network or temporarily residing in computer memory to be read or updated

USE 

Active data under constant change stored physically in databases/file/warehouses etc

◆ FeatureId

enum class FeatureId : unsigned int
strong

Defines new features by name.

Enumerator
EncryptOnly 

Check if server supports EncryptOnly feature

◆ LabelFilterType

enum LabelFilterType : unsigned int

Label filter types, optional set of properties that can be used to filter labels or label behavior when calling list sensitivity labels or autoclassifying data.

Enumerator
None 

Disable default labeling filtration

CustomProtection 

Filter labels that may result in custom protection

TemplateProtection 

Filter labels that may result in template protection

DoNotForwardProtection 

Filter labels that may result in do not forward

AdhocProtection 

Filter labels that may result in adhoc protection

HyokProtection 

Filter labels that may result in hyok protection

PredefinedTemplateProtection 

Filter labels that may result in predefined template protection

DoubleKeyProtection 

Filter labels that may result in protection that requires double key, can be template, adhoc, dnf. This filter removes support for all double key labels

DoubleKeyUserDefinedProtection 

Filter labels that may result in protection that requires double key adhoc and dnf. This filter removes support for double key adhoc labels. It is more selective than DoubleKeyProtection filter which removes all support

EncryptOnlyProtection 

Filter labels that may result in encrypt only

SensitiveInformationClassifier 

Classifier based on Sensitive Information Detection (e.g. Credit card number or SSN) uses the Microsoft Classification Engine (MCE)

MachineLearningClassifier 

Classifier based on Machine Learning (e.g. Offensive Language)

ExtendedSensitiveInformationClassifier 

Classifier based on Sensitive Information Detection (e.g. Credit card number or SSN) does not use MCE

◆ PFileExtensionBehavior

enum class PFileExtensionBehavior
strong

Describes PFile extensions behavior.

Enumerator
Default 

Extensions will become as SDK default behavior

PFileSuffix 

Extensions will become <EXT>.PFILE

PPrefix 

Extensions will become P<EXT>

◆ VariableTextMarkingType

enum class VariableTextMarkingType : unsigned int
strong

various dynamic fields can be set into the text message of the application Some known: ${Item.Label} ${Item.Name} ${Item.Location} ${User.Name} ${User.PrincipalName} ${Event.DateTime} Others are still not defined: The sdk will replace them with correct values using these control flags.

Enumerator
Default 

Known markings are converted unknown marking are removed

PassThrough 

Known markings are converted unknown marking are passed through

None 

All markings are passed through

◆ WatermarkLayout

enum class WatermarkLayout : unsigned int
strong

Layout for watermarks.

Enumerator
HORIZONTAL 

Watermark layout is horizontal

DIAGONAL 

Watermark layout is diagonal

◆ Workload

enum class Workload : unsigned int
strong

The workload the application is working on, used primary to check for consent.

Enumerator
Office 
Purview 

Function Documentation

◆ GetActionSourceString()

static std::string GetActionSourceString ( ActionSource actionSource)
inlinestatic

Get the action source name.

Parameters
actionSourceThe action source.
Returns
a string representation of the action source.

◆ GetAssignmentMethodString()

std::string GetAssignmentMethodString ( AssignmentMethod method)
inline

Converts AssignmentMethod enum to a string description.

Parameters
methodan assignment method.
Returns
a string description of the assignment method.

◆ GetCustomSettingExportPolicyFileName()

const char * GetCustomSettingExportPolicyFileName ( )
inlineconstexpr

Name of the setting to explicitly specify file path to export SCC policy data to.

Returns
the custom settings key.

◆ GetCustomSettingLabelCustomPropertiesSyncEnabled()

const char * GetCustomSettingLabelCustomPropertiesSyncEnabled ( )
inlineconstexpr

Name of the setting that allows to enable label by custom properties and custom properties by label features.

Returns
the custom settings key.

◆ GetCustomSettingPolicyDataFile()

const char * GetCustomSettingPolicyDataFile ( )
inlineconstexpr

Name of the setting to explicitly specify policy data file path.

Returns
the custom settings key.

◆ GetCustomSettingPolicyDataName()

const char * GetCustomSettingPolicyDataName ( )
inlineconstexpr

Name of the setting to explicitly specify policy data.

Returns
the custom settings key.

◆ GetCustomSettingPolicyTtlDays()

const char * GetCustomSettingPolicyTtlDays ( )
inlineconstexpr

Name of the setting that enables overriding policy ttl in days be default it will be 30 days. Values should be set as string integers i < 0 means infinite time to live.

Returns
the custom settings key.

◆ GetCustomSettingSensitivityPolicyTtlDays()

const char * GetCustomSettingSensitivityPolicyTtlDays ( )
inlineconstexpr

Name of the setting that enables overriding sensitivity policy ttl in days be default it will be 30 days. Values should be set as string integers i < 0 means infinite time to live.

Returns
the custom settings key.

◆ GetCustomSettingSensitivityTypesDataFile()

const char * GetCustomSettingSensitivityTypesDataFile ( )
inlineconstexpr

Name of the setting to explicitly specify sensitivity types data file path.

Returns
the custom settings key.

◆ GetCustomSettingSensitivityTypesDataName()

const char * GetCustomSettingSensitivityTypesDataName ( )
inlineconstexpr

Name of the setting to explicitly specify sensitivity data.

Returns
the custom settings key.

◆ GetDataStateString()

static std::string GetDataStateString ( DataState state)
inlinestatic

Get the content state name.

Parameters
actionSourceThe state of the content being worked upon.
Returns
a string representation of the content state.

◆ GetEmailContentFormat()

const std::string & GetEmailContentFormat ( )
inline

◆ GetFileContentFormat()

const std::string & GetFileContentFormat ( )
inline

◆ GetMemoryDatabasePath()

const std::string & GetMemoryDatabasePath ( )
inline

◆ GetSqliteExtension()

const std::string & GetSqliteExtension ( )
inline

◆ operator&()

FunctionalityFilterType operator& ( FunctionalityFilterType firstFilter,
FunctionalityFilterType secondFilter )
inline

◆ operator|()

FunctionalityFilterType operator| ( FunctionalityFilterType firstFilter,
FunctionalityFilterType secondFilter )
inline

◆ operator~()