Interface

PurpleProtocolServer

Description [src]

interface Purple.ProtocolServer : Purple.Protocol

PurpleProtocolServer describes the API for protocols that have a central server.

Available since:3.0.0

Prerequisite

In order to implement ProtocolServer, your type must inherit from PurpleProtocol.

Instance methods

purple_protocol_server_add_buddies

Similar to purple_protocol_server_add_buddy() but can add multiple buddies at a time. If protocol_server does not implement this function, this will call purple_protocol_server_add_buddy() for each buddy/group pair in buddies/groups.

Available since: 3.0.0

purple_protocol_server_add_buddy

This protocol function may be called in situations in which the buddy is already in the specified group. If the protocol supports authorization and the user is not already authorized to see the status of buddy, this function will request authorization. If authorization is required, then message will be used as an invite message.

Available since: 3.0.0

purple_protocol_server_alias_buddy

Sets the server side alias for who to alias.

Available since: 3.0.0

purple_protocol_server_change_passwd

Changes the user’s password from old_pass to new_pass.

Available since: 3.0.0

purple_protocol_server_get_info

Gets the user info or profile for who and displays it in a protocol specific way.

Available since: 3.0.0

purple_protocol_server_get_keepalive_interval

Returns a custom interval, in seconds, that libpurple should tell protocol_server to send its keepalive.

Available since: 3.0.0

purple_protocol_server_group_buddy

Moves who from group old_group to a new group of new_group.

Available since: 3.0.0

purple_protocol_server_keepalive

Tell protocol_server to send its keep alive to the server.

Available since: 3.0.0

purple_protocol_server_register_user

Tell protocol_server to register the new account described by account.

Available since: 3.0.0

purple_protocol_server_remove_buddies

Similar to purple_protocol_server_remove_buddy() but allows you to remove multiple at a time.

Available since: 3.0.0

purple_protocol_server_remove_buddy

Removes buddy and potentially group from the server side list of contacts.

Available since: 3.0.0

purple_protocol_server_remove_group

Removes group from the server side contact list.

Available since: 3.0.0

purple_protocol_server_rename_group

Renames the group named old_name to the new group.

Available since: 3.0.0

purple_protocol_server_send_raw

Sends raw data over the protocol. This should only be called when you know the exact underlying protocol.

Available since: 3.0.0

purple_protocol_server_set_buddy_icon

Sets the user’s buddy icon to img.

Available since: 3.0.0

purple_protocol_server_set_idle

Tells protocol_server to set the user’s idle time to idletime.

Available since: 3.0.0

purple_protocol_server_set_info

Sets the user info, sometimes referred to as a user profile to info.

Available since: 3.0.0

purple_protocol_server_set_status

Sets the status for account account to status.

Available since: 3.0.0

purple_protocol_server_unregister_user

Unregisters account with protocol_server. The account can either be connected or disconnected. After the removal is finished, the connection will stay open and has to be closed.

Available since: 3.0.0

Interface structure

struct PurpleProtocolServerInterface {
  void (* register_user) (
    PurpleProtocolServer* protocol_server,
    PurpleAccount* account
  );
  void (* unregister_user) (
    PurpleProtocolServer* protocol_server,
    PurpleAccount* account,
    PurpleAccountUnregistrationCb cb,
    gpointer data
  );
  void (* set_info) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* info
  );
  void (* get_info) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* who
  );
  void (* set_status) (
    PurpleProtocolServer* protocol_server,
    PurpleAccount* account,
    PurpleStatus* status
  );
  void (* set_idle) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    gint idletime
  );
  void (* change_passwd) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* old_pass,
    const gchar* new_pass
  );
  void (* add_buddy) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    PurpleBuddy* buddy,
    PurpleGroup* group,
    const gchar* message
  );
  void (* add_buddies) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    GList* buddies,
    GList* groups,
    const gchar* message
  );
  void (* remove_buddy) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    PurpleBuddy* buddy,
    PurpleGroup* group
  );
  void (* remove_buddies) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    GList* buddies,
    GList* groups
  );
  void (* keepalive) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection
  );
  gint (* get_keepalive_interval) (
    PurpleProtocolServer* protocol_server
  );
  void (* alias_buddy) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* who,
    const gchar* alias
  );
  void (* group_buddy) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* who,
    const gchar* old_group,
    const gchar* new_group
  );
  void (* rename_group) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* old_name,
    PurpleGroup* group,
    GList* moved_buddies
  );
  void (* set_buddy_icon) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    PurpleImage* img
  );
  void (* remove_group) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    PurpleGroup* group
  );
  gint (* send_raw) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* buf,
    gint len
  );
  
}

