Constructor

PurpleBuddynew

since: 2.0

Declaration [src]

PurpleBuddy*
purple_buddy_new (
  PurpleAccount* account,
  const char* name,
  const char* alias
)

Description [src]

Creates a new buddy.

This function only creates the PurpleBuddy. Use purple_blist_add_buddy() to add the buddy to the list and purple_account_add_buddy() to sync up with the server.

See purple_account_add_buddy(), purple_blist_add_buddy().

Available since: 2.0

Parameters

account

Type: PurpleAccount

The account this buddy will get added to.

The data is owned by the caller of the function.
name

Type: const char*

The name of the new buddy.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
alias

Type: const char*

The alias of the new buddy (or NULL if unaliased)

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: PurpleBuddy

A newly allocated buddy.

The caller of the function takes ownership of the data, and is responsible for freeing it.