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  GaimNotifyUiOps
 Notification UI operations. More...

Notification API

#define gaim_notify_info(handle, title, primary, secondary)
 A wrapper for gaim_notify_message that displays an information message.
#define gaim_notify_warning(handle, title, primary, secondary)
 A wrapper for gaim_notify_message that displays a warning message.
#define gaim_notify_error(handle, title, primary, secondary)
 A wrapper for gaim_notify_message that displays an error message.
void * gaim_notify_message (void *handle, GaimNotifyMsgType type, const char *title, const char *primary, const char *secondary, GCallback cb, void *user_data)
 Displays a notification message to the user.
void * gaim_notify_email (void *handle, const char *subject, const char *from, const char *to, const char *url, GCallback cb, void *user_data)
 Displays a single e-mail notification to the user.
void * gaim_notify_emails (void *handle, size_t count, gboolean detailed, const char **subjects, const char **froms, const char **tos, const char **urls, GCallback cb, void *user_data)
 Displays a notification for multiple e-mails to the user.
void * gaim_notify_formatted (void *handle, const char *title, const char *primary, const char *secondary, const char *text, GCallback cb, void *user_data)
 Displays a notification with formatted text.
void * gaim_notify_userinfo (GaimConnection *gc, const char *who, const char *title, const char *primary, const char *secondary, const char *text, GCallback cb, void *user_data)
 Displays user information with formatted text, passing information giving the connection and username from which the user information came.
void * gaim_notify_uri (void *handle, const char *uri)
 Opens a URI or somehow presents it to the user.
void gaim_notify_close (GaimNotifyType type, void *ui_handle)
 Closes a notification.
void gaim_notify_close_with_handle (void *handle)
 Closes all notifications registered with the specified handle.

Enumerations

enum  GaimNotifyType {
  GAIM_NOTIFY_MESSAGE = 0, GAIM_NOTIFY_EMAIL, GAIM_NOTIFY_EMAILS, GAIM_NOTIFY_FORMATTED,
  GAIM_NOTIFY_USERINFO, GAIM_NOTIFY_URI
}
 Notification types. More...
enum  GaimNotifyMsgType { GAIM_NOTIFY_MSG_ERROR = 0, GAIM_NOTIFY_MSG_WARNING, GAIM_NOTIFY_MSG_INFO }
 Notification message types. More...

Functions

UI Operations API
void gaim_notify_set_ui_ops (GaimNotifyUiOps *ops)
 Sets the UI operations structure to be used when displaying a notification.
GaimNotifyUiOpsgaim_notify_get_ui_ops (void)
 Returns the UI operations structure to be used when displaying a notification.


Detailed Description

Notification API.

gaim

Gaim is the legal property of its developers, whose names are too numerous to list here. Please refer to the COPYRIGHT file distributed with this source distribution.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Define Documentation

#define gaim_notify_error ( handle,
title,
primary,
secondary   ) 

Value:

gaim_notify_message((handle), GAIM_NOTIFY_MSG_ERROR, (title), \
                        (primary), (secondary), NULL, NULL)
A wrapper for gaim_notify_message that displays an error message.

#define gaim_notify_info ( handle,
title,
primary,
secondary   ) 

Value:

gaim_notify_message((handle), GAIM_NOTIFY_MSG_INFO, (title), \
                        (primary), (secondary), NULL, NULL)
A wrapper for gaim_notify_message that displays an information message.

#define gaim_notify_warning ( handle,
title,
primary,
secondary   ) 

Value:

gaim_notify_message((handle), GAIM_NOTIFY_MSG_WARNING, (title), \
                        (primary), (secondary), NULL, NULL)
A wrapper for gaim_notify_message that displays a warning message.


Enumeration Type Documentation

enum GaimNotifyMsgType

Notification message types.

Enumerator:
GAIM_NOTIFY_MSG_ERROR  Error notification.
GAIM_NOTIFY_MSG_WARNING  Warning notification.
GAIM_NOTIFY_MSG_INFO  Information notification.

