notify.h File Reference

Notification API. More...

#include <stdlib.h>
#include <glib-object.h>
#include <glib.h>
#include "connection.h"
Include dependency graph for notify.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PurpleNotifySearchResults
 Search results object. More...
struct  PurpleNotifySearchColumn
 Single column of a search result. More...
struct  PurpleNotifySearchButton
 Definition of a button. More...
struct  PurpleNotifyUiOps
 Notification UI operations. More...

Typedefs

typedef struct
_PurpleNotifyUserInfoEntry 
PurpleNotifyUserInfoEntry
typedef struct
_PurpleNotifyUserInfo 
PurpleNotifyUserInfo
typedef void(* PurpleNotifyCloseCallback )(gpointer user_data)
 Notification close callbacks.
typedef void(* PurpleNotifySearchResultsCallback )(PurpleConnection *c, GList *row, gpointer user_data)
 Callback for a button in a search result.

Enumerations

enum  PurpleNotifyType {
  PURPLE_NOTIFY_MESSAGE = 0, PURPLE_NOTIFY_EMAIL, PURPLE_NOTIFY_EMAILS, PURPLE_NOTIFY_FORMATTED,
  PURPLE_NOTIFY_SEARCHRESULTS, PURPLE_NOTIFY_USERINFO, PURPLE_NOTIFY_URI
}
 Notification types. More...
enum  PurpleNotifyMsgType { PURPLE_NOTIFY_MSG_ERROR = 0, PURPLE_NOTIFY_MSG_WARNING, PURPLE_NOTIFY_MSG_INFO }
 Notification message types. More...
enum  PurpleNotifySearchButtonType {
  PURPLE_NOTIFY_BUTTON_LABELED = 0, PURPLE_NOTIFY_BUTTON_CONTINUE = 1, PURPLE_NOTIFY_BUTTON_ADD, PURPLE_NOTIFY_BUTTON_INFO,
  PURPLE_NOTIFY_BUTTON_IM, PURPLE_NOTIFY_BUTTON_JOIN, PURPLE_NOTIFY_BUTTON_INVITE
}
 The types of buttons. More...
enum  PurpleNotifyUserInfoEntryType { PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR = 0, PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK, PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER }
 Types of PurpleNotifyUserInfoEntry objects.

Functions

void * purple_notify_searchresults (PurpleConnection *gc, const char *title, const char *primary, const char *secondary, PurpleNotifySearchResults *results, PurpleNotifyCloseCallback cb, gpointer user_data)
 Search results notification API.
void purple_notify_searchresults_free (PurpleNotifySearchResults *results)
 Frees a PurpleNotifySearchResults object.
void purple_notify_searchresults_new_rows (PurpleConnection *gc, PurpleNotifySearchResults *results, void *data)
 Replace old rows with the new.
void purple_notify_searchresults_button_add (PurpleNotifySearchResults *results, PurpleNotifySearchButtonType type, PurpleNotifySearchResultsCallback cb)
 Adds a stock button that will be displayed in the search results dialog.
void purple_notify_searchresults_button_add_labeled (PurpleNotifySearchResults *results, const char *label, PurpleNotifySearchResultsCallback cb)
 Adds a plain labelled button that will be displayed in the search results dialog.
PurpleNotifySearchResultspurple_notify_searchresults_new (void)
 Returns a newly created search results object.
PurpleNotifySearchColumnpurple_notify_searchresults_column_new (const char *title)
 Returns a newly created search result column object.
void purple_notify_searchresults_column_add (PurpleNotifySearchResults *results, PurpleNotifySearchColumn *column)
 Adds a new column to the search result object.
void purple_notify_searchresults_row_add (PurpleNotifySearchResults *results, GList *row)
 Adds a new row of the results to the search results object.
guint purple_notify_searchresults_get_rows_count (PurpleNotifySearchResults *results)
 Returns a number of the rows in the search results object.
guint purple_notify_searchresults_get_columns_count (PurpleNotifySearchResults *results)
 Returns a number of the columns in the search results object.
