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 |
| enum | borogove_encryption_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) Create an attachment source from a local file path and MIME type. |
| 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 bool | borogove_available_chat_can_audio_call (void * available_chat) Can audio calls be started after starting this Chat? |
| API_PREFIX bool | borogove_available_chat_can_video_call (void * available_chat) Can video calls be started after starting Chat? |
| 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 void | borogove_available_chat_iterator_next (void * available_chat_iterator, void(*)(void *, void *handler__context) handler, void * handler__context) Get the next AvailableChat from this iterator. |
| API_PREFIX const char * | borogove_available_chat_iterator_q (void * available_chat_iterator) The query that this iterator is returning results for. |
| 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_supply_media (void * initiated_session, void *const * streams, size_t streams__len) |
| 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 void | borogove_calls_session_accept (void * self) |
| API_PREFIX void | borogove_calls_session_add_media (void * self, void *const * streams, size_t streams__len) |
| API_PREFIX size_t | borogove_calls_session_audio_tracks (void * self, void *** outPtr) |
| API_PREFIX enum borogove_calls_call_status | borogove_calls_session_call_status (void * self) |
| API_PREFIX const char * | borogove_calls_session_chat_id (void * __self) |
| API_PREFIX void * | borogove_calls_session_dtmf (void * self) |
| API_PREFIX void | borogove_calls_session_hangup (void * self) |
| API_PREFIX const char * | borogove_calls_session_sid (void * __self) |
| API_PREFIX size_t | borogove_calls_session_video_tracks (void * self, void *** outPtr) |
| API_PREFIX const char * | borogove_channel_description (void * channel) Description of this Channel. |
| API_PREFIX bool | borogove_channel_is_private (void * channel) Whether this channel is members-only/private. |
| API_PREFIX const char * | borogove_channel_subject (void * channel) Subject of this 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_add_role (void * chat, const char * participantId, void * role) Add a role to a participant. |
| 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 size_t | borogove_chat_available_roles (void * chat, const char * participantId, void *** outPtr) Roles the current user can assign to the target participant. |
| API_PREFIX void | borogove_chat_block (void * chat, bool reportSpam, void * spamMessage, 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_invite (void * chat) Can the user invite others to this chat? |
| API_PREFIX bool | borogove_chat_can_moderate (void * chat) Can the user send messages to this chat? |
| API_PREFIX bool | borogove_chat_can_remove_role (void * chat, const char * participantId, void * role) Can the current user remove this role from the participant? |
| API_PREFIX bool | borogove_chat_can_send (void * chat) Can the user send messages to 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_commands (void * chat, void(*)(void **, size_t, void *handler__context) handler, void * handler__context) List commands exposed by this chat. |
| API_PREFIX void | borogove_chat_correct_message (void * chat, void * correct, 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, void * after, 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, void * around, 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, void * before, 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 size_t | borogove_chat_get_tags (void * chat, const char *** outPtr) Tags on this Chat. |
| API_PREFIX void | borogove_chat_hangup (void * chat) Hangup or reject any calls in this chat. |
| API_PREFIX bool | borogove_chat_has_commands (void * chat) Does this chat provide a menu of commands? |
| API_PREFIX void | borogove_chat_invite (void * chat, void * other, const char * threadId) Invite another chat's participants to participate in this one. |
| API_PREFIX void * | borogove_chat_invited_by (void * chat) The Participant that originally invited us to this Chat, if we were invited. |
| API_PREFIX bool | borogove_chat_is_app (void * chat) This chat's primary mode of interaction is via commands. |
| API_PREFIX bool | borogove_chat_is_blocked (void * chat) Is this chat blocked? |
| API_PREFIX bool | borogove_chat_is_bookmarked (void * chat) Has this chat ever been bookmarked? |
| 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_body (void * chat_message, void * sender) HTML representation of the message body. |
| 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. |
| API_PREFIX size_t | borogove_chat_message_builder_link_metadata (void * chat_message_builder, void *** outPtr) Metadata about links associated with this message. |
| 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 () Create a new message builder. |
| 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_body (void * chat_message_builder, void * html) Set body from Html. |
| 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_lang (void * chat_message_builder, const char * value) Language code for the body. |
| API_PREFIX void | borogove_chat_message_builder_set_link_metadata (void * chat_message_builder, void *const * inPtr, size_t count) Metadata about links associated with this message. |
| 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_status_text (void * chat_message_builder, const char * value) Human readable text to go with the status. |
| API_PREFIX void | borogove_chat_message_builder_set_subject (void * chat_message_builder, const char * subject) Set subject of this message. |
| 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_status_text (void * chat_message_builder) Human readable text to go with the status. |
| 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 bool | borogove_chat_message_can_replace (void * chat_message, void * other) Is this message the same as or a replacement for some other one? |
| 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 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. |
| API_PREFIX size_t | borogove_chat_message_link_metadata (void * chat_message, void *** outPtr) Metadata about links associated with this message. |
| API_PREFIX const char * | borogove_chat_message_local_id (void * chat_message) The ID as set by the creator of this message. |
| API_PREFIX const char * | borogove_chat_message_moderation_reason (void * chat_message) If message is moderated, the reason. |
| 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 enum borogove_message_status | borogove_chat_message_status (void * chat_message) Status of this message. |
| API_PREFIX const char * | borogove_chat_message_status_text (void * chat_message) Message to go along with the message status. |
| API_PREFIX const char * | borogove_chat_message_subject (void * chat_message) Subject if present. |
| 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 void | borogove_chat_moderate (void * chat, void * message, const char * reason) Moderate a message by replacing it with a tombstone (if permitted) |
| 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 void | borogove_chat_read_up_to (void * chat, void(*)(void *, void *handler__context) handler, void * handler__context) 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_remove_role (void * chat, const char * participantId, void * role) Remove a role from a participant. |
| API_PREFIX void | borogove_chat_send_message (void * chat, void * message) Send a message 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 void * | borogove_chat_status (void * 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 void | borogove_client_available_chat_sources (void * client, void(*)(const char **, size_t, void *handler__context) handler, void * handler__context) List of human-readable strings of things supports by findAvailableChats. |
| 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) 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 * accountId, 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_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 not in the foreground. |
| API_PREFIX void | borogove_client_set_profile (void * client, void * profile, bool publicAccess) Set the current profile for this account on the server. |
| API_PREFIX void | borogove_client_set_send_available (void * client, bool value) Set to false to suppress sending available presence after connect. |
| API_PREFIX void | borogove_client_set_status (void * client, void * status, int expires, bool publicAccess) Publish an account status/activity item. |
| 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_command_execute (void * command, void(*)(void *, void *handler__context) handler, void * handler__context) Start a new session for this command. |
| API_PREFIX const char * | borogove_command_name (void * command) Human-readable name for this command. |
| API_PREFIX size_t | borogove_command_session_actions (void * command_session, void *** outPtr) Actions the server currently allows for this session. |
| API_PREFIX void | borogove_command_session_execute (void * command_session, const char * action, void * data, int formIdx, void(*)(void *, void *handler__context) handler, void * handler__context) Continue this command session, optionally submitting form data. |
| API_PREFIX size_t | borogove_command_session_forms (void * command_session, void *** outPtr) Forms to display for the current session step. |
| API_PREFIX const char * | borogove_command_session_name (void * command_session) Human-readable title for the current command session. |
| API_PREFIX const char * | borogove_command_session_status (void * command_session) Current command execution status. |
| 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) URI of the custom emoji image. |
| API_PREFIX const char * | borogove_encryption_info_method (void * encryption_info) |
| API_PREFIX const char * | borogove_encryption_info_method_name (void * encryption_info) |
| API_PREFIX const char * | borogove_encryption_info_reason (void * encryption_info) |
| API_PREFIX const char * | borogove_encryption_info_reason_text (void * encryption_info) |
| API_PREFIX enum borogove_encryption_status | borogove_encryption_info_status (void * encryption_info) |
| 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_form_field_datatype (void * form_field) |
| API_PREFIX const char * | borogove_form_field_desc (void * form_field) |
| API_PREFIX const char * | borogove_form_field_label (void * form_field) |
| API_PREFIX const char * | borogove_form_field_name (void * form_field) |
| API_PREFIX bool | borogove_form_field_open (void * form_field) |
| API_PREFIX size_t | borogove_form_field_options (void * form_field, void *** outPtr) |
| API_PREFIX const char * | borogove_form_field_range_max (void * form_field) |
| API_PREFIX const char * | borogove_form_field_range_min (void * form_field) |
| API_PREFIX const char * | borogove_form_field_regex (void * form_field) |
| API_PREFIX bool | borogove_form_field_required (void * form_field) |
| API_PREFIX const char * | borogove_form_field_type (void * form_field) |
| API_PREFIX size_t | borogove_form_field_value (void * form_field, const char *** outPtr) |
| API_PREFIX bool | borogove_form_is_result (void * form) Is this form entirely results / read-only? |
| API_PREFIX void * | borogove_form_item_field (void * form_item) Form field for this item, or null when the item is not a field. |
| API_PREFIX void * | borogove_form_item_section (void * form_item) Nested section for this item, or null when the item is not a section. |
| API_PREFIX const char * | borogove_form_item_status (void * form_item) Optional status type associated with instructional text. |
| API_PREFIX size_t | borogove_form_item_table_header (void * form_item, void *** outPtr) Column definitions when this item represents a result table. |
| API_PREFIX const char * | borogove_form_item_text (void * form_item) Plain text content for this item, or null when the item is not text-only. |
| API_PREFIX size_t | borogove_form_items (void * form, void *** outPtr) Items to render inside this form. |
| API_PREFIX const char * | borogove_form_option_label (void * form_option) |
| API_PREFIX const char * | borogove_form_option_value (void * form_option) |
| API_PREFIX size_t | borogove_form_section_items (void * self, void *** outPtr) Renderable items contained in this section. |
| API_PREFIX const char * | borogove_form_section_title (void * self) Title to show for this section, or null when it is untitled. |
| API_PREFIX void | borogove_form_submit_builder_add (void * form_submit_builder, const char * k, const char * v) Add a submitted value for a field. |
| API_PREFIX void * | borogove_form_submit_builder_new () Create a new empty form submission. |
| API_PREFIX const char * | borogove_form_title (void * form) Title of this form. |
| API_PREFIX const char * | borogove_form_url (void * form) URL to use instead of this form. |
| 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 void * | borogove_html_element (const char * tag, const char *const * attr, size_t attr__len, const char *const * attrValues, size_t attrValues__len, void *const * children, size_t children__len) HTML builder, make an element. |
| API_PREFIX void * | borogove_html_fragment (void *const * nodes, size_t nodes__len) HTML builder, make a fragment. |
| API_PREFIX void * | borogove_html_from_string (const char * html) Build HTML payload from source. |
| API_PREFIX size_t | borogove_html_reduce (void * html, void *(*)(const char *, const char **, ptrdiff_t, const char **, ptrdiff_t, void **, ptrdiff_t, void *) f, void * f__context, void *** outPtr) Walk the HTML tree to produce a new value. |
| API_PREFIX void * | borogove_html_text (const char * text) HTML builder, make some text. |
| API_PREFIX const char * | borogove_html_to_plain_text (void * html) Get plain text suitable for showing to a user. |
| API_PREFIX const char * | borogove_html_to_string (void * html) Get HTML source as a string. |
| API_PREFIX const char * | borogove_identicon_svg (const char * source) Generate a deterministic SVG identicon as a data URI. |
| API_PREFIX const char * | borogove_link_metadata_about (void * link_metadata) |
| API_PREFIX const char * | borogove_link_metadata_description (void * link_metadata) |
| API_PREFIX size_t | borogove_link_metadata_image (void * link_metadata, const char *** outPtr) |
| API_PREFIX const char * | borogove_link_metadata_title (void * link_metadata) |
| API_PREFIX const char * | borogove_link_metadata_url (void * link_metadata) |
| API_PREFIX size_t | borogove_link_metadata_video (void * link_metadata, const char *** outPtr) |
| 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 void * | borogove_participant_chat (void * participant) Chat metadata for this participant when it is available as a direct Chat. |
| API_PREFIX const char * | borogove_participant_display_name (void * participant) Display name to show for this participant. |
| API_PREFIX bool | borogove_participant_is_self (void * participant) True when this participant is the connected account. |
| API_PREFIX const char * | borogove_participant_photo_uri (void * participant) Avatar URI for this participant, or null when none is known. |
| API_PREFIX const char * | borogove_participant_placeholder_uri (void * participant) Fallback avatar URI to use when no photo is available. |
| API_PREFIX void | borogove_participant_profile (void * participant, void * client, void(*)(void *, void *handler__context) handler, void * handler__context) Load the participant's profile. |
| API_PREFIX size_t | borogove_participant_roles (void * participant, void *** outPtr) Roles this participant has in the Chat. |
| API_PREFIX void | borogove_participant_status (void * participant, void * client, void(*)(void *, void *handler__context) handler, void * handler__context) Load the participant's status. |
| API_PREFIX void * | borogove_persistence_dummy_new () Create a basic persistence layer that persists nothing. |
| API_PREFIX void | borogove_persistence_get_message (void * self, const char * accountId, const char * chatId, const char * serverId, const char * localId, void(*)(void *, void *handler__context) handler, void * handler__context) Find a message by Chat ID and known IDs. |
| API_PREFIX void | borogove_persistence_get_messages_after (void * self, const char * accountId, const char * chatId, void * afterId, void(*)(void **, size_t, void *handler__context) handler, void * handler__context) Load messages newer than a reference message. |
| API_PREFIX void | borogove_persistence_get_messages_around (void * self, const char * accountId, void * around, void(*)(void **, size_t, void *handler__context) handler, void * handler__context) Load messages surrounding a reference message. |
| API_PREFIX void | borogove_persistence_get_messages_before (void * self, const char * accountId, const char * chatId, void * before, void(*)(void **, size_t, void *handler__context) handler, void * handler__context) Load messages older than a reference message. |
| API_PREFIX void | borogove_persistence_has_media (void * self, const char * hashAlgorithm, const unsigned char * hash, size_t hash__len, void(*)(bool, void *handler__context) handler, void * handler__context) Check whether a media blob is already stored. |
| API_PREFIX void | borogove_persistence_key_value_store_get (void * self, const char * k, void(*)(const char *, void *handler__context) handler, void * handler__context) |
| API_PREFIX void | borogove_persistence_key_value_store_set (void * self, const char * k, const char * v, void(*)(bool, void *handler__context) handler, void * handler__context) |
| API_PREFIX void | borogove_persistence_list_accounts (void * self, void(*)(const char **, size_t, void *handler__context) handler, void * handler__context) List all accounts present in storage. |
| 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_media_store_has_media (void * self, const char * hashAlgorithm, const unsigned char * hash, size_t hash__len, void(*)(bool, void *handler__context) handler, void * handler__context) |
| API_PREFIX void | borogove_persistence_media_store_remove_media (void * self, const char * hashAlgorithm, const unsigned char * hash, size_t hash__len) |
| API_PREFIX void | borogove_persistence_media_store_store_media (void * self, const char * mime, const unsigned char * bytes, size_t bytes__len, void(*)(bool, void *handler__context) handler, void * handler__context) |
| API_PREFIX void | borogove_persistence_remove_account (void * self, const char * accountId, bool completely) Remove stored data for an account. |
| API_PREFIX void | borogove_persistence_remove_media (void * self, const char * hashAlgorithm, const unsigned char * hash, size_t hash__len) Delete previously stored media. |
| 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_persistence_store_chats (void * self, const char * accountId, void *const * chats, size_t chats__len) Persist the current metadata for a set of Chats. |
| API_PREFIX void | borogove_persistence_store_login (void * self, const char * accountId, const char * clientId, const char * displayName, const char * token) Store login-related state for an account. |
| API_PREFIX void | borogove_persistence_store_media (void * self, const char * mime, const unsigned char * bytes, size_t bytes__len, void(*)(bool, void *handler__context) handler, void * handler__context) Store media bytes and any metadata needed to retrieve them later. |
| API_PREFIX void | borogove_persistence_store_messages (void * self, const char * accountId, void *const * message, size_t message__len, void(*)(void **, size_t, void *handler__context) handler, void * handler__context) Persist one or more messages. |
| API_PREFIX void | borogove_persistence_sync_point (void * self, const char * accountId, const char * chatId, void(*)(void *, void *handler__context) handler, void * handler__context) Get the last message in an account or chat that is is safe to sync forward from. |
| API_PREFIX void | borogove_persistence_update_message (void * self, const char * accountId, void * message) Replace the stored record for a message. |
| API_PREFIX void | borogove_persistence_update_message_status (void * self, const char * accountId, const char * localId, enum borogove_message_status status, const char * statusText, void(*)(void *, void *handler__context) handler, void * handler__context) Update delivery state for a locally-created message. |
| API_PREFIX void | borogove_profile_builder_add (void * profile_builder, const char * k, const char * v) Add a new field to this profile. |
| API_PREFIX void * | borogove_profile_builder_build (void * profile_builder) Build an immutable Profile from the current builder state. |
| API_PREFIX void | borogove_profile_builder_move (void * profile_builder, const char * id, const char * moveTo) Move a profile item. |
| API_PREFIX void * | borogove_profile_builder_new (void * profile) Create a mutable builder from an existing profile. |
| API_PREFIX void | borogove_profile_builder_remove (void * profile_builder, const char * id) Remove a field from this profile. |
| API_PREFIX void | borogove_profile_builder_set (void * profile_builder, const char * id, const char * v) Set the value of an existing field on this profile. |
| API_PREFIX size_t | borogove_profile_item_date (void * profile_item, const char *** outPtr) Get date values for this profile item. |
| API_PREFIX size_t | borogove_profile_item_datetime (void * profile_item, const char *** outPtr) Get datetime values for this profile item. |
| API_PREFIX const char * | borogove_profile_item_id (void * profile_item) |
| API_PREFIX const char * | borogove_profile_item_key (void * profile_item) |
| API_PREFIX size_t | borogove_profile_item_language_tag (void * profile_item, const char *** outPtr) Get language-tag values for this profile item. |
| API_PREFIX size_t | borogove_profile_item_parameters (void * profile_item, void *** outPtr) Get parameter items attached to this profile item. |
| API_PREFIX size_t | borogove_profile_item_text (void * profile_item, const char *** outPtr) Get text values for this profile item. |
| API_PREFIX size_t | borogove_profile_item_time (void * profile_item, const char *** outPtr) Get time values for this profile item. |
| API_PREFIX size_t | borogove_profile_item_uri (void * profile_item, const char *** outPtr) Get URI values for this profile item. |
| API_PREFIX size_t | borogove_profile_items (void * profile, void *** outPtr) All items in the profile. |
| 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_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_role_color (void * role) Suggested color to use when displaying this Role. |
| API_PREFIX const char * | borogove_role_id (void * role) Unique id for the role. |
| API_PREFIX const char * | borogove_role_title (void * role) Human readable name for the role. |
| API_PREFIX void | borogove_set_finalizer (const void * ptr, void(*)(void *ptr) finalize) Register a finalizer to run when this object is garbage collected. |
| API_PREFIX const char * | borogove_setup (borogove_panic_callback panic_callback) Initializes the SDK. |
| API_PREFIX const char * | borogove_status_emoji (void * status) |
| API_PREFIX void * | borogove_status_new (const char * emoji, const char * text) Create a status value with emoji and text. |
| API_PREFIX const char * | borogove_status_text (void * status) |
| API_PREFIX const char * | borogove_status_to_string (void * status) Render this status as plain text. |
| 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
};
enum borogove_encryption_status
enum borogove_encryption_status {
DecryptionSuccess = 0,
DecryptionFailure = 1
};
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,
Invited = 3
};
Public Functions Documentation
function borogove_attachment_source_name
API_PREFIX const char * borogove_attachment_source_name (
void * attachment_source
)
function borogove_attachment_source_new
Create an attachment source from a local file path and MIME type.
API_PREFIX void * borogove_attachment_source_new (
const char * path,
const char * mime
)
Parameters:
pathpath to the local filemimeMIME type to advertise for the upload
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_can_audio_call
Can audio calls be started after starting this Chat?
API_PREFIX bool borogove_available_chat_can_audio_call (
void * available_chat
)
function borogove_available_chat_can_video_call
Can video calls be started after starting Chat?
API_PREFIX bool borogove_available_chat_can_video_call (
void * available_chat
)
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_iterator_next
Get the next AvailableChat from this iterator.
API_PREFIX void borogove_available_chat_iterator_next (
void * available_chat_iterator,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
Parameters:
handlerwhich receives the next result, or null when exhausted
function borogove_available_chat_iterator_q
The query that this iterator is returning results for.
API_PREFIX const char * borogove_available_chat_iterator_q (
void * available_chat_iterator
)
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_supply_media
API_PREFIX void borogove_calls_initiated_session_supply_media (
void * initiated_session,
void *const * streams,
size_t streams__len
)
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_calls_session_accept
API_PREFIX void borogove_calls_session_accept (
void * self
)
function borogove_calls_session_add_media
API_PREFIX void borogove_calls_session_add_media (
void * self,
void *const * streams,
size_t streams__len
)
function borogove_calls_session_audio_tracks
API_PREFIX size_t borogove_calls_session_audio_tracks (
void * self,
void *** outPtr
)
function borogove_calls_session_call_status
API_PREFIX enum borogove_calls_call_status borogove_calls_session_call_status (
void * self
)
function borogove_calls_session_chat_id
API_PREFIX const char * borogove_calls_session_chat_id (
void * __self
)
function borogove_calls_session_dtmf
API_PREFIX void * borogove_calls_session_dtmf (
void * self
)
function borogove_calls_session_hangup
API_PREFIX void borogove_calls_session_hangup (
void * self
)
function borogove_calls_session_sid
API_PREFIX const char * borogove_calls_session_sid (
void * __self
)
function borogove_calls_session_video_tracks
API_PREFIX size_t borogove_calls_session_video_tracks (
void * self,
void *** outPtr
)
function borogove_channel_description
Description of this Channel.
API_PREFIX const char * borogove_channel_description (
void * channel
)
function borogove_channel_is_private
Whether this channel is members-only/private.
API_PREFIX bool borogove_channel_is_private (
void * channel
)
function borogove_channel_subject
Subject of this Channel.
API_PREFIX const char * borogove_channel_subject (
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_add_role
Add a role to a participant.
API_PREFIX void borogove_chat_add_role (
void * chat,
const char * participantId,
void * role
)
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_available_roles
Roles the current user can assign to the target participant.
API_PREFIX size_t borogove_chat_available_roles (
void * chat,
const char * participantId,
void *** outPtr
)
function borogove_chat_block
Block this chat so it will not re-open.
API_PREFIX void borogove_chat_block (
void * chat,
bool reportSpam,
void * spamMessage,
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_invite
Can the user invite others to this chat?
API_PREFIX bool borogove_chat_can_invite (
void * chat
)
function borogove_chat_can_moderate
Can the user send messages to this chat?
API_PREFIX bool borogove_chat_can_moderate (
void * chat
)
function borogove_chat_can_remove_role
Can the current user remove this role from the participant?
API_PREFIX bool borogove_chat_can_remove_role (
void * chat,
const char * participantId,
void * role
)
function borogove_chat_can_send
Can the user send messages to this chat?
API_PREFIX bool borogove_chat_can_send (
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_commands
List commands exposed by this chat.
API_PREFIX void borogove_chat_commands (
void * chat,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
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,
void * correct,
void * message
)
Parameters:
correctthe ChatMessage to correctmessagethe new ChatMessageBuilder 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,
void * after,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
afterChatMessage to look after, or null to start at the beginninghandlerwhich 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,
void * around,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
aroundChatMessage to look aroundhandlerwhich 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,
void * before,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
beforeChatMessage to look before, or null to start at the endhandlerwhich 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_get_tags
Tags on this Chat.
API_PREFIX size_t borogove_chat_get_tags (
void * chat,
const char *** outPtr
)
function borogove_chat_hangup
Hangup or reject any calls in this chat.
API_PREFIX void borogove_chat_hangup (
void * chat
)
function borogove_chat_has_commands
Does this chat provide a menu of commands?
API_PREFIX bool borogove_chat_has_commands (
void * chat
)
function borogove_chat_invite
Invite another chat's participants to participate in this one.
API_PREFIX void borogove_chat_invite (
void * chat,
void * other,
const char * threadId
)
function borogove_chat_invited_by
The Participant that originally invited us to this Chat, if we were invited.
API_PREFIX void * borogove_chat_invited_by (
void * chat
)
function borogove_chat_is_app
This chat's primary mode of interaction is via commands.
API_PREFIX bool borogove_chat_is_app (
void * chat
)
function borogove_chat_is_blocked
Is this chat blocked?
API_PREFIX bool borogove_chat_is_blocked (
void * chat
)
function borogove_chat_is_bookmarked
Has this chat ever been bookmarked?
API_PREFIX bool borogove_chat_is_bookmarked (
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_body
HTML representation of the message body.
API_PREFIX void * borogove_chat_message_body (
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_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
)
Returns:
Chat ID for this message
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
)
Returns:
sender ID for this message
function borogove_chat_message_builder_lang
Language code for the body.
API_PREFIX const char * borogove_chat_message_builder_lang (
void * chat_message_builder
)
function borogove_chat_message_builder_link_metadata
Metadata about links associated with this message.
API_PREFIX size_t borogove_chat_message_builder_link_metadata (
void * chat_message_builder,
void *** outPtr
)
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
Create a new message builder.
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_body
Set body from Html.
API_PREFIX void borogove_chat_message_builder_set_body (
void * chat_message_builder,
void * html
)
Parameters:
htmlrich text body to attach to the message
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_lang
Language code for the body.
API_PREFIX void borogove_chat_message_builder_set_lang (
void * chat_message_builder,
const char * value
)
function borogove_chat_message_builder_set_link_metadata
Metadata about links associated with this message.
API_PREFIX void borogove_chat_message_builder_set_link_metadata (
void * chat_message_builder,
void *const * inPtr,
size_t count
)
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_status_text
Human readable text to go with the status.
API_PREFIX void borogove_chat_message_builder_set_status_text (
void * chat_message_builder,
const char * value
)
function borogove_chat_message_builder_set_subject
Set subject of this message.
API_PREFIX void borogove_chat_message_builder_set_subject (
void * chat_message_builder,
const char * subject
)
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_status_text
Human readable text to go with the status.
API_PREFIX const char * borogove_chat_message_builder_status_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_can_replace
Is this message the same as or a replacement for some other one?
API_PREFIX bool borogove_chat_message_can_replace (
void * chat_message,
void * other
)
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_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.
API_PREFIX const char * borogove_chat_message_lang (
void * chat_message
)
function borogove_chat_message_link_metadata
Metadata about links associated with this message.
API_PREFIX size_t borogove_chat_message_link_metadata (
void * chat_message,
void *** outPtr
)
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_moderation_reason
If message is moderated, the reason.
API_PREFIX const char * borogove_chat_message_moderation_reason (
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_status
Status of this message.
API_PREFIX enum borogove_message_status borogove_chat_message_status (
void * chat_message
)
function borogove_chat_message_status_text
Message to go along with the message status.
API_PREFIX const char * borogove_chat_message_status_text (
void * chat_message
)
function borogove_chat_message_subject
Subject if present.
API_PREFIX const char * borogove_chat_message_subject (
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_moderate
Moderate a message by replacing it with a tombstone (if permitted)
API_PREFIX void borogove_chat_moderate (
void * chat,
void * message,
const char * reason
)
Parameters:
messagethe message to moderatereasonthe reason for moderating this message
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 void borogove_chat_read_up_to (
void * chat,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
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_remove_role
Remove a role from a participant.
API_PREFIX void borogove_chat_remove_role (
void * chat,
const char * participantId,
void * role
)
function borogove_chat_send_message
Send a message to this Chat.
API_PREFIX void borogove_chat_send_message (
void * chat,
void * message
)
Parameters:
messagethe ChatMessageBuilder 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_status
API_PREFIX void * borogove_chat_status (
void * chat
)
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 one argument, the associated Session
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_available_chat_sources
List of human-readable strings of things supports by findAvailableChats.
API_PREFIX void borogove_client_available_chat_sources (
void * client,
void(*)(const char **, size_t, void *handler__context) handler,
void * handler__context
)
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
)
Parameters:
qthe search query to use
Returns:
an async iterator of AvailableChat matching the query
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 * accountId,
void * persistence
)
Parameters:
accountIdthe 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_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 not in the foreground.
API_PREFIX void borogove_client_set_not_in_foreground (
void * client
)
function borogove_client_set_profile
Set the current profile for this account on the server.
API_PREFIX void borogove_client_set_profile (
void * client,
void * profile,
bool publicAccess
)
Parameters:
profileto setpublicAccessset the access for the profile to public
function borogove_client_set_send_available
Set to false to suppress sending available presence after connect.
API_PREFIX void borogove_client_set_send_available (
void * client,
bool value
)
function borogove_client_set_status
Publish an account status/activity item.
API_PREFIX void borogove_client_set_status (
void * client,
void * status,
int expires,
bool publicAccess
)
Parameters:
statusstatus payload to publishexpiresexpiration in seconds for the published itempublicAccesswhen true, make the item world-readable
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_command_execute
Start a new session for this command.
API_PREFIX void borogove_command_execute (
void * command,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
May have side effects!
function borogove_command_name
Human-readable name for this command.
API_PREFIX const char * borogove_command_name (
void * command
)
function borogove_command_session_actions
Actions the server currently allows for this session.
API_PREFIX size_t borogove_command_session_actions (
void * command_session,
void *** outPtr
)
function borogove_command_session_execute
Continue this command session, optionally submitting form data.
API_PREFIX void borogove_command_session_execute (
void * command_session,
const char * action,
void * data,
int formIdx,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
Parameters:
actionrequested action, or null for the default actiondataform values to submit for the selected formformIdxindex of the form informsto submithandlerwhich receives the next command session state
function borogove_command_session_forms
Forms to display for the current session step.
API_PREFIX size_t borogove_command_session_forms (
void * command_session,
void *** outPtr
)
function borogove_command_session_name
Human-readable title for the current command session.
API_PREFIX const char * borogove_command_session_name (
void * command_session
)
function borogove_command_session_status
Current command execution status.
API_PREFIX const char * borogove_command_session_status (
void * command_session
)
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
URI of the custom emoji image.
API_PREFIX const char * borogove_custom_emoji_reaction_uri (
void * custom_emoji_reaction
)
function borogove_encryption_info_method
API_PREFIX const char * borogove_encryption_info_method (
void * encryption_info
)
function borogove_encryption_info_method_name
API_PREFIX const char * borogove_encryption_info_method_name (
void * encryption_info
)
function borogove_encryption_info_reason
API_PREFIX const char * borogove_encryption_info_reason (
void * encryption_info
)
function borogove_encryption_info_reason_text
API_PREFIX const char * borogove_encryption_info_reason_text (
void * encryption_info
)
function borogove_encryption_info_status
API_PREFIX enum borogove_encryption_status borogove_encryption_info_status (
void * encryption_info
)
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_form_field_datatype
API_PREFIX const char * borogove_form_field_datatype (
void * form_field
)
function borogove_form_field_desc
API_PREFIX const char * borogove_form_field_desc (
void * form_field
)
function borogove_form_field_label
API_PREFIX const char * borogove_form_field_label (
void * form_field
)
function borogove_form_field_name
API_PREFIX const char * borogove_form_field_name (
void * form_field
)
function borogove_form_field_open
API_PREFIX bool borogove_form_field_open (
void * form_field
)
function borogove_form_field_options
API_PREFIX size_t borogove_form_field_options (
void * form_field,
void *** outPtr
)
function borogove_form_field_range_max
API_PREFIX const char * borogove_form_field_range_max (
void * form_field
)
function borogove_form_field_range_min
API_PREFIX const char * borogove_form_field_range_min (
void * form_field
)
function borogove_form_field_regex
API_PREFIX const char * borogove_form_field_regex (
void * form_field
)
function borogove_form_field_required
API_PREFIX bool borogove_form_field_required (
void * form_field
)
function borogove_form_field_type
API_PREFIX const char * borogove_form_field_type (
void * form_field
)
function borogove_form_field_value
API_PREFIX size_t borogove_form_field_value (
void * form_field,
const char *** outPtr
)
function borogove_form_is_result
Is this form entirely results / read-only?
API_PREFIX bool borogove_form_is_result (
void * form
)
function borogove_form_item_field
Form field for this item, or null when the item is not a field.
API_PREFIX void * borogove_form_item_field (
void * form_item
)
function borogove_form_item_section
Nested section for this item, or null when the item is not a section.
API_PREFIX void * borogove_form_item_section (
void * form_item
)
function borogove_form_item_status
Optional status type associated with instructional text.
API_PREFIX const char * borogove_form_item_status (
void * form_item
)
function borogove_form_item_table_header
Column definitions when this item represents a result table.
API_PREFIX size_t borogove_form_item_table_header (
void * form_item,
void *** outPtr
)
function borogove_form_item_text
Plain text content for this item, or null when the item is not text-only.
API_PREFIX const char * borogove_form_item_text (
void * form_item
)
function borogove_form_items
Items to render inside this form.
API_PREFIX size_t borogove_form_items (
void * form,
void *** outPtr
)
function borogove_form_option_label
API_PREFIX const char * borogove_form_option_label (
void * form_option
)
function borogove_form_option_value
API_PREFIX const char * borogove_form_option_value (
void * form_option
)
function borogove_form_section_items
Renderable items contained in this section.
API_PREFIX size_t borogove_form_section_items (
void * self,
void *** outPtr
)
function borogove_form_section_title
Title to show for this section, or null when it is untitled.
API_PREFIX const char * borogove_form_section_title (
void * self
)
function borogove_form_submit_builder_add
Add a submitted value for a field.
API_PREFIX void borogove_form_submit_builder_add (
void * form_submit_builder,
const char * k,
const char * v
)
Parameters:
kfield namevvalue to submit for that field
function borogove_form_submit_builder_new
Create a new empty form submission.
API_PREFIX void * borogove_form_submit_builder_new ()
function borogove_form_title
Title of this form.
API_PREFIX const char * borogove_form_title (
void * form
)
function borogove_form_url
URL to use instead of this form.
API_PREFIX const char * borogove_form_url (
void * form
)
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_html_element
HTML builder, make an element.
API_PREFIX void * borogove_html_element (
const char * tag,
const char *const * attr,
size_t attr__len,
const char *const * attrValues,
size_t attrValues__len,
void *const * children,
size_t children__len
)
function borogove_html_fragment
HTML builder, make a fragment.
API_PREFIX void * borogove_html_fragment (
void *const * nodes,
size_t nodes__len
)
function borogove_html_from_string
Build HTML payload from source.
API_PREFIX void * borogove_html_from_string (
const char * html
)
function borogove_html_reduce
Walk the HTML tree to produce a new value.
API_PREFIX size_t borogove_html_reduce (
void * html,
void *(*)(const char *, const char **, ptrdiff_t, const char **, ptrdiff_t, void **, ptrdiff_t, void *) f,
void * f__context,
void *** outPtr
)
function borogove_html_text
HTML builder, make some text.
API_PREFIX void * borogove_html_text (
const char * text
)
function borogove_html_to_plain_text
Get plain text suitable for showing to a user.
API_PREFIX const char * borogove_html_to_plain_text (
void * html
)
function borogove_html_to_string
Get HTML source as a string.
API_PREFIX const char * borogove_html_to_string (
void * html
)
function borogove_identicon_svg
Generate a deterministic SVG identicon as a data URI.
API_PREFIX const char * borogove_identicon_svg (
const char * source
)
function borogove_link_metadata_about
API_PREFIX const char * borogove_link_metadata_about (
void * link_metadata
)
function borogove_link_metadata_description
API_PREFIX const char * borogove_link_metadata_description (
void * link_metadata
)
function borogove_link_metadata_image
API_PREFIX size_t borogove_link_metadata_image (
void * link_metadata,
const char *** outPtr
)
function borogove_link_metadata_title
API_PREFIX const char * borogove_link_metadata_title (
void * link_metadata
)
function borogove_link_metadata_url
API_PREFIX const char * borogove_link_metadata_url (
void * link_metadata
)
function borogove_link_metadata_video
API_PREFIX size_t borogove_link_metadata_video (
void * link_metadata,
const char *** outPtr
)
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_chat
Chat metadata for this participant when it is available as a direct Chat.
API_PREFIX void * borogove_participant_chat (
void * participant
)
function borogove_participant_display_name
Display name to show for this participant.
API_PREFIX const char * borogove_participant_display_name (
void * participant
)
function borogove_participant_is_self
True when this participant is the connected account.
API_PREFIX bool borogove_participant_is_self (
void * participant
)
function borogove_participant_photo_uri
Avatar URI for this participant, or null when none is known.
API_PREFIX const char * borogove_participant_photo_uri (
void * participant
)
function borogove_participant_placeholder_uri
Fallback avatar URI to use when no photo is available.
API_PREFIX const char * borogove_participant_placeholder_uri (
void * participant
)
function borogove_participant_profile
Load the participant's profile.
API_PREFIX void borogove_participant_profile (
void * participant,
void * client,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
Parameters:
clientconnected client used to send the profile queryhandlerwhich receives the participant profile
function borogove_participant_roles
Roles this participant has in the Chat.
API_PREFIX size_t borogove_participant_roles (
void * participant,
void *** outPtr
)
function borogove_participant_status
Load the participant's status.
API_PREFIX void borogove_participant_status (
void * participant,
void * client,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
Parameters:
clientconnected client used to send the profile queryhandlerwhich receives the participant status
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_get_message
Find a message by Chat ID and known IDs.
API_PREFIX void borogove_persistence_get_message (
void * self,
const char * accountId,
const char * chatId,
const char * serverId,
const char * localId,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
Parameters:
accountIdthe account that owns the messagechatIdChat containing the messageserverIdauthoritative server-assigned ID, if knownlocalIdclient-assigned ID, if knownhandlerwhich receives the matching message or null
function borogove_persistence_get_messages_after
Load messages newer than a reference message.
API_PREFIX void borogove_persistence_get_messages_after (
void * self,
const char * accountId,
const char * chatId,
void * afterId,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
accountIdthe account to load messages forchatIdChat to queryafterIdreturn messages newer than this message, or start from the oldest when nullhandlerwhich receives newer messages
function borogove_persistence_get_messages_around
Load messages surrounding a reference message.
API_PREFIX void borogove_persistence_get_messages_around (
void * self,
const char * accountId,
void * around,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
accountIdthe account to load messages foraroundmessage to center the result set aroundhandlerwhich receives nearby messages
function borogove_persistence_get_messages_before
Load messages older than a reference message.
API_PREFIX void borogove_persistence_get_messages_before (
void * self,
const char * accountId,
const char * chatId,
void * before,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
accountIdthe account to load messages forchatIdChat to querybeforereturn messages older than this message, or start from the newest when nullhandlerwhich receives older messages
function borogove_persistence_has_media
Check whether a media blob is already stored.
API_PREFIX void borogove_persistence_has_media (
void * self,
const char * hashAlgorithm,
const unsigned char * hash,
size_t hash__len,
void(*)(bool, void *handler__context) handler,
void * handler__context
)
Parameters:
hashAlgorithmhash algorithm for the content IDhashraw hash byteshandlerwhich receives true when the media exists
function borogove_persistence_key_value_store_get
API_PREFIX void borogove_persistence_key_value_store_get (
void * self,
const char * k,
void(*)(const char *, void *handler__context) handler,
void * handler__context
)
function borogove_persistence_key_value_store_set
API_PREFIX void borogove_persistence_key_value_store_set (
void * self,
const char * k,
const char * v,
void(*)(bool, void *handler__context) handler,
void * handler__context
)
function borogove_persistence_list_accounts
List all accounts present in storage.
API_PREFIX void borogove_persistence_list_accounts (
void * self,
void(*)(const char **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
handlerwhich receives stored account IDs
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_media_store_has_media
API_PREFIX void borogove_persistence_media_store_has_media (
void * self,
const char * hashAlgorithm,
const unsigned char * hash,
size_t hash__len,
void(*)(bool, void *handler__context) handler,
void * handler__context
)
function borogove_persistence_media_store_remove_media
API_PREFIX void borogove_persistence_media_store_remove_media (
void * self,
const char * hashAlgorithm,
const unsigned char * hash,
size_t hash__len
)
function borogove_persistence_media_store_store_media
API_PREFIX void borogove_persistence_media_store_store_media (
void * self,
const char * mime,
const unsigned char * bytes,
size_t bytes__len,
void(*)(bool, void *handler__context) handler,
void * handler__context
)
function borogove_persistence_remove_account
Remove stored data for an account.
API_PREFIX void borogove_persistence_remove_account (
void * self,
const char * accountId,
bool completely
)
Parameters:
accountIdthe account to removecompletelytrue to delete all account data, false to keep recoverable state
function borogove_persistence_remove_media
Delete previously stored media.
API_PREFIX void borogove_persistence_remove_media (
void * self,
const char * hashAlgorithm,
const unsigned char * hash,
size_t hash__len
)
Parameters:
hashAlgorithmhash algorithm for the content IDhashraw hash bytes
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 databasemediaa 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_persistence_store_chats
Persist the current metadata for a set of Chats.
API_PREFIX void borogove_persistence_store_chats (
void * self,
const char * accountId,
void *const * chats,
size_t chats__len
)
Parameters:
accountIdthe account that owns the Chatschatschats to write to storage
function borogove_persistence_store_login
Store login-related state for an account.
API_PREFIX void borogove_persistence_store_login (
void * self,
const char * accountId,
const char * clientId,
const char * displayName,
const char * token
)
Parameters:
accountIdthe account to store login state forclientIdnegotiated client IDdisplayNamelast known display nametokenpersisted token or null to clear it
function borogove_persistence_store_media
Store media bytes and any metadata needed to retrieve them later.
API_PREFIX void borogove_persistence_store_media (
void * self,
const char * mime,
const unsigned char * bytes,
size_t bytes__len,
void(*)(bool, void *handler__context) handler,
void * handler__context
)
Parameters:
mimeMIME type of the mediabytesraw media byteshandlerwhich receives true when storage succeeded
function borogove_persistence_store_messages
Persist one or more messages.
API_PREFIX void borogove_persistence_store_messages (
void * self,
const char * accountId,
void *const * message,
size_t message__len,
void(*)(void **, size_t, void *handler__context) handler,
void * handler__context
)
Parameters:
accountIdthe account that owns the messagesmessagemessages to storehandlerwhich receives the stored message values
function borogove_persistence_sync_point
Get the last message in an account or chat that is is safe to sync forward from.
API_PREFIX void borogove_persistence_sync_point (
void * self,
const char * accountId,
const char * chatId,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
Parameters:
accountIdthe account whose state should be queriedchatIdchat to inspect, or null for the account-wide sync pointhandlerwhich receives the sync point or null
function borogove_persistence_update_message
Replace the stored record for a message.
API_PREFIX void borogove_persistence_update_message (
void * self,
const char * accountId,
void * message
)
Parameters:
accountIdthe account that owns the messagemessagemessage to write
function borogove_persistence_update_message_status
Update delivery state for a locally-created message.
API_PREFIX void borogove_persistence_update_message_status (
void * self,
const char * accountId,
const char * localId,
enum borogove_message_status status,
const char * statusText,
void(*)(void *, void *handler__context) handler,
void * handler__context
)
Parameters:
accountIdthe account that owns the messagelocalIdlocal message ID to updatestatusnew delivery statestatusTextoptional human-readable status detailhandlerwhich receives the updated message
function borogove_profile_builder_add
Add a new field to this profile.
API_PREFIX void borogove_profile_builder_add (
void * profile_builder,
const char * k,
const char * v
)
function borogove_profile_builder_build
Build an immutable Profile from the current builder state.
API_PREFIX void * borogove_profile_builder_build (
void * profile_builder
)
function borogove_profile_builder_move
Move a profile item.
API_PREFIX void borogove_profile_builder_move (
void * profile_builder,
const char * id,
const char * moveTo
)
Parameters:
idthe item to movemoveTothe item currently in the position where it should move to
function borogove_profile_builder_new
Create a mutable builder from an existing profile.
API_PREFIX void * borogove_profile_builder_new (
void * profile
)
function borogove_profile_builder_remove
Remove a field from this profile.
API_PREFIX void borogove_profile_builder_remove (
void * profile_builder,
const char * id
)
function borogove_profile_builder_set
Set the value of an existing field on this profile.
API_PREFIX void borogove_profile_builder_set (
void * profile_builder,
const char * id,
const char * v
)
function borogove_profile_item_date
Get date values for this profile item.
API_PREFIX size_t borogove_profile_item_date (
void * profile_item,
const char *** outPtr
)
function borogove_profile_item_datetime
Get datetime values for this profile item.
API_PREFIX size_t borogove_profile_item_datetime (
void * profile_item,
const char *** outPtr
)
function borogove_profile_item_id
API_PREFIX const char * borogove_profile_item_id (
void * profile_item
)
function borogove_profile_item_key
API_PREFIX const char * borogove_profile_item_key (
void * profile_item
)
function borogove_profile_item_language_tag
Get language-tag values for this profile item.
API_PREFIX size_t borogove_profile_item_language_tag (
void * profile_item,
const char *** outPtr
)
function borogove_profile_item_parameters
Get parameter items attached to this profile item.
API_PREFIX size_t borogove_profile_item_parameters (
void * profile_item,
void *** outPtr
)
function borogove_profile_item_text
Get text values for this profile item.
API_PREFIX size_t borogove_profile_item_text (
void * profile_item,
const char *** outPtr
)
function borogove_profile_item_time
Get time values for this profile item.
API_PREFIX size_t borogove_profile_item_time (
void * profile_item,
const char *** outPtr
)
function borogove_profile_item_uri
Get URI values for this profile item.
API_PREFIX size_t borogove_profile_item_uri (
void * profile_item,
const char *** outPtr
)
function borogove_profile_items
All items in the profile.
API_PREFIX size_t borogove_profile_items (
void * profile,
void *** outPtr
)
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_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_role_color
Suggested color to use when displaying this Role.
API_PREFIX const char * borogove_role_color (
void * role
)
function borogove_role_id
Unique id for the role.
API_PREFIX const char * borogove_role_id (
void * role
)
function borogove_role_title
Human readable name for the role.
API_PREFIX const char * borogove_role_title (
void * role
)
function borogove_set_finalizer
Register a finalizer to run when this object is garbage collected.
API_PREFIX void borogove_set_finalizer (
const void * ptr,
void(*)(void *ptr) finalize
)
Thread-safety: can be called on any thread.
Parameters:
ptra handle to an arbitrary SDK object returned from an SDK functionfinalizea function pointer that will be called with ptr right before it is fully released
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_status_emoji
API_PREFIX const char * borogove_status_emoji (
void * status
)
function borogove_status_new
Create a status value with emoji and text.
API_PREFIX void * borogove_status_new (
const char * emoji,
const char * text
)
function borogove_status_text
API_PREFIX const char * borogove_status_text (
void * status
)
function borogove_status_to_string
Render this status as plain text.
API_PREFIX const char * borogove_status_to_string (
void * status
)
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