enum GaimNotifyType

Notification types.

Enumerator:
GAIM_NOTIFY_MESSAGE  Message notification.
GAIM_NOTIFY_EMAIL  Single e-mail notification.
GAIM_NOTIFY_EMAILS  Multiple e-mail notification.
GAIM_NOTIFY_FORMATTED  Formatted text.
GAIM_NOTIFY_USERINFO  Formatted userinfo text.
GAIM_NOTIFY_URI  URI notification or display.


Function Documentation

void gaim_notify_close ( GaimNotifyType  type,
void *  ui_handle 
)

Closes a notification.

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

Parameters:
type The notification type.
ui_handle The notification UI handle.

void gaim_notify_close_with_handle ( void *  handle  ) 

Closes all notifications registered with the specified handle.

Parameters:
handle The handle.

void* gaim_notify_email ( void *  handle,
const char *  subject,
const char *  from,
const char *  to,
const char *  url,
GCallback  cb,
void *  user_data 
)

Displays a single e-mail notification to the user.

Parameters:
handle The plugin or connection handle.
subject The subject of the e-mail.
from The from address.
to The destination address.
url The URL where the message can be read.
cb The callback to call when the user closes the notification.
user_data The data to pass to the callback.
Returns:
A UI-specific handle.

void* gaim_notify_emails ( void *  handle,
size_t  count,
gboolean  detailed,
const char **  subjects,
const char **  froms,
const char **  tos,
const char **  urls,
GCallback  cb,
void *  user_data 
)

Displays a notification for multiple e-mails to the user.

Parameters:
handle The plugin or connection handle.
count The number of e-mails.
detailed TRUE if there is information for each e-mail in the arrays.
subjects The array of subjects.
froms The array of from addresses.
tos The array of destination addresses.
urls The URLs where the messages can be read.
cb The callback to call when the user closes the notification.
user_data The data to pass to the callback.
Returns:
A UI-specific handle.

void* gaim_notify_formatted ( void *  handle,
const char *  title,
const char *  primary,
const char *  secondary,
const char *  text,
GCallback  cb,
void *  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:
handle The plugin or connection handle.
title The title of the message.
primary The main point of the message.
secondary The secondary information.
text The formatted text.
cb The callback to call when the user closes the notification.
user_data The data to pass to the callback.
Returns:
A UI-specific handle.

GaimNotifyUiOps* gaim_notify_get_ui_ops ( void   ) 

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

Returns:
The UI operations structure.

void* gaim_notify_message ( void *  handle,
GaimNotifyMsgType  type,
const char *  title,
const char *  primary,
const char *  secondary,
GCallback  cb,
void *  user_data 
)

Displays a notification message to the user.

Parameters:
handle The plugin or connection handle.
type The notification type.
title The title of the message.
primary The main point of the message.
secondary The secondary information.
cb The callback to call when the user closes the notification.
user_data The data to pass to the callback.
Returns:
A UI-specific handle.

void gaim_notify_set_ui_ops ( GaimNotifyUiOps ops  ) 

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

Parameters:
ops The UI operations structure.

void* gaim_notify_uri ( void *  handle,
const char *  uri 
)

Opens a URI or somehow presents it to the user.

Parameters:
handle The plugin or connection handle.
uri The 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* gaim_notify_userinfo ( GaimConnection *  gc,
const char *  who,
const char *  title,
const char *  primary,
const char *  secondary,
const char *  text,
GCallback  cb,
void *  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:
gc The GaimConnection handle associated with the information.
who The username associated with the information.
title The title of the message.
primary The main point of the message.
secondary The secondary information.
text The formatted text.
cb The callback to call when the user closes the notification.
user_data The data to pass to the callback.
Returns:
A UI-specific handle.


Generated on Sun Feb 18 08:39:49 2007 for gaim by  doxygen 1.5.1