aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/reference/libindicate-decl.txt34
-rw-r--r--tests/im-client.c9
2 files changed, 42 insertions, 1 deletions
diff --git a/docs/reference/libindicate-decl.txt b/docs/reference/libindicate-decl.txt
index e3280bd..e7890c0 100644
--- a/docs/reference/libindicate-decl.txt
+++ b/docs/reference/libindicate-decl.txt
@@ -315,6 +315,34 @@ IndicateListener * listener,IndicateListenerServer * server,indicate_listener_ge
<NAME>INDICATE_SERVER_GET_CLASS</NAME>
#define INDICATE_SERVER_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), INDICATE_TYPE_SERVER, IndicateServerClass))
</MACRO>
+<MACRO>
+<NAME>INDICATE_SERVER_INDICATOR_NULL</NAME>
+#define INDICATE_SERVER_INDICATOR_NULL (0)
+</MACRO>
+<MACRO>
+<NAME>INDICATE_SERVER_SIGNAL_INDICATOR_ADDED</NAME>
+#define INDICATE_SERVER_SIGNAL_INDICATOR_ADDED "indicator-added"
+</MACRO>
+<MACRO>
+<NAME>INDICATE_SERVER_SIGNAL_INDICATOR_REMOVED</NAME>
+#define INDICATE_SERVER_SIGNAL_INDICATOR_REMOVED "indicator-removed"
+</MACRO>
+<MACRO>
+<NAME>INDICATE_SERVER_SIGNAL_INDICATOR_MODIFIED</NAME>
+#define INDICATE_SERVER_SIGNAL_INDICATOR_MODIFIED "indicator-modified"
+</MACRO>
+<MACRO>
+<NAME>INDICATE_SERVER_SIGNAL_SERVER_SHOW</NAME>
+#define INDICATE_SERVER_SIGNAL_SERVER_SHOW "server-show"
+</MACRO>
+<MACRO>
+<NAME>INDICATE_SERVER_SIGNAL_SERVER_HIDE</NAME>
+#define INDICATE_SERVER_SIGNAL_SERVER_HIDE "server-hide"
+</MACRO>
+<MACRO>
+<NAME>INDICATE_SERVER_SIGNAL_SERVER_DISPLAY</NAME>
+#define INDICATE_SERVER_SIGNAL_SERVER_DISPLAY "server-display"
+</MACRO>
<STRUCT>
<NAME>IndicateServer</NAME>
</STRUCT>
@@ -339,6 +367,7 @@ struct _IndicateServerClass {
void (* indicator_modified) (IndicateServer * server, guint id, gchar * property);
void (* server_show) (IndicateServer * server, gchar * type);
void (* server_hide) (IndicateServer * server, gchar * type);
+ void (* server_display) (IndicateServer * server);
/* Virtual Functions */
gboolean (*get_indicator_count) (IndicateServer * server, guint * count, GError **error);
@@ -468,6 +497,11 @@ IndicateServer *server, guint id, const gchar *type
<RETURNS>void </RETURNS>
IndicateServer *server, guint id, const gchar *property
</FUNCTION>
+<FUNCTION>
+<NAME>indicate_server_emit_server_display</NAME>
+<RETURNS>void </RETURNS>
+IndicateServer *server
+</FUNCTION>
<MACRO>
<NAME>INDICATE_TYPE_INDICATOR_MESSAGE</NAME>
#define INDICATE_TYPE_INDICATOR_MESSAGE (indicate_indicator_message_get_type ())
diff --git a/tests/im-client.c b/tests/im-client.c
index 3419a9d..1b5a86b 100644
--- a/tests/im-client.c
+++ b/tests/im-client.c
@@ -56,7 +56,13 @@ timeout_cb (gpointer data)
static void
display (IndicateIndicator * indicator, gpointer data)
{
- g_debug("Ah, I've been displayed");
+ g_debug("Ah, my indicator has been displayed");
+}
+
+static void
+server_display (IndicateServer * server, gpointer data)
+{
+ g_debug("Ah, my server has been displayed");
}
int
@@ -67,6 +73,7 @@ main (int argc, char ** argv)
IndicateServer * server = indicate_server_ref_default();
indicate_server_set_type(server, "message.im");
indicate_server_set_desktop_file(server, "/usr/share/applications/empathy.desktop");
+ g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_SERVER_DISPLAY, G_CALLBACK(server_display), NULL);
IndicateIndicatorMessage * indicator;