root/trunk/libnotify/libnotify/notify.h

Revision 2861 (checked in by chipx86, 3 years ago)

Add G_BEGIN_DECLS and G_END_DECLS to notify.h, so that libnotify can be used in C++ applications properly.

Line 
1 /**
2  * @file libnotify/notify.h Notifications library
3  *
4  * @Copyright (C) 2004-2006 Christian Hammond
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA  02111-1307, USA.
20  */
21 #ifndef _LIBNOTIFY_NOTIFY_H_
22 #define _LIBNOTIFY_NOTIFY_H_
23
24 #include <glib.h>
25 #include <time.h>
26
27 #include <libnotify/notification.h>
28 #include <libnotify/notify-enum-types.h>
29
30 G_BEGIN_DECLS
31
32 /**
33  * Initializes the notifications library.
34  *
35  * @param app_name The application name.
36  *
37  * @return TRUE if the library initialized properly and a connection to a
38  *         notification server was made.
39  */
40 gboolean notify_init(const char *app_name);
41
42 /**
43  * Uninitializes the notifications library.
44  *
45  * This will be automatically called on exit unless previously called.
46  */
47 void notify_uninit(void);
48
49 /**
50  * Returns whether or not the notification library is initialized.
51  *
52  * @return TRUE if the library is initialized, or FALSE.
53  */
54 gboolean notify_is_initted(void);
55
56 /**
57  * Returns the name of the application set when notify_init() was called.
58  *
59  * @return The name of the application.
60  */
61 const gchar *notify_get_app_name(void);
62
63 /**
64  * Returns the capabilities of the notification server.
65  *
66  * @return A list of capability strings. These strings must be freed.
67  */
68 GList *notify_get_server_caps(void);
69
70 /**
71  * Returns the server notification information.
72  *
73  * The strings returned must be freed.
74  *
75  * @param ret_name         The returned product name of the server.
76  * @param ret_vendor       The returned vendor.
77  * @param ret_version      The returned server version.
78  * @param ret_spec_version The returned specification version supported.
79  *
80  * @return TRUE if the call succeeded, or FALSE if there were errors.
81  */
82 gboolean notify_get_server_info(char **ret_name,
83                                 char **ret_vendor,
84                                 char **ret_version,
85                                 char **ret_spec_version);
86
87 G_END_DECLS
88
89 #endif /* _LIBNOTIFY_NOTIFY_H_ */
Note: See TracBrowser for help on using the browser.