The DeviceAtlas CloudApi Documentation  DEVICEATLAS_API_VERSION
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Com.DeviceAtlas.Cloud.Client Class Reference

DeviceAtlas Cloud API. This client library can be used to easily get device data from the DeviceAtlas Cloud service. To reduce cloud calls and improve performance the API locally caches the data returned from the cloud service. The caching uses the built in .NET cache backed by a file cache. More...

Inheritance diagram for Com.DeviceAtlas.Cloud.Client:
Com.DeviceAtlas.Cloud.ClientWeb Com.DeviceAtlas.Cloud.ClientWebFramework

Public Member Functions

string GetCloudUrl ()
 Get the last DeviceAtlas cloud service end-point (server) URL called to get device properties More...
 
Server [] GetServers ()
 Getter for cloud server list. The end-points in the returned array are used for making DeviceAtlas cloud calls. The top end-point will most likely be used unless it fails and the call falls to the next end-point and so on. More...
 
void SetServers (Server[] servers)
 Setter for cloud server list. To set DeviceAtlas cloud end-points manually. The order of this array matters. While healthy the top end-point will be used. More...
 
bool GetAutoServerRanking ()
 Getter for auto server ranking More...
 
void SetAutoServerRanking (bool autoServerRanking)
 Setter for auto server ranking More...
 
int GetServerPhaseOutLifetime ()
 Getter for manual ranking server phase out Lifetime. When not auto-ranking shall the top end-point fail the list will be re-arranged and the failed end-point will be moved to the bottom. ServerPhaseOutLifetime indicated for how long should this re-arranged Server list be used over the original. More...
 
void SetServerPhaseOutLifetime (int serverPhaseOutLifetime)
 Setter for manual ranking server phase out Lifetime. When not auto-ranking shall the top end-point fail the list will be re-arranged and the failed end-point will be moved to the bottom. ServerPhaseOutLifetime indicated for how long should this re-arranged Server list be used over the original. More...
 
int GetCloudServiceTimeout ()
 Getter for cloud service timeout. If the API requests service from a DeviceAtlas end-point, shall the end-point not response in this amount of time the next end-point in the list will be used. More...
 
void SetCloudServiceTimeout (int timeout)
 Setter for cloud service timeout. If the API requests service from a DeviceAtlas end-point, shall the end-point not response in this amount of time the next end-point in the list will be used. More...
 
int GetAutoServerRankingMaxFailures ()
 Getter for max server failures More...
 
void SetAutoServerRankingMaxFailures (int autoServerRankingMaxFailures)
 Setter for max server failures. Number of times an end-point is allowed to fail during auto ranking. Failing more times and the end-pint will be excluded. More...
 
int GetAutoServerRankingNumRequests ()
 When auto ranking end-points, this number of requests will be sent to each end-point and the mean time will be used for ranking the end-point. More...
 
void SetAutoServerRankingNumRequests (int autoServerLatencyNumRequests)
 When auto ranking end-points, this number of requests will be sent to each end-point and the mean time will be used for ranking the end-point. More...
 
int GetAutoServerRankingLifetime ()
 Getter for auto ranking cached end-point list lifetime. After each auto ranking the ranked end point list will be valid for this amount of time. When the list is too old the API will rank it again unless the auto ranking is off. More...
 
void SetAutoServerRankingLifetime (int autoServerRankListLifetime)
 Setter for auto ranking cached end-point list lifetime. After each auto ranking the ranked end point list will be valid for this amount of time. When the list is too old the API will rank it again unless the auto ranking is off. More...
 
string GetLicenceKey ()
 Getter for licence key More...
 
void SetLicenceKey (string licenceKey)
 Setter for licence key More...
 
bool GetUseCache ()
 Is device data being cached by the API or not. More...
 
void SetUseCache (bool useCache)
 Setter to cache or not to cache device data. More...
 
bool GetUseFileCache ()
 Is data being cached on the disk or not. More...
 
void SetUseFileCache (bool fileCache)
 Set if data must be cached on disk or not More...
 
string GetCacheDir ()
 Getter for the cache location directory. More...
 
void SetCacheDir (string cacheDir)
 Setter for the cache location directory. More...
 
int GetCacheItemExpirySeconds ()
 Getter for the cache item expiry. More...
 
void SetCacheItemExpirySeconds (int cacheItemExpirySec)
 Setter for the cache item expiry. More...
 