GList * purple_notify_searchresults_row_get (PurpleNotifySearchResults *results, unsigned int row_id)
 Returns a row of the results from the search results object.
char * purple_notify_searchresults_column_get_title (PurpleNotifySearchResults *results, unsigned int column_id)
 Returns a title of the search results object's column.
UI Registration Functions
void purple_notify_set_ui_ops (PurpleNotifyUiOps *ops)
 Sets the UI operations structure to be used when displaying a notification.
PurpleNotifyUiOpspurple_notify_get_ui_ops (void)
 Returns the UI operations structure to be used when displaying a notification.
Notify Subsystem
void * purple_notify_get_handle (void)
 Returns the notify subsystem handle.
void purple_notify_init (void)
 Initializes the notify subsystem.
void purple_notify_uninit (void)
 Uninitializes the notify subsystem.

Notification API

#define purple_notify_info(handle, title, primary, secondary)
 A wrapper for purple_notify_message that displays an information message.
#define purple_notify_warning(handle, title, primary, secondary)
 A wrapper for purple_notify_message that displays a warning message.
#define purple_notify_error(handle, title, primary, secondary)
 A wrapper for purple_notify_message that displays an error message.
void * purple_notify_message (void *handle, PurpleNotifyMsgType type, const char *title, const char *primary, const char *secondary, PurpleNotifyCloseCallback cb, gpointer user_data)
 Displays a notification message to the user.
void * purple_notify_email (void *handle, const char *subject, const char *from, const char *to, const char *url, PurpleNotifyCloseCallback cb, gpointer user_data)
 Displays a single email notification to the user.
void * purple_notify_emails (void *handle, size_t count, gboolean detailed, const char **subjects, const char **froms, const char **tos, const char **urls, PurpleNotifyCloseCallback cb, gpointer user_data)
 Displays a notification for multiple emails to the user.
void * purple_notify_formatted (void *handle, const char *title, const char *primary, const char *secondary, const char *text, PurpleNotifyCloseCallback cb, gpointer user_data)
 Displays a notification with formatted text.
void * purple_notify_userinfo (PurpleConnection *gc, const char *who, PurpleNotifyUserInfo *user_info, PurpleNotifyCloseCallback cb, gpointer user_data)
 Displays user information with formatted text, passing information giving the connection and username from which the user information came.
PurpleNotifyUserInfo * purple_notify_user_info_new (void)
 Create a new PurpleNotifyUserInfo which is suitable for passing to purple_notify_userinfo()
void purple_notify_user_info_destroy (PurpleNotifyUserInfo *user_info)
 Destroy a PurpleNotifyUserInfo.
GList * purple_notify_user_info_get_entries (PurpleNotifyUserInfo *user_info)
 Retrieve the array of PurpleNotifyUserInfoEntry objects from a PurpleNotifyUserInfo.
char * purple_notify_user_info_get_text_with_newline (PurpleNotifyUserInfo *user_info, const char *newline)
 Create a textual representation of a PurpleNotifyUserInfo, separating entries with newline.
void purple_notify_user_info_add_pair (PurpleNotifyUserInfo *user_info, const char *label, const char *value)
 Add a label/value pair to a PurpleNotifyUserInfo object.
void purple_notify_user_info_add_pair_plaintext (PurpleNotifyUserInfo *user_info, const char *label, const char *value)
 Like purple_notify_user_info_add_pair, but value should be plaintext and will be escaped using g_markup_escape_text().
void purple_notify_user_info_prepend_pair (PurpleNotifyUserInfo *user_info, const char *label, const char *value)
 Prepend a label/value pair to a PurpleNotifyUserInfo object.
void purple_notify_user_info_remove_entry (PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *user_info_entry)
 Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object without freeing the entry.
PurpleNotifyUserInfoEntry * purple_notify_user_info_entry_new (const char *label, const char *value)
 Create a new PurpleNotifyUserInfoEntry.
