Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / providers / groupwise / camel-groupwise-utils.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* 
3  * Copyright (C) 2001 Ximian, Inc.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of version 2 of the GNU Lesser General Public
7  * License as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 #ifndef __CAMEL_GROUPWISE_UTILS__
21 #define __CAMEL_GROUPWISE_UTILS__
22
23 #include <glib.h>
24 #include <camel/camel-mime-message.h>
25 #include <camel/camel-string-utils.h>
26 #include <e-gw-connection.h>
27 #include <e-gw-container.h>
28 #include <e-gw-item.h>
29
30 /*Headers for send options*/
31 #define X_SEND_OPTIONS        "X-gw-send-options"
32 /*General Options*/
33 #define X_SEND_OPT_PRIORITY   "X-gw-send-opt-priority"
34 #define X_SEND_OPT_SECURITY   "X-gw-send-opt-security"
35 #define X_REPLY_CONVENIENT    "X-reply-convenient"
36 #define X_REPLY_WITHIN        "X-reply-within"
37 #define X_EXPIRE_AFTER        "X-expire-after"
38 #define X_DELAY_UNTIL         "X-delay-until"
39
40 /*Status Tracking Options*/
41 #define X_TRACK_WHEN            "X-track-when"
42 #define X_AUTODELETE            "X-auto-delete"
43 #define X_RETURN_NOTIFY_OPEN    "X-return-notify-open"
44 #define X_RETURN_NOTIFY_DELETE  "X-return-notify-delete"
45
46 /* Folder types for source */
47 #define RECEIVED  "Mailbox"
48 #define SENT      "Sent Items"
49 #define DRAFT     ""
50 #define PERSONAL  "Cabinet"
51
52 G_BEGIN_DECLS
53
54 /*for syncing flags back to server*/
55 typedef struct {
56         guint32 changed;
57         guint32 bits;
58 } flags_diff_t;
59
60
61 /* FIXME: deprecated
62    This is used exclusively for the legacy imap cache code.  DO NOT use this in any new code */
63
64 typedef gboolean (*EPathFindFoldersCallback) (const char *physical_path,
65                                               const char *path,
66                                               gpointer user_data);
67
68 char *   e_path_to_physical  (const char *prefix, const char *vpath);
69
70 gboolean e_path_find_folders (const char *prefix,
71                               EPathFindFoldersCallback callback,
72                               gpointer data);
73
74 int      e_path_rmdir        (const char *prefix, const char *vpath);
75
76
77 EGwItem *camel_groupwise_util_item_from_message (EGwConnection *cnc, CamelMimeMessage *message, CamelAddress *from);
78
79 void do_flags_diff (flags_diff_t *diff, guint32 old, guint32 _new);
80 char *gw_concat ( const char *prefix, const char *suffix);
81 void strip_lt_gt (char **string, int s_offset, int e_offset);
82
83 G_END_DECLS
84
85 #endif