bool GetTestMode ()
 Getter for testMode setting. If this is TRUE then a test User-Agent will be used for the query. More...
 
void SetTestMode (bool testMode)
 Setter for testMode setting. Defaults to false. If this is TRUE then a test User-Agent will be used for the query. More...
 
string GetVersion ()
 Get the API version. More...
 
bool GetUseClientCookie ()
 Getter for the useClientCookie setting. Defaults to true. If TRUE then if device data which is created by the DeviceAtlas client side component (JS library) exists it will be used More...
 
void SetUseClientCookie (bool useClientCookie)
 Setter for the useClientCookie setting. Defaults to true. If TRUE then if device data which is created by the DeviceAtlas client side component (JS library) exists it will be used More...
 
Hashtable GetDeviceData (NameValueCollection headers)
 Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud. More...
 
Hashtable GetDeviceData (Dictionary< string, string > headers)
 Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud. More...
 
Hashtable GetDeviceData (string userAgent)
 Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud. More...
 
Hashtable GetDeviceDataByUserAgent (string userAgent)
 Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud. More...
 
Hashtable GetDeviceDataByHeaders (Dictionary< string, string > headers)
 Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud. More...
 
Hashtable GetDeviceDataByHeaders (NameValueCollection headers)
 Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud. More...
 
Server [] GetServersLatencies ()
 Get DeviceAtlas cloud end-point list. If auto-ranking is on then the ranked end-point list is returned otherwise the manual or default original or fail-over list will be returned. If auto-ranking is on but no valid end-point list is found inside the cache then the end-points will be ranked and cached. More...
 
Server [] GetServersLatencies (int numRequests)
 Get servers and their service latencies. More...
 
Server [] RankServers ()
 If auto-ranking is on then rank the DeviceAtlas cloud end-points and put in cache. More...
 
void SetProxy (WebProxy proxy)
 Sets HTTP proxy settings for the remote requests More...
 

Static Public Member Functions

static Client GetInstance ()
 Get the instance for the Client. More...
 

Public Attributes

const string TEST_USERAGENT = "Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; GT-I9100 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
 Built in test user-agent More...
 
const string CLIENT_COOKIE_NAME = "DAPROPS"
 Name of the cookie created by the DeviceAtlas client side component More...
 
const string KEY_USERAGENT = "useragent"
 The name of the key used to lookup the User-Agent in the results object More...
 
const string KEY_SOURCE = "source"
 The name of the key used to lookup the source of data (none, cache or cloud) in the results object More...
 
const string KEY_PROPERTIES = "properties"
 The name of the key used to lookup the device properties in the results object More...
 
const string SOURCE_CACHE = "cache"
 In the result Map, KEY_SOURCE may be set to this. Shows that the data source of device properties set to KEY_PROPERTIES in the result Map was cache. More...
 
const string SOURCE_CLOUD = "cloud"
 In the result Map, KEY_SOURCE may be set to this. Shows that the device properties set to KEY_PROPERTIES where queried from DA cloud service. More...
 
const string SOURCE_NONE = "none"
 In the result Map, KEY_SOURCE may be set to this. Indicates that there was a problem getting device data. More...
 
const String CACHE_NAME_SERVERS_AUTO = "servers"
 cache key for cached servers ranked list ///
 
const String CACHE_NAME_SERVERS_MANUAL = "servers_manual"
 cache key for cached servers manual fail-over list ///
 

Static Public Attributes

static readonly string API_VERSION = "2.2"
 API version More...
 

Detailed Description

DeviceAtlas Cloud API. This client library can be used to easily get device data from the DeviceAtlas Cloud service. To reduce cloud calls and improve performance the API locally caches the data returned from the cloud service. The caching uses the built in .NET cache backed by a file cache.

The client is queried by passing either a collection of HTTP headers or a user-agent string. The device properties will then be returned.
Example 1 (manually passing the http headers):

