aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/idl
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-10-22 02:51:30 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-10-22 02:51:30 +0800
commit21743ac2cfa2d2ddcd539e9b7695cc8dd720ef36 (patch)
tree0111dbe4d8a6d5617f5e5406001b0024e4293169 /calendar/idl
parent653cfffc0e00dfb59b36813c1b45c53d3f773c65 (diff)
downloadgsoc2013-evolution-21743ac2cfa2d2ddcd539e9b7695cc8dd720ef36.tar.gz
gsoc2013-evolution-21743ac2cfa2d2ddcd539e9b7695cc8dd720ef36.tar.zst
gsoc2013-evolution-21743ac2cfa2d2ddcd539e9b7695cc8dd720ef36.zip
Merge new-ui-branch into the trunk.
svn path=/trunk/; revision=22966
Diffstat (limited to 'calendar/idl')
-rw-r--r--calendar/idl/evolution-calendar.idl275
1 files changed, 103 insertions, 172 deletions
diff --git a/calendar/idl/evolution-calendar.idl b/calendar/idl/evolution-calendar.idl
index 15b27e806a..1b139fc6f5 100644
--- a/calendar/idl/evolution-calendar.idl
+++ b/calendar/idl/evolution-calendar.idl
@@ -23,9 +23,14 @@ module Calendar {
typedef string CalObj;
typedef sequence<CalObj> CalObjSeq;
+ typedef sequence<string> stringlist;
+
/* A unique identifier for a calendar component */
typedef string CalObjUID;
+ /* A unique identified for an event recurrence */
+ typedef string CalRecurID;
+
/* Simple sequence of strings */
typedef sequence<string> StringSeq;
@@ -66,14 +71,6 @@ module Calendar {
const CalObjChangeType ADDED = 1 << 0;
const CalObjChangeType MODIFIED = 1 << 1;
const CalObjChangeType DELETED = 1 << 2;
-
- /* Types of alarms */
- enum AlarmType {
- MAIL,
- PROGRAM,
- DISPLAY,
- AUDIO
- };
/* Used to store a time_t */
typedef unsigned long Time_t;
@@ -102,30 +99,39 @@ module Calendar {
/* Used to transfer a list of changed components */
typedef sequence<CalObjChange> CalObjChangeSeq;
- /* An alarm trigger instance */
- struct CalAlarmInstance {
- CalAlarmUID auid;
- Time_t trigger;
- Time_t occur_start;
- Time_t occur_end;
- };
-
- /* Used to represent a list of alarm triggers for a single component */
- typedef sequence<CalAlarmInstance> CalAlarmInstanceSeq;
-
- /* Alarms for a component */
- struct CalComponentAlarms {
- CalObj calobj;
- CalAlarmInstanceSeq alarms;
- };
-
- /* Used to represent a list of components plus their triggers */
- typedef sequence<CalComponentAlarms> CalComponentAlarmsSeq;
-
/* Used to represent users and lists of users */
typedef string User;
typedef sequence<User> UserList;
+ enum CallStatus {
+ Success,
+ RepositoryOffline,
+ PermissionDenied,
+ InvalidRange,
+ ObjectNotFound,
+ InvalidObject,
+ CardIdAlreadyExists,
+ AuthenticationFailed,
+ AuthenticationRequired,
+ UnsupportedField,
+ UnsupportedMethod,
+ UnsupportedAuthenticationMethod,
+ TLSNotAvailable,
+ NoSuchCal,
+
+ /* These can be returned for successful searches, but
+ indicate the result set was truncated */
+ SearchSizeLimitExceeded,
+ SearchTimeLimitExceeded,
+
+ InvalidQuery,
+ QueryRefused,
+
+ CouldNotCancel,
+
+ OtherError
+ };
+
interface Query;
interface Listener;
@@ -136,134 +142,68 @@ module Calendar {
interface Cal : Bonobo::Unknown {
exception NotFound {};
exception InvalidRange {};
- exception InvalidObject {};
- exception CouldNotCreate {};
- exception PermissionDenied {};
- exception Busy {string errorMsg;};
/* A calendar is identified by its URI */
readonly attribute string uri;
+ oneway void open (in boolean only_if_exists);
+ oneway void remove ();
+
/* Check write permissions for calendar */
- boolean isReadOnly ();
+ oneway void isReadOnly ();
/* Information on the backend's capabilities */
- string getStaticCapabilities ();
+ oneway void getStaticCapabilities ();
- /* Return the cal address associated with this calendar,
- if any. */
- string getCalAddress ()
- raises (NotFound);
+ /* Return the cal address associated with this calendar, if any. */
+ oneway void getCalAddress ();
- string getAlarmEmailAddress ()
- raises (NotFound);
+ oneway void getAlarmEmailAddress ();
/* Returns the LDAP attribute to get attendees from */
- string getLdapAttribute ()
- raises (NotFound);
+ oneway void getLdapAttribute ();
/* For going online/offline */
void setMode (in CalMode mode);
-
- /* Gets the number of components of the specified types */
- long countObjects (in CalObjType type);
- /* Get a default object of a given type */
- CalObj getDefaultObject (in CalObjType type);
+ /* Get a default object of the backend's type */
+ oneway void getDefaultObject ();
/* Gets a component based on its URI */
- CalObj getObject (in CalObjUID uid)
- raises (NotFound);
-
- /* Sets the default timezone to be used for resolving DATE
- and floating DATE-TIME values. */
- void setDefaultTimezone (in CalTimezoneObjUID tzid)
- raises (NotFound);
+ oneway void getObject (in CalObjUID uid, in CalRecurID rid);
- /* Gets a VTIMEZONE component based on its TZID */
- CalTimezoneObj getTimezoneObject (in CalTimezoneObjUID tzid)
- raises (NotFound);
+ oneway void getObjectList (in string query);
- /* Gets a list of UIDs based on component type */
- CalObjUIDSeq getUIDs (in CalObjType type);
+ /* Methods for manipulating timezones */
+ oneway void getTimezone (in CalTimezoneObjUID tzid);
+ oneway void addTimezone (in CalTimezoneObj tz);
+ /* The timezone used to resolve DATE and floating DATE-TIME values. */
+ oneway void setDefaultTimezone (in CalTimezoneObjUID tzid);
/* Gets a list of components that changed based on object type */
- CalObjChangeSeq getChanges (in CalObjType type, in string change_id);
-
- /* Gets a list of components that occur or recur in the specified time range */
- CalObjUIDSeq getObjectsInRange (in CalObjType type,
- in Time_t start, in Time_t end)
- raises (InvalidRange);
-
- /* Gets a list of the components that have alarms that trigger
- * in the specified range of time, and the trigger/occurrence
- * structures themselves.
- */
- CalComponentAlarmsSeq getAlarmsInRange (in Time_t start, in Time_t end)
- raises (NotFound, InvalidRange);
+ oneway void getChanges (in CalObjType type, in string change_id);
/* Returns free/busy objects for the given interval */
- CalObjSeq getFreeBusy (in UserList users, in Time_t start, in Time_t end)
- raises (NotFound, InvalidRange);
-
- /* Gets the alarms for the specified component that trigger in
- * the specified time range.
- */
- CalComponentAlarms getAlarmsForObject (in CalObjUID uid,
- in Time_t start, in Time_t end)
- raises (NotFound, InvalidRange);
-
+ oneway void getFreeBusy (in UserList users, in Time_t start, in Time_t end);
/* Discards an alarm from a given component */
- void discardAlarm (in CalObjUID uid, in CalAlarmUID auid)
- raises (NotFound);
-
- /* Adds or updates one or more VEVENT/VTODO/VTIMEZONE
- * components. The calobj should be a string representation of
- * a complete VCALENDAR object (we also support single
- * VEVENT/VTODO strings, but that is deprecated).
- *
- * The VTIMEZONE data will be merged into the calendar,
- * possibly by renaming TZIDs (though not for builtin
- * VTIMEZONEs, which have unique TZIDs), so don't rely on the
- * TZIDs being the same in the new object on the server.
- *
- * The client should probably immediately free its copy of the
- * object after this call, and call getObject to get the
- * updated version.
- */
- void updateObjects (in CalObj calobj, in CalObjModType mod)
- raises (NotFound, InvalidObject, PermissionDenied);
+ oneway void discardAlarm (in CalObjUID uid, in CalAlarmUID auid);
- /* Removes a component */
- void removeObject (in CalObjUID uid, in CalObjModType mod)
- raises (NotFound, PermissionDenied);
+ /* Methods for manipulating iCalendar objects */
+ oneway void createObject (in CalObj calobj);
+ oneway void modifyObject (in CalObj calobj, in CalObjModType mod);
+ oneway void removeObject (in CalObjUID uid, in CalRecurID rid, in CalObjModType mod);
- /* Sends a component */
- CalObj sendObject (in CalObj calobj, out UserList users)
- raises (InvalidObject, PermissionDenied, Busy);
+ /* Methods for getting/sending iCalendar VCALENDARS via iTip/iMip */
+ oneway void receiveObjects (in CalObj calobj);
+ oneway void sendObjects (in CalObj calobj);
- /* Initiates a live query of the calendar. Returns a handle
- * to the live query itself; changes to components that are
- * present in the query are notified to the listener.
- */
- Query getQuery (in string sexp, in QueryListener ql)
- raises (CouldNotCreate);
+ /* Query methods */
+ oneway void getQuery (in string sexp, in QueryListener ql);
};
/* Listener for changes in a calendar */
interface Listener : Bonobo::Unknown {
- /* Return status when opening a calendar */
- enum OpenStatus {
- SUCCESS, /* All OK */
- ERROR, /* Generic error */
- NOT_FOUND, /* Requested opening in only_if_exists mode
- * when the URI did not exist.
- */
- METHOD_NOT_SUPPORTED, /* A method handler is not registered */
- PERMISSION_DENIED
- };
-
/* Return status when setting calendar mode */
enum SetModeStatus {
MODE_SET, /* All OK */
@@ -271,62 +211,58 @@ module Calendar {
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);
+ oneway void notifyReadOnly (in CallStatus status, in boolean read_only);
+ oneway void notifyCalAddress (in CallStatus status, in string address);
+ oneway void notifyAlarmEmailAddress (in CallStatus status, in string address);
+ oneway void notifyLDAPAttribute (in CallStatus status, in string ldap_attribute);
+ oneway void notifyStaticCapabilities (in CallStatus status, in string capabilities);
+
+ oneway void notifyCalOpened (in CallStatus status);
+ oneway void notifyCalRemoved (in CallStatus status);
- /* Called from a Calendar when the mode is changed */
- void notifyCalSetMode (in SetModeStatus status, in CalMode mode);
+ oneway void notifyObjectCreated (in CallStatus status, in string uid);
+ oneway void notifyObjectModified (in CallStatus status);
+ oneway void notifyObjectRemoved (in CallStatus status);
+
+ oneway void notifyAlarmDiscarded (in CallStatus status);
+
+ oneway void notifyObjectsReceived (in CallStatus status);
+ oneway void notifyObjectsSent (in CallStatus status);
- /* Called from a Calendar when a component is added or changed */
- void notifyObjUpdated (in CalObjUID uid);
+ oneway void notifyDefaultObjectRequested (in CallStatus status, in CalObj object);
+ oneway void notifyObjectRequested (in CallStatus status, in CalObj object);
+ oneway void notifyObjectListRequested (in CallStatus status, in stringlist objects);
+ oneway void notifyQuery (in CallStatus status, in Query query);
+
+ oneway void notifyTimezoneRequested (in CallStatus status, in CalTimezoneObj tz);
+ oneway void notifyTimezoneAdded (in CallStatus status, in CalTimezoneObjUID tzid);
+ oneway void notifyDefaultTimezoneSet (in CallStatus status);
- /* Called from a Calendar when a component is removed */
- void notifyObjRemoved (in CalObjUID uid);
+ oneway void notifyChanges (in CallStatus status, in CalObjChangeSeq changes);
+ oneway void notifyFreeBusy (in CallStatus status, in CalObjSeq freebusy);
+
+ /* Called from a Calendar when the mode is changed */
+ oneway void notifyCalSetMode (in SetModeStatus status, in CalMode mode);
/* Called from a Calendar when the list of categories changes */
- void notifyCategoriesChanged (in StringSeq categories);
+ oneway void notifyCategoriesChanged (in StringSeq categories);
/* Called from a Calendar when there is an error not notified otherwise */
- void notifyErrorOccurred (in string message);
+ oneway void notifyErrorOccurred (in string message);
};
/* Handle to a live query on a calendar */
interface Query : Bonobo::Unknown {
+ oneway void start ();
};
/* Listener for changes in a query of a calendar */
interface QueryListener : Bonobo::Unknown {
- /* Called when components are added or changed. If
- * query_in_progress is true, then the initial query results are
- * being populated and the other arguments indicate the
- * percentage of completion Otherwise, the percent value is
- * unspecified. */
- void notifyObjUpdated (in CalObjUIDSeq uids,
- in boolean query_in_progress,
- in long n_scanned,
- in long total);
-
- /* Called when a component is removed */
- void notifyObjRemoved (in CalObjUID uid);
-
- /* Reported when a query ends */
- enum QueryDoneStatus {
- SUCCESS,
- PARSE_ERROR
- };
-
- /* Called when the query finishes populating itself some time
- * after it is created. Before this is called,
- * notifyObjUpdated() may have been called several times to
- * indicate which objects are actually in the query, unless the
- * status result is a parse error.
- */
- void notifyQueryDone (in QueryDoneStatus status, in string error_str);
-
- /* Called when an evaluation error occurs while performing a query */
- void notifyEvalError (in string error_str);
+ oneway void notifyObjectsAdded (in stringlist objects);
+ oneway void notifyObjectsModified (in stringlist objects);
+ oneway void notifyObjectsRemoved (in CalObjUIDSeq uids);
+ oneway void notifyQueryProgress (in string message, in short percent);
+ oneway void notifyQueryDone (in CallStatus status);
};
/* A calendar factory, can load and create calendars */
@@ -334,14 +270,9 @@ module Calendar {
exception NilListener {};
exception InvalidURI {};
exception UnsupportedMethod {};
- exception PermissionDenied {};
-
- /* Open a calendar from an URI */
- void open (in string uri, in boolean only_if_exists, in Listener listener)
- raises (NilListener, InvalidURI, UnsupportedMethod, PermissionDenied);
- /* List of open URI's */
- StringSeq uriList (in CalMode mode);
+ Cal getCal (in string uri, in CalObjType type, in Listener listener)
+ raises (NilListener, InvalidURI, UnsupportedMethod);
};
/* Interface to the alarm notification service */