Overview
The libventrilo3 library is used for network connections to a Ventrilo server. It provides a hands-off approach that allows Ventrilo client developers the ability to not deal with the intricacies of the Ventrilo protocol. Messages received from the server are stored in a queue and functions are provided for various operations that require sending data to the server. Basic functionality is as follows:
- Use v3_login() to connect to a server
- Immediately start listening for events using v3_get_event()
- Start processing incoming events
- Use _v3_recv() as a mainloop iteration function [example needed]
- Use v3_logout() to disconnect
A simple example program using libventrilo3
The above info probably isn't very helpful. If you have questions, feel free to ask us on IRC on irc.freenode.net in #mangler
Data Structures
Functions
| int | v3_login(char *server, char *username, char *password, char *phonetic);
|
| void | v3_set_server_opts(uint8_t type, uint8_t value);
|
| void | v3_join_chat();
|
| void | v3_leave_chat();
|
| void | v3_send_chat_message(char* message);
|
| uint32_t | v3_get_bytes_recv(void);?
|
| uint32_t | v3_get_bytes_sent(void);?
|
| uint32_t | v3_get_packets_recv(void);?
|
| uint32_t | v3_get_packets_sent(void);?
|
| void | v3_start_privchat(uint16_t userid);?
|
| void | v3_end_privchat(uint16_t userid);?
|
| void | v3_send_privchat_away(uint16_t userid);?
|
| void | v3_send_privchat_back(uint16_t userid);?
|
| void | v3_logout(void);
|
| void | v3_change_channel(uint16_t channel_id, char *password);
|
| void | v3_admin_login(char *password);
|
| void | v3_admin_logout(void);
|
| void | v3_admin_boot(enum _v3_boot_types type, uint16_t user_id, char *reason);
|
| void | v3_phantom_add(uint16_t channel_id);
|
| void | v3_phantom_remove(uint16_t channel_id);
|
| void | v3_userlist_open(void);
|
| void | v3_userlist_close(void);
|
| void | v3_userlist_remove(uint16_t account_id);
|
| void | v3_userlist_update(v3_account *account);
|
| void | v3_userlist_change_owner(uint16_t old_owner_id, uint16_t new_owner_id);
|
| int | v3_debuglevel(uint32_t level);
|
| int | v3_is_loggedin(void);
|
| uint16_t | v3_get_user_id(void);
|
| const v3_permissions * | v3_get_permissions(void);
|
| uint8_t | v3_is_channel_admin(uint16_t channel_id);
|
| void | v3_set_text(char *comment, char *url, char *integration_text, uint8_t silent);
|
| int | v3_message_waiting(int block);
|
| v3_event * | v3_get_event(int block);
|
| int | v3_get_max_clients(void);
|
| void | v3_clear_events(void);
|
| uint32_t | v3_get_codec_rate(uint16_t codec, uint16_t format);
|
| const v3_codec * | v3_get_codec(uint16_t codec, uint16_t format);
|
| const v3_codec * | v3_get_channel_codec(uint16_t channel_id);
|
| uint16_t | v3_channel_requires_password(uint16_t channel_id);
|
| void | v3_start_audio(uint16_t send_type);
|
| void | v3_send_audio(uint16_t send_type, uint32_t rate, uint8_t *pcm, uint32_t length);
|
| void | v3_stop_audio(void);
|
| int | v3_user_count(void);
|
| void | v3_free_user(v3_user *user);
|
| v3_user * | v3_get_user(uint16_t id);
|
| void | v3_free_rank(v3_rank *rank);
|
| v3_rank * | v3_get_rank(uint16_t id);
|
| void | v3_ranklist_open(void);
|
| void | v3_ranklist_close(void);
|
| void | v3_rank_update(v3_rank *rank);
|
| void | v3_rank_remove(uint16_t rankid);
|
| void | v3_free_account(v3_account *account);
|
| v3_account * | v3_get_account(uint16_t id);
|
| int | v3_channel_count(void);
|
| void | v3_free_channel(v3_channel *channel);
|
| v3_channel * | v3_get_channel(uint16_t id);
|
| void | v3_channel_update(v3_channel *channel, const char *password);
|
| void | v3_channel_remove(uint16_t channel_id);
|
| void | v3_set_volume_master(int level);
|
| void | v3_set_volume_user(uint16_t id, int level);
|
| void | v3_set_volume_luser(int level);
|
| uint8_t | v3_get_volume_user(uint16_t id);
|
Other