Login Register Free Account
Trackerbird SDK v3 for Mac OS (C++)
TBApp.h
1 // ======================================
2 // *** TRACKERBIRD SOFTWARE ANALYTICS ***
3 // ******** www.trackerbird.com ********
4 // ======================================
5 // © 2013 Trackerbird. All rights reserved.
6 //
7 // SDK Version: MacOS SDK ver 3.4.1 (C++)
8 // Release date: 11 Sep 2014
9 //
10 // You may get the latest version from: http://docs.trackerbird.com
11 // For customer support please visit: http://helpdesk.trackerbird.com
12 // ======================================
13 //
14 
15 #ifndef __TrackerbirdSDK__TBApp__
16 #define __TrackerbirdSDK__TBApp__
17 
18 #include <iostream>
19 #include "TBConfig.h"
20 #include "TBMessageResult.h"
21 #include "TBLicenseResult.h"
22 #include "TBVersionResult.h"
23 
24 using namespace std;
25 
26 namespace TrackerbirdSDK
27 {
28  typedef enum
29  {
30  TBResultStatusUnknown = 0,
31  TBResultStatusOK = 1,
32  TBResultStatusFunctionNotAvailable,
33  TBResultStatusConnectionError,
34  TBResultStatusAuthenticationFailure,
35  TBResultStatusServerError,
36  TBResultStatusConfigurationNotLoaded,
37  TBResultStatusConfigurationNotInitialized
38  }
39  TBResultStatus;
40 
41  typedef enum
42  {
43  TBPrivacyModeOff = 0, //Collects both architecture and usage data (default).
44  TBPrivacyModeLow, //Collect only architecture data but NOT usage data.
45  TBPrivacyModeHigh //Does not collect any architecture or usage data.
46  }
47  TBPrivacyMode;
48 
173  class TBApp
174  {
175 
176  public:
177 
178 
182 
199  static void start(TrackerbirdSDK::TBConfig config, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
200 
219  static void start(TrackerbirdSDK::TBConfig config, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), bool doSync, bool receiveReachout);
220 
239  static void stop(void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
240 
261  static void stop(int syncTimeout, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
262 
281  static void sessionStart(string sessionID, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
282 
304  static void sessionStop(string sessionID, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
305 
306 
307 
308 
309 
313 
330  static void sync(void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
331 
349  static void sync(void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), bool receiveReachout);
350 
364  static void startAutoSync();
365 
381  static void startAutoSync(bool receiveReachout);
382 
394  static void stopAutoSync();
395 
396 
400 
413  static void eventTrack(string name, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), bool allowExtendedNames = false);
414 
428  static void eventTrack(string name, double value, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), bool allowExtendedNames = false);
429 
444  static void eventTrack(string name, double value, string sessionID, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), bool allowExtendedNames = false);
445 
459  static void eventTrack(string name, string value, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), bool allowExtendedNames = false);
460 
475  static void eventTrack(string name, string value, string sessionID, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), bool allowExtendedNames = false);
476 
491  static void eventTrack(string category, string name, double value, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), bool allowExtendedNames = false);
492 
507  static void eventTrack(string category, string name, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), void *overload, bool allowExtendedNames = false);
508 
524  static void eventTrack(string category, string name, double value, string sessionID, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), bool allowExtendedNames = false);
525 
540  static void eventTrack(string category, string name, string value, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), void *overload, bool allowExtendedNames = false);
541 
556  static void eventTrack(string category, string name, string value, string sessionID, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status), bool allowExtendedNames = false);
557 
558 
559 
563 
577  static void exceptionTrack(string className, string methodName, string message, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
578 
593  static void exceptionTrack(string className, string methodName, string message, string stackTrace, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
594 
598 
639  static void messageCheck(void(*completionFunction)(TrackerbirdSDK::TBMessageResult messageResult, TrackerbirdSDK::TBResultStatus status));
640 
682  static void messageCheck(TrackerbirdSDK::TBMessageType messageType, void(*completionFunction)(TrackerbirdSDK::TBMessageResult messageResult, TrackerbirdSDK::TBResultStatus status));
683 
687 
688 
703  static void versionCheck(void(*completionFunction)(TrackerbirdSDK::TBVersionResult versionResult, TrackerbirdSDK::TBResultStatus status));
704 
708 
709 
765  static void keyCheck(string key, void(*completionFunction)(TrackerbirdSDK::TBLicenseResult licenseResult, TrackerbirdSDK::TBResultStatus status));
766 
822  static void keyChange(string key, void(*completionFunction)(TrackerbirdSDK::TBLicenseResult licenseResult, TrackerbirdSDK::TBResultStatus status));
823 
834  static void setLicenseInfo(TrackerbirdSDK::TBKeyType keyType, TrackerbirdSDK::TBLicenseStatus whitelistedStatus, TrackerbirdSDK::TBLicenseStatus expiredStatus, TrackerbirdSDK::TBLicenseStatus blacklistedStatus, TrackerbirdSDK::TBLicenseStatus activatedStatus, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
835 
847  static void setLicenseInfo(TrackerbirdSDK::TBKeyType keyType, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
848 
849 
853 
854 
867  static void connectionCheck(string url, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
868 
872 
886  static void getPrivacyMode(void(*completionFunction)(TrackerbirdSDK::TBPrivacyMode privacyMode, TrackerbirdSDK::TBResultStatus status));
887 
902  static void setPrivacyMode(TrackerbirdSDK::TBPrivacyMode privacyMode, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
903 
907 
918  static void setCustomProperty(string property, unsigned int index, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
919 
930  static void removeCustomProperty(unsigned int index, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
931 
935 
948  static void updateConfig(TrackerbirdSDK::TBConfig config, void(*completionFunction)(TrackerbirdSDK::TBResultStatus status));
949 
950 
951 
952 
953 
954 
955  };
956 }
957 
958 #endif /* defined(__TrackerbirdSDK__TBApp__) */
Definition: TBVersionResult.h:52
Definition: TBApp.h:26
Definition: TBApp.h:173
Definition: TBMessageResult.h:50
Definition: TBLicenseResult.h:85
Definition: TBConfig.h:48