|
libivon 0.1.0
Voice-over-IP library
|
Pure virtual interface for the libivon client. More...
#include <ivon_client_interface.hpp>
Public Member Functions | |
| virtual | ~IClient ()=default |
| virtual expected_void< NegotiationError > | connect ()=0 |
| Connect to the server (blocking). | |
| virtual void | disconnect ()=0 |
| Disconnect from the server (blocks until closed). | |
| virtual ConnectionState | connection_state () const noexcept=0 |
| Get the current connection lifecycle state. | |
| virtual bool | is_connected () const noexcept=0 |
| Check if fully connected to the server. | |
| virtual bool | is_synchronized () const noexcept=0 |
| Check if initial state synchronization is complete. | |
| virtual std::string | session_id () const =0 |
| Get the session ID assigned by the server (empty if not connected). | |
| virtual bool | send_client_message (const std::string &client_id, const std::string &type, const std::vector< uint8_t > &buffer)=0 |
| Send a typed message to a specific remote client. Returns false if not connected. | |
| virtual bool | send_broadcast_message (const std::string &type, const std::vector< uint8_t > &buffer)=0 |
| Broadcast a typed message to all connected clients. Returns false if not connected. | |
| virtual bool | send_group_message (const std::string &group_id, const std::string &type, const std::vector< uint8_t > &buffer)=0 |
| Send a typed message to all members of a group via TCP. Returns false if not connected or not a member. | |
| virtual size_t | get_remote_client_count () const noexcept=0 |
| Get the count of remote clients in the session. | |
| virtual bool | has_remote_client (const std::string &client_id) const noexcept=0 |
| Check if a remote client with the given ID exists. | |
| virtual std::vector< std::string > | get_remote_client_ids () const =0 |
| Get all remote client IDs as a vector. | |
| virtual bool | join_group (const std::string &group_id)=0 |
| Request to join a group. Returns false if not connected. | |
| virtual bool | leave_group (const std::string &group_id)=0 |
| Request to leave a group. Returns false if not connected. | |
| virtual bool | request_group_list ()=0 |
| Request the list of available groups from the server. | |
| virtual bool | set_mute (const std::string &group_id, const std::string &target_client_id, bool muted)=0 |
| Mute or unmute a target client in a specific group. | |
| virtual bool | is_group_member (const std::string &group_id) const =0 |
| Check if this client is a member of the given group. | |
| virtual std::vector< std::string > | get_group_ids () const =0 |
| Get all group IDs this client is a member of. | |
| virtual bool | send_group_data (const std::string &group_id, const unsigned char *data, size_t len)=0 |
| Send raw data to a group via the fanout channel. | |
| virtual bool | send_group_data (const std::string &group_id, const std::vector< uint8_t > &data)=0 |
| Send raw data to a group via the fanout channel (vector overload). | |
| virtual bool | set_fanout_sender_id (uint64_t sender_id)=0 |
| Set this client's fanout sender ID (used for audio routing). | |
| virtual void | on_tofu_verify (TofuVerifyCallback cb)=0 |
| Set the TOFU key verification callback (called during negotiation). | |
| virtual void | on_password_required (PasswordCallback cb)=0 |
| Set the password prompt callback (called when the server requires auth). | |
| virtual void | on_client_message (ClientMessageCallback cb)=0 |
| Set the callback for incoming direct client messages. | |
| virtual void | on_client_joined (ClientJoinedCallback cb)=0 |
| Set the callback fired when a remote client joins the session. | |
| virtual void | on_client_left (ClientLeftCallback cb)=0 |
| Set the callback fired when a remote client leaves the session. | |
| virtual void | on_kicked (KickedCallback cb)=0 |
| Set the callback fired when this client is kicked from the server. | |
| virtual void | on_disconnected (DisconnectedCallback cb)=0 |
| Set the callback fired when the connection is lost or closed. | |
| virtual void | on_connection_state_changed (ConnectionStateCallback cb)=0 |
| Set the callback fired on connection state transitions. | |
| virtual void | on_group_joined (GroupJoinCallback cb)=0 |
| Set the callback for group join results. | |
| virtual void | on_group_left (GroupLeaveCallback cb)=0 |
| Set the callback for group leave results. | |
| virtual void | on_group_key_update (GroupKeyUpdateCallback cb)=0 |
| Set the callback fired when a group's encryption key is rotated. | |
| virtual void | on_group_member_joined (GroupMemberJoinedCallback cb)=0 |
| Set the callback fired when another client joins a group. | |
| virtual void | on_group_member_left (GroupMemberLeftCallback cb)=0 |
| Set the callback fired when another client leaves a group. | |
| virtual void | on_group_kicked (GroupKickedCallback cb)=0 |
| Set the callback fired when this client is kicked from a group. | |
| virtual void | on_group_list (GroupListCallback cb)=0 |
| Set the callback for group list responses. | |
| virtual void | on_group_mute (GroupMuteCallback cb)=0 |
| Set the callback for group mute operation results. | |
| virtual void | on_fanout_data (FanoutDataCallback cb)=0 |
| Set the callback for incoming fanout data. | |
| virtual void | on_fanout_error (FanoutErrorCallback cb)=0 |
| Set the callback for fanout channel errors. | |
| virtual void | on_server_properties (ServerPropertiesCallback cb)=0 |
| Set the callback for initial server properties received during sync. | |
| virtual void | on_server_property_update (ServerPropertyUpdateCallback cb)=0 |
| Set the callback for server property updates. | |
| virtual void | on_group_property_update (GroupPropertyUpdateCallback cb)=0 |
| Set the callback for group property updates. | |
Pure virtual interface for the libivon client.
Every method here must have a corresponding C ABI function in ivon_client.h and a wrapper in ivon_client_wrapper.hpp. Adding a new pure virtual here will cause a compile error in any class that inherits IClient but hasn't implemented the new method, ensuring the C ABI stays synchronized with the C++ API.
|
virtualdefault |
|
pure virtual |
Connect to the server (blocking).
Implemented in ivon::ClientWrapper.
|
pure virtualnoexcept |
Get the current connection lifecycle state.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Disconnect from the server (blocks until closed).
Implemented in ivon::ClientWrapper.
|
pure virtual |
Get all group IDs this client is a member of.
Implemented in ivon::ClientWrapper.
|
pure virtualnoexcept |
Get the count of remote clients in the session.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Get all remote client IDs as a vector.
Implemented in ivon::ClientWrapper.
|
pure virtualnoexcept |
Check if a remote client with the given ID exists.
Implemented in ivon::ClientWrapper.
|
pure virtualnoexcept |
Check if fully connected to the server.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Check if this client is a member of the given group.
Implemented in ivon::ClientWrapper.
|
pure virtualnoexcept |
Check if initial state synchronization is complete.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Request to join a group. Returns false if not connected.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Request to leave a group. Returns false if not connected.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback fired when a remote client joins the session.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback fired when a remote client leaves the session.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback for incoming direct client messages.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback fired on connection state transitions.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback fired when the connection is lost or closed.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback for incoming fanout data.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback for fanout channel errors.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback for group join results.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback fired when a group's encryption key is rotated.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback fired when this client is kicked from a group.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback for group leave results.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback for group list responses.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback fired when another client joins a group.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback fired when another client leaves a group.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback for group mute operation results.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback for group property updates.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback fired when this client is kicked from the server.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the password prompt callback (called when the server requires auth).
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback for initial server properties received during sync.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the callback for server property updates.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set the TOFU key verification callback (called during negotiation).
Implemented in ivon::ClientWrapper.
|
pure virtual |
Request the list of available groups from the server.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Broadcast a typed message to all connected clients. Returns false if not connected.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Send a typed message to a specific remote client. Returns false if not connected.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Send raw data to a group via the fanout channel (vector overload).
Implemented in ivon::ClientWrapper.
|
pure virtual |
Send raw data to a group via the fanout channel.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Send a typed message to all members of a group via TCP. Returns false if not connected or not a member.
Implemented in ivon::ClientWrapper.
|
pure virtual |
Get the session ID assigned by the server (empty if not connected).
Implemented in ivon::ClientWrapper.
|
pure virtual |
Set this client's fanout sender ID (used for audio routing).
Implemented in ivon::ClientWrapper.
|
pure virtual |
Mute or unmute a target client in a specific group.
Implemented in ivon::ClientWrapper.