PreEmptive Analytics Linux Client
 All Classes Files Functions Variables Typedefs Macros
Public Member Functions | Public Attributes | List of all members
Configuration Class Reference

The Configuration class is used to provide the configuration to PAClient::ApplicationStart(). More...

Public Member Functions

DLL_PACLIENT Configuration (const FlowController *flowController=0, const FieldLimiter *fieldLimiter=0)
 Create a new default configuration instance. More...
 
DLL_PACLIENT ~Configuration ()
 Dispose of a configuration instance. More...
 
DLL_PACLIENT void AddSSLCertificate (const wchar_t *certificate)
 Add a SSL certificate to be used for SSL verification. More...
 
DLL_PACLIENT void AddSSLCertificateStore (const wchar_t *path)
 Add a SSL certificate store to be used for SSL verification. More...
 
DLL_PACLIENT const wchar_t * GetApplicationID () const
 Get the ID for the application. More...
 
DLL_PACLIENT const wchar_t * GetApplicationInstanceID () const
 Get the instance identifier for the application. More...
 
DLL_PACLIENT const wchar_t * GetApplicationName () const
 Get the name of the application. More...
 
DLL_PACLIENT const wchar_t * GetApplicationType () const
 Get the type of the application. More...
 
DLL_PACLIENT const wchar_t * GetApplicationVersion () const
 Get the version for the application. More...
 
DLL_PACLIENT const wchar_t * GetCompanyID () const
 Get the ID for the company. More...
 
DLL_PACLIENT const wchar_t * GetCompanyName () const
 Get the name for the company. More...
 
DLL_PACLIENT const wchar_t * GetDefaultSession () const
 Get the ID of the default session if one has been set. More...
 
DLL_PACLIENT const wchar_t * GetEndpointLocation () const
 Get the endpoint where messages will be sent. More...
 
DLL_PACLIENT long GetEndpointTimeout () const
 Get the timeout used when sending of messages to the endpoint. More...
 
DLL_PACLIENT const wchar_t * GetMessageGroup () const
 Get the message group for messages if one has been set. More...
 
DLL_PACLIENT bool IsFullData () const
 Get the value for the analytics data that may take a while to gather. More...
 
DLL_PACLIENT bool IsOmitPersonalInfo () const
 Get the setting for the hidding of personal information. More...
 
DLL_PACLIENT bool IsOptIn () const
 Get the initial opt-in value for analytics gathering. More...
 
DLL_PACLIENT bool IsUseSSL () const
 Is SSL being used for the sending of messages to the endpoint. More...
 
DLL_PACLIENT Configurationoperator= (const Configuration *other)
 Assign the values of another instance to this instance. More...
 
DLL_PACLIENT void SetApplicationID (const wchar_t *id)
 Set the ID for your application. More...
 
DLL_PACLIENT void SetApplicationInstanceID (const wchar_t *id)
 Sets an identifier for the installed instance of your application. More...
 
DLL_PACLIENT void SetApplicationName (const wchar_t *name)
 Set the name of your application. More...
 
DLL_PACLIENT void SetApplicationType (const wchar_t *type)
 Set the type for your application. More...
 
DLL_PACLIENT void SetApplicationVersion (const wchar_t *version)
 Set the version for your application. More...
 
DLL_PACLIENT void SetCompanyID (const wchar_t *id)
 Set the ID for the company. More...
 
DLL_PACLIENT void SetCompanyName (const wchar_t *name)
 Set the name for the company. More...
 
DLL_PACLIENT bool SetDefaultIDs (const wchar_t *messageGroup, const wchar_t *session)
 Set the message group and default session ID. More...
 
DLL_PACLIENT void SetEndpointLocation (const wchar_t *location)
 Set the endpoint where messages will be sent. More...
 
DLL_PACLIENT void SetEndpointTimeout (long timeout)
 Set the timeout used when sending of messages to the endpoint. More...
 
DLL_PACLIENT void SetFullData (bool fullData=true)
 Set the retrieval of analytics data that may take a while to gather. More...
 
DLL_PACLIENT void SetOmitPersonalInfo (bool omitPersonalInfo=true)
 Set the hidding of personal information. More...
 
DLL_PACLIENT void SetOptIn (bool optIn=true)
 Set the initial opt-in value for analytics gathering. More...
 
DLL_PACLIENT void SetUseSSL (bool useSSL=true)
 Sets SSL for the sending of messages to the endpoint. More...
 

Public Attributes

KVList CustomHeaders
 Custom HTTP headers to transmit with messages as a KVList. More...
 
FieldLimiter Fieldlimiter
 The FieldLimiter instance used by the config. More...
 
ConfigurationFlags Flags
 Extended Configuration flags. The default should normally be used. More...
 
FlowController Flowcontroller
 The FlowController instance used by the config. More...
 
