Updated to the current API 1.0
Showing
14 changed files
with
227 additions
and
212 deletions
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,9 +12,10 @@ | ... | @@ -12,9 +12,10 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _ADDRESS_H | 21 | #ifndef _ADDRESS_H |
... | @@ -33,24 +34,24 @@ class Address | ... | @@ -33,24 +34,24 @@ class Address |
33 | char buf[256]; | 34 | char buf[256]; |
34 | 35 | ||
35 | protected: | 36 | protected: |
36 | address_t addr; | 37 | mu_address_t addr; |
37 | 38 | ||
38 | friend class Mailer; | 39 | friend class Mailer; |
39 | 40 | ||
40 | public: | 41 | public: |
41 | Address (const std::string&); | 42 | Address (const std::string&); |
42 | Address (const address_t); | 43 | Address (const mu_address_t); |
43 | ~Address (); | 44 | ~Address (); |
44 | 45 | ||
45 | size_t GetCount (); | 46 | size_t getCount (); |
46 | bool IsGroup (size_t); | 47 | bool isGroup (size_t); |
47 | 48 | ||
48 | std::string GetEmail (size_t); | 49 | std::string getEmail (size_t); |
49 | std::string GetLocalPart (size_t); | 50 | std::string getLocalPart (size_t); |
50 | std::string GetDomain (size_t); | 51 | std::string getDomain (size_t); |
51 | std::string GetPersonal (size_t); | 52 | std::string getPersonal (size_t); |
52 | std::string GetComments (size_t); | 53 | std::string getComments (size_t); |
53 | std::string GetRoute (size_t); | 54 | std::string getRoute (size_t); |
54 | 55 | ||
55 | // Address Exceptions | 56 | // Address Exceptions |
56 | class EInval : public Exception { | 57 | class EInval : public Exception { | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _ERROR_H | 21 | #ifndef _MUCPP_ERROR_H |
21 | #define _ERROR_H | 22 | #define _MUCPP_ERROR_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <string> | 25 | #include <string> |
... | @@ -30,25 +31,25 @@ namespace mailutils | ... | @@ -30,25 +31,25 @@ namespace mailutils |
30 | class Exception | 31 | class Exception |
31 | { | 32 | { |
32 | protected: | 33 | protected: |
33 | std::string method; | 34 | std::string pmethod; |
34 | std::string msgerr; | 35 | std::string pmsgerr; |
35 | 36 | ||
36 | public: | 37 | public: |
37 | Exception (const std::string m, int s) { | 38 | Exception (const std::string m, int s) { |
38 | method = m; | 39 | pmethod = m; |
39 | msgerr = mu_strerror (s); | 40 | pmsgerr = mu_strerror (s); |
40 | } | 41 | } |
41 | 42 | ||
42 | std::string Method () const { | 43 | std::string method () const { |
43 | return method; | 44 | return pmethod; |
44 | } | 45 | } |
45 | 46 | ||
46 | std::string MsgError () const { | 47 | std::string msgError () const { |
47 | return msgerr; | 48 | return pmsgerr; |
48 | } | 49 | } |
49 | }; | 50 | }; |
50 | 51 | ||
51 | } | 52 | } |
52 | 53 | ||
53 | #endif /* not _ERROR_H */ | 54 | #endif /* not _MUCPP_ERROR_H */ |
54 | 55 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _FILTER_H | 21 | #ifndef _MUCPP_FILTER_H |
21 | #define _FILTER_H | 22 | #define _MUCPP_FILTER_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <mailutils/filter.h> | 25 | #include <mailutils/filter.h> |
... | @@ -33,13 +34,13 @@ class FilterStream : public Stream | ... | @@ -33,13 +34,13 @@ class FilterStream : public Stream |
33 | Stream *input; | 34 | Stream *input; |
34 | 35 | ||
35 | public: | 36 | public: |
36 | void Create (Stream&, const std::string&, int, int); | 37 | void create (Stream&, const std::string&, int, int); |
37 | void IconvCreate (Stream&, const std::string&, | 38 | void iconvCreate (Stream&, const std::string&, |
38 | const std::string&, int, | 39 | const std::string&, int, |
39 | enum mu_iconv_fallback_mode); | 40 | enum mu_iconv_fallback_mode); |
40 | }; | 41 | }; |
41 | 42 | ||
42 | } | 43 | } |
43 | 44 | ||
44 | #endif // not _FILTER_H | 45 | #endif // not _MUCPP_FILTER_H |
45 | 46 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _HEADER_H | 21 | #ifndef _MUCPP_HEADER_H |
21 | #define _HEADER_H | 22 | #define _MUCPP_HEADER_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <string> | 25 | #include <string> |
... | @@ -30,17 +31,17 @@ namespace mailutils | ... | @@ -30,17 +31,17 @@ namespace mailutils |
30 | class Header | 31 | class Header |
31 | { | 32 | { |
32 | protected: | 33 | protected: |
33 | header_t hdr; | 34 | mu_header_t hdr; |
34 | 35 | ||
35 | public: | 36 | public: |
36 | Header (); | 37 | Header (); |
37 | Header (const header_t); | 38 | Header (const mu_header_t); |
38 | 39 | ||
39 | std::string GetValue (const std::string&); | 40 | std::string getValue (const std::string&); |
40 | std::string operator [] (const std::string&); | 41 | std::string operator [] (const std::string&); |
41 | }; | 42 | }; |
42 | 43 | ||
43 | } | 44 | } |
44 | 45 | ||
45 | #endif // not _HEADER_H | 46 | #endif // not _MUCPP_HEADER_H |
46 | 47 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _ITERATOR_H | 21 | #ifndef _MUCPP_ITERATOR_H |
21 | #define _ITERATOR_H | 22 | #define _MUCPP_ITERATOR_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <mailutils/iterator.h> | 25 | #include <mailutils/iterator.h> |
... | @@ -30,25 +31,25 @@ namespace mailutils | ... | @@ -30,25 +31,25 @@ namespace mailutils |
30 | class Iterator | 31 | class Iterator |
31 | { | 32 | { |
32 | protected: | 33 | protected: |
33 | iterator_t mu_iter; | 34 | mu_iterator_t mu_iter; |
34 | List* pList; | 35 | List* pList; |
35 | 36 | ||
36 | public: | 37 | public: |
37 | Iterator (const List&); | 38 | Iterator (const List&); |
38 | Iterator (const iterator_t); | 39 | Iterator (const mu_iterator_t); |
39 | ~Iterator (); | 40 | ~Iterator (); |
40 | 41 | ||
41 | void Dup (Iterator*&, const Iterator&); | 42 | void dup (Iterator*&, const Iterator&); |
42 | void First (); | 43 | void first (); |
43 | void Next (); | 44 | void next (); |
44 | Iterator& operator ++ (int); | 45 | Iterator& operator ++ (int); |
45 | void Current (void**); | 46 | void current (void**); |
46 | void* Current (); | 47 | void* current (); |
47 | bool IsDone (); | 48 | bool isDone (); |
48 | List& GetList (); | 49 | List& getList (); |
49 | }; | 50 | }; |
50 | 51 | ||
51 | } | 52 | } |
52 | 53 | ||
53 | #endif // not _ITERATOR_H | 54 | #endif // not _MUCPP_ITERATOR_H |
54 | 55 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,19 +12,20 @@ | ... | @@ -12,19 +12,20 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _LIST_H | 21 | #ifndef _MUCPP_LIST_H |
21 | #define _LIST_H | 22 | #define _MUCPP_LIST_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <mailutils/list.h> | 25 | #include <mailutils/list.h> |
25 | 26 | ||
26 | typedef int list_action_t (void*, void*); | 27 | typedef int mu_list_action_t (void*, void*); |
27 | typedef int (*list_comparator_t) (const void*, const void*); | 28 | typedef int (*mu_list_comparator_t) (const void*, const void*); |
28 | 29 | ||
29 | namespace mailutils | 30 | namespace mailutils |
30 | { | 31 | { |
... | @@ -32,37 +33,37 @@ namespace mailutils | ... | @@ -32,37 +33,37 @@ namespace mailutils |
32 | class List | 33 | class List |
33 | { | 34 | { |
34 | protected: | 35 | protected: |
35 | list_t mu_list; | 36 | mu_list_t mu_list; |
36 | 37 | ||
37 | friend class Iterator; | 38 | friend class Iterator; |
38 | 39 | ||
39 | public: | 40 | public: |
40 | List (); | 41 | List (); |
41 | List (const list_t); | 42 | List (const mu_list_t); |
42 | ~List (); | 43 | ~List (); |
43 | 44 | ||
44 | void Append (void*); | 45 | void append (void*); |
45 | void Prepend (void*); | 46 | void prepend (void*); |
46 | void Insert (void*, void*); | 47 | void insert (void*, void*, int); |
47 | void Remove (void*); | 48 | void remove (void*); |
48 | void Replace (void*, void*); | 49 | void replace (void*, void*); |
49 | 50 | ||
50 | void Get (size_t, void**); | 51 | void get (size_t, void**); |
51 | void* Get (size_t); | 52 | void* get (size_t); |
52 | void* operator [] (size_t); | 53 | void* operator [] (size_t); |
53 | 54 | ||
54 | void ToArray (void**, size_t, size_t*); | 55 | void toArray (void**, size_t, size_t*); |
55 | void Locate (void*, void**); | 56 | void locate (void*, void**); |
56 | 57 | ||
57 | void Do (list_action_t*, void*); | 58 | void apply (mu_list_action_t*, void*); |
58 | list_comparator_t SetComparator (list_comparator_t); | 59 | mu_list_comparator_t setComparator (mu_list_comparator_t); |
59 | void SetDestroyItem (void (*destoy_item) (void *)); | 60 | void setDestroyItem (void (*mu_destoy_item) (void *)); |
60 | 61 | ||
61 | bool IsEmpty (); | 62 | bool isEmpty (); |
62 | size_t Count (); | 63 | size_t count (); |
63 | }; | 64 | }; |
64 | 65 | ||
65 | } | 66 | } |
66 | 67 | ||
67 | #endif // not _LIST_H | 68 | #endif // not _MUCPP_LIST_H |
68 | 69 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _MAILBOX_H | 21 | #ifndef _MUCPP_MAILBOX_H |
21 | #define _MAILBOX_H | 22 | #define _MUCPP_MAILBOX_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <mailutils/mailbox.h> | 25 | #include <mailutils/mailbox.h> |
... | @@ -30,14 +31,14 @@ namespace mailutils | ... | @@ -30,14 +31,14 @@ namespace mailutils |
30 | class MailboxBase | 31 | class MailboxBase |
31 | { | 32 | { |
32 | protected: | 33 | protected: |
33 | mailbox_t mbox; | 34 | mu_mailbox_t mbox; |
34 | 35 | ||
35 | public: | 36 | public: |
36 | void Open (int); | 37 | void open (int); |
37 | void Close (); | 38 | void close (); |
38 | 39 | ||
39 | size_t MessagesCount (); | 40 | size_t messagesCount (); |
40 | Message& GetMessage (size_t); | 41 | Message& getMessage (size_t); |
41 | Message& operator [] (size_t); | 42 | Message& operator [] (size_t); |
42 | }; | 43 | }; |
43 | 44 | ||
... | @@ -45,7 +46,7 @@ class Mailbox : public MailboxBase | ... | @@ -45,7 +46,7 @@ class Mailbox : public MailboxBase |
45 | { | 46 | { |
46 | public: | 47 | public: |
47 | Mailbox (const std::string&); | 48 | Mailbox (const std::string&); |
48 | Mailbox (const mailbox_t); | 49 | Mailbox (const mu_mailbox_t); |
49 | ~Mailbox (); | 50 | ~Mailbox (); |
50 | }; | 51 | }; |
51 | 52 | ||
... | @@ -53,11 +54,11 @@ class MailboxDefault : public MailboxBase | ... | @@ -53,11 +54,11 @@ class MailboxDefault : public MailboxBase |
53 | { | 54 | { |
54 | public: | 55 | public: |
55 | MailboxDefault (const std::string&); | 56 | MailboxDefault (const std::string&); |
56 | MailboxDefault (const mailbox_t); | 57 | MailboxDefault (const mu_mailbox_t); |
57 | ~MailboxDefault (); | 58 | ~MailboxDefault (); |
58 | }; | 59 | }; |
59 | 60 | ||
60 | } | 61 | } |
61 | 62 | ||
62 | #endif /* not _MAILBOX_H */ | 63 | #endif /* not _MUCPP_MAILBOX_H */ |
63 | 64 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _MAILCAP_H | 21 | #ifndef _MUCPP_MAILCAP_H |
21 | #define _MAILCAP_H | 22 | #define _MUCPP_MAILCAP_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <mailutils/mailcap.h> | 25 | #include <mailutils/mailcap.h> |
... | @@ -38,10 +39,10 @@ class MailcapEntry | ... | @@ -38,10 +39,10 @@ class MailcapEntry |
38 | public: | 39 | public: |
39 | MailcapEntry (mu_mailcap_entry_t); | 40 | MailcapEntry (mu_mailcap_entry_t); |
40 | 41 | ||
41 | size_t FieldsCount (); | 42 | size_t fieldsCount (); |
42 | std::string GetTypeField (); | 43 | std::string getTypeField (); |
43 | std::string GetViewCommand (); | 44 | std::string getViewCommand (); |
44 | std::string GetField (size_t); | 45 | std::string getField (size_t); |
45 | }; | 46 | }; |
46 | 47 | ||
47 | class Mailcap | 48 | class Mailcap |
... | @@ -54,11 +55,11 @@ class Mailcap | ... | @@ -54,11 +55,11 @@ class Mailcap |
54 | Mailcap (const mu_mailcap_t); | 55 | Mailcap (const mu_mailcap_t); |
55 | ~Mailcap (); | 56 | ~Mailcap (); |
56 | 57 | ||
57 | size_t GetCount (); | 58 | size_t getCount (); |
58 | MailcapEntry& GetEntry (size_t); | 59 | MailcapEntry& getEntry (size_t); |
59 | }; | 60 | }; |
60 | 61 | ||
61 | } | 62 | } |
62 | 63 | ||
63 | #endif // not _MAILCAP_H | 64 | #endif // not _MUCPP_MAILCAP_H |
64 | 65 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _MAILER_H | 21 | #ifndef _MUCPP_MAILER_H |
21 | #define _MAILER_H | 22 | #define _MUCPP_MAILER_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <string> | 25 | #include <string> |
... | @@ -32,19 +33,19 @@ namespace mailutils | ... | @@ -32,19 +33,19 @@ namespace mailutils |
32 | class Mailer | 33 | class Mailer |
33 | { | 34 | { |
34 | protected: | 35 | protected: |
35 | mailer_t mailer; | 36 | mu_mailer_t mailer; |
36 | 37 | ||
37 | public: | 38 | public: |
38 | Mailer (const std::string&); | 39 | Mailer (const std::string&); |
39 | Mailer (const mailer_t); | 40 | Mailer (const mu_mailer_t); |
40 | ~Mailer (); | 41 | ~Mailer (); |
41 | 42 | ||
42 | void Open (int); | 43 | void open (int); |
43 | void Close (); | 44 | void close (); |
44 | void SendMessage (const Message&, const Address&, const Address&); | 45 | void sendMessage (const Message&, const Address&, const Address&); |
45 | }; | 46 | }; |
46 | 47 | ||
47 | } | 48 | } |
48 | 49 | ||
49 | #endif // not _MAILER_H | 50 | #endif // not _MUCPP_MAILER_H |
50 | 51 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,9 +12,10 @@ | ... | @@ -12,9 +12,10 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #include <mailutils/cpp/address.h> | 21 | #include <mailutils/cpp/address.h> | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _MESSAGE_H | 21 | #ifndef _MUCPP_MESSAGE_H |
21 | #define _MESSAGE_H | 22 | #define _MUCPP_MESSAGE_H |
22 | 23 | ||
23 | #include <mailutils/message.h> | 24 | #include <mailutils/message.h> |
24 | #include <mailutils/cpp/header.h> | 25 | #include <mailutils/cpp/header.h> |
... | @@ -29,18 +30,18 @@ namespace mailutils | ... | @@ -29,18 +30,18 @@ namespace mailutils |
29 | class Message | 30 | class Message |
30 | { | 31 | { |
31 | protected: | 32 | protected: |
32 | message_t msg; | 33 | mu_message_t msg; |
33 | 34 | ||
34 | friend class Mailer; | 35 | friend class Mailer; |
35 | 36 | ||
36 | public: | 37 | public: |
37 | Message (); | 38 | Message (); |
38 | Message (const message_t); | 39 | Message (const mu_message_t); |
39 | 40 | ||
40 | Header& GetHeader (); | 41 | Header& getHeader (); |
41 | }; | 42 | }; |
42 | 43 | ||
43 | } | 44 | } |
44 | 45 | ||
45 | #endif // not _MESSAGE_H | 46 | #endif // not _MUCPP_MESSAGE_H |
46 | 47 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,17 +12,19 @@ | ... | @@ -12,17 +12,19 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _POP3_H | 21 | #ifndef _MUCPP_POP3_H |
21 | #define _POP3_H | 22 | #define _MUCPP_POP3_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <mailutils/pop3.h> | 25 | #include <mailutils/pop3.h> |
25 | #include <mailutils/cpp/list.h> | 26 | #include <mailutils/cpp/list.h> |
27 | #include <mailutils/cpp/iterator.h> | ||
26 | #include <mailutils/cpp/stream.h> | 28 | #include <mailutils/cpp/stream.h> |
27 | 29 | ||
28 | namespace mailutils | 30 | namespace mailutils |
... | @@ -39,34 +41,34 @@ class Pop3 | ... | @@ -39,34 +41,34 @@ class Pop3 |
39 | Pop3 (const mu_pop3_t); | 41 | Pop3 (const mu_pop3_t); |
40 | ~Pop3 (); | 42 | ~Pop3 (); |
41 | 43 | ||
42 | void SetCarrier (const Stream&); | 44 | void setCarrier (const Stream&); |
43 | Stream& GetCarrier (); | 45 | Stream& getCarrier (); |
44 | void Connect (); | 46 | void connect (); |
45 | void Disconnect (); | 47 | void disconnect (); |
46 | void SetTimeout (int); | 48 | void setTimeout (int); |
47 | int GetTimeout (); | 49 | int getTimeout (); |
48 | 50 | ||
49 | void Stls (); | 51 | void stls (); |
50 | Iterator& Capa (); | 52 | Iterator& capa (); |
51 | void Dele (unsigned int); | 53 | void dele (unsigned int); |
52 | size_t List (unsigned int); | 54 | size_t list (unsigned int); |
53 | Iterator& ListAll (); | 55 | Iterator& listAll (); |
54 | void Noop (); | 56 | void noop (); |
55 | void Pass (const char*); | 57 | void pass (const char*); |
56 | void Quit (); | 58 | void quit (); |
57 | Stream& Retr (unsigned int); | 59 | Stream& retr (unsigned int); |
58 | void Rset (); | 60 | void rset (); |
59 | void Stat (unsigned int*, size_t*); | 61 | void stat (unsigned int*, size_t*); |
60 | Stream& Top (unsigned int, unsigned int); | 62 | Stream& top (unsigned int, unsigned int); |
61 | void User (const char*); | 63 | void user (const char*); |
62 | 64 | ||
63 | size_t ReadLine (char*, size_t); | 65 | size_t readLine (char*, size_t); |
64 | size_t Response (char*, size_t); | 66 | size_t response (char*, size_t); |
65 | void SendLine (const char*); | 67 | void sendLine (const char*); |
66 | void Send (); | 68 | void send (); |
67 | }; | 69 | }; |
68 | 70 | ||
69 | } | 71 | } |
70 | 72 | ||
71 | #endif // not _POP3_H | 73 | #endif // not _MUCPP_POP3_H |
72 | 74 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _STREAM_H | 21 | #ifndef _MUCPP_STREAM_H |
21 | #define _STREAM_H | 22 | #define _MUCPP_STREAM_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <string> | 25 | #include <string> |
... | @@ -32,7 +33,7 @@ namespace mailutils | ... | @@ -32,7 +33,7 @@ namespace mailutils |
32 | class Stream | 33 | class Stream |
33 | { | 34 | { |
34 | protected: | 35 | protected: |
35 | stream_t stm; | 36 | mu_stream_t stm; |
36 | size_t readn; | 37 | size_t readn; |
37 | size_t writen; | 38 | size_t writen; |
38 | int wflags; | 39 | int wflags; |
... | @@ -56,26 +57,26 @@ class Stream | ... | @@ -56,26 +57,26 @@ class Stream |
56 | public: | 57 | public: |
57 | Stream (); | 58 | Stream (); |
58 | Stream (Stream& s); | 59 | Stream (Stream& s); |
59 | Stream (const stream_t); | 60 | Stream (const mu_stream_t); |
60 | ~Stream (); | 61 | ~Stream (); |
61 | 62 | ||
62 | void Open (); | 63 | void open (); |
63 | void Close (); | 64 | void close (); |
64 | void SetWaitFlags (int); | 65 | void setWaitFlags (int); |
65 | void Wait (); // timeval is missing | 66 | void wait (); // timeval is missing |
66 | void Wait (int); // timeval is missing | 67 | void wait (int); // timeval is missing |
67 | void Read (char*, size_t, off_t); | 68 | void read (char*, size_t, off_t); |
68 | void Write (const std::string&, size_t, off_t); | 69 | void write (const std::string&, size_t, off_t); |
69 | void ReadLine (char*, size_t, off_t); | 70 | void readLine (char*, size_t, off_t); |
70 | void SequentialReadLine (char*, size_t); | 71 | void sequentialReadLine (char*, size_t); |
71 | void SequentialWrite (const std::string&, size_t); | 72 | void sequentialWrite (const std::string&, size_t); |
72 | void Flush (); | 73 | void flush (); |
73 | 74 | ||
74 | // Inlines | 75 | // Inlines |
75 | size_t GetReadn () const { | 76 | size_t getReadn () const { |
76 | return readn; | 77 | return readn; |
77 | }; | 78 | }; |
78 | size_t GetWriten () const { | 79 | size_t getWriten () const { |
79 | return writen; | 80 | return writen; |
80 | }; | 81 | }; |
81 | 82 | ||
... | @@ -124,5 +125,5 @@ class FilterProgStream : public Stream | ... | @@ -124,5 +125,5 @@ class FilterProgStream : public Stream |
124 | 125 | ||
125 | } | 126 | } |
126 | 127 | ||
127 | #endif // not _STREAM_H | 128 | #endif // not _MUCPP_STREAM_H |
128 | 129 | ... | ... |
1 | /* | 1 | /* |
2 | GNU Mailutils -- a suite of utilities for electronic mail | 2 | GNU Mailutils -- a suite of utilities for electronic mail |
3 | Copyright (C) 2004 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General |
16 | License along with this library; if not, write to the Free Software | 16 | Public License along with this library; if not, write to the |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301 USA | ||
18 | */ | 19 | */ |
19 | 20 | ||
20 | #ifndef _URL_H | 21 | #ifndef _MUCPP_URL_H |
21 | #define _URL_H | 22 | #define _MUCPP_URL_H |
22 | 23 | ||
23 | #include <iostream> | 24 | #include <iostream> |
24 | #include <string> | 25 | #include <string> |
... | @@ -33,26 +34,26 @@ class Url | ... | @@ -33,26 +34,26 @@ class Url |
33 | char buf[1024]; | 34 | char buf[1024]; |
34 | 35 | ||
35 | protected: | 36 | protected: |
36 | url_t url; | 37 | mu_url_t url; |
37 | 38 | ||
38 | public: | 39 | public: |
39 | Url (const std::string&); | 40 | Url (const std::string&); |
40 | Url (const char*); | 41 | Url (const char*); |
41 | Url (const url_t); | 42 | Url (const mu_url_t); |
42 | ~Url (); | 43 | ~Url (); |
43 | 44 | ||
44 | void Parse (); | 45 | void parse (); |
45 | long GetPort (); | 46 | long getPort (); |
46 | std::string GetScheme (); | 47 | std::string getScheme (); |
47 | std::string GetUser (); | 48 | std::string getUser (); |
48 | std::string GetPasswd (); | 49 | std::string getPasswd (); |
49 | std::string GetAuth (); | 50 | std::string getAuth (); |
50 | std::string GetHost (); | 51 | std::string getHost (); |
51 | std::string GetPath (); | 52 | std::string getPath (); |
52 | std::string GetQuery (); | 53 | std::string getQuery (); |
53 | }; | 54 | }; |
54 | 55 | ||
55 | } | 56 | } |
56 | 57 | ||
57 | #endif // not _URL_H | 58 | #endif // not _MUCPP_URL_H |
58 | 59 | ... | ... |
-
Please register or sign in to post a comment