 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
18 #ifndef SENTRY_H_INCLUDED
19 #define SENTRY_H_INCLUDED
26 #define SENTRY_SDK_NAME "sentry.native"
27 #define SENTRY_SDK_VERSION "0.3.1"
28 #define SENTRY_SDK_USER_AGENT (SENTRY_SDK_NAME "/" SENTRY_SDK_VERSION)
32 # define SENTRY_PLATFORM_WINDOWS
33 #elif defined(__APPLE__)
34 # define SENTRY_PLATFORM_MACOS
35 # define SENTRY_PLATFORM_DARWIN
36 # define SENTRY_PLATFORM_UNIX
37 #elif defined(__ANDROID__)
38 # define SENTRY_PLATFORM_ANDROID
39 # define SENTRY_PLATFORM_LINUX
40 # define SENTRY_PLATFORM_UNIX
41 #elif defined(__linux) || defined(__linux__)
42 # define SENTRY_PLATFORM_LINUX
43 # define SENTRY_PLATFORM_UNIX
45 # error unsupported platform
51 # if defined(SENTRY_BUILD_SHARED)
52 # define SENTRY_API __declspec(dllexport)
53 # elif !defined(SENTRY_BUILD_STATIC)
54 # define SENTRY_API __declspec(dllimport)
60 # define SENTRY_API __attribute__((visibility("default")))
68 #ifndef SENTRY_EXPERIMENTAL_API
69 # define SENTRY_EXPERIMENTAL_API SENTRY_API
107 #define sentry_string_free sentry_free
354 const char *type,
const char *message);
383 EXCEPTION_POINTERS exception_ptrs;
401 void *addr,
void **stacktrace_out,
size_t max_len);
461 struct sentry_envelope_s;
500 struct sentry_options_s;
528 struct sentry_transport_s;
801 #ifdef SENTRY_PLATFORM_WINDOWS
805 SENTRY_API void sentry_options_add_attachmentw(
811 SENTRY_API void sentry_options_set_handler_pathw(
817 SENTRY_API void sentry_options_set_database_pathw(
Represents a sentry protocol value.
Definition: sentry.h:140
SENTRY_API void sentry_options_free(sentry_options_t *opts)
Deallocates previously allocated sentry options.
SENTRY_API void sentry_options_set_dist(sentry_options_t *opts, const char *dist)
Sets the dist.
struct sentry_options_s sentry_options_t
Definition: sentry.h:501
struct sentry_uuid_s sentry_uuid_t
A UUID.
struct sentry_envelope_s sentry_envelope_t
Definition: sentry.h:462
SENTRY_API void sentry_remove_tag(const char *key)
Removes the tag with the specified key.
SENTRY_API void sentry_set_level(sentry_level_t level)
Sets the event level.
SENTRY_EXPERIMENTAL_API char * sentry_value_to_msgpack(sentry_value_t value, size_t *size_out)
Serialize a sentry value to msgpack.
union sentry_value_u sentry_value_t
Definition: sentry.h:144
SENTRY_API sentry_uuid_t sentry_uuid_nil(void)
Creates the nil uuid.
SENTRY_API double sentry_options_get_sample_rate(const sentry_options_t *opts)
Gets the sample rate.
SENTRY_API int sentry_uuid_is_nil(const sentry_uuid_t *uuid)
Checks if the uuid is nil.
SENTRY_API sentry_value_t sentry_value_get_by_key_owned(sentry_value_t value, const char *k)
Looks up a value in a map by key.
SENTRY_API void sentry_remove_transaction(void)
Removes the transaction.
sentry_level_e
Sentry levels for events and breadcrumbs.
Definition: sentry.h:327
SENTRY_API int sentry_value_is_frozen(sentry_value_t value)
Checks if a value is frozen.
@ SENTRY_VALUE_TYPE_DOUBLE
Definition: sentry.h:118
SENTRY_API void sentry_remove_fingerprint(void)
Removes the fingerprint.
#define SENTRY_API
Definition: sentry.h:62
SENTRY_API char * sentry_value_to_json(sentry_value_t value)
Serialize a sentry value to JSON.
enum sentry_level_e sentry_level_t
Sentry levels for events and breadcrumbs.
@ SENTRY_LEVEL_FATAL
Definition: sentry.h:332
const SENTRY_API char * sentry_options_get_dist(const sentry_options_t *opts)
Gets the dist.
const SENTRY_API char * sentry_options_get_release(const sentry_options_t *opts)
Gets the release.
SENTRY_API int sentry_options_get_symbolize_stacktraces(const sentry_options_t *opts)
Returns true if on-device symbolication of stack traces is enabled.
char bytes[16]
Definition: sentry.h:416
SENTRY_API sentry_options_t * sentry_options_new(void)
Creates a new options struct.
SENTRY_API void * sentry_malloc(size_t size)
The library internally uses the system malloc and free functions to manage memory.
@ SENTRY_VALUE_TYPE_LIST
Definition: sentry.h:120
@ SENTRY_LEVEL_INFO
Definition: sentry.h:329
SENTRY_API void sentry_remove_context(const char *key)
Removes the context object with the specified key.
sentry_value_t(* sentry_event_function_t)(sentry_value_t event, void *hint, void *closure)
Type of the callback for modifying events.
Definition: sentry.h:591
SENTRY_API char * sentry_envelope_serialize(const sentry_envelope_t *envelope, size_t *size_out)
Serializes the envelope.
SENTRY_API void sentry_options_set_sample_rate(sentry_options_t *opts, double sample_rate)
Sets the sample rate, which should be a double between 0.0 and 1.0.
SENTRY_EXPERIMENTAL_API void sentry_clear_modulecache(void)
Clears the internal module cache.
SENTRY_API int sentry_options_get_debug(const sentry_options_t *opts)
Returns the current value of the debug flag.
SENTRY_API void sentry_transport_free(sentry_transport_t *transport)
Generic way to free a transport.
SENTRY_API sentry_uuid_t sentry_uuid_new_v4(void)
Creates a new uuid4.
SENTRY_API void sentry_envelope_free(sentry_envelope_t *envelope)
Frees an envelope.
SENTRY_API void sentry_user_consent_reset(void)
Resets the user consent (back to unknown).
SENTRY_API void sentry_options_set_symbolize_stacktraces(sentry_options_t *opts, int val)
Enables or disables on-device symbolication of stack traces.
SENTRY_API sentry_value_t sentry_value_new_null(void)
Creates a null value.
SENTRY_API void sentry_remove_extra(const char *key)
Removes the extra with the specified key.
SENTRY_API int sentry_init(sentry_options_t *options)
Initializes the Sentry SDK with the specified options.
SENTRY_API sentry_value_t sentry_value_get_by_index_owned(sentry_value_t value, size_t index)
Looks up a value in a list by index.
SENTRY_EXPERIMENTAL_API void sentry_start_session(void)
Starts a new session.
@ SENTRY_VALUE_TYPE_INT32
Definition: sentry.h:117
siginfo_t * siginfo
Definition: sentry.h:386
SENTRY_API void sentry_transport_set_free_func(sentry_transport_t *transport, void(*free_func)(void *state))
Sets the transport hook to free the transport state.
SENTRY_API void sentry_value_incref(sentry_value_t value)
Increments the reference count on the value.
const SENTRY_API char * sentry_value_as_string(sentry_value_t value)
Returns the value as c string.
SENTRY_API sentry_value_t sentry_value_new_object(void)
Creates a new object.
#define SENTRY_EXPERIMENTAL_API
Definition: sentry.h:69
@ SENTRY_VALUE_TYPE_OBJECT
Definition: sentry.h:121
SENTRY_API void sentry_shutdown(void)
Shuts down the sentry client and forces transports to flush out.
SENTRY_EXPERIMENTAL_API void sentry_end_session(void)
Ends a session.
uint64_t _bits
Definition: sentry.h:141
SENTRY_API sentry_value_t sentry_envelope_get_event(const sentry_envelope_t *envelope)
Given an envelope returns the embedded event if there is one.
SENTRY_API sentry_value_t sentry_value_new_int32(int32_t value)
Creates a new 32-bit signed integer value.
@ SENTRY_LEVEL_DEBUG
Definition: sentry.h:328
SENTRY_API void sentry_options_add_attachment(sentry_options_t *opts, const char *name, const char *path)
Adds a new attachment to be sent along.
unsigned long long uint64_t
Definition: stdint.h:18
SENTRY_API void sentry_transport_set_startup_func(sentry_transport_t *transport, void(*startup_func)(const sentry_options_t *options, void *state))
Sets the transport startup hook.
SENTRY_API void sentry_options_set_http_proxy(sentry_options_t *opts, const char *proxy)
Configures the http proxy.
SENTRY_API sentry_value_t sentry_value_new_message_event(sentry_level_t level, const char *logger, const char *text)
Creates a new message event value.
SENTRY_API int sentry_value_remove_by_key(sentry_value_t value, const char *k)
This removes a value from the map by key.
SENTRY_API void sentry_remove_user(void)
Removes a user.
SENTRY_API sentry_transport_t * sentry_new_function_transport(void(*func)(const sentry_envelope_t *envelope, void *data), void *data)
Create a new function transport.
SENTRY_API void sentry_set_fingerprint(const char *fingerprint,...)
Sets the event fingerprint.
SENTRY_API void sentry_options_set_handler_path(sentry_options_t *opts, const char *path)
Sets the path to the crashpad handler if the crashpad backend is used.
@ SENTRY_USER_CONSENT_GIVEN
Definition: sentry.h:601
struct sentry_ucontext_s sentry_ucontext_t
This represents the OS dependent user context in the case of a crash, and can be used to manually cap...
SENTRY_API int sentry_value_is_true(sentry_value_t value)
Returns true if the value is boolean true.
SENTRY_API sentry_value_t sentry_value_new_string(const char *value)
Creates a new null terminated string.
A UUID.
Definition: sentry.h:415
int int32_t
Definition: stdint.h:13
SENTRY_API sentry_value_t sentry_value_new_breadcrumb(const char *type, const char *message)
Creates a new breadcrumb with a specific type and message.
SENTRY_API sentry_user_consent_t sentry_user_consent_get(void)
Checks the current state of user consent.
@ SENTRY_USER_CONSENT_UNKNOWN
Definition: sentry.h:600
SENTRY_API sentry_value_t sentry_value_new_double(double value)
Creates a new double value.
const SENTRY_API char * sentry_options_get_environment(const sentry_options_t *opts)
Gets the environment.
@ SENTRY_VALUE_TYPE_BOOL
Definition: sentry.h:116
SENTRY_EXPERIMENTAL_API void sentry_handle_exception(const sentry_ucontext_t *uctx)
Captures an exception to be handled by the backend.
SENTRY_API void sentry_options_set_ca_certs(sentry_options_t *opts, const char *path)
Configures the path to a file containing ssl certificates for verification.
sock planetquake com All rights reserved Quake III Arena is a registered trademark of id Inc This level may be electronically distributed only at NO CHARGE to the recipient in its current state
Definition: chiropteraDM.txt:94
SENTRY_EXPERIMENTAL_API void sentry_event_value_add_stacktrace(sentry_value_t event, void **ips, size_t len)
Adds a stacktrace to an event.
sentry_user_consent_t
The state of user consent.
Definition: sentry.h:599
SENTRY_API void sentry_transport_set_state(sentry_transport_t *transport, void *state)
Sets the transport state.
SENTRY_EXPERIMENTAL_API size_t sentry_unwind_stack_from_ucontext(const sentry_ucontext_t *uctx, void **stacktrace_out, size_t max_len)
Unwinds the stack from the given context.
SENTRY_API void sentry_transport_set_shutdown_func(sentry_transport_t *transport, bool(*shutdown_func)(uint64_t timeout, void *state))
Sets the transport shutdown hook.
SENTRY_API size_t sentry_value_get_length(sentry_value_t value)
Returns the length of the given map or list.
const SENTRY_API char * sentry_options_get_http_proxy(const sentry_options_t *opts)
Returns the configured http proxy.
SENTRY_API int sentry_options_get_require_user_consent(const sentry_options_t *opts)
Returns true if user consent is required.
SENTRY_API void sentry_options_set_database_path(sentry_options_t *opts, const char *path)
Sets the path to the Sentry Database Directory.
SENTRY_API void sentry_options_set_transport(sentry_options_t *opts, sentry_transport_t *transport)
Sets a transport.
@ SENTRY_LEVEL_ERROR
Definition: sentry.h:331
SENTRY_API sentry_transport_t * sentry_transport_new(void(*send_func)(sentry_envelope_t *envelope, void *state))
Creates a new transport with an initial send_func.
@ SENTRY_LEVEL_WARNING
Definition: sentry.h:330
SENTRY_API int sentry_value_remove_by_index(sentry_value_t value, size_t index)
This removes a value from the list by index.
SENTRY_API int32_t sentry_value_as_int32(sentry_value_t value)
Converts a value into a 32bit signed integer.
double _double
Definition: sentry.h:142
SENTRY_API void sentry_user_consent_revoke(void)
Revokes user consent.
SENTRY_API sentry_value_type_t sentry_value_get_type(sentry_value_t value)
Returns the type of the value passed.
SENTRY_API sentry_uuid_t sentry_capture_event(sentry_value_t event)
Sends a sentry event.
SENTRY_API int sentry_value_set_by_key(sentry_value_t value, const char *k, sentry_value_t v)
Sets a key to a value in the map.
struct sentry_transport_s sentry_transport_t
Definition: sentry.h:529
const SENTRY_API char * sentry_options_get_ca_certs(const sentry_options_t *opts)
Returns the configured path for ca certificates.
SENTRY_API void sentry_options_set_dsn(sentry_options_t *opts, const char *dsn)
Sets the DSN.
SENTRY_API int sentry_envelope_write_to_file(const sentry_envelope_t *envelope, const char *path)
Serializes the envelope into a file.
This represents the OS dependent user context in the case of a crash, and can be used to manually cap...
Definition: sentry.h:381
SENTRY_API sentry_value_t sentry_value_new_event(void)
Creates a new empty event value.
SENTRY_API void sentry_value_freeze(sentry_value_t value)
Freezes a value.
@ SENTRY_VALUE_TYPE_NULL
Definition: sentry.h:115
SENTRY_API size_t sentry_value_refcount(sentry_value_t value)
Returns the refcount of a value.
SENTRY_API void sentry_user_consent_give(void)
Gives user consent.
ucontext_t * user_context
Definition: sentry.h:387
@ SENTRY_USER_CONSENT_REVOKED
Definition: sentry.h:602
SENTRY_API int sentry_value_is_null(sentry_value_t value)
Returns true if the value is null.
SENTRY_API void sentry_set_transaction(const char *transaction)
Sets the transaction.
SENTRY_API sentry_uuid_t sentry_uuid_from_bytes(const char bytes[16])
Creates a uuid from bytes.
const SENTRY_API char * sentry_options_get_dsn(const sentry_options_t *opts)
Gets the DSN.
const SENTRY_API sentry_options_t * sentry_get_options(void)
Returns the client options.
SENTRY_API void sentry_free(void *ptr)
Releases memory allocated from the underlying allocator.
SENTRY_EXPERIMENTAL_API size_t sentry_unwind_stack(void *addr, void **stacktrace_out, size_t max_len)
Unwinds the stack from the given address.
@ SENTRY_VALUE_TYPE_STRING
Definition: sentry.h:119
SENTRY_API void sentry_options_set_system_crash_reporter_enabled(sentry_options_t *opts, int enabled)
Enables forwarding to the system crash reporter.
SENTRY_API void sentry_set_extra(const char *key, sentry_value_t value)
Sets extra information.
SENTRY_API void sentry_uuid_as_bytes(const sentry_uuid_t *uuid, char bytes[16])
Returns the bytes of the uuid.
SENTRY_API void sentry_value_decref(sentry_value_t value)
Decrements the reference count on the value.
SENTRY_API double sentry_value_as_double(sentry_value_t value)
Converts a value into a double value.
SENTRY_API void sentry_options_set_debug(sentry_options_t *opts, int debug)
Enables or disables debug printing mode.
SENTRY_API sentry_uuid_t sentry_uuid_from_string(const char *str)
Parses a uuid from a string.
SENTRY_API int sentry_value_set_by_index(sentry_value_t value, size_t index, sentry_value_t v)
Inserts a value into the list at a certain position.
SENTRY_API void sentry_set_context(const char *key, sentry_value_t value)
Sets a context object.
SENTRY_API void sentry_options_set_require_user_consent(sentry_options_t *opts, int val)
Enables or disables user consent requirements for uploads.
SENTRY_API sentry_value_t sentry_value_get_by_key(sentry_value_t value, const char *k)
Looks up a value in a map by key.
SENTRY_API sentry_value_t sentry_value_new_list(void)
Creates a new list value.
SENTRY_API void sentry_options_set_environment(sentry_options_t *opts, const char *environment)
Sets the environment.
SENTRY_API sentry_value_t sentry_value_new_bool(int value)
Creates a new boolen value.
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font name
Definition: ARPHICPL.TXT:16
sentry_value_type_t
Type of a sentry value.
Definition: sentry.h:114
SENTRY_API void sentry_options_set_release(sentry_options_t *opts, const char *release)
Sets the release.
SENTRY_API void sentry_set_tag(const char *key, const char *value)
Sets a tag.
SENTRY_API void sentry_set_user(sentry_value_t user)
Sets the specified user.
SENTRY_API sentry_value_t sentry_value_get_by_index(sentry_value_t value, size_t index)
Looks up a value in a list by index.
SENTRY_API void sentry_add_breadcrumb(sentry_value_t breadcrumb)
Adds the breadcrumb to be sent in case of an event.
int signum
Definition: sentry.h:385
SENTRY_API void sentry_uuid_as_string(const sentry_uuid_t *uuid, char str[37])
Formats the uuid into a string buffer.
SENTRY_API void sentry_options_set_before_send(sentry_options_t *opts, sentry_event_function_t func, void *data)
Sets the before send callback.
SENTRY_API int sentry_value_append(sentry_value_t value, sentry_value_t v)
Appends a value to a list.