Function

PurpleNotifyUserInfoEntrynew

since: 2.0

Declaration [src]

PurpleNotifyUserInfoEntry*
purple_notify_user_info_entry_new (
  const char* label,
  const char* value
)

Description [src]

Create a new PurpleNotifyUserInfoEntry

If added to a PurpleNotifyUserInfo object, this should not be free()’d, as PurpleNotifyUserInfo will do so when destroyed. purple_notify_user_info_add_pair_html(), purple_notify_user_info_add_pair_plaintext(), purple_notify_user_info_prepend_pair_html() and purple_notify_user_info_prepend_pair_plaintext() are convenience methods for creating entries and adding them to a PurpleNotifyUserInfo.

Available since: 2.0

This function is not directly available to language bindings.

Parameters

label

Type: const char*

A label, which for example might be displayed by a UI with a colon after it (“Status:”). Do not include a colon. If NULL, value will be displayed without a label.

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

Type: const char*

The value, which might be displayed by a UI after the label. If NULL, label will still be displayed; the UI should then treat label as independent and not include a colon if it would otherwise.

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

Return value

Type: PurpleNotifyUserInfoEntry

A new PurpleNotifyUserInfoEntry.

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