void purple_notify_user_info_add_section_break (PurpleNotifyUserInfo *user_info)
 Add a section break.
void purple_notify_user_info_prepend_section_break (PurpleNotifyUserInfo *user_info)
 Prepend a section break.
void purple_notify_user_info_add_section_header (PurpleNotifyUserInfo *user_info, const char *label)
 Add a section header.
void purple_notify_user_info_prepend_section_header (PurpleNotifyUserInfo *user_info, const char *label)
 Prepend a section header.
void purple_notify_user_info_remove_last_item (PurpleNotifyUserInfo *user_info)
 Remove the last item which was added to a PurpleNotifyUserInfo.
const gchar * purple_notify_user_info_entry_get_label (PurpleNotifyUserInfoEntry *user_info_entry)
 Get the label for a PurpleNotifyUserInfoEntry.
void purple_notify_user_info_entry_set_label (PurpleNotifyUserInfoEntry *user_info_entry, const char *label)
 Set the label for a PurpleNotifyUserInfoEntry.
const gchar * purple_notify_user_info_entry_get_value (PurpleNotifyUserInfoEntry *user_info_entry)
 Get the value for a PurpleNotifyUserInfoEntry.
void purple_notify_user_info_entry_set_value (PurpleNotifyUserInfoEntry *user_info_entry, const char *value)
 Set the value for a PurpleNotifyUserInfoEntry.
PurpleNotifyUserInfoEntryType purple_notify_user_info_entry_get_type (PurpleNotifyUserInfoEntry *user_info_entry)
 Get the type of a PurpleNotifyUserInfoEntry.
void purple_notify_user_info_entry_set_type (PurpleNotifyUserInfoEntry *user_info_entry, PurpleNotifyUserInfoEntryType type)
 Set the type of a PurpleNotifyUserInfoEntry.
void * purple_notify_uri (void *handle, const char *uri)
 Opens a URI or somehow presents it to the user.
void purple_notify_close (PurpleNotifyType type, void *ui_handle)
 Closes a notification.
void purple_notify_close_with_handle (void *handle)
 Closes all notifications registered with the specified handle.

Detailed Description

Notification API.

See Also
Notification Signals

Definition in file notify.h.

Macro Definition Documentation

#define purple_notify_error (   handle,
  title,
  primary,
  secondary 
)
Value:
(primary), (secondary), NULL, NULL)

A wrapper for purple_notify_message that displays an error message.

Definition at line 756 of file notify.h.

#define purple_notify_info (   handle,
  title,
  primary,
  secondary 
)
Value:
(primary), (secondary), NULL, NULL)

A wrapper for purple_notify_message that displays an information message.

Definition at line 742 of file notify.h.

#define purple_notify_warning (   handle,
  title,
  primary,
  secondary 
)
Value:
(primary), (secondary), NULL, NULL)

A wrapper for purple_notify_message that displays a warning message.

Definition at line 749 of file notify.h.

Typedef Documentation

typedef void(* PurpleNotifySearchResultsCallback)(PurpleConnection *c, GList *row, gpointer user_data)

Callback for a button in a search result.

Parameters
cthe PurpleConnection passed to purple_notify_searchresults
rowthe contents of the selected row
user_dataUser defined data.

Definition at line 126 of file notify.h.

Enumeration Type Documentation

Notification message types.

Enumerator:
PURPLE_NOTIFY_MSG_ERROR 

Error notification.

PURPLE_NOTIFY_MSG_WARNING 

Warning notification.

PURPLE_NOTIFY_MSG_INFO 

Information notification.

Definition at line 64 of file notify.h.

The types of buttons.

Enumerator:
PURPLE_NOTIFY_BUTTON_LABELED 

special use, see _button_add_labeled

Definition at line 76 of file notify.h.

Notification types.

Enumerator:
PURPLE_NOTIFY_MESSAGE 

Message notification.

PURPLE_NOTIFY_EMAIL 

Single email notification.

PURPLE_NOTIFY_EMAILS 

Multiple email notification.

PURPLE_NOTIFY_FORMATTED 

