NCBI C++ ToolKit
Static Public Member Functions | List of all members
CUsageReportAPI Class Reference

Search Toolkit Book for CUsageReportAPI

CUsageReportAPI:: Global settings related to the usage reporting. More...

#include <connect/ncbi_usage_report.hpp>

+ Inheritance diagram for CUsageReportAPI:
+ Collaboration diagram for CUsageReportAPI:

Static Public Member Functions

static void SetEnabled (bool enable=true)
 Enable or disable usage statistics reporting globally for all reporters. More...
static bool IsEnabled (void)
 Indicates whether global application usage statistics collection is enabled. More...
static void SetDefaultParameters (TWhat what=fDefault)
 Set default reporting parameters. More...
static TWhat GetDefaultParameters (void)
static void SetURL (const string &url)
 Change CGI URL for reporting usage statistics. More...
static string GetURL (void)
static void SetAppName (const string &name)
 Set application name for the usage reporters. More...
static string GetAppName (void)
static void SetAppVersion (const string &version)
 Set application version for the usage reporter(s). More...
static void SetAppVersion (const CVersionInfo &version)
static string GetAppVersion (void)
static void SetMaxQueueSize (unsigned n)
 Declare the maximum reporting jobs queue size per reporter. More...
static unsigned GetMaxQueueSize ()
static void SetTimeout (const CTimeout &timeout)
 Set timeout for connection. More...
static CTimeout GetTimeout ()
 Return timeout for network connection, if specified. More...
static void SetRetries (int retries)
 Set muximum number of retries in case of error reporting. More...
static int GetRetries ()
 Return muximum number of retries in case of error reporting, if specified. More...
static bool CheckConnection ()
 Check that connection to reporting URL can be established. More...

Additional Inherited Members

- Public Types inherited from CUsageReportBase
enum  EWhat {
  fNone = 0 , fAppName = 1 << 1 , fAppVersion = 1 << 2 , fOS = 1 << 3 ,
  fHost = 1 << 4 , fDefault = fAppName | fAppVersion | fOS
 Defines what information should be reported by default by all reporters, in addition to passed parameters for Send() method. More...
typedef int TWhat
 Binary OR of "EWhat". More...

Detailed Description

CUsageReportAPI:: Global settings related to the usage reporting.

All methods are static and can be called from any thread. Global settings affects all newly created usage statistics reporters. If you need to call some Set*() methods, this should be called before creating CUsageReport objects or any CUsageReport::Instance() usage. Of course you can adjust any settings later for each reporter separately.

All methods are MT safe.
The usage reporting use default connection timeouts and maximum number of tries specified by $CONN_TIMEOUT and $CONN_MAX_TRY environment variables, or [CONN]TIMEOUT and [CONN]MAX_TRY registry values accordingly. But CUsageReportAPI have methods to override both for this API only, if necessary.

Definition at line 120 of file ncbi_usage_report.hpp.

The documentation for this class was generated from the following files:
Modified on Sat May 25 14:18:47 2024 by rev. 669887