Conviva Client Library  2.185.0.2
app_tracker.h
1 //
2 // Copyright (c) 2014 Conviva. All rights reserved.
3 //
4 
8 
9 
15 
16 #ifndef APPTRACKER_H
17 #define APPTRACKER_H
18 
19 #include "ccl_dictionary.h"
20 
21 #define CAT_MAX_APP_NAME_LENGTH 64
22 #define CAT_MAX_USER_ID_LENGTH 64
23 #define CAT_MAX_IID_LENGTH 64
24 
25 #define CCL_APP_MAX_SCREEN_NAME_LEN 1024
26 #define CCL_APP_MAX_SCREEN_ID_LEN 38
27 
28 // Network Reequest Info Constants
29 #define CAT_MAX_URL_LENGTH 1024
30 #define CAT_MAX_METHOD_LENGTH 15
31 #define CAT_MAX_BODY_LENGTH 10000 // 10 KB
32 
33 #define CAT_MEMORY_ERROR -1
34 #define CAT_MUTEX_ERROR -2
35 #define CAT_INPUT_ERROR -3
36 #define CAT_TIMER_ERROR -4
37 #define CAT_ERROR 0
38 #define CAT_SUCCESS 1
39 
40 
42 typedef struct cat_network_request_info {
54 
61  void *request_body;
65 
69 int cat_set_user_id(const char* uid);
70 
75 int cat_send_custom_event(const char *name, ccl_dictionary_t *attributes);
76 
81 int cat_track_screen_view(const char* name, const char* screen_type);
82 
87 
92 int cat_pause_tracker(void);
93 
98 int cat_resume_tracker(void);
99 
100 #endif /* APPTRACKER_H*/
101 
cat_track_screen_view
int cat_track_screen_view(const char *name, const char *screen_type)
send the screen info
cat_network_request_info::request_body
void * request_body
Definition: app_tracker.h:61
ccl_dictionary_t
struct ccl_dictionary ccl_dictionary_t
Definition: ccl_dictionary.h:18
cat_network_request_info::response_body
void * response_body
Definition: app_tracker.h:63
cat_network_request_info::request_timestamp
uint64_t request_timestamp
Definition: app_tracker.h:51
cat_network_request_info
Use to set the network request details.
Definition: app_tracker.h:42
cat_network_request_info::response_code
int response_code
Definition: app_tracker.h:49
cat_set_user_id
int cat_set_user_id(const char *uid)
Sets the user ID for ECO.
cat_network_request_info::request_header
void * request_header
Definition: app_tracker.h:57
cat_network_request_info::response_header
void * response_header
Definition: app_tracker.h:59
cat_pause_tracker
int cat_pause_tracker(void)
pause the app tracker to stop monitoring
CAT_MAX_URL_LENGTH
#define CAT_MAX_URL_LENGTH
Definition: app_tracker.h:29
cat_resume_tracker
int cat_resume_tracker(void)
resume the app tracker to start monitoring again
cat_network_request_info::target_url
char target_url[CAT_MAX_URL_LENGTH]
Definition: app_tracker.h:45
cat_track_network_request
int cat_track_network_request(cat_network_request_info_t *nw_info)
send the network request info to eco
cat_send_custom_event
int cat_send_custom_event(const char *name, ccl_dictionary_t *attributes)
send custom event to eco
cat_network_request_info::response_timestamp
uint64_t response_timestamp
Definition: app_tracker.h:53
CAT_MAX_METHOD_LENGTH
#define CAT_MAX_METHOD_LENGTH
Definition: app_tracker.h:30
cat_network_request_info_t
struct cat_network_request_info cat_network_request_info_t
Use to set the network request details.
cat_network_request_info::method
char method[CAT_MAX_METHOD_LENGTH]
Definition: app_tracker.h:47