Formatted text.

PURPLE_NOTIFY_SEARCHRESULTS 

Buddy search results.

PURPLE_NOTIFY_USERINFO 

Formatted userinfo text.

PURPLE_NOTIFY_URI 

URI notification or display.

Definition at line 48 of file notify.h.

Function Documentation

void purple_notify_close ( PurpleNotifyType  type,
void *  ui_handle 
)

Closes a notification.

This should be used only by the UI operation functions and part of the core.

Parameters
typeThe notification type.
ui_handleThe notification UI handle.
void purple_notify_close_with_handle ( void *  handle)

Closes all notifications registered with the specified handle.

Parameters
handleThe handle.
void* purple_notify_email ( void *  handle,
const char *  subject,
const char *  from,
const char *  to,
const char *  url,
PurpleNotifyCloseCallback  cb,
gpointer  user_data 
)

Displays a single email notification to the user.

Parameters
handleThe plugin or connection handle.
subjectThe subject of the email.
fromThe from address.
toThe destination address.
urlThe URL where the message can be read.
cbThe callback to call when the user closes the notification.
user_dataThe data to pass to the callback.
Returns
A UI-specific handle.
void* purple_notify_emails ( void *  handle,
size_t  count,
gboolean  detailed,
const char **  subjects,
const char **  froms,
const char **  tos,
const char **  urls,
PurpleNotifyCloseCallback  cb,
gpointer  user_data 
)

Displays a notification for multiple emails to the user.

Parameters
handleThe plugin or connection handle.
countThe number of emails. '0' can be used to signify that the user has no unread emails and the UI should remove the mail notification.
detailedTRUE if there is information for each email in the arrays.
subjectsThe array of subjects.
fromsThe array of from addresses.
tosThe array of destination addresses.
urlsThe URLs where the messages can be read.
cbThe callback to call when the user closes the notification.
user_dataThe data to pass to the callback.
Returns
A UI-specific handle.
void* purple_notify_formatted ( void *  handle,
const char *  title,
const char *  primary,
const char *  secondary,
const char *  text,
PurpleNotifyCloseCallback  cb,
gpointer  user_data 
)

Displays a notification with formatted text.

The text is essentially a stripped-down format of HTML, the same that IMs may send.

Parameters
handleThe plugin or connection handle.
titleThe title of the message.
primaryThe main point of the message.
secondaryThe secondary information.
textThe formatted text.
cbThe callback to call when the user closes the notification.
user_dataThe data to pass to the callback.
Returns
A UI-specific handle.
void* purple_notify_get_handle ( void  )

Returns the notify subsystem handle.

Returns
The notify subsystem handle.
PurpleNotifyUiOps* purple_notify_get_ui_ops ( void  )

Returns the UI operations structure to be used when displaying a notification.

Returns
The UI operations structure.
void* purple_notify_message ( void *  handle,
PurpleNotifyMsgType  type,
const char *  title,
const char *  primary,
const char *  secondary,
PurpleNotifyCloseCallback  cb,
gpointer  user_data 
)

Displays a notification message to the user.

Parameters
handleThe plugin or connection handle.
typeThe notification type.
titleThe title of the message.
primaryThe main point of the message.
secondaryThe secondary information.
cbThe callback to call when the user closes the notification.
user_dataThe data to pass to the callback.
Returns
A UI-specific handle.
void* purple_notify_searchresults ( PurpleConnection gc,
const char *  title,
const char *  primary,
const char *  secondary,
PurpleNotifySearchResults results,
PurpleNotifyCloseCallback  cb,
gpointer  user_data 
)

Search results notification API.

Displays results from a buddy search. This can be, for example, a window with a list of all found buddies, where you are given the option of adding buddies to your buddy list.

