1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2001 Ximian, Inc.
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.
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.
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.
20 #ifndef __CAMEL_GROUPWISE_UTILS__
21 #define __CAMEL_GROUPWISE_UTILS__
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>
30 /*Headers for send options*/
31 #define X_SEND_OPTIONS "X-gw-send-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"
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"
46 /* Folder types for source */
47 #define RECEIVED "Mailbox"
48 #define SENT "Sent Items"
50 #define PERSONAL "Cabinet"
54 /*for syncing flags back to server*/
62 This is used exclusively for the legacy imap cache code. DO NOT use this in any new code */
64 typedef gboolean (*EPathFindFoldersCallback) (const char *physical_path,
68 char * e_path_to_physical (const char *prefix, const char *vpath);
70 gboolean e_path_find_folders (const char *prefix,
71 EPathFindFoldersCallback callback,
74 int e_path_rmdir (const char *prefix, const char *vpath);
77 EGwItem *camel_groupwise_util_item_from_message (EGwConnection *cnc, CamelMimeMessage *message, CamelAddress *from);
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);