1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
4 * JP Rosevear <jpr@ximian.com>
5 * Rodrigo Moya <rodrigo@ximian.com>
7 * Copyright 2003, Novell, Inc.
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.
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.
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
24 #ifndef E_GW_CONTAINER_H
25 #define E_GW_CONTAINER_H
27 #include <libsoup/soup-soap-response.h>
28 #include <libsoup/soup-soap-message.h>
32 #define E_TYPE_GW_CONTAINER (e_gw_container_get_type ())
33 #define E_GW_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_GW_CONTAINER, EGwContainer))
34 #define E_GW_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_GW_CONTAINER, EGwContainerClass))
35 #define E_IS_GW_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_GW_CONTAINER))
36 #define E_IS_GW_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_GW_CONTAINER))
38 typedef struct _EShUsers EShUsers;
39 typedef struct _EGwContainer EGwContainer;
40 typedef struct _EGwContainerClass EGwContainerClass;
41 typedef struct _EGwContainerPrivate EGwContainerPrivate;
43 struct _EGwContainer {
45 EGwContainerPrivate *priv;
48 struct _EGwContainerClass {
49 GObjectClass parent_class;
58 E_GW_CONTAINER_TYPE_ROOT,
59 E_GW_CONTAINER_TYPE_INBOX,
60 E_GW_CONTAINER_TYPE_SENT,
61 E_GW_CONTAINER_TYPE_CALENDAR,
62 E_GW_CONTAINER_TYPE_CONTACTS,
63 E_GW_CONTAINER_TYPE_DOCUMENTS,
64 E_GW_CONTAINER_TYPE_QUERY,
65 E_GW_CONTAINER_TYPE_CHECKLIST,
66 E_GW_CONTAINER_TYPE_DRAFT,
67 E_GW_CONTAINER_TYPE_CABINET,
68 E_GW_CONTAINER_TYPE_TRASH,
69 E_GW_CONTAINER_TYPE_JUNK,
70 E_GW_CONTAINER_TYPE_FOLDER
74 GType e_gw_container_get_type (void);
75 EGwContainer *e_gw_container_new_from_soap_parameter (SoupSoapParameter *param);
76 gboolean e_gw_container_set_from_soap_parameter (EGwContainer *container,
77 SoupSoapParameter *param);
78 const char *e_gw_container_get_name (EGwContainer *container);
79 void e_gw_container_set_name (EGwContainer *container, const char *new_name);
80 const char *e_gw_container_get_id (EGwContainer *container);
81 void e_gw_container_set_id (EGwContainer *container, const char *new_id);
82 const char *e_gw_container_get_parent_id (EGwContainer *container) ;
83 void e_gw_container_set_parent_id (EGwContainer *container, const char *parent_id) ;
84 guint32 e_gw_container_get_total_count (EGwContainer *container) ;
85 guint32 e_gw_container_get_unread_count (EGwContainer *container) ;
86 gboolean e_gw_container_get_is_writable (EGwContainer *container);
87 void e_gw_container_set_is_writable (EGwContainer *container, gboolean writable);
88 gboolean e_gw_container_get_is_frequent_contacts (EGwContainer *container);
89 void e_gw_container_set_is_frequent_contacts (EGwContainer *container, gboolean is_frequent_contacts);
90 gboolean e_gw_container_is_root (EGwContainer *container) ;
91 const char * e_gw_container_get_owner(EGwContainer *container);
92 const char * e_gw_container_get_modified(EGwContainer *container);
93 int e_gw_container_get_sequence(EGwContainer *container);
94 gboolean e_gw_container_get_is_shared_by_me(EGwContainer *container);
95 gboolean e_gw_container_get_is_shared_to_me(EGwContainer *container);
96 int e_gw_container_get_rights(EGwContainer *container, gchar *email);
97 EGwContainerType e_gw_container_get_container_type (EGwContainer *container) ;
98 void e_gw_container_get_user_list(EGwContainer *container, GList **user_list);
99 void e_gw_container_form_message (SoupSoapMessage *msg, gchar *id, GList *new_list, const char *sub, const char *mesg, int flag);