|
Sternum iOS SDK
|
import "sternum_sdk.h"import "communication_module.h"#include "include/init.h"import <UIKit/UIKit.h>Functions | |
| static void | init_cache_file_path (void) |
| static uint64_t | load_or_generate_device_id (void) |
| char * | settings_get_cache_path (void) |
| void | init_sternum_ios_settings (sternum_ios_sdk_settings_t *settings) |
| Initializes the SDK settings structure. | |
| sternum_code_t | sternum_ios_sdk_initialize (const sternum_ios_sdk_settings_t *sdk_settings) |
| Initializes the Sternum SDK. | |
| sternum_code_t | sternum_sdk_initialize (const char *sternum_url, const char *firmware_version, bool relay_override_device_id, uint64_t access_token, bool is_production, size_t max_cache_size) |
| Initializes the Sternum SDK (Legacy API). | |
| sternum_code_t | sternum_sdk_relay_device_data (const device_type_e device_type, const void *data, size_t size) |
| transmit relayed data that was received from a remote device. | |
| sternum_code_t | sternum_sdk_flush (void) |
| Flush transmission queue. | |
| void | sternum_sdk_close (void) |
| Closes the Sternum SDK. Call initialize to reinitialize. | |
Macros | |
| #define | MAX_STERNUM_CACHE_PATH_LEN 4096 |
| #define | DEVICE_ID_ENTRY @"jrLtcGwdCNwx" |
| #define | CACHE_FILENAME "/Documents/sternum_cache.bin" |
| #define | CACHE_MAX_SIZE 1024 * 1024 |
Variables | |
| char | g_cache_path [MAX_STERNUM_CACHE_PATH_LEN] = {0} |
|
static |
| void init_sternum_ios_settings | ( | sternum_ios_sdk_settings_t * | settings | ) |
Initializes the SDK settings structure.
| settings | Pointer to the sternum_ios_sdk_settings_t structure to be initialized. |
|
static |
| char * settings_get_cache_path | ( | void | ) |
| sternum_code_t sternum_ios_sdk_initialize | ( | const sternum_ios_sdk_settings_t * | sdk_options | ) |
Initializes the Sternum SDK.
| sdk_options | Pointer to a sternum_ios_sdk_settings_t structure containing the SDK configuration. |
| void sternum_sdk_close | ( | void | ) |
Closes the Sternum SDK. Call initialize to reinitialize.
| sternum_code_t sternum_sdk_flush | ( | void | ) |
Flush transmission queue.
| sternum_code_t sternum_sdk_initialize | ( | const char * | sternum_url, |
| const char * | firmware_version, | ||
| bool | relay_override_device_id, | ||
| uint64_t | sdk_device_definition_id, | ||
| bool | is_production, | ||
| size_t | max_cache_size | ||
| ) |
Initializes the Sternum SDK (Legacy API).
| sternum_url | your Sternum dedicated transmission URL. |
| firmware_version | a string identifying client's application firmware version. |
| relay_override_device_id | if a remote device that originated the relayed traces cannot have a random a device ID, set to true and the application's device ID will be used. |
| sdk_device_definition_id | a device definition id for traces transmitted from the importing application. |
| is_production | indicate if the application is in production/development phase. |
| max_cache_size | defines the maximum amount of bytes to store on disk when caching traces. Cache is automatically emptied when internet connection is available. |
| sternum_code_t sternum_sdk_relay_device_data | ( | const device_type_e | device_type, |
| const void * | data, | ||
| size_t | size | ||
| ) |
transmit relayed data that was received from a remote device.
| device_type | each device type as its own channel for relaying sternum traces. If you are relaying multiple devices in parallel, please make sure to assign each a different device type. |
| data | data to relay. |
| size | the size of the data. |
| #define CACHE_FILENAME "/Documents/sternum_cache.bin" |
| #define CACHE_MAX_SIZE 1024 * 1024 |
| #define DEVICE_ID_ENTRY @"jrLtcGwdCNwx" |
| #define MAX_STERNUM_CACHE_PATH_LEN 4096 |
| char g_cache_path[MAX_STERNUM_CACHE_PATH_LEN] = {0} |