StringList SSLCertificates
 Custom SSL Certificates to use for SSL verification in PEM format. More...
 
StringList SSLCertificateStores
 A list of potential SSL certificate stores and/or files for sending of messages to the secure endpoint. More...
 

Detailed Description

The Configuration class is used to provide the configuration to PAClient::ApplicationStart().

Constructor & Destructor Documentation

DLL_PACLIENT Configuration::Configuration ( const FlowController flowController = 0,
const FieldLimiter fieldLimiter = 0 
)

Create a new default configuration instance.

Parameters
aFlowController instance that is provided by the user.
aFieldLimiter instance that is provided by the user.
DLL_PACLIENT Configuration::~Configuration ( )

Dispose of a configuration instance.

Member Function Documentation

DLL_PACLIENT void Configuration::AddSSLCertificate ( const wchar_t *  certificate)

Add a SSL certificate to be used for SSL verification.

Parameters
certificatethe SSL certificate in PEM format.
DLL_PACLIENT void Configuration::AddSSLCertificateStore ( const wchar_t *  path)

Add a SSL certificate store to be used for SSL verification.

Parameters
paththe path to the SSL certificate store to look for.
DLL_PACLIENT const wchar_t* Configuration::GetApplicationID ( ) const

Get the ID for the application.

Returns
the ID for the application.
DLL_PACLIENT const wchar_t* Configuration::GetApplicationInstanceID ( ) const

Get the instance identifier for the application.

Returns
the instance identifer for the application.
DLL_PACLIENT const wchar_t* Configuration::GetApplicationName ( ) const

Get the name of the application.

Returns
the name of the application.
DLL_PACLIENT const wchar_t* Configuration::GetApplicationType ( ) const

Get the type of the application.

Returns
the type of the application.
DLL_PACLIENT const wchar_t* Configuration::GetApplicationVersion ( ) const

Get the version for the application.

Returns
the version string for the application.
DLL_PACLIENT const wchar_t* Configuration::GetCompanyID ( ) const

Get the ID for the company.

Returns
the ID for the company.
DLL_PACLIENT const wchar_t* Configuration::GetCompanyName ( ) const

Get the name for the company.

Returns
the name for the company
DLL_PACLIENT const wchar_t* Configuration::GetDefaultSession ( ) const

Get the ID of the default session if one has been set.

Returns
the ID of the default session if one has been set.
See Also
SetDefaultIDs()
PAClient::GetDefaultSession()
DLL_PACLIENT const wchar_t* Configuration::GetEndpointLocation ( ) const

Get the endpoint where messages will be sent.

Returns
the endpoint for messages. null indicates that an internal default will be used.
DLL_PACLIENT long Configuration::GetEndpointTimeout ( ) const

Get the timeout used when sending of messages to the endpoint.

Returns
the number of milliseconds for the timeout.
DLL_PACLIENT const wchar_t* Configuration::GetMessageGroup ( ) const

Get the message group for messages if one has been set.

Returns
the message group for messages if one has been set.
See Also
SetDefaultIDs()
PAClient::GetMessageGroup()
DLL_PACLIENT bool Configuration::IsFullData ( ) const

Get the value for the analytics data that may take a while to gather.

Returns
true if data will be gathered regardless of the time it takes
DLL_PACLIENT bool Configuration::IsOmitPersonalInfo ( ) const

Get the setting for the hidding of personal information.

Returns
true if personal information will be hidden.
DLL_PACLIENT bool Configuration::IsOptIn ( ) const

Get the initial opt-in value for analytics gathering.

Returns
true if the user is initialy opting-in
DLL_PACLIENT bool Configuration::IsUseSSL ( ) const

Is SSL being used for the sending of messages to the endpoint.

Returns
true if SSL is being used for the sending of messages.
DLL_PACLIENT Configuration& Configuration::operator= ( const Configuration other)

Assign the values of another instance to this instance.

Parameters
otherthe instance whos values are being assigned to this instance. If null then this instance is defaulted to its original state.
Returns
this instance.
DLL_PACLIENT void Configuration::SetApplicationID ( const wchar_t *  id)

Set the ID for your application.

Choose a GUID that will be used to identify your application on the server. This value should remain the same regardless of the version of your application- a separate version identifier can be defined.
Setting this value is required for PAClient::ApplicationStart() to succede.
Parameters
ida GUID that identifies your application.
See Also
SetApplicationVersion()
DLL_PACLIENT void Configuration::SetApplicationInstanceID ( const wchar_t *  id)

Sets an identifier for the installed instance of your application.

This strings represents a particular install of the application. Typically a serial number or some other unique identifier set as the instance identifier. The instance identifier is a free form string.
Parameters
idan instance identifying string
DLL_PACLIENT void Configuration::SetApplicationName ( const wchar_t *  name)

Set the name of your application.