Client client = Client.GetInstance();
client.SetLicenceKey("DeviceAtlas-licence-key");
Hashtable results;
Dictionary<string, string> headers new Dictionary<string, string>();
// the headers can be defined in a Dictionary<string, string> or a NameValueCollection
// NameValueCollection headers = new NameValueCollection();
// get data by passing headers (headers named are not case sensitive and may include "_" or start with "HTTP_")
headers.Add("User-Agent", "Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95_8GB/15.0.015; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413");
headers.Add("X-Profile", "http://nds.nokia.com/uaprof/NN95_8GB-1r100.xml");
headers.Add("Accept", "text/html,text/css,multipart/mixed,application/java-archive, application/java");
headers.Add("Accept-Language", "en-us,en;q=0.5");
try{ results = client.GetDeviceData(headers); } catch (Exception x) { // handle exceptions etc... }
// The useragent used in the lookup
string ua = (String)results[Client.KEY_USERAGENT];
// The source of the data - cache, cloud etc
string dataSource = (String)results[Client.KEY_SOURCE];
// The actual device properties
Hashtable properties = (Hashtable)results[Client.KEY_PROPERTIES];

Example 2 (manually passing the user-agent string):

Client client = Client.GetInstance();
client.SetLicenceKey("DeviceAtlas-licence-key");
Hashtable results;
string ua = "Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95_8GB/15.0.015; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413";
try{ results = client.GetDeviceData(ua); } catch (Exception x) { // handle exceptions etc... }
// The useragent used in the lookup
string ua = (String)results[Client.KEY_USERAGENT];
// The source of the data - cache, cloud etc
string dataSource = (String)results[Client.KEY_SOURCE];
// The actual device properties
Hashtable properties = (Hashtable)results[Client.KEY_PROPERTIES];

Member Function Documentation

◆ GetAutoServerRanking()

bool Com.DeviceAtlas.Cloud.Client.GetAutoServerRanking ( )
inline

Getter for auto server ranking

Returns
true = the API will auto rank DeviceAtlas end-points. false = the default built-in DeviceAtlas end-points array or one provided manually will be used by the API.

◆ GetAutoServerRankingLifetime()

int Com.DeviceAtlas.Cloud.Client.GetAutoServerRankingLifetime ( )
inline

Getter for auto ranking cached end-point list lifetime. After each auto ranking the ranked end point list will be valid for this amount of time. When the list is too old the API will rank it again unless the auto ranking is off.

Returns
Time in minutes

◆ GetAutoServerRankingMaxFailures()

int Com.DeviceAtlas.Cloud.Client.GetAutoServerRankingMaxFailures ( )
inline

Getter for max server failures

Returns
Cloud service timeout (seconds)

◆ GetAutoServerRankingNumRequests()

int Com.DeviceAtlas.Cloud.Client.GetAutoServerRankingNumRequests ( )
inline

When auto ranking end-points, this number of requests will be sent to each end-point and the mean time will be used for ranking the end-point.

Returns
Number or requests per end-point during auto-ranking.

◆ GetCacheDir()

string Com.DeviceAtlas.Cloud.Client.GetCacheDir ( )
inline

Getter for the cache location directory.

Returns
The directory to store the cache items

◆ GetCacheItemExpirySeconds()

int Com.DeviceAtlas.Cloud.Client.GetCacheItemExpirySeconds ( )
inline

Getter for the cache item expiry.

Returns
The number of seconds to allow before an item in the cache expires

◆ GetCloudServiceTimeout()

int Com.DeviceAtlas.Cloud.Client.GetCloudServiceTimeout ( )
inline

Getter for cloud service timeout. If the API requests service from a DeviceAtlas end-point, shall the end-point not response in this amount of time the next end-point in the list will be used.

Returns
Time in seconds.

◆ GetCloudUrl()

string Com.DeviceAtlas.Cloud.Client.GetCloudUrl ( )
inline

Get the last DeviceAtlas cloud service end-point (server) URL called to get device properties

<return> null or an URL. Null means no call to a DeviceAtlas cloud end-pointwas done probably because the data was fetched from cache. </return>

◆ GetDeviceData() [1/3]

Hashtable Com.DeviceAtlas.Cloud.Client.GetDeviceData ( NameValueCollection  headers)
inline

Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud.

Parameters
headersA collection of HTTP headers {"header-name": "header-value",}
Returns
A collection of device data as { Client.KEY_USERAGENT: "UA", Client.KEY_SOURCE: "data source", Client.KEY_PROPERTIES: {"propertyName": "PropertyVal",}, } Note that Client.KEY_PROPERTIES will not exists for not detectable data and on failures.
Exceptions
DaClientExceptionThrown when any part of detection or the API fails.

◆ GetDeviceData() [2/3]

Hashtable Com.DeviceAtlas.Cloud.Client.GetDeviceData ( Dictionary< string, string >  headers)
inline

Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud.

Parameters
headersA collection of HTTP headers {"header-name": "header-value",}
Returns
A collection of device data as { Client.KEY_USERAGENT: "UA", Client.KEY_SOURCE: "data source", Client.KEY_PROPERTIES: {"propertyName": "PropertyVal",}, } Note that Client.KEY_PROPERTIES will not exists for not detectable data and on failures.
Exceptions
DaClientExceptionThrown when any part of detection or the API fails.

◆ GetDeviceData() [3/3]

Hashtable Com.DeviceAtlas.Cloud.Client.GetDeviceData ( string  userAgent)
inline

Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud.

Parameters
userAgentUser-agent string
Returns
A collection of device data as { Client.KEY_USERAGENT: "UA", Client.KEY_SOURCE: "data source", Client.KEY_PROPERTIES: {"propertyName": "PropertyVal",}, } Note that Client.KEY_PROPERTIES will not exists for not detectable data and on failures.
Exceptions
DaClientExceptionThrown when any part of detection or the API fails.

◆ GetDeviceDataByHeaders() [1/2]

Hashtable Com.DeviceAtlas.Cloud.Client.GetDeviceDataByHeaders ( Dictionary< string, string >  headers)
inline

Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud.

Parameters
headersA Map of http headers {"header-name": "header-value",}
Returns
A collection of device data as { Client.KEY_USERAGENT: "UA", Client.KEY_SOURCE: "data source", Client.KEY_PROPERTIES: {"propertyName": "PropertyVal",}, } Note that Client.KEY_PROPERTIES will not exists for not detectable data and on failures.
Exceptions
DaClientExceptionThrown when any part of detection or the API fails.

◆ GetDeviceDataByHeaders() [2/2]

Hashtable Com.DeviceAtlas.Cloud.Client.GetDeviceDataByHeaders ( NameValueCollection  headers)
inline

Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud.

Parameters
headersA Map of http headers {"header-name": "header-value",}
Returns
A collection of device data as { Client.KEY_USERAGENT: "UA", Client.KEY_SOURCE: "data source", Client.KEY_PROPERTIES: {"propertyName": "PropertyVal",}, } Note that Client.KEY_PROPERTIES will not exists for not detectable data and on failures.
Exceptions
DaClientExceptionThrown when any part of detection or the API fails.

◆ GetDeviceDataByUserAgent()

Hashtable Com.DeviceAtlas.Cloud.Client.GetDeviceDataByUserAgent ( string  userAgent)
inline

Get device data from DeviceAtlas Cloud service. If using cache is not turned off the device data will be cached after each cloud call, if cached data exists for a device it will be used over the cloud.

Parameters
userAgentUser-agent string
Returns
A collection of device data as { Client.KEY_USERAGENT: "UA", Client.KEY_SOURCE: "data source", Client.KEY_PROPERTIES: {"propertyName": "PropertyVal",}, } Note that Client.KEY_PROPERTIES will not exists for not detectable data and on failures.
Exceptions
DaClientExceptionThrown when any part of detection or the API fails.

◆ GetInstance()

static Client Com.DeviceAtlas.Cloud.Client.GetInstance ( )
inlinestatic

Get the instance for the Client.

Returns
The instance of the Client

◆ GetLicenceKey()

string Com.DeviceAtlas.Cloud.Client.GetLicenceKey ( )
inline

Getter for licence key

Returns
The Licence key being used

◆ GetServerPhaseOutLifetime()

int Com.DeviceAtlas.Cloud.Client.GetServerPhaseOutLifetime ( )
inline

Getter for manual ranking server phase out Lifetime. When not auto-ranking shall the top end-point fail the list will be re-arranged and the failed end-point will be moved to the bottom. ServerPhaseOutLifetime indicated for how long should this re-arranged Server list be used over the original.

Returns
Time in minutes

◆ GetServers()

Server [] Com.DeviceAtlas.Cloud.Client.GetServers ( )
inline

Getter for cloud server list. The end-points in the returned array are used for making DeviceAtlas cloud calls. The top end-point will most likely be used unless it fails and the call falls to the next end-point and so on.

Returns
Available DeviceAtlas cloud servers (list of Server objects)

◆ GetServersLatencies() [1/2]

Server [] Com.DeviceAtlas.Cloud.Client.GetServersLatencies ( )
inline

Get DeviceAtlas cloud end-point list. If auto-ranking is on then the ranked end-point list is returned otherwise the manual or default original or fail-over list will be returned. If auto-ranking is on but no valid end-point list is found inside the cache then the end-points will be ranked and cached.

<return>A list of Server objects</return>

◆ GetServersLatencies() [2/2]

Server [] Com.DeviceAtlas.Cloud.Client.GetServersLatencies ( int  numRequests)
inline

Get servers and their service latencies.

Parameters
numRequestsNumber of times to request from server

<return>A list of Server objects</return>

◆ GetTestMode()

bool Com.DeviceAtlas.Cloud.Client.GetTestMode ( )
inline

Getter for testMode setting. If this is TRUE then a test User-Agent will be used for the query.

Returns
The testMode setting. Defaults to false.

◆ GetUseCache()

bool Com.DeviceAtlas.Cloud.Client.GetUseCache ( )
inline

Is device data being cached by the API or not.

Returns
The useCache setting. Defaults to true.

◆ GetUseClientCookie()

bool Com.DeviceAtlas.Cloud.Client.GetUseClientCookie ( )
inline

Getter for the useClientCookie setting. Defaults to true. If TRUE then if device data which is created by the DeviceAtlas client side component (JS library) exists it will be used

Returns
The useClientCookie setting. Defaults to true

◆ GetUseFileCache()

bool Com.DeviceAtlas.Cloud.Client.GetUseFileCache ( )
inline

Is data being cached on the disk or not.

Returns
The useCache setting. Defaults to true.

◆ GetVersion()

string Com.DeviceAtlas.Cloud.Client.GetVersion ( )
inline

Get the API version.

Returns
Api versiob

◆ RankServers()

Server [] Com.DeviceAtlas.Cloud.Client.RankServers ( )
inline

If auto-ranking is on then rank the DeviceAtlas cloud end-points and put in cache.

<return>The ranked or re-ordered end-point list</return>

◆ SetAutoServerRanking()

void Com.DeviceAtlas.Cloud.Client.SetAutoServerRanking ( bool  autoServerRanking)
inline

Setter for auto server ranking

Parameters
autoServerRankingtrue = the API must auto rank DeviceAtlas end-points. false = the API should use the built-in Server array or one which is provided to it.

◆ SetAutoServerRankingLifetime()

void Com.DeviceAtlas.Cloud.Client.SetAutoServerRankingLifetime ( int  autoServerRankListLifetime)
inline

Setter for auto ranking cached end-point list lifetime. After each auto ranking the ranked end point list will be valid for this amount of time. When the list is too old the API will rank it again unless the auto ranking is off.

Parameters
autoServerRankListLifetimeTime in minutes

◆ SetAutoServerRankingMaxFailures()

void Com.DeviceAtlas.Cloud.Client.SetAutoServerRankingMaxFailures ( int  autoServerRankingMaxFailures)
inline

Setter for max server failures. Number of times an end-point is allowed to fail during auto ranking. Failing more times and the end-pint will be excluded.

Parameters
autoServerRankingMaxFailuresEnd-point fail tollerance during auto ranking.

◆ SetAutoServerRankingNumRequests()

void Com.DeviceAtlas.Cloud.Client.SetAutoServerRankingNumRequests ( int  autoServerLatencyNumRequests)
inline

When auto ranking end-points, this number of requests will be sent to each end-point and the mean time will be used for ranking the end-point.

Parameters
autoServerLatencyNumRequestsNumber or requests per end-point during auto-ranking.

◆ SetCacheDir()

void Com.DeviceAtlas.Cloud.Client.SetCacheDir ( string  cacheDir)
inline

Setter for the cache location directory.

Parameters
cacheDirThe directory to store the cache items

◆ SetCacheItemExpirySeconds()

void Com.DeviceAtlas.Cloud.Client.SetCacheItemExpirySeconds ( int  cacheItemExpirySec)
inline

Setter for the cache item expiry.

Parameters
cacheItemExpirySecThe number of seconds to allow before an item in the cache expires

◆ SetCloudServiceTimeout()

void Com.DeviceAtlas.Cloud.Client.SetCloudServiceTimeout ( int  timeout)
inline

Setter for cloud service timeout. If the API requests service from a DeviceAtlas end-point, shall the end-point not response in this amount of time the next end-point in the list will be used.

Parameters
timeoutTime in seconds.

◆ SetLicenceKey()

void Com.DeviceAtlas.Cloud.Client.SetLicenceKey ( string  licenceKey)
inline

Setter for licence key

Parameters
licenceKeyThe licence key issued to gain access to DeviceAtlas Cloud

◆ SetProxy()

void Com.DeviceAtlas.Cloud.Client.SetProxy ( WebProxy  proxy)
inline

Sets HTTP proxy settings for the remote requests

Parameters
proxy

◆ SetServerPhaseOutLifetime()

void Com.DeviceAtlas.Cloud.Client.SetServerPhaseOutLifetime ( int  serverPhaseOutLifetime)
inline

Setter for manual ranking server phase out Lifetime. When not auto-ranking shall the top end-point fail the list will be re-arranged and the failed end-point will be moved to the bottom. ServerPhaseOutLifetime indicated for how long should this re-arranged Server list be used over the original.

Parameters
serverPhaseOutLifetimeTime in minutes

◆ SetServers()

void Com.DeviceAtlas.Cloud.Client.SetServers ( Server []  servers)
inline

Setter for cloud server list. To set DeviceAtlas cloud end-points manually. The order of this array matters. While healthy the top end-point will be used.

Parameters
serversAn array of Server objects, each object is a DeviceAtlas cloud end-point

◆ SetTestMode()

void Com.DeviceAtlas.Cloud.Client.SetTestMode ( bool  testMode)
inline

Setter for testMode setting. Defaults to false. If this is TRUE then a test User-Agent will be used for the query.

Parameters
testModeTRUE if test mode is on, FALSE otherwise

◆ SetUseCache()

void Com.DeviceAtlas.Cloud.Client.SetUseCache ( bool  useCache)
inline

Setter to cache or not to cache device data.

Parameters
useCacheTRUE if caching is to be used or FALSE if not

◆ SetUseClientCookie()

void Com.DeviceAtlas.Cloud.Client.SetUseClientCookie ( bool  useClientCookie)
inline

Setter for the useClientCookie setting. Defaults to true. If TRUE then if device data which is created by the DeviceAtlas client side component (JS library) exists it will be used

Parameters
useClientCookieTRUE = use device data which is created by the DeviceAtlas JS library if exists.

◆ SetUseFileCache()

void Com.DeviceAtlas.Cloud.Client.SetUseFileCache ( bool  fileCache)
inline

Set if data must be cached on disk or not

Parameters
fileCacheTRUE = cache data on disk

Member Data Documentation

◆ API_VERSION

readonly string Com.DeviceAtlas.Cloud.Client.API_VERSION = "2.2"
static

API version

◆ CLIENT_COOKIE_NAME

const string Com.DeviceAtlas.Cloud.Client.CLIENT_COOKIE_NAME = "DAPROPS"

Name of the cookie created by the DeviceAtlas client side component

◆ KEY_PROPERTIES

const string Com.DeviceAtlas.Cloud.Client.KEY_PROPERTIES = "properties"

The name of the key used to lookup the device properties in the results object

◆ KEY_SOURCE

const string Com.DeviceAtlas.Cloud.Client.KEY_SOURCE = "source"

The name of the key used to lookup the source of data (none, cache or cloud) in the results object

◆ KEY_USERAGENT

const string Com.DeviceAtlas.Cloud.Client.KEY_USERAGENT = "useragent"

The name of the key used to lookup the User-Agent in the results object

◆ SOURCE_CACHE

const string Com.DeviceAtlas.Cloud.Client.SOURCE_CACHE = "cache"

In the result Map, KEY_SOURCE may be set to this. Shows that the data source of device properties set to KEY_PROPERTIES in the result Map was cache.

◆ SOURCE_CLOUD

const string Com.DeviceAtlas.Cloud.Client.SOURCE_CLOUD = "cloud"

In the result Map, KEY_SOURCE may be set to this. Shows that the device properties set to KEY_PROPERTIES where queried from DA cloud service.

◆ SOURCE_NONE

const string Com.DeviceAtlas.Cloud.Client.SOURCE_NONE = "none"

In the result Map, KEY_SOURCE may be set to this. Indicates that there was a problem getting device data.

◆ TEST_USERAGENT

const string Com.DeviceAtlas.Cloud.Client.TEST_USERAGENT = "Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; GT-I9100 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"

Built in test user-agent


The documentation for this class was generated from the following file: