aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/idl
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-09-26 14:40:50 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-09-26 14:40:50 +0800
commit943c0e6e2393607a1adf380db102cc2bad61ff52 (patch)
treec8bcf65617509c8c40e74fcbd82ff956c9584026 /calendar/idl
parent225b147233ea335927385c2f867218b6abfb3994 (diff)
downloadgsoc2013-evolution-943c0e6e2393607a1adf380db102cc2bad61ff52.tar
gsoc2013-evolution-943c0e6e2393607a1adf380db102cc2bad61ff52.tar.gz
gsoc2013-evolution-943c0e6e2393607a1adf380db102cc2bad61ff52.tar.bz2
gsoc2013-evolution-943c0e6e2393607a1adf380db102cc2bad61ff52.tar.lz
gsoc2013-evolution-943c0e6e2393607a1adf380db102cc2bad61ff52.tar.xz
gsoc2013-evolution-943c0e6e2393607a1adf380db102cc2bad61ff52.tar.zst
gsoc2013-evolution-943c0e6e2393607a1adf380db102cc2bad61ff52.zip
new proto
2001-09-26 JP Rosevear <jpr@ximian.com> * pcs/cal.h: new proto * pcs/cal.c (impl_Cal_set_mode): implement set mode method (cal_class_init): set setMode function in epv (cal_notify_mode): notify listener of mode change * pcs/cal-factory.c (add_uri): deal with UriType renaming * pcs/cal-backend.h: add new virtual methods and protos * pcs/cal-backend.c (cal_backend_class_init): init new virtual methods to null (cal_backend_set_mode): sets mode (cal_backend_get_mode): gets mode * pcs/cal-backend-file.c (cal_backend_file_class_init): overide get_mode and set_mode methods (cal_backend_file_get_mode): return mode (notify_mode): have listeners notified of the set mode call (cal_backend_file_set_mode): set the mode by indicating not supported * cal-client/cal-listener.h: update proto * cal-client/cal-listener.c (impl_notifyCalSetMode): implement set mode callback (cal_listener_construct): take set mode callback (cal_listener_new): ditto * cal-client/cal-client.h: update protos, add signal proto * cal-client/cal-client.c (cal_client_class_init): add cal_set_mode signal (cal_set_mode_cb): handle set mode callback from listener (cal_client_open_calendar): pass additional param to cal_listener_new (cal_client_set_mode): wrapper to set the calendar mode * idl/evolution-calendar.idl: make UriType into CalMode, add SetModeStatus enum and notifyCalSetMode method to the listener * gui/calendar-offline-handler.c (create_connection_list): fetch the uri list ourselves (impl_prepareForOffline): reflect param change of create_connect_list (update_offline): ditto (backend_cal_set_mode): set mode call back (backend_cal_opened): cal opened call back, set mode to local (impl_goOffline): reflect UriType renaming * cal-util/cal-util.h: rename UriType to CalMode svn path=/trunk/; revision=13142
Diffstat (limited to 'calendar/idl')
-rw-r--r--calendar/idl/evolution-calendar.idl25
1 files changed, 19 insertions, 6 deletions
diff --git a/calendar/idl/evolution-calendar.idl b/calendar/idl/evolution-calendar.idl
index be378a017a..df9b7ecf57 100644
--- a/calendar/idl/evolution-calendar.idl
+++ b/calendar/idl/evolution-calendar.idl
@@ -49,10 +49,10 @@ module Calendar {
const CalObjType TYPE_ANY = 0x07;
/* Flags for getting URI sequences */
- typedef long UriType;
- const UriType URI_LOCAL = 1 << 0;
- const UriType URI_REMOTE = 1 << 1;
- const UriType URI_ANY = 0x07;
+ typedef long CalMode;
+ const CalMode MODE_LOCAL = 1 << 0;
+ const CalMode MODE_REMOTE = 1 << 1;
+ const CalMode MODE_ANY = 0x07;
/* Types of object changes made */
typedef long CalObjChangeType;
@@ -131,10 +131,13 @@ module Calendar {
exception InvalidRange {};
exception InvalidObject {};
exception CouldNotCreate {};
-
+
/* A calendar is identified by its URI */
readonly attribute string uri;
+ /* For going online/offline */
+ void setMode (in CalMode mode);
+
/* Gets the number of components of the specified types */
long countObjects (in CalObjType type);
@@ -215,11 +218,21 @@ module Calendar {
METHOD_NOT_SUPPORTED /* A method handler is not registered */
};
+ /* Return status when setting calendar mode */
+ enum SetModeStatus {
+ MODE_SET, /* All OK */
+ MODE_NOT_SET, /* Generic error */
+ MODE_NOT_SUPPORTED /* Mode not supported */
+ };
+
/* Called from a CalFactory when a calendar is initially opened.
* The listener must remember the cal object.
*/
void notifyCalOpened (in OpenStatus status, in Cal cal);
+ /* Called from a Calendar when the mode is changed */
+ void notifyCalSetMode (in SetModeStatus status, in CalMode mode);
+
/* Called from a Calendar when a component is added or changed */
void notifyObjUpdated (in CalObjUID uid);
@@ -276,7 +289,7 @@ module Calendar {
raises (NilListener);
/* List of open URI's */
- StringSeq uriList (in UriType type);
+ StringSeq uriList (in CalMode mode);
};
/* Interface to the alarm notification service */