aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/evolution-calendar.idl
blob: 6357a014d05dcbd785b2962262574678e6286d8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* GNOME calendar interfaces
 *
 * Copyright (C) 2000 Eskil Heyn Olsen
 * Copyright (C) 2000 Helix Code, Inc.
 *
 * Authors: Eskil Heyn Olsen <deity@eskil.dk>
 *          Federico Mena-Quintero <federico@helixcode.com>
 */

#ifndef _GNOME_CALENDAR_IDL_
#define _GNOME_CALENDAR_IDL_

#include <gnome-unknown.idl>

module GNOME {

module Calendar {
    /* A calendar object (event/todo/journal/etc), represented as an
     * iCalendar string.
     */
    typedef string CalObj;

    /* An unique identifier for a calendar object */
    typedef string CalObjUID;

    interface Listener;

    /* A calendar handle */
    interface Cal : Unknown {
        /* A calendar is identified by its URI */
        readonly attribute string uri;
    };

    /* Listener for changes in a calendar */
    interface Listener : Unknown {
        /* Called from a CalFactory when a calendar is initially loaded
         * or created.  The listener must remember the cal object.  
         */
        void cal_loaded (in Cal cal, in CalObj calobj);

        /* Called from a Calendar when an object is added */
        void obj_added (in CalObj calobj);

        /* Called from a Calendar when an object is removed */
        void obj_removed (in CalObjUID uid);

        /* Called from a Calendar when an object is changed */
        void obj_changed (in CalObj calobj);
    };

    /* A calendar factory, can load and create calendars */
    interface CalFactory : Unknown {
        /* Load a calendar from an URI */
        void load (in string uri, in Listener listener);

        /* Create a new calendar at the specified URI */
        void create (in string uri, in Listener listener);
    };
};

};

#endif