Interface

PurpleProtocolServer

since: 3.0.0

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 fromPurpleProtocol.

Instance methods

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.

since: 3.0.0

purple_protocol_server_alias_buddy

Sets the server side alias for who to alias.

since: 3.0.0

purple_protocol_server_change_passwd

Changes the user’s password from old_pass to new_pass.

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.

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.

since: 3.0.0

purple_protocol_server_group_buddy

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

since: 3.0.0

purple_protocol_server_keepalive

Tell protocol_server to send its keep alive to the server.

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.

since: 3.0.0

purple_protocol_server_remove_buddy

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

since: 3.0.0

purple_protocol_server_remove_group

Removes group from the server side contact list.

since: 3.0.0

purple_protocol_server_rename_group

Renames the group named old_name to the new group.

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.

since: 3.0.0

purple_protocol_server_set_buddy_icon

Sets the user’s buddy icon to img.

since: 3.0.0

purple_protocol_server_set_idle

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

since: 3.0.0

purple_protocol_server_set_info

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

since: 3.0.0

purple_protocol_server_set_status

Sets the status for account account to status.

since: 3.0.0

Interface structure

struct PurpleProtocolServerInterface {
  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 (* 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
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.
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_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.

since: 3.0.0

Purple.ProtocolServer.alias_buddy

Sets the server side alias for who to alias.

since: 3.0.0

Purple.ProtocolServer.change_passwd

Changes the user’s password from old_pass to new_pass.

since: 3.0.0

Purple.ProtocolServer.get_info

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

since: 3.0.0

Purple.ProtocolServer.get_keepalive_interval

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

since: 3.0.0

Purple.ProtocolServer.group_buddy

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

since: 3.0.0

Purple.ProtocolServer.keepalive

Tell protocol_server to send its keep alive to the server.

since: 3.0.0

Purple.ProtocolServer.remove_buddies

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

since: 3.0.0

Purple.ProtocolServer.remove_buddy

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

since: 3.0.0

Purple.ProtocolServer.remove_group

Removes group from the server side contact list.

since: 3.0.0

Purple.ProtocolServer.rename_group

Renames the group named old_name to the new group.

since: 3.0.0

Purple.ProtocolServer.send_raw

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

since: 3.0.0

Purple.ProtocolServer.set_buddy_icon

Sets the user’s buddy icon to img.

since: 3.0.0

Purple.ProtocolServer.set_idle

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

since: 3.0.0

Purple.ProtocolServer.set_info

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

since: 3.0.0

Purple.ProtocolServer.set_status

Sets the status for account account to status.

since: 3.0.0