Class ISemanticContext

Inheritance Relationships

Derived Type

Class Documentation

class Microsoft::Applications::Events::ISemanticContext

Subclassed by Microsoft::Applications::Events::NullContext

Public Functions

inline virtual ~ISemanticContext()
inline virtual void SetAppEnv(const std::string &x)

Set the application environment context information of telemetry event.

Parameters

appEnv – Environment from which this event originated

inline virtual void SetAppId(const std::string &x)

Set the application identifier context information of telemetry event.

Parameters

appId – Id that uniquely identifies the user-facing application from which this event originated

inline virtual void SetAppName(const std::string &x)

Set the application name context information of telemetry event.

Parameters

appName – Application Name

inline virtual void SetAppVersion(const std::string &x)

Set the application version context information of telemetry event.

Parameters

appVersion – Version of the application, retrieved programmatically where possible and is app/platform specific

inline virtual void SetAppLanguage(const std::string &x)

Set the application language context information of telemetry event.

inline virtual void SetAppExperimentIds(const std::string &x)

Set the application’s experiment IDs information of telemetry event.

The experiment IDs information will be applied to all events unless it is overwritten by that set via SetEventExperimentIds

Parameters

appVersion – list of IDs of experimentations into which the application is enlisted

inline virtual void SetAppExperimentETag(std::string const &appExperimentETag)

Set the application version context information of telemetry event.

Removes previously stored experiment ids set by SetAppExperimentIds.

Parameters

appVersion – ETAG which is a hash of the set of experimentations into which the application is enlisted

inline virtual void SetAppExperimentImpressionId(const std::string &x)

Set the application experimentation impression id information of telemetry event.

Parameters

appExperimentIds – List of expementation IDs which are app/platform specific

inline virtual void SetEventExperimentIds(std::string const&, std::string const&)

Set the experiment IDs information of the specified telemetry event.

Parameters

appVersion – list of IDs of experimentations into which the application is enlisted

inline virtual void ClearExperimentIds()

Clear the experiment IDs information.

inline virtual void SetDeviceId(const std::string &x)

Set the device identifier context information of telemetry event.

Parameters

deviceId – A unique device identifier, retrieved programmatically where possible and is app/platform specific

inline virtual void SetDeviceMake(const std::string &x)

Set the device manufacturer context information of telemetry event.

Parameters

deviceMake – The manufacturer of the device, retrieved programmatically where possible and is app/platform specific

inline virtual void SetDeviceModel(const std::string &x)

Set the device model context information of telemetry event.

Parameters

deviceModel – The model of the device, retrieved programmatically where possible and is app/platform specific

inline virtual void SetDeviceClass(const std::string &x)

Set the device class context information of telemetry event.

Parameters

deviceClass – Device class.

inline virtual void SetDeviceOrgId(const std::string &x)

Set the device orgId context information of telemetry event.

Parameters

deviceClass – Device orgId

inline virtual void SetNetworkCost(NetworkCost networkCost)

Set the network cost context information of telemetry event.

Parameters

networkCost – The cost of using data traffic on the current network

inline virtual void SetNetworkProvider(const std::string &x)

Set the network provider context information of telemetry event.

Parameters

networkProvider – The provider used to connect to the current network, retrieved programmatically where possible and is app/platform specific

inline virtual void SetNetworkType(NetworkType networkType)

Set the network type context information of telemetry event.

Parameters

networkType – The type of the current network

inline virtual void SetOsName(const std::string &x)

Set the system name context information of telemetry event.

Parameters

osName – The system anme, retrieved programmatically where possible and is app/platform specific

inline virtual void SetOsVersion(const std::string &x)

Set the system version context information of telemetry event.

Parameters

osVersion – The system version, retrieved programmatically where possible and is app/platform specific

inline virtual void SetOsBuild(const std::string &x)

Set the system build number context information of telemetry event.

Parameters

osBuild – The system build, retrieved programmatically where possible and is app/platform specific

inline virtual void SetUserId(std::string const &userId, PiiKind piiKind = PiiKind_Identity)

Set the userId context information of telemetry event.

Parameters
  • userId – Identifier that uniquely identifies a user in the application-specific user namespace

  • piiKind – PIIKind of the userId. Default to PiiKind_Identity, set it to PiiKind_None to denote it as non-PII.

inline virtual void SetUserMsaId(const std::string &x)

Set the user MsaId context information of telemetry event.

Parameters

userMsaId – Msa id that identifies a user in the application-specific user namespace

inline virtual void SetUserANID(const std::string &x)

Set the user ANID context information of telemetry event.

Parameters

userANID – ANID that identifies a user in in the application-specific user namespace

inline virtual void SetUserAdvertisingId(const std::string &x)

Set the advertising Id context information of telemetry event.

Parameters

userAdvertingId – Advertising Id of a user to use in an application-specific user namespace

inline virtual void SetUserLanguage(const std::string &x)

Set the user language context information of telemetry event.

Parameters

locale – user’s language in IETF language tag format, as described in RFC 4646.

inline virtual void SetUserTimeZone(const std::string &x)

Set the user time zone context information of telemetry event.

Parameters

timeZone – user’s time zone relative to UTC, in ISO 8601 time zone format

inline virtual void SetCommercialId(const std::string &x)

Set the Commercial Id context information of telemetry event.

Parameters

commercialId – CommercialId of a machine

inline virtual void SetCommonField(const std::string&, const EventProperty&)

Sets the common Part A/B field.

Parameters
  • name – Field name

  • value – Field value.

inline virtual void SetCustomField(const std::string&, const EventProperty&)

Sets the custom Part C field.

Parameters
  • name – Field name

  • value – Field value.

inline virtual void SetTicket(TicketType, std::string const&)

Sets the ticket (device ticket, user id ticket, etc.) for secure token validation.

Parameters
  • type – Ticket type

  • ticketValue – Ticket value.