4#if defined _WIN32 || defined __CYGWIN__
5#ifdef LIBTOX_SERVER_EXPORTS
6#define TOX_SERVER_DEF_PREFIX __declspec(dllexport)
8#define TOX_SERVER_DEF_PREFIX __declspec(dllimport)
11#ifdef TOX_SERVER_EXPORT_SHARED
13#define TOX_SERVER_DEF_PREFIX __attribute__((visibility("default")))
16#define TOX_SERVER_DEF_PREFIX
20#define TOX_SERVER_DEF_PREFIX
49#define TOX_SERVER_VERSION "1.5.2"
265 const char* single_tenant_prefix);
271typedef void* (*tox_server_malloc_callback)(
size_t size);
272typedef void (*tox_server_free_callback)(
void* ptr);
273typedef void* (*tox_server_realloc_callback)(
void* ptr,
size_t size);
274typedef char* (*tox_server_strdup_callback)(
const char* str);
275typedef void* (*tox_server_calloc_callback)(
size_t nmemb,
size_t size);
314 const char* account_uuid,
const char* api_key,
const char* single_tenant_prefix,
316 tox_server_realloc_callback tox_realloc, tox_server_strdup_callback tox_strdup,
317 tox_server_calloc_callback tox_calloc);
568 const unsigned int* packet_sizes,
unsigned int num_packets);
Definition tox_server.h:147
const char * session_name_unique
Definition tox_server.h:157
unsigned long circular_buffer_max_num_packets
Definition tox_server.h:163
int obscure_names
Definition tox_server.h:182
int is_nonrealtime
Definition tox_server.h:205
int enable_proximity_chat
Definition tox_server.h:195
const char * player_name_unique
Definition tox_server.h:152
unsigned long max_packet_size
Definition tox_server.h:168
Definition tox_server.h:136
void * tox_internal_ptr
Definition tox_server.h:140
TOX_SERVER_ERROR tox_server_add_packet(tox_server_instance_t *tox_instance_ptr, const unsigned char *packet, unsigned int packet_size)
TOX_SERVER_ERROR tox_server_get_internal_session_uuid(tox_server_instance_t *tox_instance_ptr, const char **internal_session_uuid)
TOX_SERVER_ERROR tox_server_destroy_instance(tox_server_instance_t *tox_instance_ptr)
TOX_SERVER_ERROR tox_server_set_proximity_chat_player_can_hear(tox_server_instance_t *tox_instance_ptr, const char *const *players, unsigned int num_players)
TOX_SERVER_ERROR tox_server_set_player_alias(tox_server_instance_t *tox_instance_ptr, const char *player_alias)
TOX_SERVER_ERROR tox_server_set_log_error_callback(void(*log_error_callback)(const char *))
TOX_SERVER_ERROR tox_server_begin_upload(tox_server_instance_t *tox_instance_ptr)
void *(* tox_server_malloc_callback)(size_t size)
Definition tox_server.h:271
TOX_SERVER_ERROR tox_server_global_init_mem(const char *account_uuid, const char *api_key, const char *single_tenant_prefix, tox_server_malloc_callback tox_malloc, tox_server_free_callback tox_free, tox_server_realloc_callback tox_realloc, tox_server_strdup_callback tox_strdup, tox_server_calloc_callback tox_calloc)
TOX_SERVER_ERROR tox_server_set_session_alias(tox_server_instance_t *tox_instance_ptr, const char *session_alias)
#define TOX_SERVER_DEF_PREFIX
Definition tox_server.h:20
TOX_SERVER_ERROR tox_server_add_session_data(tox_server_instance_t *tox_instance_ptr, const char *session_data)
const char * tox_server_error_name(TOX_SERVER_ERROR error)
TOX_SERVER_ERROR tox_server_set_log_info_callback(void(*log_info_callback)(const char *))
TOX_SERVER_ERROR tox_server_set_proximity_chat_can_hear_player(tox_server_instance_t *tox_instance_ptr, const char *const *players, unsigned int num_players)
TOX_SERVER_ERROR tox_server_create_instance(tox_server_instance_t *tox_instance_ptr, const tox_server_config_t *tox_server_config_ptr)
TOX_SERVER_ERROR tox_server_set_players_muted_at_join(tox_server_instance_t *tox_instance_ptr, const char *const *players, unsigned int num_players)
TOX_SERVER_ERROR
Definition tox_server.h:55
@ TOX_SERVER_BAD_CONFIG
Definition tox_server.h:73
@ TOX_SERVER_UPLOAD_METADATA_FAILED
Definition tox_server.h:117
@ TOX_SERVER_BAD_MEM_FUNCTION
Definition tox_server.h:112
@ TOX_SERVER_BAD_MAX_NUM_PACKETS
Definition tox_server.h:79
@ TOX_SERVER_BAD_PLAYER_ALIAS
Definition tox_server.h:119
@ TOX_SERVER_UPLOAD_QUEUE_FULL
Definition tox_server.h:110
@ TOX_SERVER_CURL_ERROR
Definition tox_server.h:85
@ TOX_SERVER_BAD_PACKET
Definition tox_server.h:83
@ TOX_SERVER_EMPTY_PACKET
Definition tox_server.h:87
@ TOX_SERVER_BAD_API_KEY
Definition tox_server.h:71
@ TOX_SERVER_BAD_PLAYER_NAME
Definition tox_server.h:75
@ TOX_SERVER_BAD_SESSION_NAME
Definition tox_server.h:77
@ TOX_SERVER_NO_ERROR
Definition tox_server.h:57
@ TOX_SERVER_BAD_ACCOUNT_UUID
Definition tox_server.h:69
@ TOX_SERVER_BAD_SESSION_ALIAS
Definition tox_server.h:121
@ TOX_SERVER_CIRCULAR_BUFFER_FULL
Definition tox_server.h:101
@ TOX_SERVER_BAD_INSTANCE
Definition tox_server.h:67
@ TOX_SERVER_BAD_PLAYER_LIST
Definition tox_server.h:123
@ TOX_SERVER_PACKET_TOO_LARGE
Definition tox_server.h:92
@ TOX_SERVER_UNKNOWN_ERROR
Definition tox_server.h:62
@ TOX_SERVER_BAD_REALTIME_CONFIG
Definition tox_server.h:129
@ TOX_SERVER_BAD_MAX_PACKET_SIZE
Definition tox_server.h:81
@ TOX_SERVER_PROXIMITY_CHAT_DISABLED
Definition tox_server.h:125
TOX_SERVER_ERROR tox_server_global_init(const char *account_uuid, const char *api_key, const char *single_tenant_prefix)
TOX_SERVER_ERROR tox_server_global_cleanup(void)
TOX_SERVER_ERROR tox_server_run_all_uploads_with_timeout(int *num_running_uploads, int wait_timeout_milliseconds)
TOX_SERVER_ERROR tox_server_run_all_uploads(int *num_running_uploads)
const char * tox_server_get_version(void)
TOX_SERVER_ERROR tox_server_run_buffer_copy(tox_server_instance_t *tox_instance_ptr)
TOX_SERVER_ERROR tox_server_add_packets_nonrealtime(tox_server_instance_t *tox_instance_ptr, const unsigned char **packets, const unsigned int *packet_sizes, unsigned int num_packets)
TOX_SERVER_ERROR tox_server_get_internal_player_uuid(tox_server_instance_t *tox_instance_ptr, const char **internal_player_uuid)
TOX_SERVER_ERROR tox_server_set_global_muted(tox_server_instance_t *tox_instance_ptr, int muted)
TOX_SERVER_ERROR tox_server_set_player_muted(tox_server_instance_t *tox_instance_ptr, const char *player, int muted)