Function

PurpleAccountOptionnew

since: 2.0

Declaration [src]

PurpleAccountOption*
purple_account_option_new (
  PurplePrefType type,
  const char* text,
  const char* pref_name
)

Description [src]

Creates a new account option. If you know what type will be in advance, consider using purple_account_option_bool_new(), purple_account_option_int_new(), purple_account_option_string_new() or purple_account_option_list_new() (as appropriate) instead.

Available since: 2.0

Parameters

type

Type: PurplePrefType

The type of option.

text

Type: const char*

The text of the option.

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

Type: const char*

The account preference name for the option.

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

Return value

Type: PurpleAccountOption

The account option.

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