Parameters
gcThe PurpleConnection handle associated with the information.
titleThe title of the message. If this is NULL, the title will be "Search Results."
primaryThe main point of the message.
secondaryThe secondary information.
resultsThe PurpleNotifySearchResults instance.
cbThe callback to call when the user closes the notification.
user_dataThe data to pass to the close callback and any other callback associated with a button.
Returns
A UI-specific handle.
void purple_notify_searchresults_button_add ( PurpleNotifySearchResults results,
PurpleNotifySearchButtonType  type,
PurpleNotifySearchResultsCallback  cb 
)

Adds a stock button that will be displayed in the search results dialog.

Parameters
resultsThe search results object.
typeType of the button. (TODO: Only one button of a given type can be displayed.)
cbFunction that will be called on the click event.
void purple_notify_searchresults_button_add_labeled ( PurpleNotifySearchResults results,
const char *  label,
PurpleNotifySearchResultsCallback  cb 
)

Adds a plain labelled button that will be displayed in the search results dialog.

Parameters
resultsThe search results object
labelThe label to display
cbFunction that will be called on the click event
void purple_notify_searchresults_column_add ( PurpleNotifySearchResults results,
PurpleNotifySearchColumn column 
)

Adds a new column to the search result object.

Parameters
resultsThe result object to which the column will be added.
columnThe column that will be added to the result object.
char* purple_notify_searchresults_column_get_title ( PurpleNotifySearchResults results,
unsigned int  column_id 
)

Returns a title of the search results object's column.

Deprecated:
This function will be removed in Pidgin 3.0.0 unless there is sufficient demand to keep it. Using this function encourages looping through the columns inefficiently. Instead of using this function you should iterate through the name of a particular column you can use g_list_nth_data(results->columns, row_id).
Parameters
resultsThe search results object.
column_idIndex of the column.
Returns
Title of the column.
PurpleNotifySearchColumn* purple_notify_searchresults_column_new ( const char *  title)

Returns a newly created search result column object.

Parameters
titleTitle of the column. NOTE: Title will get g_strdup()ed.
Returns
The new search column object.
void purple_notify_searchresults_free ( PurpleNotifySearchResults results)

Frees a PurpleNotifySearchResults object.

Parameters
resultsThe PurpleNotifySearchResults to free.
guint purple_notify_searchresults_get_columns_count ( PurpleNotifySearchResults results)

Returns a number of the columns in the search results object.

Deprecated:
This function will be removed in Pidgin 3.0.0 unless there is sufficient demand to keep it. Using this function encourages looping through the columns inefficiently. Instead of using this function you should iterate through the columns using a loop similar to this: for (l = results->columns; l != NULL; l = l->next) If you really need to get the number of columns you can use g_list_length(results->columns).
Parameters
resultsThe search results object.
Returns
Number of the columns.
guint purple_notify_searchresults_get_rows_count ( PurpleNotifySearchResults results)

Returns a number of the rows in the search results object.

Deprecated:
This function will be removed in Pidgin 3.0.0 unless there is sufficient demand to keep it. Using this function encourages looping through the results inefficiently. Instead of using this function you should iterate through the results using a loop similar to this: for (l = results->rows; l != NULL; l = l->next) If you really need to get the number of rows you can use g_list_length(results->rows).
Parameters
resultsThe search results object.
Returns
Number of the result rows.
PurpleNotifySearchResults* purple_notify_searchresults_new ( void  )

Returns a newly created search results object.

Returns
The new search results object.
void purple_notify_searchresults_new_rows ( PurpleConnection gc,
PurpleNotifySearchResults results,
void *  data 
)

Replace old rows with the new.

Reuse an existing window.

Parameters
gcThe PurpleConnection structure.
resultsThe PurpleNotifySearchResults structure.
dataData returned by the purple_notify_searchresults().
void purple_notify_searchresults_row_add ( PurpleNotifySearchResults results,
GList *  row 
)

Adds a new row of the results to the search results object.

Parameters
resultsThe search results object.
rowThe row of the results.
GList* purple_notify_searchresults_row_get ( PurpleNotifySearchResults results,
unsigned int  row_id 
)

Returns a row of the results from the search results object.

