libivon 0.1.0
Voice-over-IP library
Loading...
Searching...
No Matches
ivon_server_types.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "libivon/public/ivon_common_types.h"

Macros

#define IVON_SERVER_PUBLIC_KEY_SIZE   32
 Server public key size in bytes (must match crypto_utils.hpp).
 
#define IVON_SERVER_PRIVATE_KEY_SIZE   32
 Server private key size in bytes (must match crypto_utils.hpp).
 

Typedefs

typedef struct ivon_server * ivon_server_t
 C ABI types for the libivon server.
 
typedef struct ivon_server_config * ivon_server_config_t
 Opaque handle to a server configuration (builder pattern).
 
typedef int(* ivon_server_connection_admission_fn) (const char *remote_ip, uint16_t remote_port, void *user_data)
 Gate: accept/reject a raw TCP connection.
 
typedef int(* ivon_server_client_id_check_fn) (const char *client_id, void *user_data)
 Gate: validate a self-declared client ID during negotiation.
 
typedef int(* ivon_server_password_validate_fn) (const char *client_id, const char *password, void *user_data)
 Gate: validate a password attempt (replaces built-in == check).
 
typedef int(* ivon_server_client_approve_fn) (const char *client_id, const char *remote_ip, void *user_data)
 Gate: final approval before a client becomes visible.
 
typedef void(* ivon_server_client_connected_fn) (const char *client_id, uint64_t session_id, void *user_data)
 Event: a client is now registered and visible to peers.
 
typedef void(* ivon_server_client_disconnected_fn) (const char *client_id, uint64_t session_id, int graceful, void *user_data)
 Event: a client has been removed from the session.
 
typedef int(* ivon_server_group_join_authorize_fn) (const char *client_id, const char *group_id, void *user_data)
 Gate: authorize a group join request.
 
typedef void(* ivon_server_bool_callback_fn) (int success, void *user_data)
 Completion callback for async operations (delete_group, kick_client_from_group).
 

Macro Definition Documentation

◆ IVON_SERVER_PRIVATE_KEY_SIZE

#define IVON_SERVER_PRIVATE_KEY_SIZE   32

Server private key size in bytes (must match crypto_utils.hpp).

◆ IVON_SERVER_PUBLIC_KEY_SIZE

#define IVON_SERVER_PUBLIC_KEY_SIZE   32

Server public key size in bytes (must match crypto_utils.hpp).

Typedef Documentation

◆ ivon_server_bool_callback_fn

typedef void(* ivon_server_bool_callback_fn) (int success, void *user_data)

Completion callback for async operations (delete_group, kick_client_from_group).

Parameters
successNon-zero on success, zero on failure.

◆ ivon_server_client_approve_fn

typedef int(* ivon_server_client_approve_fn) (const char *client_id, const char *remote_ip, void *user_data)

Gate: final approval before a client becomes visible.

Returns
Non-zero to admit, zero to reject.

◆ ivon_server_client_connected_fn

typedef void(* ivon_server_client_connected_fn) (const char *client_id, uint64_t session_id, void *user_data)

Event: a client is now registered and visible to peers.

◆ ivon_server_client_disconnected_fn

typedef void(* ivon_server_client_disconnected_fn) (const char *client_id, uint64_t session_id, int graceful, void *user_data)

Event: a client has been removed from the session.

◆ ivon_server_client_id_check_fn

typedef int(* ivon_server_client_id_check_fn) (const char *client_id, void *user_data)

Gate: validate a self-declared client ID during negotiation.

Returns
Non-zero to accept, zero to reject.

◆ ivon_server_config_t

typedef struct ivon_server_config* ivon_server_config_t

Opaque handle to a server configuration (builder pattern).

◆ ivon_server_connection_admission_fn

typedef int(* ivon_server_connection_admission_fn) (const char *remote_ip, uint16_t remote_port, void *user_data)

Gate: accept/reject a raw TCP connection.

Returns
Non-zero to accept, zero to reject.

◆ ivon_server_group_join_authorize_fn

typedef int(* ivon_server_group_join_authorize_fn) (const char *client_id, const char *group_id, void *user_data)

Gate: authorize a group join request.

Returns
Non-zero to allow, zero to deny.

◆ ivon_server_password_validate_fn

typedef int(* ivon_server_password_validate_fn) (const char *client_id, const char *password, void *user_data)

Gate: validate a password attempt (replaces built-in == check).

Returns
Non-zero if the password is valid, zero to reject.

◆ ivon_server_t

typedef struct ivon_server* ivon_server_t

C ABI types for the libivon server.

Author
Cliff Foster (Nou) cliff.nosp@m.@idi.nosp@m.-syst.nosp@m.ems..nosp@m.com

Pure C header — no C++ dependencies. Defines the opaque handles, configuration structure, and callback function-pointer typedefs used by ivon_server.h.

Opaque handle to a libivon server instance.