27 #ifndef _PURPLE_CONNECTION_H_
28 #define _PURPLE_CONNECTION_H_
212 void (*network_connected)(void);
218 void (*network_disconnected)(void);
238 void (*_purple_reserved1)(void);
239 void (*_purple_reserved2)(void);
240 void (*_purple_reserved3)(void);
287 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
308 const char *password);
311 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
329 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
396 #define PURPLE_CONNECTION_IS_CONNECTED(gc) \
397 (purple_connection_get_state(gc) == PURPLE_CONNECTED)
457 size_t step,
size_t count);
497 const char *description);
572 #define PURPLE_CONNECTION_IS_VALID(gc) (g_list_find(purple_connections_get_all(), (gc)) != NULL)
PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc)
Returns the connection state.
Connection sends/receives in 'HTML'.
time_t last_received
When we last received a packet.
There was an error sending or receiving on the network socket, or there was some protocol error (such...
libpurple doesn't speak any of the authentication methods the server offered.
void purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data)
This function should only be called by purple_account_unregister() in account.c.
Connection does not send/receive font sizes.
The server's SSL certificate does not have the expected fingerprint.
Connection UI operations.
void purple_connections_uninit(void)
Uninitializes the connections subsystem.
PurpleConnectionState state
The connection state.
void purple_connection_set_display_name(PurpleConnection *gc, const char *name)
Sets the connection's displayed name.
Holds the type of an error along with its description.
Send auto responses when away.
The username/server/other preference for the account isn't valid.
int inpa
The input watcher.
void purple_connections_disconnect_all(void)
Disconnects from all connections.
void purple_connection_notice(PurpleConnection *gc, const char *text)
Displays a connection-specific notice.
libpurple was built without SSL support, and the connection needs SSL.
void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state)
Sets the connection state.
Structure representing an account.
guint keepalive
Keep-alive.
The server's SSL certificate is self-signed.
void * proto_data
Protocol-specific data.
void purple_connections_set_ui_ops(PurpleConnectionUiOps *ops)
Sets the UI operations structure to be used for connections.
The text buffer must be formatted as a whole.
No new lines are allowed in outgoing messages.
gboolean purple_connection_error_is_fatal(PurpleConnectionError reason)
Reports whether a disconnection reason is fatal (in which case the account should probably not be aut...
void purple_connection_ssl_error(PurpleConnection *gc, PurpleSslErrorType ssl_error)
Closes a connection due to an SSL error; this is basically a shortcut to turning the PurpleSslErrorTy...
void purple_connection_update_progress(PurpleConnection *gc, const char *text, size_t step, size_t count)
Updates the connection progress.
PurpleConnectionFlags flags
Connection flags.
PurplePlugin * prpl
The protocol plugin.
void purple_connections_init(void)
Initializes the connections subsystem.
The username, password or some other credential was incorrect.
void purple_connection_error_reason(PurpleConnection *gc, PurpleConnectionError reason, const char *description)
Closes a connection with an error and a human-readable description of the error.
guint disconnect_timeout
Timer used for nasty stack tricks.
GList * purple_connections_get_connecting(void)
Returns a list of all connections in the process of connecting.
void * purple_connections_get_handle(void)
Returns the handle to the connections subsystem.
void purple_connection_destroy(PurpleConnection *gc)
Disconnects and destroys a PurpleConnection.
The server did not provide a SSL certificate.
PurpleConnectionUiOps * purple_connections_get_ui_ops(void)
Returns the UI operations structure used for connections.
GSList * buddy_chats
A list of active chats (PurpleConversation structs of type PURPLE_CONV_TYPE_CHAT).
GList * purple_connections_get_all(void)
Returns a list of all active connections.
char * display_name
How you appear to other people.
The server's SSL certificate is not yet valid.
gboolean wants_to_die
Wants to Die state.
void purple_connection_error(PurpleConnection *gc, const char *reason)
Closes a connection with an error.
PurpleAccount * account
The account being connected to.
The username supplied was not valid.
There was an error negotiating SSL on this connection, or the server does not support encryption but ...
void * purple_connection_get_protocol_data(const PurpleConnection *connection)
Gets the protocol data from a connection.
The server's SSL certificate did not match its hostname.
Connection supports setting a message on moods.
void purple_connection_new(PurpleAccount *account, gboolean regist, const char *password)
This function should only be called by purple_account_connect() in account.c.
PurpleSslErrorType
Possible SSL errors.
PurpleAccount * purple_connection_get_account(const PurpleConnection *gc)
Returns the connection's account.
Status APIA brief explanation of the status API:
PurpleConnectionFlags
Flags to change behavior of the client for a given connection.
PurpleConnectionError
Possible errors that can cause a connection to be closed.
PurplePlugin * purple_connection_get_prpl(const PurpleConnection *gc)
Returns the protocol plugin managing a connection.
Connection supports sending and receiving custom smileys.
There was some other error validating the server's SSL certificate.
The server's SSL certificate could not be trusted.
The server's SSL certificate has expired.
const char * purple_connection_get_display_name(const PurpleConnection *gc)
Returns the connection's displayed name.
const char * purple_connection_get_password(const PurpleConnection *gc)
Returns the connection's password.
void purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account)
Sets the connection's account.
PurpleConnectionError type
The type of error.
Connection does not support descriptions with links.
void purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data)
Sets the protocol data for a connection.
Someone is already connected to the server using the name you are trying to connect with...
Connection does not support sending of images.
Connection does not send/receive background colors.
Connection supports setting moods.
char * password
The password used.
Some other error occurred which fits into none of the other categories.
char * description
A localised, human-readable description of the error.