Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / servers / groupwise / e-gw-proxy.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* 
3  * Authors : 
4  *  Shreyas Srinivasan <sshreyas@novell.com>
5  *  Sankar P <psankar@novell.com>
6  *
7  * Copyright 2003, Novell, Inc.
8  *
9  * This program is free software; you can redistribute it and/or 
10  * modify it under the terms of version 2 of the GNU Lesser General Public 
11  * License as published by the Free Software Foundation.
12  *
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 Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
21  * USA
22  */
23
24 #ifdef HAVE_CONFIG_H
25 #include <config.h>
26 #endif
27
28 #include <libsoup/soup-soap-message.h>
29
30 /*State of each proxy grant*/
31
32 #define E_GW_PROXY_NEW           (1 << 0)           
33 #define E_GW_PROXY_DELETED       (1 << 1)
34 #define E_GW_PROXY_EDITED           (1 << 2)
35
36 /*Permissions associated with a proxy grant*/
37 #define E_GW_PROXY_MAIL_READ                (1 << 0)           
38 #define E_GW_PROXY_MAIL_WRITE               (1 << 1)
39 #define E_GW_PROXY_APPOINTMENT_READ         (1 << 2)           
40 #define E_GW_PROXY_APPOINTMENT_WRITE        (1 << 3)
41 #define E_GW_PROXY_NOTES_READ               (1 << 4)
42 #define E_GW_PROXY_NOTES_WRITE              (1 << 5)
43 #define E_GW_PROXY_TASK_READ                (1 << 6)
44 #define E_GW_PROXY_TASK_WRITE               (1 << 7)
45 #define E_GW_PROXY_GET_ALARMS               (1 << 8)
46 #define E_GW_PROXY_GET_NOTIFICATIONS        (1 << 9)
47 #define E_GW_PROXY_MODIFY_FOLDERS           (1 << 10)
48 #define E_GW_PROXY_READ_PRIVATE             (1 << 11)
49
50
51 struct _proxyHandler {
52     char *uniqueid;
53     char *proxy_name;
54     char *proxy_email;   
55     guint32 flags;
56     guint32 permissions;
57 };
58
59 typedef struct _proxyHandler proxyHandler;
60
61 void e_gw_proxy_construct_proxy_access_list (SoupSoapParameter *param, GList **proxy_list);
62 void e_gw_proxy_construct_proxy_list (SoupSoapParameter *param, GList **proxy_info);
63 void e_gw_proxy_form_proxy_add_msg (SoupSoapMessage *msg, proxyHandler *new_proxy);
64 void e_gw_proxy_form_proxy_remove_msg (SoupSoapMessage *msg, proxyHandler *removeProxy);
65 void e_gw_proxy_form_modify_proxy_msg (SoupSoapMessage *msg, proxyHandler *new_proxy);
66 void e_gw_proxy_parse_proxy_login_response (SoupSoapParameter *param, int *permissions);
67