You can optionally supply the name of your application. If not supplied on the configuration it can be defined on the server.
Parameters
namethe name of the application.
DLL_PACLIENT void Configuration::SetApplicationType ( const wchar_t *  type)

Set the type for your application.

You can optionally supply a type to organize or identify your application. Examples: "Plug-in"; "Console". This is a free-form value.
Parameters
typethe type of the application.
DLL_PACLIENT void Configuration::SetApplicationVersion ( const wchar_t *  version)

Set the version for your application.

Although optional, setting a version for your application is recommended. The version string is a free form value.
Parameters
versionthe version string for your application.
DLL_PACLIENT void Configuration::SetCompanyID ( const wchar_t *  id)

Set the ID for the company.

The ID for you company is assigned by PreEmptive Solutions. Please consult the information that came with your subscription information for the correct value.
Setting this value is required for PAClient::ApplicationStart() to succede.
Parameters
ida string representation of a GUID.
DLL_PACLIENT void Configuration::SetCompanyName ( const wchar_t *  name)

Set the name for the company.

Setting this value is optional.
Parameters
namethe name for the company.
DLL_PACLIENT bool Configuration::SetDefaultIDs ( const wchar_t *  messageGroup,
const wchar_t *  session 
)

Set the message group and default session ID.

This is used for inter-op purposes and generally need not be set. If left unset default values will be determined. If values are set then the behavior of ApplicationStart and ApplicationStart requests is modified to allow the application start/stop boundry to be controlled a PAClient implemented in another language.
Parameters
messageGroupthe GUID for the message group or null.
sessionthe GUID for the default session or null.
Returns
true if the values were accepted
DLL_PACLIENT void Configuration::SetEndpointLocation ( const wchar_t *  location)

Set the endpoint where messages will be sent.

This method is used when a custom endpoint has be defined for your company. If this is the case contact PreEmptive Solutions for details. It can also be used to route messages to a different destination for testing.
When left as blank or null a default value is choosen.
Parameters
locationa partial URL to the endpoint. It includes all portions except the protocol.
DLL_PACLIENT void Configuration::SetEndpointTimeout ( long  timeout)

Set the timeout used when sending of messages to the endpoint.

This timeout is used to determine if the server has correctly received the messages. If the server does not respond in this time period the messages may be stored for later transmission.
Parameters
timeoutthe number of milliseconds for the timeout. Zero and negative values are ignored.
See Also
SetSupportOfflineStorage()
DLL_PACLIENT void Configuration::SetFullData ( bool  fullData = true)

Set the retrieval of analytics data that may take a while to gather.

The gathering of some analytics data, typically information by PAClient::SystemProfile() and PAClient::PerformanceProbe(), can require some time that may slow an application. When set to false some data may be omitted or simpler forms of the data will be used.
Affected data varies by platform.
The default is to gather full data.
Parameters
fullDatatrue if data will be gathered regardless of the time it takes
DLL_PACLIENT void Configuration::SetOmitPersonalInfo ( bool  omitPersonalInfo = true)

Set the hidding of personal information.

Some values returned by analytics gathering could be used to identify a particular device or user. Setting this value to true has the analytics gathering logic omit or mask information that could be used to identify the device or user.
Parameters
omitPersonalInfotrue if personal information should be hidden.
DLL_PACLIENT void Configuration::SetOptIn ( bool  optIn = true)

Set the initial opt-in value for analytics gathering.

This value is the inital setting for the user opting-int to analytics gathering. Typically the opt-in state for an application is stored between runs and then passed in via this value.
The opt-in state can be changed at runtime by using PAClient::SetOptIn() The default initial opt-in value is true.
Parameters
optIntrue indicates the user is opting-in to analytics gathering.
DLL_PACLIENT void Configuration::SetUseSSL ( bool  useSSL = true)

Sets SSL for the sending of messages to the endpoint.

The default is to always send messages using SSL.
Parameters
useSSLtrue indicates the messages will be sent using SSL.

Member Data Documentation

KVList Configuration::CustomHeaders

Custom HTTP headers to transmit with messages as a KVList.

Note: All headers are prepended with "X-RI-Custom-" when transmitted
See Also
KVList
FieldLimiter Configuration::Fieldlimiter

The FieldLimiter instance used by the config.

ConfigurationFlags Configuration::Flags

Extended Configuration flags. The default should normally be used.

See Also
ConfigurationFlags.h
FlowController Configuration::Flowcontroller

The FlowController instance used by the config.

StringList Configuration::SSLCertificates

Custom SSL Certificates to use for SSL verification in PEM format.

StringList Configuration::SSLCertificateStores

A list of potential SSL certificate stores and/or files for sending of messages to the secure endpoint.

Windows: Not used, OS level certificate store is always used. Linux: If not found, certain well known defaults will be tried.