aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-pub-utils.h
blob: 98e36d875877ba43a214f5acb3126c2d25f50134 (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
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/* Evolution calendar Free/Busy utilities and types
 *
 * Copyright (C) 2004 Ximian, Inc.
 *
 * Author: Gary Ekker <gekker@novell.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#ifndef E_CAL_FB_UTIL_H
#define E_CAL_FB_UTIL_H

#include <glib.h>
#include <libxml/tree.h>

G_BEGIN_DECLS

enum publish_frequency{
    URI_PUBLISH_DAILY,
    URI_PUBLISH_WEEKLY,
    URI_PUBLISH_USER
};

static const int pub_frequency_type_map[] = {
    URI_PUBLISH_DAILY,
    URI_PUBLISH_WEEKLY,
    URI_PUBLISH_USER,
    -1
};

struct _EPublishUri {
    gint enabled;
    gchar *location;
    gint publish_freq;
    gchar *username;
    gchar *password;
    GSList *calendars;
    gchar *last_pub_time;
};

typedef struct _EPublishUri EPublishUri;

void e_pub_uri_from_xml (EPublishUri *uri, const gchar *xml);
gchar  *e_pub_uri_to_xml (EPublishUri *uri);
void e_pub_publish (gboolean publish) ;

G_END_DECLS

#endif