aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/alarm-queue.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2001-01-10 05:37:33 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-01-10 05:37:33 +0800
commit0a3ef04d1b421df60ad6876c9bae6265e9ba85da (patch)
tree89f383feb971b6191bf48bec642f5943db8ac8e0 /calendar/gui/alarm-notify/alarm-queue.c
parent3ad4def2b79353a0b154e58c39b026c76817397f (diff)
downloadgsoc2013-evolution-0a3ef04d1b421df60ad6876c9bae6265e9ba85da.tar
gsoc2013-evolution-0a3ef04d1b421df60ad6876c9bae6265e9ba85da.tar.gz
gsoc2013-evolution-0a3ef04d1b421df60ad6876c9bae6265e9ba85da.tar.bz2
gsoc2013-evolution-0a3ef04d1b421df60ad6876c9bae6265e9ba85da.tar.lz
gsoc2013-evolution-0a3ef04d1b421df60ad6876c9bae6265e9ba85da.tar.xz
gsoc2013-evolution-0a3ef04d1b421df60ad6876c9bae6265e9ba85da.tar.zst
gsoc2013-evolution-0a3ef04d1b421df60ad6876c9bae6265e9ba85da.zip
New interface for the alarm notification system.
2001-01-09 Federico Mena Quintero <federico@helixcode.com> * idl/evolution-calendar.idl (AlarmNotify): New interface for the alarm notification system. * gui/alarm-notify: New directory for the alarm notification daemon and its auxiliary stuff. * gui/alarm-notify/alarm.[ch]: Moved over from gui/alarm.[ch]. * gui/alarm-notify/alarm-queue.[ch]: Moved over from gui/alarm-notify.[ch]. Renamed functions from alarm_notify_*() to alarm_queue_*(). * gui/alarm-notify/alarm-notify.[ch]: Implementation of the GNOME::Evolution::Calendar::AlarmNotify interface. * gui/Makefile.am (evolution_calendar_LDADD): Removed the LINK_FLAGS variable and reordered the libraries to remove some duplicated ones. (SUBDIRS): Added the alarm-notify directory. svn path=/trunk/; revision=7338
Diffstat (limited to 'calendar/gui/alarm-notify/alarm-queue.c')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index d824b2a189..fc4b2a5652 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -1,4 +1,4 @@
-/* Evolution calendar - Alarm notification engine
+/* Evolution calendar - Alarm queueing engine
*
* Copyright (C) 2000 Helix Code, Inc.
*
@@ -26,12 +26,12 @@
#include <gtk/gtksignal.h>
#include <cal-util/timeutil.h>
#include "alarm.h"
-#include "alarm-notify.h"
+#include "alarm-queue.h"
-/* Whether the notification system has been initialized */
-static gboolean alarm_notify_inited;
+/* Whether the queueing system has been initialized */
+static gboolean alarm_queue_inited;
/* Clients we are monitoring for alarms */
static GHashTable *client_alarms_hash = NULL;
@@ -98,7 +98,7 @@ queue_midnight_refresh (void)
midnight_refresh_id = alarm_add (midnight, midnight_refresh_cb, NULL, NULL);
if (!midnight_refresh_id) {
- g_message ("alarm_notify_init(): Could not set up the midnight refresh alarm!");
+ g_message ("queue_midnight_refresh(): Could not set up the midnight refresh alarm!");
/* FIXME: what to do? */
}
}
@@ -382,33 +382,33 @@ obj_removed_cb (CalClient *client, const char *uid, gpointer data)
/**
- * alarm_notify_init:
+ * alarm_queue_init:
*
- * Initializes the alarm notification system. This should be called near the
+ * Initializes the alarm queueing system. This should be called near the
* beginning of the program, after calling alarm_init().
**/
void
-alarm_notify_init (void)
+alarm_queue_init (void)
{
- g_return_if_fail (alarm_notify_inited == FALSE);
+ g_return_if_fail (alarm_queue_inited == FALSE);
client_alarms_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
queue_midnight_refresh ();
- alarm_notify_inited = TRUE;
+ alarm_queue_inited = TRUE;
}
/**
- * alarm_notify_done:
+ * alarm_queue_done:
*
- * Shuts down the alarm notification system. This should be called near the end
+ * Shuts down the alarm queueing system. This should be called near the end
* of the program. All the monitored calendar clients should already have been
- * unregistered with alarm_notify_remove_client().
+ * unregistered with alarm_queue_remove_client().
**/
void
-alarm_notify_done (void)
+alarm_queue_done (void)
{
- g_return_if_fail (alarm_notify_inited);
+ g_return_if_fail (alarm_queue_inited);
/* All clients must be unregistered by now */
g_return_if_fail (g_hash_table_size (client_alarms_hash) == 0);
@@ -420,29 +420,29 @@ alarm_notify_done (void)
alarm_remove (midnight_refresh_id);
midnight_refresh_id = NULL;
- alarm_notify_inited = FALSE;
+ alarm_queue_inited = FALSE;
}
/**
- * alarm_notify_add_client:
+ * alarm_queue_add_client:
* @client: A calendar client.
*
- * Adds a calendar client to the alarm notification system. Alarm trigger
+ * Adds a calendar client to the alarm queueing system. Alarm trigger
* notifications will be presented at the appropriate times. The client should
- * be removed with alarm_notify_remove_client() when receiving notifications
+ * be removed with alarm_queue_remove_client() when receiving notifications
* from it is no longer desired.
*
- * A client can be added any number of times to the alarm notification system,
+ * A client can be added any number of times to the alarm queueing system,
* but any single alarm trigger will only be presented once for a particular
* client. The client must still be removed the same number of times from the
- * notification system when it is no longer wanted.
+ * queueing system when it is no longer wanted.
**/
void
-alarm_notify_add_client (CalClient *client)
+alarm_queue_add_client (CalClient *client)
{
ClientAlarms *ca;
- g_return_if_fail (alarm_notify_inited);
+ g_return_if_fail (alarm_queue_inited);
g_return_if_fail (client != NULL);
g_return_if_fail (IS_CAL_CLIENT (client));
@@ -516,17 +516,17 @@ remove_client_alarms (ClientAlarms *ca)
}
/**
- * alarm_notify_remove_client:
+ * alarm_queue_remove_client:
* @client: A calendar client.
*
- * Removes a calendar client from the alarm notification system.
+ * Removes a calendar client from the alarm queueing system.
**/
void
-alarm_notify_remove_client (CalClient *client)
+alarm_queue_remove_client (CalClient *client)
{
ClientAlarms *ca;
- g_return_if_fail (alarm_notify_inited);
+ g_return_if_fail (alarm_queue_inited);
g_return_if_fail (client != NULL);
g_return_if_fail (IS_CAL_CLIENT (client));