The protocol server interface.

This interface provides a gateway between purple and the protocol’s server.

Interface members
register_user
void (* register_user) (
    PurpleProtocolServer* protocol_server,
    PurpleAccount* account
  )
 No description available.
unregister_user
void (* unregister_user) (
    PurpleProtocolServer* protocol_server,
    PurpleAccount* account,
    PurpleAccountUnregistrationCb cb,
    gpointer data
  )
 No description available.
set_info
void (* set_info) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* info
  )
 No description available.
get_info
void (* get_info) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* who
  )
 No description available.
set_status
void (* set_status) (
    PurpleProtocolServer* protocol_server,
    PurpleAccount* account,
    PurpleStatus* status
  )
 No description available.
set_idle
void (* set_idle) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    gint idletime
  )
 No description available.
change_passwd
void (* change_passwd) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* old_pass,
    const gchar* new_pass
  )
 No description available.
add_buddy
void (* add_buddy) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    PurpleBuddy* buddy,
    PurpleGroup* group,
    const gchar* message
  )
 No description available.
add_buddies
void (* add_buddies) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    GList* buddies,
    GList* groups,
    const gchar* message
  )
 No description available.
remove_buddy
void (* remove_buddy) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    PurpleBuddy* buddy,
    PurpleGroup* group
  )
 No description available.
remove_buddies
void (* remove_buddies) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    GList* buddies,
    GList* groups
  )
 No description available.
keepalive
void (* keepalive) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection
  )
 No description available.
get_keepalive_interval
gint (* get_keepalive_interval) (
    PurpleProtocolServer* protocol_server
  )
 No description available.
alias_buddy
void (* alias_buddy) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* who,
    const gchar* alias
  )
 No description available.
group_buddy
void (* group_buddy) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* who,
    const gchar* old_group,
    const gchar* new_group
  )
 No description available.
rename_group
void (* rename_group) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* old_name,
    PurpleGroup* group,
    GList* moved_buddies
  )
 No description available.
set_buddy_icon
void (* set_buddy_icon) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    PurpleImage* img
  )
 No description available.
remove_group
void (* remove_group) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    PurpleGroup* group
  )
 No description available.
send_raw
gint (* send_raw) (
    PurpleProtocolServer* protocol_server,
    PurpleConnection* connection,
    const gchar* buf,
    gint len
  )
 No description available.

Virtual methods

Purple.ProtocolServer.add_buddies

Similar to purple_protocol_server_add_buddy() but can add multiple buddies at a time. If protocol_server does not implement this function, this will call purple_protocol_server_add_buddy() for each buddy/group pair in buddies/groups.

Purple.ProtocolServer.add_buddy

This protocol function may be called in situations in which the buddy is already in the specified group. If the protocol supports authorization and the user is not already authorized to see the status of buddy, this function will request authorization. If authorization is required, then message will be used as an invite message.

Purple.ProtocolServer.alias_buddy

Sets the server side alias for who to alias.

Purple.ProtocolServer.change_passwd

Changes the user’s password from old_pass to new_pass.

Purple.ProtocolServer.get_info

Gets the user info or profile for who and displays it in a protocol specific way.

Purple.ProtocolServer.get_keepalive_interval

Returns a custom interval, in seconds, that libpurple should tell protocol_server to send its keepalive.

Purple.ProtocolServer.group_buddy

Moves who from group old_group to a new group of new_group.

Purple.ProtocolServer.keepalive

Tell protocol_server to send its keep alive to the server.

Purple.ProtocolServer.register_user

Tell protocol_server to register the new account described by account.

Purple.ProtocolServer.remove_buddies

Similar to purple_protocol_server_remove_buddy() but allows you to remove multiple at a time.

Purple.ProtocolServer.remove_buddy

Removes buddy and potentially group from the server side list of contacts.

Purple.ProtocolServer.remove_group

Removes group from the server side contact list.

Purple.ProtocolServer.rename_group

Renames the group named old_name to the new group.

Purple.ProtocolServer.send_raw

Sends raw data over the protocol. This should only be called when you know the exact underlying protocol.

Purple.ProtocolServer.set_buddy_icon

Sets the user’s buddy icon to img.

Purple.ProtocolServer.set_idle

Tells protocol_server to set the user’s idle time to idletime.

Purple.ProtocolServer.set_info

Sets the user info, sometimes referred to as a user profile to info.

Purple.ProtocolServer.set_status

Sets the status for account account to status.

Purple.ProtocolServer.unregister_user

Unregisters account with protocol_server. The account can either be connected or disconnected. After the removal is finished, the connection will stay open and has to be closed.