core cleanup: sipe-csta module is purple free
[siplcs.git] / src / core / sipe-ews.h
blobb1c6bc873107451ec1859d558d6d0eca1b483ba1
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
24 * Interface dependencies:
26 * <time.h>
27 * <glib.h>
30 /* Forward declarations */
31 struct http_conn_auth;
32 struct http_conn_struct;
33 struct sipe_account_data;
34 struct _PurpleAccount;
36 /**
37 * Context
39 struct sipe_ews {
40 struct sipe_account_data *sip;
42 int state;
43 char *email;
44 char *legacy_dn;
45 struct http_conn_auth *auth;
46 struct _PurpleAccount *account;
47 int auto_disco_method;
48 int is_disabled;
49 int is_updated;
51 char *as_url;
52 char *oof_url;
53 char *oab_url;
55 char *oof_state; /* Enabled, Disabled, Scheduled */
56 char *oof_note;
57 time_t oof_start;
58 time_t oof_end;
59 time_t updated;
60 gboolean published;
62 struct http_conn_struct *http_conn;
64 time_t fb_start;
65 /* hex form */
66 char *free_busy;
67 char *working_hours_xml_str;
68 GSList *cal_events;
71 /**
72 * Connects to Exchange 2007/2010 Server's Web Services,
73 * pulls out our Availability and Out-of-Office (OOF) information
74 * and publishes it to Communications server.
76 * Advised schedule: 30 minutes.
78 void
79 sipe_ews_update_calendar(struct sipe_account_data *sip);
81 /**
82 * Returns OOF note if enabled in the moment
83 * otherwise NULL.
85 char *
86 sipe_ews_get_oof_note(struct sipe_ews *ews);
88 /**
89 * Frees context
91 void
92 sipe_ews_free(struct sipe_ews* ews);