Deprecated:
This function will be removed in Pidgin 3.0.0 unless there is sufficient demand to keep it. Using this function encourages looping through the results inefficiently. Instead of using this function you should iterate through the results using a loop similar to this: for (l = results->rows; l != NULL; l = l->next) If you really need to get the data for a particular row you can use g_list_nth_data(results->rows, row_id).
Parameters
resultsThe search results object.
row_idIndex of the row to be returned.
Returns
Row of the results.
void purple_notify_set_ui_ops ( PurpleNotifyUiOps ops)

Sets the UI operations structure to be used when displaying a notification.

Parameters
opsThe UI operations structure.
void* purple_notify_uri ( void *  handle,
const char *  uri 
)

Opens a URI or somehow presents it to the user.

Parameters
handleThe plugin or connection handle.
uriThe URI to display or go to.
Returns
A UI-specific handle, if any. This may only be presented if the UI code displays a dialog instead of a webpage, or something similar.
void purple_notify_user_info_add_pair ( PurpleNotifyUserInfo *  user_info,
const char *  label,
const char *  value 
)

Add a label/value pair to a PurpleNotifyUserInfo object.

PurpleNotifyUserInfo keeps track of the order in which pairs are added.

Parameters
user_infoThe PurpleNotifyUserInfo
labelA 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.
valueThe value, which might be displayed by a UI after the label. This should be valid HTML. If you want to insert plaintext then use purple_notify_user_info_add_pair_plaintext(), instead. If this is NULL the label will still be displayed; the UI should treat label as independent and not include a colon if it would otherwise.
void purple_notify_user_info_add_section_break ( PurpleNotifyUserInfo *  user_info)

Add a section break.

A UI might display this as a horizontal line.

Parameters
user_infoThe PurpleNotifyUserInfo
void purple_notify_user_info_add_section_header ( PurpleNotifyUserInfo *  user_info,
const char *  label 
)

Add a section header.

A UI might display this in a different font from other text.

Parameters
user_infoThe PurpleNotifyUserInfo
labelThe name of the section
void purple_notify_user_info_destroy ( PurpleNotifyUserInfo *  user_info)

Destroy a PurpleNotifyUserInfo.

Parameters
user_infoThe PurpleNotifyUserInfo
const gchar* purple_notify_user_info_entry_get_label ( PurpleNotifyUserInfoEntry *  user_info_entry)

Get the label for a PurpleNotifyUserInfoEntry.

Parameters
user_info_entryThe PurpleNotifyUserInfoEntry
Returns
The label
PurpleNotifyUserInfoEntryType purple_notify_user_info_entry_get_type ( PurpleNotifyUserInfoEntry *  user_info_entry)

Get the type of a PurpleNotifyUserInfoEntry.

Parameters
user_info_entryThe PurpleNotifyUserInfoEntry
Returns
The PurpleNotifyUserInfoEntryType
const gchar* purple_notify_user_info_entry_get_value ( PurpleNotifyUserInfoEntry *  user_info_entry)

Get the value for a PurpleNotifyUserInfoEntry.

Parameters
user_info_entryThe PurpleNotifyUserInfoEntry
Returns
The value
PurpleNotifyUserInfoEntry* purple_notify_user_info_entry_new ( const char *  label,
const char *  value 
)

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() and purple_notify_user_info_prepend_pair() are convenience methods for creating entries and adding them to a PurpleNotifyUserInfo.

Parameters
labelA 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.
valueThe 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.
Returns
A new PurpleNotifyUserInfoEntry
void purple_notify_user_info_entry_set_label ( PurpleNotifyUserInfoEntry *  user_info_entry,
const char *  label 
)

Set the label for a PurpleNotifyUserInfoEntry.

Parameters
user_info_entryThe PurpleNotifyUserInfoEntry
labelThe label
void purple_notify_user_info_entry_set_type ( PurpleNotifyUserInfoEntry *  user_info_entry,
PurpleNotifyUserInfoEntryType  type 
)

Set the type of a PurpleNotifyUserInfoEntry.

