aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client/cal-client-multi.h
blob: f16b2d60f4fb0e824f4a257249ce6f278ae92e18 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/* Evolution calendar client
 *
 * Copyright (C) 2001 Ximian, Inc.
 *
 * Author: Rodrigo Moya <rodrigo@ximian.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef CAL_CLIENT_MULTI_H
#define CAL_CLIENT_MULTI_H

#include <cal-client/cal-client.h>

G_BEGIN_DECLS

#define CAL_CLIENT_MULTI_TYPE            (cal_client_multi_get_type ())
#define CAL_CLIENT_MULTI(obj)            (GTK_CHECK_CAST ((obj), CAL_CLIENT_MULTI_TYPE, CalClientMulti))
#define CAL_CLIENT_MULTI_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), CAL_CLIENT_MULTI_TYPE, CalClientMultiClass))
#define IS_CAL_CLIENT_MULTI(obj)         (GTK_CHECK_TYPE ((obj), CAL_CLIENT_MULTI_TYPE))
#define IS_CAL_CLIENT_MULTI_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_CLIENT_MULTI_TYPE))

typedef struct _CalClientMulti        CalClientMulti;
typedef struct _CalClientMultiClass   CalClientMultiClass;
typedef struct _CalClientMultiPrivate CalClientMultiPrivate;

struct _CalClientMulti {
    GtkObject object;

    /* Private data */
    CalClientMultiPrivate *priv;
};

struct _CalClientMultiClass {
    GtkObjectClass parent_class;

    /* notification signals */
    void (* cal_opened) (CalClientMulti *multi, CalClient *client, CalClientOpenStatus status);

    void (* obj_updated) (CalClientMulti *multi, CalClient *client, const char *uid);
    void (* obj_removed) (CalClientMulti *multi, CalClient *client, const char *uid);

    void (* categories_changed) (CalClientMulti *multi, CalClient *client, GPtrArray *categories);

    void (* forget_password) (CalClientMulti *multi, CalClient *client, const char *key);
};

GtkType            cal_client_multi_get_type (void);

CalClientMulti    *cal_client_multi_new (void);

void               cal_client_multi_add_client (CalClientMulti *multi, CalClient *client);
void               cal_client_multi_set_auth_func (CalClientMulti *multi,
                           CalClientAuthFunc func,
                           gpointer user_data);

CalClient         *cal_client_multi_open_calendar (CalClientMulti *multi,
                           const char *str_uri,
                           gboolean only_if_exists);
CalClient         *cal_client_multi_get_client_for_uri (CalClientMulti *multi,
                            const char *uri);

int                cal_client_multi_get_n_objects (CalClientMulti *multi, CalObjType type);
CalClientGetStatus cal_client_multi_get_object (CalClientMulti *multi,
                        const char *uid,
                        CalComponent **comp);
CalClientGetStatus cal_client_multi_get_timezone (CalClientMulti *multi,
                          const char *tzid,
                          icaltimezone **zone);
GList             *cal_client_multi_get_uids (CalClientMulti *multi, CalObjType type);
GList             *cal_client_multi_get_changes (CalClientMulti *multi,
                         CalObjType type,
                         const char *change_id);
GList             *cal_client_multi_get_objects_in_range (CalClientMulti *multi,
                              CalObjType type,
                              time_t start,
                              time_t end);
GList             *cal_client_multi_get_free_busy (CalClientMulti *multi,
                           GList *users,
                           time_t start,
                           time_t end);
void               cal_client_multi_generate_instances (CalClientMulti *multi,
                            CalObjType type,
                            time_t start,
                            time_t end,
                            CalRecurInstanceFn cb,
                            gpointer cb_data);
GSList            *cal_client_multi_get_alarms_in_range (CalClientMulti *multi,
                             time_t start, time_t end);

G_END_DECLS

#endif