Merge branch 'mob' of git+ssh://localhost/srv/git/siplcs into mob
[siplcs.git] / src / core / sipe-ews.h
blob3a65a3d9a87f50f9937cb8a12dce00db07e8e02f
1 /**
2 * @file sipe-ews.h
4 * pidgin-sipe
6 * Copyright (C) 2009 pier11 <pier11@operamail.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include "http-conn.h"
25 /**
26 * Context
28 struct sipe_ews {
29 struct sipe_account_data *sip;
31 int state;
32 char *email;
33 char *legacy_dn;
34 HttpConnAuth *auth;
35 PurpleAccount *account;
36 int auto_disco_method;
37 int is_disabled;
38 int is_updated;
40 char *as_url;
41 char *oof_url;
42 char *oab_url;
44 char *oof_state; /* Enabled, Disabled, Scheduled */
45 char *oof_note;
46 time_t oof_start;
47 time_t oof_end;
48 time_t updated;
49 gboolean published;
51 HttpConn *http_conn;
53 time_t fb_start;
54 /* hex form */
55 char *free_busy;
56 char *working_hours_xml_str;
57 GSList *cal_events;
60 /**
61 * Connects to Exchange 2007/2010 Server's Web Services,
62 * pulls out our Availability and Out-of-Office (OOF) information
63 * and publishes it to Communications server.
65 * Advised schedule: 30 minutes.
67 void
68 sipe_ews_update_calendar(struct sipe_account_data *sip);
70 /**
71 * Returns OOF note if enabled in the moment
72 * otherwise NULL.
74 char *
75 sipe_ews_get_oof_note(struct sipe_ews *ews);
77 /**
78 * Frees context
80 void
81 sipe_ews_free(struct sipe_ews* ews);