Skip to content
Newer
Older
100644 106 lines (88 sloc) 3.08 KB
228af3e @djcb * mu-msg.[ch], mu-msg-file.[ch]: update indentation
authored May 19, 2011
1 /* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/
2
2d0959e @djcb * add mu-msg-file, unit tests
authored Dec 7, 2010
3 /*
4 ** Copyright (C) 2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
5 **
6 ** This program is free software; you can redistribute it and/or modify it
7 ** under the terms of the GNU General Public License as published by the
8 ** Free Software Foundation; either version 3, or (at your option) any
9 ** later version.
10 **
11 ** This program is distributed in the hope that it will be useful,
12 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ** GNU General Public License for more details.
15 **
16 ** You should have received a copy of the GNU General Public License
17 ** along with this program; if not, write to the Free Software Foundation,
18 ** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 **
20 */
21
22 #ifndef __MU_MSG_FILE_H__
23 #define __MU_MSG_FILE_H__
24
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 9, 2011
25 struct _MuMsgFile;
26 typedef struct _MuMsgFile MuMsgFile;
27
f9f3c11 @djcb * mu_msg_file.h, mu_msg.h: documentation improvements
authored May 15, 2011
28 /**
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
29 * create a new message from a file
6a75624 @djcb * MuMsgPart refactoring / cleanups
authored Aug 1, 2012
30 *
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
31 * @param path full path to the message
32 * @param mdir
33 * @param err error to receive (when function returns NULL), or NULL
6a75624 @djcb * MuMsgPart refactoring / cleanups
authored Aug 1, 2012
34 *
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
35 * @return a new MuMsg, or NULL in case of error
36 */
c0a24cf @djcb * mu-msg-*: take mu_msg_cache into use
authored May 14, 2011
37 MuMsgFile *mu_msg_file_new (const char *path,
dbfd08e @djcb * mu-msg-file: improve header file, add some gcc-attributes
authored May 17, 2011
38 const char* mdir, GError **err)
39 G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
40
f9f3c11 @djcb * mu_msg_file.h, mu_msg.h: documentation improvements
authored May 15, 2011
41 /**
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
42 * destroy a MuMsgFile object
43 *
44 * @param self object to destroy, or NULL
45 */
46 void mu_msg_file_destroy (MuMsgFile *self);
47
48
228af3e @djcb * mu-msg.[ch], mu-msg-file.[ch]: update indentation
authored May 19, 2011
49
f9f3c11 @djcb * mu_msg_file.h, mu_msg.h: documentation improvements
authored May 15, 2011
50 /**
603c6be @djcb * mu-msg, mu-msg-file: fix up mu_msg_get_header
authored May 19, 2011
51 * get a specific header
6a75624 @djcb * MuMsgPart refactoring / cleanups
authored Aug 1, 2012
52 *
603c6be @djcb * mu-msg, mu-msg-file: fix up mu_msg_get_header
authored May 19, 2011
53 * @param self a MuMsgFile instance
54 * @param header a header (e.g. 'X-Mailer' or 'List-Id')
6a75624 @djcb * MuMsgPart refactoring / cleanups
authored Aug 1, 2012
55 *
c3391b3 @djcb * lib: cleanups: remove mu-msg-cache (WIP)
authored Aug 8, 2012
56 * @return the value of the header or NULL if not found; free with g_free
603c6be @djcb * mu-msg, mu-msg-file: fix up mu_msg_get_header
authored May 19, 2011
57 */
c3391b3 @djcb * lib: cleanups: remove mu-msg-cache (WIP)
authored Aug 8, 2012
58 char* mu_msg_file_get_header (MuMsgFile *self, const char *header);
603c6be @djcb * mu-msg, mu-msg-file: fix up mu_msg_get_header
authored May 19, 2011
59
60
61 /**
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
62 * get a string value for this message
6a75624 @djcb * MuMsgPart refactoring / cleanups
authored Aug 1, 2012
63 *
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
64 * @param self a valid MuMsgFile
663895f @djcb * add support for GSList* fields to MuMsgDoc and MuMsgFile
authored Jun 15, 2011
65 * @param msfid the message field id to get (must be of type string)
c0a24cf @djcb * mu-msg-*: take mu_msg_cache into use
authored May 14, 2011
66 * @param do_free receives TRUE or FALSE, conveying if this string
f9f3c11 @djcb * mu_msg_file.h, mu_msg.h: documentation improvements
authored May 15, 2011
67 * should be owned & freed (TRUE) or not by caller. In case 'FALSE',
68 * this function should be treated as if it were returning a const
69 * char*, and note that in that case the string is only valid as long
70 * as the MuMsgFile is alive, ie. before mu_msg_file_destroy
6a75624 @djcb * MuMsgPart refactoring / cleanups
authored Aug 1, 2012
71 *
663895f @djcb * add support for GSList* fields to MuMsgDoc and MuMsgFile
authored Jun 15, 2011
72 * @return a string, or NULL
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
73 */
c0a24cf @djcb * mu-msg-*: take mu_msg_cache into use
authored May 14, 2011
74 char* mu_msg_file_get_str_field (MuMsgFile *self,
75 MuMsgFieldId msfid,
dbfd08e @djcb * mu-msg-file: improve header file, add some gcc-attributes
authored May 17, 2011
76 gboolean *do_free)
77 G_GNUC_WARN_UNUSED_RESULT;
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
78
663895f @djcb * add support for GSList* fields to MuMsgDoc and MuMsgFile
authored Jun 15, 2011
79
80 /**
81 * get a string-list value for this message
6a75624 @djcb * MuMsgPart refactoring / cleanups
authored Aug 1, 2012
82 *
663895f @djcb * add support for GSList* fields to MuMsgDoc and MuMsgFile
authored Jun 15, 2011
83 * @param self a valid MuMsgFile
84 * @param msfid the message field id to get (must be of type string-list)
6a75624 @djcb * MuMsgPart refactoring / cleanups
authored Aug 1, 2012
85 *
c3391b3 @djcb * lib: cleanups: remove mu-msg-cache (WIP)
authored Aug 8, 2012
86 * @return a GSList*, or NULL; free with mu_str_free_list
663895f @djcb * add support for GSList* fields to MuMsgDoc and MuMsgFile
authored Jun 15, 2011
87 */
c3391b3 @djcb * lib: cleanups: remove mu-msg-cache (WIP)
authored Aug 8, 2012
88 GSList* mu_msg_file_get_str_list_field (MuMsgFile *self, MuMsgFieldId msfid)
663895f @djcb * add support for GSList* fields to MuMsgDoc and MuMsgFile
authored Jun 15, 2011
89 G_GNUC_WARN_UNUSED_RESULT;
90
91
92
f9f3c11 @djcb * mu_msg_file.h, mu_msg.h: documentation improvements
authored May 15, 2011
93 /**
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
94 * get a numeric value for this message -- the return value should be
95 * cast into the actual type, e.g., time_t, MuMsgPrio etc.
6a75624 @djcb * MuMsgPart refactoring / cleanups
authored Aug 1, 2012
96 *
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
97 * @param self a valid MuMsgFile
98 * @param msfid the message field id to get (must be string-based one)
6a75624 @djcb * MuMsgPart refactoring / cleanups
authored Aug 1, 2012
99 *
50fad7d @djcb * cosmetics
authored Jul 26, 2011
100 * @return the numeric value, or -1 in case of error
53b87a7 @djcb * <many> WIP: refactor mu-msg -- mu-msg-file
authored May 8, 2011
101 */
50fad7d @djcb * cosmetics
authored Jul 26, 2011
102 gint64 mu_msg_file_get_num_field (MuMsgFile *self, MuMsgFieldId mfid);
2d0959e @djcb * add mu-msg-file, unit tests
authored Dec 7, 2010
103
c0a24cf @djcb * mu-msg-*: take mu_msg_cache into use
authored May 14, 2011
104
2d0959e @djcb * add mu-msg-file, unit tests
authored Dec 7, 2010
105 #endif /*__MU_MSG_FILE_H__*/
Something went wrong with that request. Please try again.