File borogove.h
FileList > cpp > borogove.h
Go to the source code of this file
the Borogove SDK for C More...
Public Types
| Type | Name |
|---|---|
| enum | borogove_calls_call_status |
| typedef int | borogove_event_handler_token |
| enum | borogove_message_direction |
| enum | borogove_message_status |
| enum | borogove_message_type |
| typedef void(* | borogove_panic_callback |
| enum | borogove_ui_state |
Public Functions
| Type | Name |
|---|---|
| API_PREFIX const char * | borogove_attachment_source_name (void * attachment_source) |
| API_PREFIX void * | borogove_attachment_source_new (const char * path, const char * mime) |
| API_PREFIX const char * | borogove_attachment_source_path (void * attachment_source) |
| API_PREFIX int | borogove_attachment_source_size (void * attachment_source) |
| API_PREFIX const char * | borogove_attachment_source_type (void * attachment_source) |
| API_PREFIX const char * | borogove_available_chat_chat_id (void * available_chat) The ID of the Chat this search result represents. |
| API_PREFIX const char * | borogove_available_chat_display_name (void * available_chat) The display name of this search result. |
| API_PREFIX bool | borogove_available_chat_is_channel (void * available_chat) Is this search result a channel? |
| API_PREFIX const char * | borogove_available_chat_note (void * available_chat) A human-readable note associated with this search result. |
| API_PREFIX int | borogove_calls_audio_format_channels (void * audio_format) |
| API_PREFIX int | borogove_calls_audio_format_clock_rate (void * audio_format) |
| API_PREFIX void * | borogove_calls_audio_format_new (const char * format, unsigned char payloadType, int clockRate, int channels) |
| API_PREFIX void | borogove_calls_dtmf_sender_insert_dtmf (void * dtmf_sender, const char * tones) Schedule DTMF events to be sent. |
| API_PREFIX void | borogove_calls_initiated_session_accept (void * initiated_session) |
| API_PREFIX void | borogove_calls_initiated_session_add_media (void * initiated_session, void *const * streams, size_t streams__len) |
| API_PREFIX size_t | borogove_calls_initiated_session_audio_tracks (void * initiated_session, void *** outPtr) |
| API_PREFIX enum borogove_calls_call_status | borogove_calls_initiated_session_call_status (void * initiated_session) |
| API_PREFIX const char * | borogove_calls_initiated_session_chat_id (void * initiated_session) |
| API_PREFIX void * | borogove_calls_initiated_session_dtmf (void * initiated_session) |
| API_PREFIX void | borogove_calls_initiated_session_hangup (void * initiated_session) |
| API_PREFIX const char * | borogove_calls_initiated_session_sid (void * initiated_session) |
| API_PREFIX void | borogove_calls_initiated_session_supply_media (void * initiated_session, void *const * streams, size_t streams__len) |
| API_PREFIX size_t | borogove_calls_initiated_session_video_tracks (void * initiated_session, void *** outPtr) |
| API_PREFIX void | borogove_calls_media_stream_add_track (void * media_stream, void * track) |
| API_PREFIX size_t | borogove_calls_media_stream_get_tracks (void * media_stream, void *** outPtr) |
| API_PREFIX void * | borogove_calls_media_stream_make_audio () Create default bidirectional audio track. |
| API_PREFIX void * | borogove_calls_media_stream_new () |
| API_PREFIX void | borogove_calls_media_stream_track_add_pcm_listener (void * media_stream_track, void(*)(short *, size_t, int, int, void *) callback, void * callback__context) Event fired for new inbound audio frame. |
| API_PREFIX void | borogove_calls_media_stream_track_add_ready_for_pcm_listener (void * media_stream_track, void(*)(void *) callback, void * callback__context) Event fired when ready for next outbound audio frame. |
| API_PREFIX const char * | borogove_calls_media_stream_track_id (void * media_stream_track) |
| API_PREFIX const char * | borogove_calls_media_stream_track_kind (void * media_stream_track) |
| API_PREFIX bool | borogove_calls_media_stream_track_muted (void * media_stream_track) |
| API_PREFIX void | borogove_calls_media_stream_track_stop (void * media_stream_track) |
| API_PREFIX size_t | borogove_calls_media_stream_track_supported_audio_formats (void * media_stream_track, void *** outPtr) |
| API_PREFIX void | borogove_calls_media_stream_track_write_pcm (void * media_stream_track, const short * pcm, size_t pcm__len, int clockRate, int channels) Send new audio to this track. |
| API_PREFIX bool | borogove_channel_is_private (void * channel) |
| API_PREFIX void | borogove_chat_accept_call (void * chat) Accept any incoming calls in this Chat. |
| API_PREFIX void | borogove_chat_add_reaction (void * chat, void * m, void * reaction) Add new reaction to a message in this Chat. |
| API_PREFIX void * | borogove_chat_attachment_create (const char * name, const char * mime, int size, const char * uri) Create a new attachment for adding to a ChatMessage. |
| API_PREFIX size_t | borogove_chat_attachment_hashes (void * chat_attachment, void *** outPtr) Hashes of data. |
| API_PREFIX const char * | borogove_chat_attachment_mime (void * chat_attachment) MIME Type. |
| API_PREFIX const char * | borogove_chat_attachment_name (void * chat_attachment) Filename. |
| API_PREFIX int | borogove_chat_attachment_size (void * chat_attachment) Size in bytes. |
| API_PREFIX size_t | borogove_chat_attachment_uris (void * chat_attachment, const char *** outPtr) URIs to data. |
| API_PREFIX void | borogove_chat_block (void * chat, void * reportSpam, bool onServer) Block this chat so it will not re-open. |
| API_PREFIX void | borogove_chat_bookmark (void * chat) Save this Chat on the server. |
| API_PREFIX enum borogove_calls_call_status | borogove_chat_call_status (void * chat) The current status of a call in this chat. |
| API_PREFIX bool | borogove_chat_can_audio_call (void * chat) Can audio calls be started in this Chat? |
| API_PREFIX bool | borogove_chat_can_video_call (void * chat) Can video calls be started in this Chat? |
| API_PREFIX const char * | borogove_chat_chat_id (void * chat) ID of this Chat. |
| API_PREFIX void | borogove_chat_close (void * chat) Archive this chat. |
| API_PREFIX void | borogove_chat_correct_message (void * chat, const char * localId, void * message) Correct an already-send message by replacing it with a new one. |
| API_PREFIX void * | borogove_chat_dtmf (void * chat) A DTMFSender for a call in this chat, or NULL. |
| API_PREFIX const char * | borogove_chat_encryption_mode (void * chat) Get encryption mode for this chat. |
| API_PREFIX const char * | borogove_chat_get_display_name (void * chat) The display name of this Chat. |
| API_PREFIX void | borogove_chat_get_messages_after (void * chat, const char * afterId, const char * afterTime, void(*)(void **, size_t, void *handler__context) handler, void * handler__context) Fetch a page of messages after some point. |
| API_PREFIX void | borogove_chat_get_messages_around (void * chat, const char * aroundId, const char * aroundTime, void(*)(void **, size_t, void *handler__context) handler, void * handler__context) Fetch a page of messages around (before, including, and after) some point. |
| API_PREFIX void | borogove_chat_get_messages_before (void * chat, const char * beforeId, const char * beforeTime, void(*)(void **, size_t, void *handler__context) handler, void * handler__context) Fetch a page of messages before some point. |
| API_PREFIX void * | borogove_chat_get_participant_details (void * chat, const char * participantId) Get the details for one participant in this Chat. |
| API_PREFIX size_t | borogove_chat_get_participants (void * chat, const char *** outPtr) Get the list of IDs of participants in this Chat. |
| API_PREFIX const char * | borogove_chat_get_photo (void * chat) Get the URI image to represent this Chat, or null. |
| API_PREFIX const char * | borogove_chat_get_placeholder (void * chat) Get the URI to a placeholder image to represent this Chat. |
| API_PREFIX void | borogove_chat_hangup (void * chat) Hangup or reject any calls in this chat. |
| API_PREFIX bool | borogove_chat_is_blocked (void * chat) Is this chat blocked? |
| API_PREFIX bool | borogove_chat_is_trusted (void * chat) Is this a chat with an entity we trust to see our online status? |
| API_PREFIX void * | borogove_chat_last_message (void * chat) The most recent message in this chat. |
| API_PREFIX const char * | borogove_chat_last_message_id (void * chat) An ID of the most recent message in this chat. |
| API_PREFIX void | borogove_chat_mark_read_up_to (void * chat, void * message) Signals that all messages up to and including this one have probably been displayed to the user. |
| API_PREFIX const char * | borogove_chat_message_account (void * chat_message) The ID of the account associated with this message. |
| API_PREFIX size_t | borogove_chat_message_attachments (void * chat_message, void *** outPtr) Array of attachments to this message. |
| API_PREFIX void | borogove_chat_message_builder_add_attachment (void * chat_message_builder, void * attachment) Add an attachment to this message. |
| API_PREFIX size_t | borogove_chat_message_builder_attachments (void * chat_message_builder, void *** outPtr) Array of attachments to this message. |
| API_PREFIX void * | borogove_chat_message_builder_build (void * chat_message_builder) Build this builder into an immutable ChatMessage. |
| API_PREFIX const char * | borogove_chat_message_builder_chat_id (void * chat_message_builder) The ID of the Chat this message is associated with. |
| API_PREFIX enum borogove_message_direction | borogove_chat_message_builder_direction (void * chat_message_builder) Direction of this message. |
| API_PREFIX void * | borogove_chat_message_builder_encryption (void * chat_message_builder) Information about the encryption used by the sender of this message. |
| API_PREFIX const char * | borogove_chat_message_builder_get_sender_id (void * chat_message_builder) The ID of the sender of this message. |
| API_PREFIX const char * | borogove_chat_message_builder_lang (void * chat_message_builder) Language code for the body text. |
| API_PREFIX const char * | borogove_chat_message_builder_local_id (void * chat_message_builder) The ID as set by the creator of this message. |
| API_PREFIX void * | borogove_chat_message_builder_new () |
| API_PREFIX void * | borogove_chat_message_builder_reply_to_message (void * chat_message_builder) Message this one is in reply to, or NULL. |
| API_PREFIX const char * | borogove_chat_message_builder_sender_id (void * chat_message_builder) The ID of the message sender. |
| API_PREFIX const char * | borogove_chat_message_builder_server_id (void * chat_message_builder) The ID as set by the authoritative server. |
| API_PREFIX const char * | borogove_chat_message_builder_server_id_by (void * chat_message_builder) The ID of the server which set the serverId. |
| API_PREFIX void | borogove_chat_message_builder_set_direction (void * chat_message_builder, enum borogove_message_direction value) Direction of this message. |
| API_PREFIX void | borogove_chat_message_builder_set_encryption (void * chat_message_builder, void * value) Information about the encryption used by the sender of this message. |
| API_PREFIX void | borogove_chat_message_builder_set_html (void * chat_message_builder, const char * html) Set rich text using an HTML string Also sets the plain text body appropriately. |
| API_PREFIX void | borogove_chat_message_builder_set_lang (void * chat_message_builder, const char * value) Language code for the body text. |
| API_PREFIX void | borogove_chat_message_builder_set_local_id (void * chat_message_builder, const char * value) The ID as set by the creator of this message. |
| API_PREFIX void | borogove_chat_message_builder_set_reply_to_message (void * chat_message_builder, void * value) Message this one is in reply to, or NULL. |
| API_PREFIX void | borogove_chat_message_builder_set_sender_id (void * chat_message_builder, const char * value) The ID of the message sender. |
| API_PREFIX void | borogove_chat_message_builder_set_server_id (void * chat_message_builder, const char * value) The ID as set by the authoritative server. |
| API_PREFIX void | borogove_chat_message_builder_set_server_id_by (void * chat_message_builder, const char * value) The ID of the server which set the serverId. |
| API_PREFIX void | borogove_chat_message_builder_set_status (void * chat_message_builder, enum borogove_message_status value) Status of this message. |
| API_PREFIX void | borogove_chat_message_builder_set_text (void * chat_message_builder, const char * value) Body text of this message or NULL. |
| API_PREFIX void | borogove_chat_message_builder_set_thread_id (void * chat_message_builder, const char * value) ID of the thread this message is in, or NULL. |
| API_PREFIX void | borogove_chat_message_builder_set_timestamp (void * chat_message_builder, const char * value) The timestamp of this message, in format YYYY-MM-DDThh:mm:ss[.sss]+00:00. |
| API_PREFIX void | borogove_chat_message_builder_set_type (void * chat_message_builder, enum borogove_message_type value) The type of this message (Chat, Call, etc) |
| API_PREFIX void | borogove_chat_message_builder_set_versions (void * chat_message_builder, void *const * inPtr, size_t count) Array of past versions of this message, if it has been edited. |
| API_PREFIX enum borogove_message_status | borogove_chat_message_builder_status (void * chat_message_builder) Status of this message. |
| API_PREFIX const char * | borogove_chat_message_builder_text (void * chat_message_builder) Body text of this message or NULL. |
| API_PREFIX const char * | borogove_chat_message_builder_thread_id (void * chat_message_builder) ID of the thread this message is in, or NULL. |
| API_PREFIX const char * | borogove_chat_message_builder_timestamp (void * chat_message_builder) The timestamp of this message, in format YYYY-MM-DDThh:mm:ss[.sss]+00:00. |
| API_PREFIX enum borogove_message_type | borogove_chat_message_builder_type (void * chat_message_builder) The type of this message (Chat, Call, etc) |
| API_PREFIX size_t | borogove_chat_message_builder_versions (void * chat_message_builder, void *** outPtr) Array of past versions of this message, if it has been edited. |
| API_PREFIX const char * | borogove_chat_message_call_duration (void * chat_message) The duration of the call if this message is related to a call. |
| API_PREFIX const char * | borogove_chat_message_call_sid (void * chat_message) The session id of the call if this message is related to a call. |
| API_PREFIX const char * | borogove_chat_message_call_status (void * chat_message) The last status of the call if this message is related to a call. |
| API_PREFIX const char * | borogove_chat_message_chat_id (void * chat_message) The ID of the Chat this message is associated with. |
| API_PREFIX enum borogove_message_direction | borogove_chat_message_direction (void * chat_message) Direction of this message. |
| API_PREFIX void * | borogove_chat_message_encryption (void * chat_message) Information about the encryption used by the sender of this message. |
| API_PREFIX const char * | borogove_chat_message_html (void * chat_message, void * sender) Get HTML version of the message body. |
| API_PREFIX bool | borogove_chat_message_is_incoming (void * chat_message) Is this an incoming message? |
| API_PREFIX const char * | borogove_chat_message_lang (void * chat_message) Language code for the body text. |
| API_PREFIX const char * | borogove_chat_message_local_id (void * chat_message) The ID as set by the creator of this message. |
| API_PREFIX size_t | borogove_chat_message_reaction_details (void * chat_message, const char * reactionKey, void *** outPtr) Details of a set of reaction to this message. |
| API_PREFIX size_t | borogove_chat_message_reaction_keys (void * chat_message, const char *** outPtr) List of reactions to this message. |
| API_PREFIX void * | borogove_chat_message_reply (void * chat_message) Create a new ChatMessage in reply to this one. |
| API_PREFIX void * | borogove_chat_message_reply_to_message (void * chat_message) Message this one is in reply to, or NULL. |
| API_PREFIX const char * | borogove_chat_message_sender_id (void * chat_message) The ID of the sender of this message. |
| API_PREFIX const char * | borogove_chat_message_server_id (void * chat_message) The ID as set by the authoritative server. |
| API_PREFIX const char * | borogove_chat_message_server_id_by (void * chat_message) The ID of the server which set the serverId. |
| API_PREFIX void | borogove_chat_message_set_encryption (void * chat_message, void * value) Information about the encryption used by the sender of this message. |
| API_PREFIX void | borogove_chat_message_set_status (void * chat_message, enum borogove_message_status value) Status of this message. |
| API_PREFIX enum borogove_message_status | borogove_chat_message_status (void * chat_message) Status of this message. |
| API_PREFIX const char * | borogove_chat_message_text (void * chat_message) Body text of this message or NULL. |
| API_PREFIX const char * | borogove_chat_message_thread_icon (void * chat_message) The URI of an icon for the thread associated with this message, or NULL. |
| API_PREFIX const char * | borogove_chat_message_thread_id (void * chat_message) ID of the thread this message is in, or NULL. |
| API_PREFIX const char * | borogove_chat_message_timestamp (void * chat_message) The timestamp of this message, in format YYYY-MM-DDThh:mm:ss[.sss]Z. |
| API_PREFIX enum borogove_message_type | borogove_chat_message_type (void * chat_message) The type of this message (Chat, Call, etc) |
| API_PREFIX size_t | borogove_chat_message_versions (void * chat_message, void *** outPtr) Array of past versions of this message, if it has been edited. |
| API_PREFIX bool | borogove_chat_notifications_filtered (void * chat) Should notifications be filtered? |
| API_PREFIX bool | borogove_chat_notify_mention (void * chat) Should a mention produce a notification? |
| API_PREFIX bool | borogove_chat_notify_reply (void * chat) Should a reply produce a notification? |
| API_PREFIX const char * | borogove_chat_preview (void * chat) A preview of the chat, such as the most recent message body. |
| API_PREFIX const char * | borogove_chat_read_up_to (void * chat) An ID of the last message displayed to the user. |
| API_PREFIX void | borogove_chat_remove_reaction (void * chat, void * m, void * reaction) Remove an already-sent reaction from a message. |
| API_PREFIX void | borogove_chat_send_message (void * chat, void * message) Send a ChatMessage to this Chat. |
| API_PREFIX void | borogove_chat_set_active (void * chat, bool active, const char * threadId) Call this whenever the user makes a chat or thread "active" in your UX If you call this with true you MUST later call it will false. |
| API_PREFIX void | borogove_chat_set_display_name (void * chat, const char * displayName) Set the display name to use for this chat. |
| API_PREFIX void | borogove_chat_set_notifications (void * chat, bool filtered, bool mention, bool reply) Update notification preferences. |
| API_PREFIX void | borogove_chat_set_trusted (void * chat, bool trusted) Set if this chat is to be trusted with our presence, etc. |
| API_PREFIX void * | borogove_chat_start_call (void * chat, bool audio, bool video) Start a new call in this Chat. |
| API_PREFIX bool | borogove_chat_syncing (void * chat) |
| API_PREFIX void | borogove_chat_toggle_pinned (void * chat) Pin or unpin this chat. |
| API_PREFIX void | borogove_chat_typing (void * chat, const char * threadId, const char * content) Call this whenever the user is typing, can call on every keystroke. |
| API_PREFIX enum borogove_ui_state | borogove_chat_ui_state (void * chat) Current state of this chat. |
| API_PREFIX void | borogove_chat_unblock (void * chat, bool onServer) Unblock this chat so it will open again. |
| API_PREFIX int | borogove_chat_unread_count (void * chat) The number of message that have not yet been displayed to the user. |
| API_PREFIX size_t | borogove_chat_video_tracks (void * chat, void *** outPtr) All video tracks in all active calls in this chat. |
| API_PREFIX const char * | borogove_client_account_id (void * client) Get the account ID for this Client. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_call_media_listener (void * client, void(*)(void *, bool, bool, void *) handler, void * handler__context) Event fired when a call is asking for media to send. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_call_retract_listener (void * client, void(*)(const char *, const char *, void *) handler, void * handler__context) Event fired when a call is retracted or hung up. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_call_ring_listener (void * client, void(*)(void *, void *) handler, void * handler__context) Event fired when a new call comes in. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_call_ringing_listener (void * client, void(*)(void *, void *) handler, void * handler__context) Event fired when an outgoing call starts ringing. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_call_track_listener (void * client, void(*)(void *, void *, void **, size_t, void *) handler, void * handler__context) Event fired when call has a new MediaStreamTrack to play. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_call_update_status_listener (void * client, void(*)(void *, void *) handler, void * handler__context) Event fired when an existing call changes status (connecting, failed, etc) |
| API_PREFIX borogove_event_handler_token | borogove_client_add_chat_message_listener (void * client, void(*)(void *, int, void *) handler, void * handler__context) Event fired when a new ChatMessage comes in on any Chat Also fires when status of a ChatMessage changes, when a ChatMessage is edited, or when a reaction is added. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_chats_updated_listener (void * client, void(*)(void **, size_t, void *) handler, void * handler__context) Event fired when a Chat's metadata is updated, or when a new Chat is added. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_connection_failed_listener (void * client, void(*)(void *) handler, void * handler__context) Event fired when connection fails with a fatal error and will not be retried. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_password_needed_listener (void * client, void(*)(void *, void *) handler, void * handler__context) Event fired when client needs a password for authentication. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_status_offline_listener (void * client, void(*)(void *) handler, void * handler__context) Event fired when client is disconnected. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_status_online_listener (void * client, void(*)(void *) handler, void * handler__context) Event fired when client is connected and fully synchronized. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_sync_message_listener (void * client, void(*)(void *, void *) handler, void * handler__context) Event fired when syncing a new ChatMessage that was send when offline. |
| API_PREFIX borogove_event_handler_token | borogove_client_add_tls_check_listener (void * client, bool(*)(const char *, const char **, size_t, void *) handler, void * handler__context) Event fired when TLS checks fail, to give client the chance to override. |
| API_PREFIX const char * | borogove_client_display_name (void * client) Get the current display name for this account. |
| API_PREFIX void | borogove_client_enable_push (void * client, const char * push_service, const char * endpoint, const unsigned char * p256dh, size_t p256dh__len, const unsigned char * auth, size_t auth__len, int grace, const unsigned char * vapid_private_pkcs8, size_t vapid_private_pkcs8__len, const char *const * claims, size_t claims__len) Enable push notifications. |
| API_PREFIX void | borogove_client_find_available_chats (void * client, const char * q, bool(*)(const char *, void **, size_t, void *) callback, void * callback__context) Search for chats the user can start or join. |
| API_PREFIX void * | borogove_client_get_chat (void * client, const char * chatId) Find a chat by id. |
| API_PREFIX size_t | borogove_client_get_chats (void * client, void *** outPtr) |
| API_PREFIX void | borogove_client_logout (void * client, bool completely) Destroy local data for this account. |
| API_PREFIX void * | borogove_client_new (const char * address, void * persistence) Create a new Client to connect to a particular account. |
| API_PREFIX void | borogove_client_prepare_attachment (void * client, void * source, void(*)(void *, void *handler__context) handler, void * handler__context) Turn a file into a ChatAttachment for attaching to a ChatMessage. |
| API_PREFIX void | borogove_client_set_display_name (void * client, const char * displayName) Set the current display name for this account on the server. |
| API_PREFIX void | borogove_client_set_in_foreground (void * client) Let the SDK know the UI is in the foreground. |
| API_PREFIX void | borogove_client_set_not_in_foreground (void * client) Let the SDK know the UI is in the foreground. |
| API_PREFIX void | borogove_client_set_send_available (void * client, bool value) Set to false to suppress sending available presence. |
| API_PREFIX void | borogove_client_start (void * client) Start this client running and trying to connect to the server. |
| API_PREFIX void * | borogove_client_start_chat (void * client, void * availableChat) Start or join a chat from the search results. |
| API_PREFIX void | borogove_client_start_offline (void * client, void(*)(bool, void *handler__context) handler, void * handler__context) Gets the client ready to use but does not connect to the server. |
| API_PREFIX void | borogove_client_use_password (void * client, const char * password) Sets the password to be used in response to the password needed event. |
| API_PREFIX void | borogove_config_enable_constrained_memory_mode () Trades off some performance for lower / more consistent memory usage. |
| API_PREFIX bool | borogove_config_relative_hash_uri () Produce /.well-known/ni/ paths instead of ni:/// URIs for referencing media by hash. |
| API_PREFIX void | borogove_config_set_relative_hash_uri (bool value) Produce /.well-known/ni/ paths instead of ni:/// URIs for referencing media by hash. |
| API_PREFIX void * | borogove_custom_emoji_reaction_custom (const char * text, const char * uri) Create a new custom emoji reaction to send. |
| API_PREFIX const char * | borogove_custom_emoji_reaction_uri (void * custom_emoji_reaction) |
| API_PREFIX void | borogove_event_emitter_remove_event_listener (void * event_emitter, borogove_event_handler_token token) Remove an event listener of any type, no matter how it was added or what event it is for. |
| API_PREFIX const char * | borogove_hash_algorithm (void * hash) Hash algorithm name. |
| API_PREFIX void * | borogove_hash_from_hex (const char * algorithm, const char * hash) Create a new Hash from a hex string. |
| API_PREFIX void * | borogove_hash_from_uri (const char * uri) Create a new Hash from a ni:, cid: or similar URI. |
| API_PREFIX const char * | borogove_hash_to_base_64 (void * hash) Represent this Hash as a Base64 string. |
| API_PREFIX const char * | borogove_hash_to_base_64_url (void * hash) Represent this Hash as a Base64url string. |
| API_PREFIX const char * | borogove_hash_to_hex (void * hash) Represent this Hash as a hex string. |
| API_PREFIX const char * | borogove_hash_to_uri (void * hash) Represent this Hash as a URI. |
| API_PREFIX const char * | borogove_identicon_svg (const char * source) |
| API_PREFIX const char * | borogove_notification_account_id (void * notification) The ID of the associated account. |
| API_PREFIX const char * | borogove_notification_body (void * notification) The body text. |
| API_PREFIX const char * | borogove_notification_call_sid (void * notification) If this is a call notification, the call session ID. |
| API_PREFIX const char * | borogove_notification_call_status (void * notification) If this is a call notification, the call status. |
| API_PREFIX const char * | borogove_notification_chat_id (void * notification) The ID of the associated chat. |
| API_PREFIX const char * | borogove_notification_image_uri (void * notification) Optional image URI. |
| API_PREFIX const char * | borogove_notification_lang (void * notification) Optional language code. |
| API_PREFIX const char * | borogove_notification_message_id (void * notification) The serverId of the message. |
| API_PREFIX const char * | borogove_notification_sender_id (void * notification) The ID of the message sender. |
| API_PREFIX const char * | borogove_notification_timestamp (void * notification) Optional date and time of the event. |
| API_PREFIX const char * | borogove_notification_title (void * notification) The title. |
| API_PREFIX enum borogove_message_type | borogove_notification_type (void * notification) The type of the message. |
| API_PREFIX const char * | borogove_participant_display_name (void * participant) |
| API_PREFIX bool | borogove_participant_is_self (void * participant) |
| API_PREFIX const char * | borogove_participant_photo_uri (void * participant) |
| API_PREFIX const char * | borogove_participant_placeholder_uri (void * participant) |
| API_PREFIX void * | borogove_persistence_dummy_new () Create a basic persistence layer that persists nothing. |
| API_PREFIX void | borogove_persistence_media_store_fs_get_media_path (void * media_store_fs, const char * uri, void(*)(const char *, void *handler__context) handler, void * handler__context) Get absolute path on filesystem to a particular piece of media. |
| API_PREFIX void * | borogove_persistence_media_store_fs_new (const char * path) Store media on the filesystem. |
| API_PREFIX void | borogove_persistence_sqlite_get_message (void * sqlite, const char * accountId, const char * chatId, const char * serverId, const char * localId, void(*)(void *, void *handler__context) handler, void * handler__context) Get a single message. |
| API_PREFIX void | borogove_persistence_sqlite_list_accounts (void * sqlite, void(*)(const char **, size_t, void *handler__context) handler, void * handler__context) List all known accounts. |
| API_PREFIX void * | borogove_persistence_sqlite_new (const char * dbfile, void * media) Create a basic persistence layer based on sqlite. |
| API_PREFIX void | borogove_persistence_sqlite_remove_account (void * sqlite, const char * accountId, bool completely) Remove an account from storage. |
| API_PREFIX void * | borogove_push_receive (const char * data, void * persistence) Receive a new push notification from some external system. |
| API_PREFIX const char * | borogove_reaction_key (void * reaction) Key for grouping reactions. |
| API_PREFIX const char * | borogove_reaction_render (void * reaction, const char *(*)(const char *, void *) forText, void * forText__context, const char *(*)(const char *, const char *, void *) forImage, void * forImage__context) Create a new Unicode reaction to send. |
| API_PREFIX const char * | borogove_reaction_sender_id (void * reaction) ID of who sent this Reaction. |
| API_PREFIX const char * | borogove_reaction_timestamp (void * reaction) Date and time when this Reaction was sent, in format YYYY-MM-DDThh:mm:ss[.sss]+00:00. |
| API_PREFIX void * | borogove_reaction_unicode (const char * unicode) Create a new Unicode reaction to send. |
| API_PREFIX void | borogove_release (const void * ptr) Informs the garbage collector that object is no longer needed by the C code. |
| API_PREFIX const char * | borogove_setup (borogove_panic_callback panic_callback) Initializes the SDK. |
| API_PREFIX void | borogove_stop (bool wait) Stops the SDK, blocking until the main thread has completed. |
Detailed Description
Everything returned from an SDK procedure or passed to a function pointer, both strings and opaque types, must be passed to borogove_release when you are done with it.
Thread-safety: All calls can be made from any thread. Callbacks may run on any thread.
Public Types Documentation
enum borogove_calls_call_status
enum borogove_calls_call_status {
NoCall = 0,
Incoming = 1,
Outgoing = 2,
Connecting = 3,
Ongoing = 4,
Failed = 5
};
typedef borogove_event_handler_token
typedef int borogove_event_handler_token;
enum borogove_message_direction
enum borogove_message_direction {
MessageReceived = 0,
MessageSent = 1
};
enum borogove_message_status
enum borogove_message_status {
MessagePending = 0,
MessageDeliveredToServer = 1,
MessageDeliveredToDevice = 2,
MessageFailedToSend = 3
};
enum borogove_message_type
enum borogove_message_type {
MessageChat = 0,
MessageCall = 1,
MessageChannel = 2,
MessageChannelPrivate = 3
};
typedef borogove_panic_callback
typedef void(* borogove_panic_callback) (const char *info);
enum borogove_ui_state
enum borogove_ui_state {
Pinned = 0,
Open = 1,
Closed = 2
};
Public Functions Documentation
function borogove_attachment_source_name
API_PREFIX const char * borogove_attachment_source_name (
void * attachment_source
)
function borogove_attachment_source_new
API_PREFIX void * borogove_attachment_source_new (
const char * path,
const char * mime
)
function borogove_attachment_source_path
API_PREFIX const char * borogove_attachment_source_path (
void * attachment_source
)
function borogove_attachment_source_size
API_PREFIX int borogove_attachment_source_size (
void * attachment_source
)
function borogove_attachment_source_type
API_PREFIX const char * borogove_attachment_source_type (
void * attachment_source
)
function borogove_available_chat_chat_id
The ID of the Chat this search result represents.
API_PREFIX const char * borogove_available_chat_chat_id (
void * available_chat
)
function borogove_available_chat_display_name
The display name of this search result.
API_PREFIX const char * borogove_available_chat_display_name (
void * available_chat
)
function borogove_available_chat_is_channel
Is this search result a channel?
API_PREFIX bool borogove_available_chat_is_channel (
void * available_chat
)
function borogove_available_chat_note
A human-readable note associated with this search result.
API_PREFIX const char * borogove_available_chat_note (
void * available_chat
)
function borogove_calls_audio_format_channels
API_PREFIX int borogove_calls_audio_format_channels (
void * audio_format
)
function borogove_calls_audio_format_clock_rate
API_PREFIX int borogove_calls_audio_format_clock_rate (
void * audio_format
)
function borogove_calls_audio_format_new
API_PREFIX void * borogove_calls_audio_format_new (
const char * format,
unsigned char payloadType,
int clockRate,
int channels
)
function borogove_calls_dtmf_sender_insert_dtmf
Schedule DTMF events to be sent.
API_PREFIX void borogove_calls_dtmf_sender_insert_dtmf (
void * dtmf_sender,
const char * tones
)
Parameters:
tonescan be any number of 0123456789#*ABCD,
function borogove_calls_initiated_session_accept
API_PREFIX void borogove_calls_initiated_session_accept (
void * initiated_session
)
function borogove_calls_initiated_session_add_media
API_PREFIX void borogove_calls_initiated_session_add_media (
void * initiated_session,
void *const * streams,
size_t streams__len
)
function borogove_calls_initiated_session_audio_tracks
API_PREFIX size_t borogove_calls_initiated_session_audio_tracks (
void * initiated_session,
void *** outPtr
)
function borogove_calls_initiated_session_call_status
API_PREFIX enum borogove_calls_call_status borogove_calls_initiated_session_call_status (
void * initiated_session
)
function borogove_calls_initiated_session_chat_id
API_PREFIX const char * borogove_calls_initiated_session_chat_id (
void * initiated_session
)
function borogove_calls_initiated_session_dtmf
API_PREFIX void * borogove_calls_initiated_session_dtmf (
void * initiated_session
)
function borogove_calls_initiated_session_hangup
API_PREFIX void borogove_calls_initiated_session_hangup (
void * initiated_session
)
function borogove_calls_initiated_session_sid
API_PREFIX const char * borogove_calls_initiated_session_sid (
void * initiated_session
)
function borogove_calls_initiated_session_supply_media
API_PREFIX void borogove_calls_initiated_session_supply_media (
void * initiated_session,
void *const * streams,
size_t streams__len
)
function borogove_calls_initiated_session_video_tracks
API_PREFIX size_t borogove_calls_initiated_session_video_tracks (
void * initiated_session,
void *** outPtr
)
function borogove_calls_media_stream_add_track
API_PREFIX void borogove_calls_media_stream_add_track (
void * media_stream,
void * track
)
function borogove_calls_media_stream_get_tracks
API_PREFIX size_t borogove_calls_media_stream_get_tracks (
void * media_stream,
void *** outPtr
)
function borogove_calls_media_stream_make_audio
Create default bidirectional audio track.
API_PREFIX void * borogove_calls_media_stream_make_audio ()
function borogove_calls_media_stream_new
API_PREFIX void * borogove_calls_media_stream_new ()
function borogove_calls_media_stream_track_add_pcm_listener
Event fired for new inbound audio frame.
API_PREFIX void borogove_calls_media_stream_track_add_pcm_listener (
void * media_stream_track,
void(*)(short *, size_t, int, int, void *) callback,
void * callback__context
)
Parameters:
callbacktakes three arguments, the Signed 16-bit PCM data, the clock rate, and the number of channels
function borogove_calls_media_stream_track_add_ready_for_pcm_listener
Event fired when ready for next outbound audio frame.
API_PREFIX void borogove_calls_media_stream_track_add_ready_for_pcm_listener (
void * media_stream_track,
void(*)(void *) callback,
void * callback__context
)
Parameters:
callback
function borogove_calls_media_stream_track_id
API_PREFIX const char * borogove_calls_media_stream_track_id (
void * media_stream_track
)
function borogove_calls_media_stream_track_kind
API_PREFIX const char * borogove_calls_media_stream_track_kind (
void * media_stream_track
)
function borogove_calls_media_stream_track_muted
API_PREFIX bool borogove_calls_media_stream_track_muted (
void * media_stream_track
)
function borogove_calls_media_stream_track_stop
API_PREFIX void borogove_calls_media_stream_track_stop (
void * media_stream_track
)
function borogove_calls_media_stream_track_supported_audio_formats
API_PREFIX size_t borogove_calls_media_stream_track_supported_audio_formats (
void * media_stream_track,
void *** outPtr
)
function borogove_calls_media_stream_track_write_pcm
Send new audio to this track.
API_PREFIX void borogove_calls_media_stream_track_write_pcm (
void * media_stream_track,
const short * pcm,
size_t pcm__len,
int clockRate,
int channels
)
Parameters:
pcm16-bit signed linear PCM data (interleaved)clockRatethe sampling rate of the datachannelsthe number of audio channels
function borogove_channel_is_private
API_PREFIX bool borogove_channel_is_private (
void * channel
)
function borogove_chat_accept_call
Accept any incoming calls in this Chat.
API_PREFIX void borogove_chat_accept_call (
void * chat
)
function borogove_chat_add_reaction
Add new reaction to a message in this Chat.
API_PREFIX void borogove_chat_add_reaction (
void * chat,
void * m,
void * reaction
)
Parameters:
mChatMessage to react toreactionemoji of the reaction
function borogove_chat_attachment_create
Create a new attachment for adding to a ChatMessage.
API_PREFIX void * borogove_chat_attachment_create (
const char * name,
const char * mime,
int size,
const char * uri
)
Parameters:
nameOptional filenamemimeMIME typesizeSize in bytesuriURI to attachment
function borogove_chat_attachment_hashes
Hashes of data.
API_PREFIX size_t borogove_chat_attachment_hashes (
void * chat_attachment,
void *** outPtr
)
function borogove_chat_attachment_mime
MIME Type.
API_PREFIX const char * borogove_chat_attachment_mime (
void * chat_attachment
)
function borogove_chat_attachment_name
Filename.
API_PREFIX const char * borogove_chat_attachment_name (
void * chat_attachment
)
function borogove_chat_attachment_size
Size in bytes.
API_PREFIX int borogove_chat_attachment_size (
void * chat_attachment
)
function borogove_chat_attachment_uris
URIs to data.
API_PREFIX size_t borogove_chat_attachment_uris (
void * chat_attachment,
const char *** outPtr
)
function borogove_chat_block
Block this chat so it will not re-open.
API_PREFIX void borogove_chat_block (
void * chat,
void * reportSpam,
bool onServer
)
function borogove_chat_bookmark
Save this Chat on the server.
API_PREFIX void borogove_chat_bookmark (
void * chat
)
function borogove_chat_call_status
The current status of a call in this chat.
API_PREFIX enum borogove_calls_call_status borogove_chat_call_status (
void * chat
)
function borogove_chat_can_audio_call
Can audio calls be started in this Chat?
API_PREFIX bool borogove_chat_can_audio_call (
void * chat
)
function borogove_chat_can_video_call
Can video calls be started in this Chat?
API_PREFIX bool borogove_chat_can_video_call (
void * chat
)
function borogove_chat_chat_id
ID of this Chat.
API_PREFIX const char * borogove_chat_chat_id (
void * chat
)
function borogove_chat_close
Archive this chat.
API_PREFIX void borogove_chat_close (
void * chat
)
function borogove_chat_correct_message
Correct an already-send message by replacing it with a new one.
API_PREFIX void borogove_chat_correct_message (
void * chat,
const char * localId,
void * message
)
Parameters:
localIdthe localId of the message to correct must be the localId of the first version ever sent, not a subsequent correctionmessagethe new ChatMessage to replace it with
function borogove_chat_dtmf
A DTMFSender for a call in this chat, or NULL.
API_PREFIX void * borogove_chat_dtmf (
void * chat
)
function borogove_chat_encryption_mode
Get encryption mode for this chat.
API_PREFIX const char * borogove_chat_encryption_mode (
void * chat
)
function borogove_chat_get_display_name
The display name of this Chat.
API_PREFIX const char * borogove_chat_get_display_name (
void * chat
)
function borogove_chat_get_messages_after
Fetch a page of messages after some point.
API_PREFIX void borogove_chat_get_messages_after (
void * chat,
const char * afterId,
const char * afterTime,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
afterIdid of the message to look afterafterTimetimestamp of the message to look after, String in format YYYY-MM-DDThh:mm:ss[.sss]+00:00handlerwhich receives an array of ChatMessage that are found
function borogove_chat_get_messages_around
Fetch a page of messages around (before, including, and after) some point.
API_PREFIX void borogove_chat_get_messages_around (
void * chat,
const char * aroundId,
const char * aroundTime,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
aroundIdid of the message to look aroundaroundTimetimestamp of the message to look around, String in format YYYY-MM-DDThh:mm:ss[.sss]+00:00handlerwhich receives an array of ChatMessage that are found
function borogove_chat_get_messages_before
Fetch a page of messages before some point.
API_PREFIX void borogove_chat_get_messages_before (
void * chat,
const char * beforeId,
const char * beforeTime,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
beforeIdid of the message to look beforebeforeTimetimestamp of the message to look before, String in format YYYY-MM-DDThh:mm:ss[.sss]+00:00handlerwhich receives an array of ChatMessage that are found
function borogove_chat_get_participant_details
Get the details for one participant in this Chat.
API_PREFIX void * borogove_chat_get_participant_details (
void * chat,
const char * participantId
)
Parameters:
participantIdthe ID of the participant to look up
function borogove_chat_get_participants
Get the list of IDs of participants in this Chat.
API_PREFIX size_t borogove_chat_get_participants (
void * chat,
const char *** outPtr
)
Returns:
array of IDs
function borogove_chat_get_photo
Get the URI image to represent this Chat, or null.
API_PREFIX const char * borogove_chat_get_photo (
void * chat
)
function borogove_chat_get_placeholder
Get the URI to a placeholder image to represent this Chat.
API_PREFIX const char * borogove_chat_get_placeholder (
void * chat
)
function borogove_chat_hangup
Hangup or reject any calls in this chat.
API_PREFIX void borogove_chat_hangup (
void * chat
)
function borogove_chat_is_blocked
Is this chat blocked?
API_PREFIX bool borogove_chat_is_blocked (
void * chat
)
function borogove_chat_is_trusted
Is this a chat with an entity we trust to see our online status?
API_PREFIX bool borogove_chat_is_trusted (
void * chat
)
function borogove_chat_last_message
The most recent message in this chat.
API_PREFIX void * borogove_chat_last_message (
void * chat
)
function borogove_chat_last_message_id
An ID of the most recent message in this chat.
API_PREFIX const char * borogove_chat_last_message_id (
void * chat
)
function borogove_chat_mark_read_up_to
Signals that all messages up to and including this one have probably been displayed to the user.
API_PREFIX void borogove_chat_mark_read_up_to (
void * chat,
void * message
)
Parameters:
messagethe ChatMessage most recently displayed
function borogove_chat_message_account
The ID of the account associated with this message.
API_PREFIX const char * borogove_chat_message_account (
void * chat_message
)
function borogove_chat_message_attachments
Array of attachments to this message.
API_PREFIX size_t borogove_chat_message_attachments (
void * chat_message,
void *** outPtr
)
function borogove_chat_message_builder_add_attachment
Add an attachment to this message.
API_PREFIX void borogove_chat_message_builder_add_attachment (
void * chat_message_builder,
void * attachment
)
Parameters:
attachmentThe ChatAttachment to add
function borogove_chat_message_builder_attachments
Array of attachments to this message.
API_PREFIX size_t borogove_chat_message_builder_attachments (
void * chat_message_builder,
void *** outPtr
)
function borogove_chat_message_builder_build
Build this builder into an immutable ChatMessage.
API_PREFIX void * borogove_chat_message_builder_build (
void * chat_message_builder
)
Returns:
the ChatMessage
function borogove_chat_message_builder_chat_id
The ID of the Chat this message is associated with.
API_PREFIX const char * borogove_chat_message_builder_chat_id (
void * chat_message_builder
)
function borogove_chat_message_builder_direction
Direction of this message.
API_PREFIX enum borogove_message_direction borogove_chat_message_builder_direction (
void * chat_message_builder
)
function borogove_chat_message_builder_encryption
Information about the encryption used by the sender of this message.
API_PREFIX void * borogove_chat_message_builder_encryption (
void * chat_message_builder
)
function borogove_chat_message_builder_get_sender_id
The ID of the sender of this message.
API_PREFIX const char * borogove_chat_message_builder_get_sender_id (
void * chat_message_builder
)
function borogove_chat_message_builder_lang
Language code for the body text.
API_PREFIX const char * borogove_chat_message_builder_lang (
void * chat_message_builder
)
function borogove_chat_message_builder_local_id
The ID as set by the creator of this message.
API_PREFIX const char * borogove_chat_message_builder_local_id (
void * chat_message_builder
)
function borogove_chat_message_builder_new
API_PREFIX void * borogove_chat_message_builder_new ()
Returns:
a new blank ChatMessageBuilder
function borogove_chat_message_builder_reply_to_message
Message this one is in reply to, or NULL.
API_PREFIX void * borogove_chat_message_builder_reply_to_message (
void * chat_message_builder
)
function borogove_chat_message_builder_sender_id
The ID of the message sender.
API_PREFIX const char * borogove_chat_message_builder_sender_id (
void * chat_message_builder
)
function borogove_chat_message_builder_server_id
The ID as set by the authoritative server.
API_PREFIX const char * borogove_chat_message_builder_server_id (
void * chat_message_builder
)
function borogove_chat_message_builder_server_id_by
The ID of the server which set the serverId.
API_PREFIX const char * borogove_chat_message_builder_server_id_by (
void * chat_message_builder
)
function borogove_chat_message_builder_set_direction
Direction of this message.
API_PREFIX void borogove_chat_message_builder_set_direction (
void * chat_message_builder,
enum borogove_message_direction value
)
function borogove_chat_message_builder_set_encryption
Information about the encryption used by the sender of this message.
API_PREFIX void borogove_chat_message_builder_set_encryption (
void * chat_message_builder,
void * value
)
function borogove_chat_message_builder_set_html
Set rich text using an HTML string Also sets the plain text body appropriately.
API_PREFIX void borogove_chat_message_builder_set_html (
void * chat_message_builder,
const char * html
)
function borogove_chat_message_builder_set_lang
Language code for the body text.
API_PREFIX void borogove_chat_message_builder_set_lang (
void * chat_message_builder,
const char * value
)
function borogove_chat_message_builder_set_local_id
The ID as set by the creator of this message.
API_PREFIX void borogove_chat_message_builder_set_local_id (
void * chat_message_builder,
const char * value
)
function borogove_chat_message_builder_set_reply_to_message
Message this one is in reply to, or NULL.
API_PREFIX void borogove_chat_message_builder_set_reply_to_message (
void * chat_message_builder,
void * value
)
function borogove_chat_message_builder_set_sender_id
The ID of the message sender.
API_PREFIX void borogove_chat_message_builder_set_sender_id (
void * chat_message_builder,
const char * value
)
function borogove_chat_message_builder_set_server_id
The ID as set by the authoritative server.
API_PREFIX void borogove_chat_message_builder_set_server_id (
void * chat_message_builder,
const char * value
)
function borogove_chat_message_builder_set_server_id_by
The ID of the server which set the serverId.
API_PREFIX void borogove_chat_message_builder_set_server_id_by (
void * chat_message_builder,
const char * value
)
function borogove_chat_message_builder_set_status
Status of this message.
API_PREFIX void borogove_chat_message_builder_set_status (
void * chat_message_builder,
enum borogove_message_status value
)
function borogove_chat_message_builder_set_text
Body text of this message or NULL.
API_PREFIX void borogove_chat_message_builder_set_text (
void * chat_message_builder,
const char * value
)
function borogove_chat_message_builder_set_thread_id
ID of the thread this message is in, or NULL.
API_PREFIX void borogove_chat_message_builder_set_thread_id (
void * chat_message_builder,
const char * value
)
function borogove_chat_message_builder_set_timestamp
The timestamp of this message, in format YYYY-MM-DDThh:mm:ss[.sss]+00:00.
API_PREFIX void borogove_chat_message_builder_set_timestamp (
void * chat_message_builder,
const char * value
)
function borogove_chat_message_builder_set_type
The type of this message (Chat, Call, etc)
API_PREFIX void borogove_chat_message_builder_set_type (
void * chat_message_builder,
enum borogove_message_type value
)
function borogove_chat_message_builder_set_versions
Array of past versions of this message, if it has been edited.
API_PREFIX void borogove_chat_message_builder_set_versions (
void * chat_message_builder,
void *const * inPtr,
size_t count
)
function borogove_chat_message_builder_status
Status of this message.
API_PREFIX enum borogove_message_status borogove_chat_message_builder_status (
void * chat_message_builder
)
function borogove_chat_message_builder_text
Body text of this message or NULL.
API_PREFIX const char * borogove_chat_message_builder_text (
void * chat_message_builder
)
function borogove_chat_message_builder_thread_id
ID of the thread this message is in, or NULL.
API_PREFIX const char * borogove_chat_message_builder_thread_id (
void * chat_message_builder
)
function borogove_chat_message_builder_timestamp
The timestamp of this message, in format YYYY-MM-DDThh:mm:ss[.sss]+00:00.
API_PREFIX const char * borogove_chat_message_builder_timestamp (
void * chat_message_builder
)
function borogove_chat_message_builder_type
The type of this message (Chat, Call, etc)
API_PREFIX enum borogove_message_type borogove_chat_message_builder_type (
void * chat_message_builder
)
function borogove_chat_message_builder_versions
Array of past versions of this message, if it has been edited.
API_PREFIX size_t borogove_chat_message_builder_versions (
void * chat_message_builder,
void *** outPtr
)
function borogove_chat_message_call_duration
The duration of the call if this message is related to a call.
API_PREFIX const char * borogove_chat_message_call_duration (
void * chat_message
)
function borogove_chat_message_call_sid
The session id of the call if this message is related to a call.
API_PREFIX const char * borogove_chat_message_call_sid (
void * chat_message
)
function borogove_chat_message_call_status
The last status of the call if this message is related to a call.
API_PREFIX const char * borogove_chat_message_call_status (
void * chat_message
)
function borogove_chat_message_chat_id
The ID of the Chat this message is associated with.
API_PREFIX const char * borogove_chat_message_chat_id (
void * chat_message
)
function borogove_chat_message_direction
Direction of this message.
API_PREFIX enum borogove_message_direction borogove_chat_message_direction (
void * chat_message
)
function borogove_chat_message_encryption
Information about the encryption used by the sender of this message.
API_PREFIX void * borogove_chat_message_encryption (
void * chat_message
)
function borogove_chat_message_html
Get HTML version of the message body.
API_PREFIX const char * borogove_chat_message_html (
void * chat_message,
void * sender
)
WARNING: this is possibly untrusted HTML. You must parse or sanitize appropriately!
Parameters:
senderoptionally specify the full details of the sender
function borogove_chat_message_is_incoming
Is this an incoming message?
API_PREFIX bool borogove_chat_message_is_incoming (
void * chat_message
)
function borogove_chat_message_lang
Language code for the body text.
API_PREFIX const char * borogove_chat_message_lang (
void * chat_message
)
function borogove_chat_message_local_id
The ID as set by the creator of this message.
API_PREFIX const char * borogove_chat_message_local_id (
void * chat_message
)
function borogove_chat_message_reaction_details
Details of a set of reaction to this message.
API_PREFIX size_t borogove_chat_message_reaction_details (
void * chat_message,
const char * reactionKey,
void *** outPtr
)
function borogove_chat_message_reaction_keys
List of reactions to this message.
API_PREFIX size_t borogove_chat_message_reaction_keys (
void * chat_message,
const char *** outPtr
)
function borogove_chat_message_reply
Create a new ChatMessage in reply to this one.
API_PREFIX void * borogove_chat_message_reply (
void * chat_message
)
function borogove_chat_message_reply_to_message
Message this one is in reply to, or NULL.
API_PREFIX void * borogove_chat_message_reply_to_message (
void * chat_message
)
function borogove_chat_message_sender_id
The ID of the sender of this message.
API_PREFIX const char * borogove_chat_message_sender_id (
void * chat_message
)
function borogove_chat_message_server_id
The ID as set by the authoritative server.
API_PREFIX const char * borogove_chat_message_server_id (
void * chat_message
)
function borogove_chat_message_server_id_by
The ID of the server which set the serverId.
API_PREFIX const char * borogove_chat_message_server_id_by (
void * chat_message
)
function borogove_chat_message_set_encryption
Information about the encryption used by the sender of this message.
API_PREFIX void borogove_chat_message_set_encryption (
void * chat_message,
void * value
)
function borogove_chat_message_set_status
Status of this message.
API_PREFIX void borogove_chat_message_set_status (
void * chat_message,
enum borogove_message_status value
)
function borogove_chat_message_status
Status of this message.
API_PREFIX enum borogove_message_status borogove_chat_message_status (
void * chat_message
)
function borogove_chat_message_text
Body text of this message or NULL.
API_PREFIX const char * borogove_chat_message_text (
void * chat_message
)
function borogove_chat_message_thread_icon
The URI of an icon for the thread associated with this message, or NULL.
API_PREFIX const char * borogove_chat_message_thread_icon (
void * chat_message
)
function borogove_chat_message_thread_id
ID of the thread this message is in, or NULL.
API_PREFIX const char * borogove_chat_message_thread_id (
void * chat_message
)
function borogove_chat_message_timestamp
The timestamp of this message, in format YYYY-MM-DDThh:mm:ss[.sss]Z.
API_PREFIX const char * borogove_chat_message_timestamp (
void * chat_message
)
function borogove_chat_message_type
The type of this message (Chat, Call, etc)
API_PREFIX enum borogove_message_type borogove_chat_message_type (
void * chat_message
)
function borogove_chat_message_versions
Array of past versions of this message, if it has been edited.
API_PREFIX size_t borogove_chat_message_versions (
void * chat_message,
void *** outPtr
)
function borogove_chat_notifications_filtered
Should notifications be filtered?
API_PREFIX bool borogove_chat_notifications_filtered (
void * chat
)
function borogove_chat_notify_mention
Should a mention produce a notification?
API_PREFIX bool borogove_chat_notify_mention (
void * chat
)
function borogove_chat_notify_reply
Should a reply produce a notification?
API_PREFIX bool borogove_chat_notify_reply (
void * chat
)
function borogove_chat_preview
A preview of the chat, such as the most recent message body.
API_PREFIX const char * borogove_chat_preview (
void * chat
)
function borogove_chat_read_up_to
An ID of the last message displayed to the user.
API_PREFIX const char * borogove_chat_read_up_to (
void * chat
)
function borogove_chat_remove_reaction
Remove an already-sent reaction from a message.
API_PREFIX void borogove_chat_remove_reaction (
void * chat,
void * m,
void * reaction
)
Parameters:
mChatMessage to remove the reaction fromreactionthe emoji to remove
function borogove_chat_send_message
Send a ChatMessage to this Chat.
API_PREFIX void borogove_chat_send_message (
void * chat,
void * message
)
Parameters:
messagethe ChatMessage to send
function borogove_chat_set_active
Call this whenever the user makes a chat or thread "active" in your UX If you call this with true you MUST later call it will false.
API_PREFIX void borogove_chat_set_active (
void * chat,
bool active,
const char * threadId
)
Parameters:
activetrue if the chat is "active", false otherwisethreadIdoptional, what thread the user has selected if any
function borogove_chat_set_display_name
Set the display name to use for this chat.
API_PREFIX void borogove_chat_set_display_name (
void * chat,
const char * displayName
)
Parameters:
displayNameString to use as display name
function borogove_chat_set_notifications
Update notification preferences.
API_PREFIX void borogove_chat_set_notifications (
void * chat,
bool filtered,
bool mention,
bool reply
)
function borogove_chat_set_trusted
Set if this chat is to be trusted with our presence, etc.
API_PREFIX void borogove_chat_set_trusted (
void * chat,
bool trusted
)
Parameters:
trustedBool if trusted or not
function borogove_chat_start_call
Start a new call in this Chat.
API_PREFIX void * borogove_chat_start_call (
void * chat,
bool audio,
bool video
)
Parameters:
audiodo we want audio in this callvideodo we want video in this call
function borogove_chat_syncing
API_PREFIX bool borogove_chat_syncing (
void * chat
)
Returns:
if this chat is currently syncing with the server
function borogove_chat_toggle_pinned
Pin or unpin this chat.
API_PREFIX void borogove_chat_toggle_pinned (
void * chat
)
function borogove_chat_typing
Call this whenever the user is typing, can call on every keystroke.
API_PREFIX void borogove_chat_typing (
void * chat,
const char * threadId,
const char * content
)
Parameters:
threadIdoptional, what thread the user has selected if anycontentoptional, what the user has typed so far
function borogove_chat_ui_state
Current state of this chat.
API_PREFIX enum borogove_ui_state borogove_chat_ui_state (
void * chat
)
function borogove_chat_unblock
Unblock this chat so it will open again.
API_PREFIX void borogove_chat_unblock (
void * chat,
bool onServer
)
function borogove_chat_unread_count
The number of message that have not yet been displayed to the user.
API_PREFIX int borogove_chat_unread_count (
void * chat
)
function borogove_chat_video_tracks
All video tracks in all active calls in this chat.
API_PREFIX size_t borogove_chat_video_tracks (
void * chat,
void *** outPtr
)
function borogove_client_account_id
Get the account ID for this Client.
API_PREFIX const char * borogove_client_account_id (
void * client
)
Returns:
account id
function borogove_client_add_call_media_listener
Event fired when a call is asking for media to send.
API_PREFIX borogove_event_handler_token borogove_client_add_call_media_listener (
void * client,
void(*)(void *, bool, bool, void *) handler,
void * handler__context
)
Parameters:
handlertakes three arguments, the call Session, a boolean indicating if audio is desired, and a boolean indicating if video is desired
Returns:
token for use with removeEventListener
function borogove_client_add_call_retract_listener
Event fired when a call is retracted or hung up.
API_PREFIX borogove_event_handler_token borogove_client_add_call_retract_listener (
void * client,
void(*)(const char *, const char *, void *) handler,
void * handler__context
)
Parameters:
handlertakes two arguments, the associated Chat ID and Session ID
Returns:
token for use with removeEventListener
function borogove_client_add_call_ring_listener
Event fired when a new call comes in.
API_PREFIX borogove_event_handler_token borogove_client_add_call_ring_listener (
void * client,
void(*)(void *, void *) handler,
void * handler__context
)
Parameters:
handlertakes one argument, the call Session
Returns:
token for use with removeEventListener
function borogove_client_add_call_ringing_listener
Event fired when an outgoing call starts ringing.
API_PREFIX borogove_event_handler_token borogove_client_add_call_ringing_listener (
void * client,
void(*)(void *, void *) handler,
void * handler__context
)
Parameters:
handlertakes two arguments, the associated Chat ID and Session ID
Returns:
token for use with removeEventListener
function borogove_client_add_call_track_listener
Event fired when call has a new MediaStreamTrack to play.
API_PREFIX borogove_event_handler_token borogove_client_add_call_track_listener (
void * client,
void(*)(void *, void *, void **, size_t, void *) handler,
void * handler__context
)
Parameters:
handlertakes three arguments, the associated Chat ID, the new MediaStreamTrack, and an array of any associated MediaStreams
Returns:
token for use with removeEventListener
function borogove_client_add_call_update_status_listener
Event fired when an existing call changes status (connecting, failed, etc)
API_PREFIX borogove_event_handler_token borogove_client_add_call_update_status_listener (
void * client,
void(*)(void *, void *) handler,
void * handler__context
)
Parameters:
handlertakes one argument, the associated Session
Returns:
token for use with removeEventListener
function borogove_client_add_chat_message_listener
Event fired when a new ChatMessage comes in on any Chat Also fires when status of a ChatMessage changes, when a ChatMessage is edited, or when a reaction is added.
API_PREFIX borogove_event_handler_token borogove_client_add_chat_message_listener (
void * client,
void(*)(void *, int, void *) handler,
void * handler__context
)
Parameters:
handlertakes two arguments, the ChatMessage and ChatMessageEvent enum describing what happened
Returns:
token for use with removeEventListener
function borogove_client_add_chats_updated_listener
Event fired when a Chat's metadata is updated, or when a new Chat is added.
API_PREFIX borogove_event_handler_token borogove_client_add_chats_updated_listener (
void * client,
void(*)(void **, size_t, void *) handler,
void * handler__context
)
Parameters:
handlertakes one argument, an array of Chats that were updated
Returns:
token for use with removeEventListener
function borogove_client_add_connection_failed_listener
Event fired when connection fails with a fatal error and will not be retried.
API_PREFIX borogove_event_handler_token borogove_client_add_connection_failed_listener (
void * client,
void(*)(void *) handler,
void * handler__context
)
Parameters:
handlertakes no arguments
Returns:
token for use with removeEventListener
function borogove_client_add_password_needed_listener
Event fired when client needs a password for authentication.
API_PREFIX borogove_event_handler_token borogove_client_add_password_needed_listener (
void * client,
void(*)(void *, void *) handler,
void * handler__context
)
Parameters:
handlertakes one argument, the Client that needs a password
Returns:
token for use with removeEventListener
function borogove_client_add_status_offline_listener
Event fired when client is disconnected.
API_PREFIX borogove_event_handler_token borogove_client_add_status_offline_listener (
void * client,
void(*)(void *) handler,
void * handler__context
)
Parameters:
handlertakes no arguments
Returns:
token for use with removeEventListener
function borogove_client_add_status_online_listener
Event fired when client is connected and fully synchronized.
API_PREFIX borogove_event_handler_token borogove_client_add_status_online_listener (
void * client,
void(*)(void *) handler,
void * handler__context
)
Parameters:
handlertakes no arguments
Returns:
token for use with removeEventListener
function borogove_client_add_sync_message_listener
Event fired when syncing a new ChatMessage that was send when offline.
API_PREFIX borogove_event_handler_token borogove_client_add_sync_message_listener (
void * client,
void(*)(void *, void *) handler,
void * handler__context
)
Normally you don't want this, but it may be useful if you want to notify on app start.
Parameters:
handlertakes one argument, the ChatMessage
Returns:
token for use with removeEventListener
function borogove_client_add_tls_check_listener
Event fired when TLS checks fail, to give client the chance to override.
API_PREFIX borogove_event_handler_token borogove_client_add_tls_check_listener (
void * client,
bool(*)(const char *, const char **, size_t, void *) handler,
void * handler__context
)
Parameters:
handlertakes two arguments, the PEM of the cert and an array of DNS names, and must return true to accept or false to reject
Returns:
token for use with removeEventListener
function borogove_client_display_name
Get the current display name for this account.
API_PREFIX const char * borogove_client_display_name (
void * client
)
Returns:
display name
function borogove_client_enable_push
Enable push notifications.
API_PREFIX void borogove_client_enable_push (
void * client,
const char * push_service,
const char * endpoint,
const unsigned char * p256dh,
size_t p256dh__len,
const unsigned char * auth,
size_t auth__len,
int grace,
const unsigned char * vapid_private_pkcs8,
size_t vapid_private_pkcs8__len,
const char *const * claims,
size_t claims__len
)
Parameters:
push_servicethe address of a push proxyvapid_private_pkcs8the private key for signing JWT of the push serviceendpointthe final target for the push proxy to forward top256dhA P-256 uncompressed point in ANSI X9.62 formatauthRandom 16 octed valuegraceGrace period during which not to generate push if another app is active for same account, in seconds (negative for none)claimsOptional additional JWT claims as key then value
function borogove_client_find_available_chats
Search for chats the user can start or join.
API_PREFIX void borogove_client_find_available_chats (
void * client,
const char * q,
bool(*)(const char *, void **, size_t, void *) callback,
void * callback__context
)
Parameters:
qthe search query to usecallbacktakes two arguments, the query that was used and the array of results
function borogove_client_get_chat
Find a chat by id.
API_PREFIX void * borogove_client_get_chat (
void * client,
const char * chatId
)
Returns:
the chat if known, or NULL
function borogove_client_get_chats
API_PREFIX size_t borogove_client_get_chats (
void * client,
void *** outPtr
)
Returns:
array of open chats, sorted by last activity
function borogove_client_logout
Destroy local data for this account.
API_PREFIX void borogove_client_logout (
void * client,
bool completely
)
Parameters:
completelyif true chats, messages, etc will be deleted as well
function borogove_client_new
Create a new Client to connect to a particular account.
API_PREFIX void * borogove_client_new (
const char * address,
void * persistence
)
Parameters:
addressthe account to connect topersistencethe persistence layer to use for storage
function borogove_client_prepare_attachment
Turn a file into a ChatAttachment for attaching to a ChatMessage.
API_PREFIX void borogove_client_prepare_attachment (
void * client,
void * source,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
Parameters:
sourceThe AttachmentSource to usehandlerwhich receives a ChatAttachment or null
function borogove_client_set_display_name
Set the current display name for this account on the server.
API_PREFIX void borogove_client_set_display_name (
void * client,
const char * displayName
)
Parameters:
displayname to set (ignored if empty or NULL)
function borogove_client_set_in_foreground
Let the SDK know the UI is in the foreground.
API_PREFIX void borogove_client_set_in_foreground (
void * client
)
function borogove_client_set_not_in_foreground
Let the SDK know the UI is in the foreground.
API_PREFIX void borogove_client_set_not_in_foreground (
void * client
)
function borogove_client_set_send_available
Set to false to suppress sending available presence.
API_PREFIX void borogove_client_set_send_available (
void * client,
bool value
)
function borogove_client_start
Start this client running and trying to connect to the server.
API_PREFIX void borogove_client_start (
void * client
)
function borogove_client_start_chat
Start or join a chat from the search results.
API_PREFIX void * borogove_client_start_chat (
void * client,
void * availableChat
)
Returns:
the chat that was started
function borogove_client_start_offline
Gets the client ready to use but does not connect to the server.
API_PREFIX void borogove_client_start_offline (
void * client,
void(*)(bool, void *handler__context) handler,
void * handler__context
)
Parameters:
handlerwhich receives true once the Client is ready
function borogove_client_use_password
Sets the password to be used in response to the password needed event.
API_PREFIX void borogove_client_use_password (
void * client,
const char * password
)
Parameters:
password
function borogove_config_enable_constrained_memory_mode
Trades off some performance for lower / more consistent memory usage.
API_PREFIX void borogove_config_enable_constrained_memory_mode ()
function borogove_config_relative_hash_uri
Produce /.well-known/ni/ paths instead of ni:/// URIs for referencing media by hash.
API_PREFIX bool borogove_config_relative_hash_uri ()
This can be useful eg for intercepting with a Service Worker.
function borogove_config_set_relative_hash_uri
Produce /.well-known/ni/ paths instead of ni:/// URIs for referencing media by hash.
API_PREFIX void borogove_config_set_relative_hash_uri (
bool value
)
This can be useful eg for intercepting with a Service Worker.
function borogove_custom_emoji_reaction_custom
Create a new custom emoji reaction to send.
API_PREFIX void * borogove_custom_emoji_reaction_custom (
const char * text,
const char * uri
)
Parameters:
textname of custom emojiuriURI for media of custom emoji
Returns:
Reaction
function borogove_custom_emoji_reaction_uri
API_PREFIX const char * borogove_custom_emoji_reaction_uri (
void * custom_emoji_reaction
)
function borogove_event_emitter_remove_event_listener
Remove an event listener of any type, no matter how it was added or what event it is for.
API_PREFIX void borogove_event_emitter_remove_event_listener (
void * event_emitter,
borogove_event_handler_token token
)
Parameters:
tokenthe token that was returned when the listener was added
function borogove_hash_algorithm
Hash algorithm name.
API_PREFIX const char * borogove_hash_algorithm (
void * hash
)
function borogove_hash_from_hex
Create a new Hash from a hex string.
API_PREFIX void * borogove_hash_from_hex (
const char * algorithm,
const char * hash
)
Parameters:
algorithmname per https://xmpp.org/extensions/xep-0300.htmlhashin hex format
Returns:
Hash or null on error
function borogove_hash_from_uri
Create a new Hash from a ni:, cid: or similar URI.
API_PREFIX void * borogove_hash_from_uri (
const char * uri
)
Parameters:
uriThe URI
Returns:
Hash or null on error
function borogove_hash_to_base_64
Represent this Hash as a Base64 string.
API_PREFIX const char * borogove_hash_to_base_64 (
void * hash
)
Returns:
Base64-encoded string
function borogove_hash_to_base_64_url
Represent this Hash as a Base64url string.
API_PREFIX const char * borogove_hash_to_base_64_url (
void * hash
)
Returns:
Base64url-encoded string
function borogove_hash_to_hex
Represent this Hash as a hex string.
API_PREFIX const char * borogove_hash_to_hex (
void * hash
)
Returns:
hex string
function borogove_hash_to_uri
Represent this Hash as a URI.
API_PREFIX const char * borogove_hash_to_uri (
void * hash
)
Returns:
URI as a string
function borogove_identicon_svg
API_PREFIX const char * borogove_identicon_svg (
const char * source
)
function borogove_notification_account_id
The ID of the associated account.
API_PREFIX const char * borogove_notification_account_id (
void * notification
)
function borogove_notification_body
The body text.
API_PREFIX const char * borogove_notification_body (
void * notification
)
function borogove_notification_call_sid
If this is a call notification, the call session ID.
API_PREFIX const char * borogove_notification_call_sid (
void * notification
)
function borogove_notification_call_status
If this is a call notification, the call status.
API_PREFIX const char * borogove_notification_call_status (
void * notification
)
function borogove_notification_chat_id
The ID of the associated chat.
API_PREFIX const char * borogove_notification_chat_id (
void * notification
)
function borogove_notification_image_uri
Optional image URI.
API_PREFIX const char * borogove_notification_image_uri (
void * notification
)
function borogove_notification_lang
Optional language code.
API_PREFIX const char * borogove_notification_lang (
void * notification
)
function borogove_notification_message_id
The serverId of the message.
API_PREFIX const char * borogove_notification_message_id (
void * notification
)
function borogove_notification_sender_id
The ID of the message sender.
API_PREFIX const char * borogove_notification_sender_id (
void * notification
)
function borogove_notification_timestamp
Optional date and time of the event.
API_PREFIX const char * borogove_notification_timestamp (
void * notification
)
function borogove_notification_title
The title.
API_PREFIX const char * borogove_notification_title (
void * notification
)
function borogove_notification_type
The type of the message.
API_PREFIX enum borogove_message_type borogove_notification_type (
void * notification
)
function borogove_participant_display_name
API_PREFIX const char * borogove_participant_display_name (
void * participant
)
function borogove_participant_is_self
API_PREFIX bool borogove_participant_is_self (
void * participant
)
function borogove_participant_photo_uri
API_PREFIX const char * borogove_participant_photo_uri (
void * participant
)
function borogove_participant_placeholder_uri
API_PREFIX const char * borogove_participant_placeholder_uri (
void * participant
)
function borogove_persistence_dummy_new
Create a basic persistence layer that persists nothing.
API_PREFIX void * borogove_persistence_dummy_new ()
Returns:
new persistence layer
function borogove_persistence_media_store_fs_get_media_path
Get absolute path on filesystem to a particular piece of media.
API_PREFIX void borogove_persistence_media_store_fs_get_media_path (
void * media_store_fs,
const char * uri,
void(*)(const char *, void *handler__context) handler,
void * handler__context
)
Parameters:
uriThe URI to the media (ni:// or similar)handlerwhich receives the path or null
function borogove_persistence_media_store_fs_new
Store media on the filesystem.
API_PREFIX void * borogove_persistence_media_store_fs_new (
const char * path
)
Parameters:
pathwhere on filesystem to store media
function borogove_persistence_sqlite_get_message
Get a single message.
API_PREFIX void borogove_persistence_sqlite_get_message (
void * sqlite,
const char * accountId,
const char * chatId,
const char * serverId,
const char * localId,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
Parameters:
accountIdthe account the message was sent or received onchatIdthe chat the message was sent or received onserverIdthe serverId of the message (optional if localId is specified)localIdthe localId of the message (optional if serverId is specified)handlerwhich receives the message or null
function borogove_persistence_sqlite_list_accounts
List all known accounts.
API_PREFIX void borogove_persistence_sqlite_list_accounts (
void * sqlite,
void(*)(const char **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
handlerwhich receives array of account IDs
function borogove_persistence_sqlite_new
Create a basic persistence layer based on sqlite.
API_PREFIX void * borogove_persistence_sqlite_new (
const char * dbfile,
void * media
)
Parameters:
dbfilepath to sqlite database @params media a MediaStore to use for media
Returns:
new persistence layer
function borogove_persistence_sqlite_remove_account
Remove an account from storage.
API_PREFIX void borogove_persistence_sqlite_remove_account (
void * sqlite,
const char * accountId,
bool completely
)
Parameters:
accountIdthe account to removecompletelyif message history, etc should be removed also
function borogove_push_receive
Receive a new push notification from some external system.
API_PREFIX void * borogove_push_receive (
const char * data,
void * persistence
)
Parameters:
datathe raw data from the pushpersistencethe persistence layer to write into
Returns:
a Notification representing the push data
function borogove_reaction_key
Key for grouping reactions.
API_PREFIX const char * borogove_reaction_key (
void * reaction
)
function borogove_reaction_render
Create a new Unicode reaction to send.
API_PREFIX const char * borogove_reaction_render (
void * reaction,
const char *(*)(const char *, void *) forText,
void * forText__context,
const char *(*)(const char *, const char *, void *) forImage,
void * forImage__context
)
Parameters:
forTextCallback called if this is a textual reaction. Called with the unicode String.forImageCallback called if this is a custom/image reaction. Called with the name and the URI to the image.
Returns:
the return value of the callback
function borogove_reaction_sender_id
ID of who sent this Reaction.
API_PREFIX const char * borogove_reaction_sender_id (
void * reaction
)
function borogove_reaction_timestamp
Date and time when this Reaction was sent, in format YYYY-MM-DDThh:mm:ss[.sss]+00:00.
API_PREFIX const char * borogove_reaction_timestamp (
void * reaction
)
function borogove_reaction_unicode
Create a new Unicode reaction to send.
API_PREFIX void * borogove_reaction_unicode (
const char * unicode
)
Parameters:
unicodeemoji of the reaction
Returns:
Reaction
function borogove_release
Informs the garbage collector that object is no longer needed by the C code.
API_PREFIX void borogove_release (
const void * ptr
)
If the object has no remaining reference the garbage collector can free the associated memory (which can happen at any time in the future). It does not free the memory immediately.
Thread-safety: can be called on any thread.
Parameters:
ptra handle to an arbitrary SDK object returned from an SDK function
function borogove_setup
Initializes the SDK.
API_PREFIX const char * borogove_setup (
borogove_panic_callback panic_callback
)
This must be first before calling SDK functions (otherwise those calls will hang waiting for a response).
Parameters:
panicCallbacka callback to execute if the SDK panics. The SDK will continue processing events after a panic and you may want to stop it after receiving this callback. UseNULLfor no callback
Returns:
NULL if the thread initializes successfully or a null-terminated C string if an error occurs during initialization
function borogove_stop
Stops the SDK, blocking until the main thread has completed.
API_PREFIX void borogove_stop (
bool wait
)
Once ended, it cannot be restarted (this is because static variable state will be retained from the last run).
It can be safely called any number of times – if the SDK is not running this function will just return.
After executing no more calls to SDK functions can be made (as these will hang waiting for a response).
Parameters:
waitIftrue, this function will wait for all events scheduled to execute in the future on the SDK thread to complete. Iffalse, immediate pending events will be finished and the SDK stopped without executing events scheduled in the future
The documentation for this class was generated from the following file cpp/borogove.h