Parameters
user_info_entryThe PurpleNotifyUserInfoEntry
typeThe PurpleNotifyUserInfoEntryType
void purple_notify_user_info_entry_set_value ( PurpleNotifyUserInfoEntry *  user_info_entry,
const char *  value 
)

Set the value for a PurpleNotifyUserInfoEntry.

Parameters
user_info_entryThe PurpleNotifyUserInfoEntry
valueThe value
GList* purple_notify_user_info_get_entries ( PurpleNotifyUserInfo *  user_info)

Retrieve the array of PurpleNotifyUserInfoEntry objects from a PurpleNotifyUserInfo.

This GList may be manipulated directly with normal GList functions such as g_list_insert(). Only PurpleNotifyUserInfoEntry are allowed in the list. If a PurpleNotifyUserInfoEntry item is added to the list, it should not be g_free()'d by the caller; PurpleNotifyUserInfo will g_free it when destroyed.

To remove a PurpleNotifyUserInfoEntry, use purple_notify_user_info_remove_entry(). Do not use the GList directly.

Parameters
user_infoThe PurpleNotifyUserInfo
Note
The return value of this function must not be modified or freed.
Returns
A GList of PurpleNotifyUserInfoEntry objects
char* purple_notify_user_info_get_text_with_newline ( PurpleNotifyUserInfo *  user_info,
const char *  newline 
)

Create a textual representation of a PurpleNotifyUserInfo, separating entries with newline.

Parameters
user_infoThe PurpleNotifyUserInfo
newlineThe separation character
PurpleNotifyUserInfo* purple_notify_user_info_new ( void  )

Create a new PurpleNotifyUserInfo which is suitable for passing to purple_notify_userinfo()

Returns
A new PurpleNotifyUserInfo, which the caller must destroy when done
void purple_notify_user_info_prepend_pair ( PurpleNotifyUserInfo *  user_info,
const char *  label,
const char *  value 
)

Prepend a label/value pair to a PurpleNotifyUserInfo object.

Parameters
user_infoThe PurpleNotifyUserInfo
labelA 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.
valueThe 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.
void purple_notify_user_info_prepend_section_break ( PurpleNotifyUserInfo *  user_info)

Prepend a section break.

A UI might display this as a horizontal line.

Parameters
user_infoThe PurpleNotifyUserInfo
Since
2.5.0
void purple_notify_user_info_prepend_section_header ( PurpleNotifyUserInfo *  user_info,
const char *  label 
)

Prepend a section header.

A UI might display this in a different font from other text.

Parameters
user_infoThe PurpleNotifyUserInfo
labelThe name of the section
Since
2.5.0
void purple_notify_user_info_remove_entry ( PurpleNotifyUserInfo *  user_info,
PurpleNotifyUserInfoEntry *  user_info_entry 
)

Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object without freeing the entry.

Parameters
user_infoThe PurpleNotifyUserInfo
user_info_entryThe PurpleNotifyUserInfoEntry
Deprecated:
Nothing is using this function and it should be removed in 3.0.0. Or, if we decide we want to keep it in 3.0.0 then we should make purple_notify_user_info_entry_destroy public so that entries can be free'd after they're removed.
void purple_notify_user_info_remove_last_item ( PurpleNotifyUserInfo *  user_info)

Remove the last item which was added to a PurpleNotifyUserInfo.

This could be used to remove a section header which is not needed.

void* purple_notify_userinfo ( PurpleConnection gc,
const char *  who,
PurpleNotifyUserInfo *  user_info,
PurpleNotifyCloseCallback  cb,
gpointer  user_data 
)

Displays user information with formatted text, passing information giving the connection and username from which the user information came.

The text is essentially a stripped-down format of HTML, the same that IMs may send.

Parameters
gcThe PurpleConnection handle associated with the information.
whoThe username associated with the information.
user_infoThe PurpleNotifyUserInfo which contains the information
cbThe callback to call when the user closes the notification.
user_dataThe data to pass to the callback.
Returns
A UI-specific handle.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!