├── AUTHORS ├── src ├── low-level │ ├── mbox │ │ ├── TODO │ │ ├── Makefile.am │ │ └── mailmbox_parse.h │ ├── smtp │ │ ├── TODO │ │ ├── mailsmtp_private.h │ │ ├── mailsmtp_oauth2.h │ │ └── Makefile.am │ ├── feed │ │ ├── date.c │ │ ├── date.h │ │ ├── parser_rss20.h │ │ ├── parser_atom03.h │ │ ├── parser_atom10.h │ │ ├── parser.h │ │ ├── parser_rdf.h │ │ └── newsfeed_private.h │ ├── imap │ │ ├── TODO │ │ ├── namespace_sender.c │ │ ├── namespace_sender.h │ │ ├── clientid_sender.h │ │ ├── uidplus_sender.h │ │ ├── quota_sender.h │ │ ├── mailimap_id_sender.h │ │ ├── mailimap_print.h │ │ ├── xgmmsgid.h │ │ ├── xgmthrid.h │ │ ├── quota_parser.h │ │ └── enable.h │ ├── mime │ │ └── TODO │ ├── imf │ │ ├── TODO │ │ └── Makefile.am │ ├── mh │ │ └── Makefile.am │ ├── maildir │ │ └── Makefile.am │ ├── nntp │ │ ├── Makefile.am │ │ └── newsnntp_socket.h │ ├── pop3 │ │ └── Makefile.am │ └── Makefile.am ├── data-types │ ├── carray.c │ ├── carray.h │ ├── chash.c │ ├── chash.h │ ├── clist.c │ ├── clist.h │ ├── mailsasl_private.h │ ├── timeutils.h │ ├── mailstream_cancel_types.h │ ├── mmapstring_private.h │ ├── mailstream_ssl_private.h │ ├── mailsasl.h │ ├── mail.h │ ├── mail_cache_db_types.h │ ├── md5namespace.h │ ├── maillock.h │ ├── mailsem.h │ └── mailstream_cancel.h ├── driver │ ├── TODO │ ├── Makefile.am │ ├── implementation │ │ ├── data-message │ │ │ └── Makefile.am │ │ ├── hotmail │ │ │ └── Makefile.am │ │ ├── mime-message │ │ │ ├── Makefile.am │ │ │ └── mime_message_driver.h │ │ ├── mh │ │ │ ├── mhdriver.h │ │ │ ├── mhdriver_cached.h │ │ │ ├── mhdriver_message.h │ │ │ └── mhdriver_cached_message.h │ │ ├── feed │ │ │ ├── feeddriver.h │ │ │ ├── feeddriver_message.h │ │ │ └── Makefile.am │ │ ├── imap │ │ │ ├── imapdriver.h │ │ │ ├── imapdriver_message.h │ │ │ ├── imapdriver_cached.h │ │ │ └── imapdriver_cached_message.h │ │ ├── mbox │ │ │ ├── mboxdriver.h │ │ │ ├── mboxdriver_message.h │ │ │ ├── mboxdriver_cached_message.h │ │ │ └── mboxdriver_cached.h │ │ ├── nntp │ │ │ ├── nntpdriver.h │ │ │ ├── nntpdriver_message.h │ │ │ ├── nntpdriver_cached.h │ │ │ └── nntpdriver_cached_message.h │ │ ├── pop3 │ │ │ ├── pop3driver.h │ │ │ ├── pop3driver_message.h │ │ │ ├── pop3driver_cached.h │ │ │ └── pop3driver_cached_message.h │ │ ├── db │ │ │ ├── dbdriver_message.h │ │ │ ├── dbdriver.h │ │ │ └── Makefile.am │ │ ├── maildir │ │ │ ├── maildirdriver_message.h │ │ │ ├── maildirdriver.h │ │ │ ├── maildirdriver_cached_message.h │ │ │ └── maildirdriver_cached.h │ │ └── Makefile.am │ ├── interface │ │ └── mailmessage_types.h │ └── tools │ │ ├── generic_cache_types.h │ │ └── Makefile.am ├── dummy.cpp ├── bsd │ └── Makefile.am ├── windows │ ├── Makefile.am │ ├── time_r.c │ ├── dirent.c │ ├── misc.c │ └── mmap.c ├── versioninfo.rc.in ├── main │ ├── libetpan_version.c │ ├── libetpan_version.h.in │ └── Makefile.am └── engine │ ├── mailprivacy_tools_private.h │ └── Makefile.am ├── m4 └── README ├── ChangeLog ├── .travis.yml ├── travis ├── before-script.sh └── script.sh ├── libetpan.pc.in ├── tests ├── frm-common.h ├── option-parser.h ├── readmsg-common.h ├── pop-sample.c └── README ├── libetpan-config.h.in ├── doc ├── depend.dot └── layer.fig ├── COPYRIGHT ├── include └── Makefile.am └── README.md /AUTHORS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/low-level/mbox/TODO: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/low-level/smtp/TODO: -------------------------------------------------------------------------------- 1 | - STARTTLS 2 | -------------------------------------------------------------------------------- /m4/README: -------------------------------------------------------------------------------- 1 | This folder must exist so that a README file is here. 2 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dinhvh/libetpan/HEAD/ChangeLog -------------------------------------------------------------------------------- /src/data-types/carray.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dinhvh/libetpan/HEAD/src/data-types/carray.c -------------------------------------------------------------------------------- /src/data-types/carray.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dinhvh/libetpan/HEAD/src/data-types/carray.h -------------------------------------------------------------------------------- /src/data-types/chash.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dinhvh/libetpan/HEAD/src/data-types/chash.c -------------------------------------------------------------------------------- /src/data-types/chash.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dinhvh/libetpan/HEAD/src/data-types/chash.h -------------------------------------------------------------------------------- /src/data-types/clist.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dinhvh/libetpan/HEAD/src/data-types/clist.c -------------------------------------------------------------------------------- /src/data-types/clist.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dinhvh/libetpan/HEAD/src/data-types/clist.h -------------------------------------------------------------------------------- /src/low-level/feed/date.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dinhvh/libetpan/HEAD/src/low-level/feed/date.c -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | os: 2 | - osx 3 | - linux 4 | language: c 5 | before_script: travis/before-script.sh 6 | script: travis/script.sh 7 | -------------------------------------------------------------------------------- /src/low-level/imap/TODO: -------------------------------------------------------------------------------- 1 | - literal data send progress 2 | - implement draft-16 (rfc 2822 things) 3 | - more efficient parser 4 | 5 | -------------------------------------------------------------------------------- /travis/before-script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if test "x`uname`" = xLinux ; then 5 | sudo apt-get install libsasl2-dev libssl-dev zlib1g-dev 6 | fi 7 | -------------------------------------------------------------------------------- /src/low-level/mime/TODO: -------------------------------------------------------------------------------- 1 | - see about the RFC2047, beginning in mailmime_decode.[ch] 2 | - content-langage 3 | - single mime_field 4 | - RFC 2048 5 | - RFC 2049 6 | - RFC 2231 7 | - RFC 2387 8 | - RFC 2424 9 | - RFC 2557 10 | 11 | -------------------------------------------------------------------------------- /src/data-types/mailsasl_private.h: -------------------------------------------------------------------------------- 1 | #ifndef MAILSASL_PRIVATE_H 2 | 3 | #define MAILSASL_PRIVATE_H 4 | 5 | #ifdef __cplusplus 6 | extern"C"{ 7 | #endif 8 | 9 | extern void mailsasl_init_lock(void); 10 | 11 | extern void mailsasl_uninit_lock(void); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | 18 | #endif -------------------------------------------------------------------------------- /libetpan.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | includedir=@includedir@ 4 | libdir=@libdir@ 5 | 6 | Name: libetpan 7 | Description: Libetpan C library. 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -letpan@LIBSUFFIX@ @SSLLIBS@ @GNUTLSLIB@ @LIBICONV@ @DBLIB@ @LIBS@ @SASLLIBS@ 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /tests/frm-common.h: -------------------------------------------------------------------------------- 1 | #ifndef FRM_COMMON_H 2 | 3 | #define FRM_COMMON_H 4 | 5 | #include 6 | 7 | void get_from_value(struct mailimf_single_fields * fields, 8 | char ** from, int * is_addr); 9 | 10 | void strip_crlf(char * str); 11 | 12 | void print_mail_info(char * prefix, mailmessage * msg); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/driver/TODO: -------------------------------------------------------------------------------- 1 | - get_message_list() will disconnect and reconnect POP3 box 2 | - add UID to non-cached drivers, help clients to recognize messages 3 | - move IMAP UID cache to non-cached driver 4 | - fix message size (put it in cache) 5 | - XXX : fetch body in nntp do not use generic_fetch_body 6 | - add flags prototype to add or remove flags 7 | - cache bodystructures 8 | - search is not implemented 9 | - list of folder new implementation 10 | -------------------------------------------------------------------------------- /src/low-level/imf/TODO: -------------------------------------------------------------------------------- 1 | - define a EP_parserstate_s 2 | - remove clist usage 3 | - add a errorcode to string function 4 | - error codes are EP_errornr_s 5 | - prefix everything with EP_ 6 | - mailimf_dot_atom_text_free 7 | - mailimf_address_XX -> _new(void) _init(&addr, ...) _free(addr) 8 | - in fact that data structure should then also contain a 9 | 'dynamically' allocated flag 10 | 11 | - RFC 822 : test the examples 12 | - RFC 2822 : obsolete syntax 13 | -------------------------------------------------------------------------------- /tests/option-parser.h: -------------------------------------------------------------------------------- 1 | #ifndef OPTION_PARSER 2 | 3 | #define OPTION_PARSER 4 | 5 | #include 6 | 7 | enum { 8 | POP3_STORAGE = 0, 9 | IMAP_STORAGE, 10 | NNTP_STORAGE, 11 | MBOX_STORAGE, 12 | MH_STORAGE, 13 | MAILDIR_STORAGE, 14 | FEED_STORAGE 15 | }; 16 | 17 | int parse_options(int argc, char ** argv, 18 | int * driver, 19 | char ** server, int * port, int * connection_type, 20 | char ** user, char ** password, int * auth_type, bool * xoauth2, 21 | char ** path, char ** cache_directory, 22 | char ** flags_directory); 23 | 24 | int init_storage(struct mailstorage * storage, 25 | int driver, const char * server, int port, 26 | int connection_type, const char * user, const char * password, int auth_type, bool xoauth2, 27 | const char * path, const char * cache_directory, const char * flags_directory); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /tests/readmsg-common.h: -------------------------------------------------------------------------------- 1 | #ifndef READMSG_COMMON_H 2 | 3 | #define READMSG_COMMON_H 4 | 5 | #include 6 | 7 | #define DEST_CHARSET "iso-8859-1" 8 | 9 | enum { 10 | /* SEB */ 11 | #ifndef NO_ERROR 12 | NO_ERROR, 13 | #endif 14 | ERROR_FILE = 1, 15 | ERROR_MEMORY = 2, 16 | ERROR_INVAL = 3, 17 | ERROR_FETCH = 4 18 | }; 19 | 20 | int etpan_mime_is_text(struct mailmime * build_info); 21 | 22 | int show_part_info(FILE * f, 23 | struct mailmime_single_fields * mime_fields, 24 | struct mailmime_content * content); 25 | 26 | int etpan_fetch_message(mailmessage * msg_info, 27 | struct mailmime * mime_part, 28 | struct mailmime_single_fields * fields, 29 | char ** result, size_t * result_len); 30 | 31 | struct mailimf_fields * fetch_fields(mailmessage * msg_info, 32 | struct mailmime * mime); 33 | 34 | int fields_write(FILE * f, int * col, 35 | struct mailimf_fields * fields); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /libetpan-config.h.in: -------------------------------------------------------------------------------- 1 | @ifndef LIBETPAN_CONFIG_H 2 | 3 | @define LIBETPAN_CONFIG_H 4 | 5 | #ifndef CONFIG_H 6 | #define CONFIG_H 7 | #include "config.h" 8 | #endif 9 | @if WIN32 10 | @ define MMAP_UNAVAILABLE 11 | @endif 12 | @ifdef _MSC_VER 13 | @ define inline __inline 14 | @endif 15 | #ifdef HAVE_LIMITS_H 16 | @include 17 | #endif 18 | @ifndef PATH_MAX 19 | @define PATH_MAX 4096 20 | @endif 21 | #ifdef HAVE_SYS_PARAM_H 22 | /* support for ARM platforms with a 2.95.3 arm-gcc suite */ 23 | @include 24 | #endif 25 | #if HAVE_INTTYPES_H 26 | @include 27 | #endif 28 | 29 | @define MAIL_DIR_SEPARATOR '/' 30 | 31 | @define MAIL_DIR_SEPARATOR_S "/" 32 | 33 | @ifdef _MSC_VER 34 | @ ifdef LIBETPAN_DLL 35 | @ define LIBETPAN_EXPORT __declspec(dllexport) 36 | @ else 37 | @ define LIBETPAN_EXPORT __declspec(dllimport) 38 | @ endif 39 | @else 40 | @ define LIBETPAN_EXPORT 41 | @endif 42 | 43 | @endif 44 | -------------------------------------------------------------------------------- /doc/depend.dot: -------------------------------------------------------------------------------- 1 | digraph "etPan! library" { 2 | mime -> imf; 3 | 4 | "session/message" -> imf; 5 | "session/message" -> mime; 6 | 7 | "storage/folder" -> "session/message"; 8 | } 9 | 10 | digraph "imap driver" { 11 | "imap driver" -> imap; 12 | "imap driver" -> imf; 13 | "imap driver" -> mime; 14 | "imap driver" -> "session/message"; 15 | 16 | mime -> imf; 17 | } 18 | 19 | digraph "mbox driver" { 20 | "mbox driver" -> mbox; 21 | "mbox driver" -> imf; 22 | "mbox driver" -> mime; 23 | "mbox driver" -> "session/message"; 24 | "mbox" -> imf; 25 | 26 | mime -> imf; 27 | } 28 | 29 | digraph "mh driver" { 30 | "mh driver" -> mh; 31 | "mh driver" -> imf; 32 | "mh driver" -> mime; 33 | "mh driver" -> "session/message"; 34 | 35 | mime -> imf; 36 | } 37 | 38 | digraph "pop3 driver" { 39 | "pop3 driver" -> pop3; 40 | "pop3 driver" -> imf; 41 | "pop3 driver" -> mime; 42 | "pop3 driver" -> "session/message"; 43 | 44 | mime -> imf; 45 | } 46 | 47 | digraph "nntp driver" { 48 | "nntp driver" -> nntp; 49 | "nntp driver" -> imf; 50 | "nntp driver" -> mime; 51 | "nntp driver" -> "session/message"; 52 | 53 | mime -> imf; 54 | } 55 | -------------------------------------------------------------------------------- /travis/script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | IOSSDK="`xcodebuild -showsdks 2>/dev/null | grep iphoneos | sed 's/.*iphoneos\(.*\)/\1/'`" 5 | OSXSDK="`xcodebuild -showsdks 2>/dev/null | grep macosx | sed 's/.*macosx\(.*\)/\1/'`" 6 | 7 | if test "x`uname`" = xLinux ; then 8 | distdir=libetpan-travis-build 9 | ./autogen.sh --with-curl=no --disable-db --with-expat=no 10 | make dist distdir=$distdir 11 | tar xzf $distdir.tar.gz 12 | cd $distdir 13 | ./configure --with-curl=no --disable-db --with-expat=no 14 | make 15 | cd tests 16 | make imap-sample 17 | else 18 | echo Building library for iPhoneOS 19 | xcodebuild -project build-mac/libetpan.xcodeproj -sdk iphoneos$IOSSDK -scheme "libetpan ios" build ARCHS="armv7 armv7s arm64" > /dev/null 20 | echo Building library for iPhoneSimulator 21 | xcodebuild -project build-mac/libetpan.xcodeproj -sdk iphonesimulator$IOSSDK -scheme "libetpan ios" build ARCHS="i386 x86_64" > /dev/null 22 | 23 | echo Building library for Mac 24 | xcodebuild -project build-mac/libetpan.xcodeproj -sdk macosx$OSXSDK -scheme "static libetpan" build > /dev/null 25 | echo Building framework for Mac 26 | xcodebuild -project build-mac/libetpan.xcodeproj -sdk macosx$OSXSDK -scheme "libetpan" build > /dev/null 27 | fi 28 | -------------------------------------------------------------------------------- /doc/layer.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 11 | 900 3150 12150 3150 12150 3825 900 3825 900 3150 12 | 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 13 | 900 3825 12150 3825 12150 4500 900 4500 900 3825 14 | 2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 15 | 3150 3150 3150 3825 16 | 2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 17 | 5400 3150 5400 3825 18 | 2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 19 | 7650 3150 7650 3825 20 | 2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 21 | 9900 3150 9900 3825 22 | 2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 7 23 | 12150 3150 900 3150 900 2475 12825 2475 12825 4500 12150 4500 24 | 12150 3150 25 | 2 3 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 7 26 | 900 2475 900 1800 13500 1800 13500 4500 12825 4500 12825 2475 27 | 900 2475 28 | 2 3 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 8 29 | 900 4500 225 4500 225 1125 13500 1125 13500 1800 900 1800 30 | 900 4500 900 4500 31 | 4 0 0 50 0 16 20 0.0000 4 210 1410 1305 3600 IMAP4rev1\001 32 | 4 0 0 50 0 16 20 0.0000 4 210 450 10800 3600 MH\001 33 | 4 0 0 50 0 16 20 0.0000 4 210 720 8370 3555 mbox\001 34 | 4 0 0 50 0 16 20 0.0000 4 210 795 6120 3600 NNTP\001 35 | 4 0 0 50 0 16 20 0.0000 4 210 765 3870 3600 POP3\001 36 | 4 0 0 50 0 16 20 0.0000 4 270 1620 5670 2880 session layer\001 37 | 4 0 0 50 0 16 20 0.0000 4 270 2730 5085 2250 storage / folders layer\001 38 | 4 0 0 50 0 16 20 0.0000 4 210 1500 5760 4275 IMF / MIME\001 39 | 4 0 0 50 0 16 20 0.0000 4 270 1395 5670 1575 application\001 40 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | libEtPan! -- a mail stuff library 2 | 3 | Copyright (C) 2001 - 2005 - DINH Viet Hoa 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 1. Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 3. Neither the name of the libEtPan! project nor the names of its 15 | contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | SUCH DAMAGE. 29 | 30 | This project contains code from sendmail, NetBSD, 31 | RSA Data Security MD5 Message-Digest Algorithm, Cyrus IMAP. 32 | -------------------------------------------------------------------------------- /include/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | # The links are deleted with the target "clean". 33 | clean-local: 34 | rm -fR libetpan 35 | -------------------------------------------------------------------------------- /src/dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | /* We need to link the W32 version of the library using the C++ tool 32 | chain. This file ensures that this happens. */ 33 | -------------------------------------------------------------------------------- /src/bsd/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | # Used by some tests if _MSC_VER, and is referenced in the VC project 33 | # files. 34 | EXTRA_DIST = getopt.c getopt.h getopt_long.c 35 | -------------------------------------------------------------------------------- /src/windows/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | noinst_LTLIBRARIES = libarch.la 33 | 34 | libarch_la_SOURCES = dirent.c inet_aton.c misc.c mmap.c time_r.c \ 35 | win_etpan.h win_init.cpp 36 | -------------------------------------------------------------------------------- /src/data-types/timeutils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef TIMEUTILS_H 32 | 33 | #define TIMEUTILS_H 34 | 35 | #include 36 | 37 | time_t mail_mkgmtime(struct tm * tmp); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/low-level/feed/date.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef DATE_H 32 | #define DATE_H 33 | 34 | #include 35 | 36 | time_t newsfeed_iso8601_date_parse(char *date); 37 | 38 | #endif /* __DATE_H */ 39 | -------------------------------------------------------------------------------- /src/versioninfo.rc.in: -------------------------------------------------------------------------------- 1 | /* versioninfo.rc.in - for libetpan 2 | * Copyright (C) 2005 g10 Code GmbH 3 | * 4 | * This file is free software; as a special exception the author gives 5 | * unlimited permission to copy and/or distribute it, with or without 6 | * modifications, as long as this notice is preserved. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 10 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | */ 12 | 13 | /* This file is processed by configure to create versioninfo.rc */ 14 | 15 | #line __LINE__ "versioninfo.rc.in" 16 | 17 | #include 18 | 19 | 20 | VS_VERSION_INFO VERSIONINFO 21 | FILEVERSION @API_CURRENT@,@API_COMPATIBILITY@,@API_REVISION@,@BUILD_REVISION@ 22 | PRODUCTVERSION @BUILD_FILEVERSION@ 23 | FILEFLAGSMASK 0x3fL 24 | #ifdef _DEBUG 25 | FILEFLAGS 0x21L 26 | #else 27 | FILEFLAGS 0x20L 28 | #endif 29 | FILEOS 0x40004L 30 | FILETYPE 0x1L 31 | FILESUBTYPE 0x0L 32 | BEGIN 33 | BLOCK "StringFileInfo" 34 | BEGIN 35 | BLOCK "040904b0" 36 | BEGIN 37 | VALUE "Comments", "ADD LICENSE COMMENT HERE.\0" 38 | VALUE "CompanyName", "ADD COMPANY NAME\0" 39 | VALUE "FileDescription", "LIBETPAN\0" 40 | VALUE "FileVersion", "@API_CURRENT@.@API_COMPATIBILITY@.@API_REVISION@.@BUILD_REVISION@\0" 41 | VALUE "InternalName", "libetpan\0" 42 | VALUE "LegalCopyright", "ADD COPYRIGHT NOTICE\0" 43 | VALUE "LegalTrademarks", "\0" 44 | VALUE "OriginalFilename", "libetpan.dll\0" 45 | VALUE "PrivateBuild", "\0" 46 | VALUE "ProductName", "LIBETPAN\0" 47 | VALUE "ProductVersion", "@VERSION@\0" 48 | VALUE "SpecialBuild", "@BUILD_TIMESTAMP@\0" 49 | END 50 | END 51 | END 52 | 53 | -------------------------------------------------------------------------------- /src/low-level/mh/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | mailmh.h 34 | 35 | AM_CPPFLAGS = -I$(top_builddir)/include \ 36 | -I$(top_srcdir)/src/data-types 37 | 38 | noinst_LTLIBRARIES = libmh.la 39 | 40 | libmh_la_SOURCES = \ 41 | mailmh.c 42 | -------------------------------------------------------------------------------- /src/data-types/mailstream_cancel_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef MAILSTREAM_CANCEL_TYPES_H 32 | 33 | #define MAILSTREAM_CANCEL_TYPES_H 34 | 35 | struct mailstream_cancel { 36 | int ms_cancelled; 37 | int ms_fds[2]; 38 | void * ms_internal; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/low-level/maildir/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | maildir.h maildir_types.h 34 | 35 | AM_CPPFLAGS = -I$(top_builddir)/include \ 36 | -I$(top_srcdir)/src/data-types 37 | 38 | noinst_LTLIBRARIES = libmaildir.la 39 | 40 | libmaildir_la_SOURCES = \ 41 | maildir.c 42 | -------------------------------------------------------------------------------- /src/driver/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | EXTRA_DIST = TODO 33 | 34 | SUBDIRS = implementation interface tools 35 | 36 | noinst_LTLIBRARIES = libdriver.la 37 | libdriver_la_SOURCES = 38 | libdriver_la_LIBADD = \ 39 | implementation/libimplementation.la \ 40 | interface/libinterface.la \ 41 | tools/libtools.la 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/low-level/imap/namespace_sender.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | #include "namespace_sender.h" 33 | 34 | int mailimap_namespace_send(mailstream * fd) 35 | { 36 | int r; 37 | 38 | r = mailimap_token_send(fd, "NAMESPACE"); 39 | if (r != MAILIMAP_NO_ERROR) 40 | return r; 41 | 42 | return MAILIMAP_NO_ERROR; 43 | } 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## LibEtPan 2 | 3 | The purpose of this mail library is to provide a portable, efficient framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. 4 | 5 | It provides an API for C language. 6 | 7 | [![Build Status](https://travis-ci.org/dinhviethoa/libetpan.png?branch=master)](https://travis-ci.org/dinhviethoa/libetpan) 8 | [![Code Quality: Cpp](https://img.shields.io/lgtm/grade/cpp/g/dinhviethoa/libetpan.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/dinhviethoa/libetpan/context:cpp) 9 | [![Total Alerts](https://img.shields.io/lgtm/alerts/g/dinhviethoa/libetpan.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/dinhviethoa/libetpan/alerts) 10 | 11 | ## Features 12 | 13 | - IMAP 14 | - SMTP 15 | - POP 16 | - NNTP 17 | - RFC822/MIME message builder 18 | - RFC822/MIME message parser 19 | - Maildir 20 | - mbox 21 | - MH 22 | 23 | ## Build instructions 24 | 25 | ### Unix 26 | 27 | You need to install autoconf, automake and libtool. 28 | They can be installed using [brew](http://brew.sh/). 29 | 30 | $ ./autogen.sh 31 | $ make 32 | 33 | You can use flag --with-poll for using poll() instead of select() for checking connection status 34 | 35 | ### How to link with it 36 | 37 | $ gcc -c -o sample.o sample.c `pkg-config libetpan --cflags` 38 | $ gcc -o sample sample.o `pkg-config libetpan --libs` 39 | 40 | ### Mac / iOS 41 | 42 | - Download Xcode 43 | - Open `build-mac/libetpan.xcodeproj` 44 | - Choose the correct target "static libetpan" for Mac or "libetpan ios" for iOS. 45 | - Build 46 | 47 | ### Setup a Mac project 48 | 49 | - Add `libetpan.xcodeproj` as sub-project 50 | - Link with libetpan.a 51 | 52 | ### Setup an iOS project 53 | 54 | - Add `libetpan.xcodeproj` as sub-project 55 | - Link with libetpan-ios.a 56 | - Set "Other Linker Flags": `-lsasl2` 57 | 58 | ### Build on Windows 59 | 60 | - See README and Visual Studio Solution in build-windows folder 61 | 62 | ## More information 63 | 64 | See http://etpan.org/libetpan.html for more information and examples. 65 | -------------------------------------------------------------------------------- /src/driver/implementation/data-message/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | data_message_driver.h 34 | 35 | AM_CPPFLAGS = -I$(top_builddir)/include \ 36 | -I$(top_srcdir)/src/driver/interface 37 | 38 | noinst_LTLIBRARIES = libdata-message.la 39 | 40 | libdata_message_la_SOURCES = \ 41 | data_message_driver.c 42 | -------------------------------------------------------------------------------- /src/low-level/imap/namespace_sender.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef NAMESPACE_SENDER_H 33 | 34 | #define NAMESPACE_SENDER_H 35 | 36 | #include "mailimap_sender.h" 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | int mailimap_namespace_send(mailstream * fd); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/low-level/nntp/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | newsnntp.h newsnntp_socket.h newsnntp_ssl.h newsnntp_types.h 34 | 35 | AM_CPPFLAGS = -I$(top_builddir)/include \ 36 | -I$(top_srcdir)/src/data-types 37 | 38 | noinst_LTLIBRARIES = libnntp.la 39 | 40 | libnntp_la_SOURCES = \ 41 | newsnntp.c newsnntp_socket.c newsnntp_ssl.c 42 | -------------------------------------------------------------------------------- /src/data-types/mmapstring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef MMAPSTRING_PRIVATE_H 32 | 33 | #define MMAPSTRING_PRIVATE_H 34 | 35 | #ifdef __cplusplus 36 | extern "C" 37 | { 38 | #endif 39 | 40 | extern void mmapstring_init_lock(void); 41 | 42 | extern void mmapstring_uninit_lock(void); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/driver/implementation/hotmail/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | hotmailstorage.h 34 | 35 | AM_CPPFLAGS = -I$(top_builddir)/include \ 36 | -I$(top_srcdir)/src/driver/interface \ 37 | -I$(top_srcdir)/src/driver/implementation/pop3 38 | 39 | noinst_LTLIBRARIES = libhotmail.la 40 | 41 | libhotmail_la_SOURCES = \ 42 | hotmailstorage.c 43 | -------------------------------------------------------------------------------- /src/low-level/feed/parser_rss20.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * Copyright (C) 2006 Andrej Kacian 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 3. Neither the name of the libEtPan! project nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | * SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef PARSER_RSS20_H 34 | #define PARSER_RSS20_H 35 | 36 | void newsfeed_parser_rss20_start(void * data, const char * el, const char ** attr); 37 | void newsfeed_parser_rss20_end(void * data, const char * el); 38 | 39 | #endif /* PARSER_RSS20_H */ 40 | -------------------------------------------------------------------------------- /src/driver/implementation/mime-message/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | mime_message_driver.h 34 | 35 | AM_CPPFLAGS = -I$(top_builddir)/include \ 36 | -I$(top_srcdir)/src/driver/interface \ 37 | -I$(top_srcdir)/src/data-types 38 | 39 | noinst_LTLIBRARIES = libmime-message.la 40 | 41 | libmime_message_la_SOURCES = \ 42 | mime_message_driver.c 43 | -------------------------------------------------------------------------------- /src/data-types/mailstream_ssl_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef MAILSTREAM_SSL_PRIVATE_H 32 | 33 | #define MAILSTREAM_SSL_PRIVATE_H 34 | 35 | #ifdef __cplusplus 36 | extern "C" 37 | { 38 | #endif 39 | 40 | extern void mailstream_ssl_init_lock(void); 41 | 42 | extern void mailstream_ssl_uninit_lock(void); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/low-level/feed/parser_atom03.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * Copyright (C) 2006 Andrej Kacian 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 3. Neither the name of the libEtPan! project nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | * SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef PARSER_ATOM03_H 34 | #define PARSER_ATOM03_H 35 | 36 | void newsfeed_parser_atom03_start(void * data, const char * el, const char ** attr); 37 | void newsfeed_parser_atom03_end(void * data, const char * el); 38 | 39 | #endif /* PARSER_ATOM03_H */ 40 | -------------------------------------------------------------------------------- /src/low-level/feed/parser_atom10.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * Copyright (C) 2006 Andrej Kacian 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 3. Neither the name of the libEtPan! project nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | * SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef PARSER_ATOM10_H 34 | #define PARSER_ATOM10_H 35 | 36 | void newsfeed_parser_atom10_start(void * data, const char * el, const char ** attr); 37 | void newsfeed_parser_atom10_end(void * data, const char * el); 38 | 39 | #endif /* PARSER_ATOM10_H */ 40 | -------------------------------------------------------------------------------- /src/data-types/mailsasl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef MAILSASL_H 32 | 33 | #define MAILSASL_H 34 | 35 | #ifdef __cplusplus 36 | extern"C"{ 37 | #endif 38 | 39 | /* if Cyrus-SASL is used outside of libetpan */ 40 | void mailsasl_external_ref(void); 41 | 42 | void mailsasl_ref(void); 43 | void mailsasl_unref(void); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/low-level/smtp/mailsmtp_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef MAILSMTP_PRIVATE_H 32 | 33 | #define MAILSMTP_PRIVATE_H 34 | 35 | #include 36 | 37 | int mailsmtp_send_command(mailsmtp * f, char * command); 38 | 39 | int mailsmtp_send_command_private(mailsmtp * f, char * command); 40 | 41 | int mailsmtp_read_response(mailsmtp * session); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/low-level/pop3/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | mailpop3.h mailpop3_socket.h mailpop3_helper.h mailpop3_ssl.h \ 34 | mailpop3_types.h 35 | 36 | AM_CPPFLAGS = -I$(top_builddir)/include \ 37 | -I$(top_srcdir)/src/data-types 38 | 39 | noinst_LTLIBRARIES = libpop3.la 40 | 41 | libpop3_la_SOURCES = \ 42 | mailpop3.c mailpop3_helper.c mailpop3_socket.c mailpop3_ssl.c 43 | -------------------------------------------------------------------------------- /src/driver/interface/mailmessage_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mailmessage_types.h,v 1.9 2004/11/21 21:53:35 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAILMESSAGE_TYPES_H 37 | 38 | #define MAILMESSAGE_TYPES_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/low-level/imap/clientid_sender.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2018, 2019 - LinuxMagic 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CLIENTID_SENDER_H 33 | 34 | #define CLIENTID_SENDER_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | #include "mailstream.h" 41 | 42 | int mailimap_clientid_send(mailstream * fd, 43 | const char * type, const char * clientid); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/data-types/mail.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mail.h,v 1.8 2004/11/21 21:53:31 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAIL_H 37 | 38 | #define MAIL_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #ifndef TRUE 45 | #define TRUE 1 46 | #endif 47 | 48 | #ifndef FALSE 49 | #define FALSE 0 50 | #endif 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/low-level/mbox/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | EXTRA_DIST = TODO 33 | 34 | etpaninclude_HEADERS = \ 35 | mailmbox.h mailmbox_types.h 36 | 37 | AM_CPPFLAGS = -I$(top_builddir)/include \ 38 | -I$(top_srcdir)/src/data-types \ 39 | -I$(top_srcdir)/src/low-level/imf 40 | 41 | noinst_LTLIBRARIES = libmbox.la 42 | 43 | libmbox_la_SOURCES = \ 44 | mailmbox_parse.h mailmbox_parse.c mailmbox.c mailmbox_types.c 45 | -------------------------------------------------------------------------------- /tests/pop-sample.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | static void check_error(int r, char * msg) 6 | { 7 | if (r == MAILPOP3_NO_ERROR) 8 | return; 9 | 10 | fprintf(stderr, "%s\n", msg); 11 | exit(EXIT_FAILURE); 12 | } 13 | 14 | int main(int argc, char ** argv) 15 | { 16 | mailpop3 * pop3; 17 | int r; 18 | carray * list; 19 | unsigned int i; 20 | 21 | if (argc < 3) { 22 | fprintf(stderr, "syntax: pop-sample [gmail-email-address] [gmail-password]\n"); 23 | exit(EXIT_FAILURE); 24 | } 25 | 26 | mkdir("download", 0700); 27 | 28 | pop3 = mailpop3_new(0, NULL); 29 | r = mailpop3_ssl_connect(pop3, "pop.gmail.com", 995); 30 | check_error(r, "connect failed"); 31 | 32 | r = mailpop3_user(pop3, argv[1]); 33 | check_error(r, "user failed"); 34 | 35 | r = mailpop3_pass(pop3, argv[2]); 36 | check_error(r, "pass failed"); 37 | 38 | r = mailpop3_list(pop3, &list); 39 | check_error(r, "list failed"); 40 | 41 | for(i = 0 ; i < carray_count(list) ; i ++) { 42 | struct mailpop3_msg_info * info; 43 | char * msg_content; 44 | size_t msg_size; 45 | FILE * f; 46 | char filename[512]; 47 | struct stat stat_info; 48 | 49 | info = carray_get(list, i); 50 | 51 | if (info->msg_uidl == NULL) { 52 | continue; 53 | } 54 | 55 | snprintf(filename, sizeof(filename), "download/%s.eml", info->msg_uidl); 56 | r = stat(filename, &stat_info); 57 | if (r == 0) { 58 | printf("already fetched %u %s\n", info->msg_index, info->msg_uidl); 59 | continue; 60 | } 61 | 62 | r = mailpop3_retr(pop3, info->msg_index, &msg_content, &msg_size); 63 | check_error(r, "get failed"); 64 | 65 | f = fopen(filename, "w"); 66 | fwrite(msg_content, 1, msg_size, f); 67 | fclose(f); 68 | mailpop3_retr_free(msg_content); 69 | 70 | if (info->msg_uidl != NULL) { 71 | printf("fetched %u %s\n", info->msg_index, info->msg_uidl); 72 | } 73 | else { 74 | printf("fetched %u\n", info->msg_index); 75 | } 76 | } 77 | 78 | mailpop3_quit(pop3); 79 | mailpop3_free(pop3); 80 | 81 | exit(EXIT_SUCCESS); 82 | } 83 | -------------------------------------------------------------------------------- /src/data-types/mail_cache_db_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mail_cache_db_types.h,v 1.2 2004/11/21 21:53:31 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAIL_CACHE_DB_TYPES_H 37 | 38 | #define MAIL_CACHE_DB_TYPES_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | struct mail_cache_db { 45 | void * internal_database; 46 | }; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/mh/mhdriver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mhdriver.h,v 1.12 2004/11/21 21:53:33 hoa Exp $ 34 | */ 35 | 36 | #ifndef MHDRIVER_H 37 | 38 | #define MHDRIVER_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailsession_driver * mh_session_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/windows/time_r.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifdef HAVE_CONFIG_H 32 | # include 33 | #endif 34 | 35 | #include 36 | #include 37 | 38 | struct tm *gmtime_r (const time_t *timep, struct tm *result) { 39 | *result = *gmtime( timep); 40 | return result; 41 | } 42 | struct tm *localtime_r (const time_t *timep, struct tm *result) { 43 | *result = *localtime( timep); 44 | return result; 45 | } 46 | -------------------------------------------------------------------------------- /src/driver/implementation/feed/feeddriver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: feeddriver.h,v 1.1 2007/01/18 09:15:01 hoa Exp $ 34 | */ 35 | 36 | #ifndef FEEDDRIVER_H 37 | 38 | #define FEEDDRIVER_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailsession_driver * feed_session_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/imap/imapdriver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: imapdriver.h,v 1.12 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef IMAPDRIVER_H 37 | 38 | #define IMAPDRIVER_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #include 45 | 46 | extern mailsession_driver * imap_session_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/mbox/mboxdriver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mboxdriver.h,v 1.14 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef MBOXDRIVER_H 37 | 38 | #define MBOXDRIVER_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #include 45 | 46 | extern mailsession_driver * mbox_session_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/nntp/nntpdriver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: nntpdriver.h,v 1.16 2004/11/21 21:53:33 hoa Exp $ 34 | */ 35 | 36 | #ifndef NNTPDRIVER_H 37 | 38 | #define NNTPDRIVER_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailsession_driver * nntp_session_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/pop3/pop3driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: pop3driver.h,v 1.15 2004/11/21 21:53:34 hoa Exp $ 34 | */ 35 | 36 | #ifndef POP3DRIVER_H 37 | 38 | #define POP3DRIVER_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailsession_driver * pop3_session_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/low-level/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | SUBDIRS = imap imf maildir mbox mh mime nntp pop3 smtp feed 33 | 34 | noinst_LTLIBRARIES = liblow-level.la 35 | liblow_level_la_SOURCES = 36 | liblow_level_la_LIBADD = \ 37 | imap/libimap.la \ 38 | imf/libimf.la \ 39 | maildir/libmaildir.la \ 40 | mbox/libmbox.la \ 41 | mh/libmh.la \ 42 | mime/libmime.la \ 43 | nntp/libnntp.la \ 44 | pop3/libpop3.la \ 45 | smtp/libsmtp.la \ 46 | feed/libfeed.la 47 | -------------------------------------------------------------------------------- /src/low-level/feed/parser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef PARSER_H 32 | 33 | #define PARSER_H 34 | 35 | #include "newsfeed_private.h" 36 | 37 | void newsfeed_parser_set_expat_handlers(struct newsfeed_parser_context * ctx); 38 | size_t newsfeed_writefunc(void * ptr, size_t size, size_t nmemb, void * stream); 39 | const char * newsfeed_parser_get_attribute_value(const char ** attr, 40 | const char * name); 41 | 42 | #endif /* __PARSER_H */ 43 | -------------------------------------------------------------------------------- /src/driver/implementation/db/dbdriver_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: dbdriver_message.h,v 1.2 2004/11/21 21:53:31 hoa Exp $ 34 | */ 35 | 36 | #ifndef DBDRIVER_MESSAGE_H 37 | 38 | #define DBDRIVER_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * db_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/mh/mhdriver_cached.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mhdriver_cached.h,v 1.10 2004/11/21 21:53:33 hoa Exp $ 34 | */ 35 | 36 | #ifndef MHDRIVER_CACHED_H 37 | 38 | #define MHDRIVER_CACHED_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailsession_driver * mh_cached_session_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/mh/mhdriver_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mhdriver_message.h,v 1.6 2004/11/21 21:53:33 hoa Exp $ 34 | */ 35 | 36 | #ifndef MHDRIVER_MESSAGE_H 37 | 38 | #define MHDRIVER_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * mh_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/low-level/imap/uidplus_sender.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef UIDPLUS_SENDER_H 32 | 33 | #define UIDPLUS_SENDER_H 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | #include 40 | 41 | #include "mailimap_types.h" 42 | #include "mailstream_types.h" 43 | 44 | int 45 | mailimap_uid_expunge_send(mailstream * fd, 46 | struct mailimap_set * set); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/data-types/md5namespace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2015 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef MD5NAMESPACE_H 33 | 34 | #define MD5NAMESPACE_H 35 | 36 | #define MD5Init lep_MD5Init 37 | #define MD5Update lep_MD5Update 38 | #define MD5Final lep_MD5Final 39 | #define hmac_md5 lep_hmac_md5 40 | #define hmac_md5_init lep_hmac_md5_init 41 | #define hmac_md5_precalc lep_hmac_md5_precalc 42 | #define hmac_md5_import lep_hmac_md5_import 43 | #define hmac_md5_final lep_hmac_md5_final 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/low-level/feed/parser_rdf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * Copyright (C) 2006 Andrej Kacian 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 3. Neither the name of the libEtPan! project nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | * SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef PARSER_RDF_H 34 | #define PARSER_RDF_H 35 | 36 | void newsfeed_parser_rdf_start(void * data, const char * el, const char ** attr); 37 | void newsfeed_parser_rdf_end(void * data, const char * el); 38 | 39 | enum { 40 | FEED_LOC_RDF_NONE, 41 | FEED_LOC_RDF_CHANNEL, 42 | FEED_LOC_RDF_ITEM 43 | }; 44 | 45 | #endif /* __PARSER_RDF_H */ 46 | -------------------------------------------------------------------------------- /src/driver/implementation/db/dbdriver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: dbdriver.h,v 1.2 2004/11/21 21:53:31 hoa Exp $ 34 | */ 35 | 36 | #ifndef DBDRIVER_H 37 | 38 | #define DBDRIVER_H 39 | 40 | #include 41 | #include 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | extern mailsession_driver * db_session_driver; 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/driver/implementation/feed/feeddriver_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: feeddriver_message.h,v 1.1 2007/01/18 09:15:01 hoa Exp $ 34 | */ 35 | 36 | #ifndef FEEDDRIVER_MESSAGE_H 37 | 38 | #define FEEDDRIVER_MESSAGE_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #include 45 | 46 | extern mailmessage_driver * feed_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/imap/imapdriver_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: imapdriver_message.h,v 1.6 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef IMAPDRIVER_MESSAGE_H 37 | 38 | #define IMAPDRIVER_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * imap_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/mbox/mboxdriver_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mboxdriver_message.h,v 1.6 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef MBOXDRIVER_MESSAGE_H 37 | 38 | #define MBOXDRIVER_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * mbox_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/nntp/nntpdriver_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: nntpdriver_message.h,v 1.6 2004/11/21 21:53:33 hoa Exp $ 34 | */ 35 | 36 | #ifndef NNTPDRIVER_MESSAGE_H 37 | 38 | #define NNTPDRIVER_MESSAGE_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #include 45 | 46 | extern mailmessage_driver * nntp_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/pop3/pop3driver_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: pop3driver_message.h,v 1.6 2004/11/21 21:53:34 hoa Exp $ 34 | */ 35 | 36 | #ifndef POP3DRIVER_MESSAGE_H 37 | 38 | #define POP3DRIVER_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * pop3_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/low-level/imap/quota_sender.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef QUOTA_SENDER_H 33 | 34 | #define QUOTA_SENDER_H 35 | 36 | #include "mailimap_sender.h" 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | int mailimap_quota_getquota_send(mailstream * fd, 43 | const char * quotaroot); 44 | 45 | int mailimap_quota_getquotaroot_send(mailstream * fd, 46 | const char * list_mb); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/imap/imapdriver_cached.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: imapdriver_cached.h,v 1.11 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef IMAPDRIVER_CACHED_H 37 | 38 | #define IMAPDRIVER_CACHED_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailsession_driver * imap_cached_session_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/nntp/nntpdriver_cached.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: nntpdriver_cached.h,v 1.14 2004/11/21 21:53:33 hoa Exp $ 34 | */ 35 | 36 | #ifndef NNTPDRIVER_CACHED_H 37 | 38 | #define NNTPDRIVER_CACHED_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailsession_driver * nntp_cached_session_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/pop3/pop3driver_cached.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: pop3driver_cached.h,v 1.15 2004/11/21 21:53:34 hoa Exp $ 34 | */ 35 | 36 | #ifndef POP3DRIVER_CACHED_H 37 | 38 | #define POP3DRIVER_CACHED_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #include 45 | 46 | extern mailsession_driver * pop3_cached_session_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/low-level/smtp/mailsmtp_oauth2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef MAILSMTP_OAUTH2_H 32 | 33 | #define MAILSMTP_OAUTH2_H 34 | 35 | #include 36 | 37 | LIBETPAN_EXPORT 38 | int mailsmtp_oauth2_authenticate(mailsmtp * session, const char * auth_user, 39 | const char * access_token); 40 | 41 | LIBETPAN_EXPORT 42 | int mailsmtp_oauth2_outlook_authenticate(mailsmtp * session, const char * auth_user, 43 | const char * access_token); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/main/libetpan_version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001 - 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: libetpan_version.c,v 1.4 2006/05/22 13:39:45 hoa Exp $ 34 | */ 35 | 36 | #ifdef HAVE_CONFIG_H 37 | # include 38 | #endif 39 | 40 | #include "libetpan_version.h" 41 | 42 | /* version of libEtPan! at runtime */ 43 | 44 | int libetpan_get_version_major(void) 45 | { 46 | return LIBETPAN_VERSION_MAJOR; 47 | } 48 | 49 | int libetpan_get_version_minor(void) 50 | { 51 | return LIBETPAN_VERSION_MINOR; 52 | } 53 | -------------------------------------------------------------------------------- /src/driver/implementation/maildir/maildirdriver_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: maildirdriver_message.h,v 1.3 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAILDIRDRIVER_MESSAGE_H 37 | 38 | #define MAILDIRDRIVER_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * maildir_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/mh/mhdriver_cached_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mhdriver_cached_message.h,v 1.6 2004/11/21 21:53:33 hoa Exp $ 34 | */ 35 | 36 | #ifndef MHDRIVER_CACHED_MESSAGE_H 37 | 38 | #define MHDRIVER_CACHED_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * mh_cached_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/maildir/maildirdriver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: maildirdriver.h,v 1.4 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAILDIRDRIVER_H 37 | 38 | #define MAILDIRDRIVER_H 39 | 40 | #include 41 | #include 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | extern mailsession_driver * maildir_session_driver; 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/driver/implementation/mbox/mboxdriver_cached_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mboxdriver_cached_message.h,v 1.6 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef MBOXDRIVER_CACHED_MESSAGE_H 37 | 38 | #define MBOXDRIVER_CACHED_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * mbox_cached_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/imap/imapdriver_cached_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: imapdriver_cached_message.h,v 1.6 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef IMAPDRIVER_CACHED_MESSAGE_H 37 | 38 | #define IMAPDRIVER_CACHED_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * imap_cached_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/pop3/pop3driver_cached_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: pop3driver_cached_message.h,v 1.6 2004/11/21 21:53:34 hoa Exp $ 34 | */ 35 | 36 | #ifndef POP3DRIVER_CACHED_MESSAGE_H 37 | 38 | #define POP3DRIVER_CACHED_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * pop3_cached_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/nntp/nntpdriver_cached_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: nntpdriver_cached_message.h,v 1.6 2004/11/21 21:53:33 hoa Exp $ 34 | */ 35 | 36 | #include 37 | 38 | #ifndef NNTPDRIVER_CACHED_MESSAGE_H 39 | 40 | #define NNTPDRIVER_CACHED_MESSAGE_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * nntp_cached_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/tools/generic_cache_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: generic_cache_types.h,v 1.6 2004/11/21 21:53:35 hoa Exp $ 34 | */ 35 | 36 | #ifndef GENERIC_CACHE_TYPE_H 37 | 38 | #define GENERIC_CACHE_TYPE_H 39 | 40 | #include 41 | #include 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | struct mail_flags_store { 48 | carray * fls_tab; 49 | chash * fls_hash; 50 | }; 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/engine/mailprivacy_tools_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef MAILPRIVACY_TOOLS_PRIVATE_H 32 | 33 | #define MAILPRIVACY_TOOLS_PRIVATE_H 34 | 35 | #include 36 | #include 37 | 38 | enum { 39 | NO_ERROR_PASSPHRASE = 0, 40 | ERROR_PASSPHRASE_COMMAND, 41 | ERROR_PASSPHRASE_FILE 42 | }; 43 | 44 | int mailprivacy_spawn_and_wait(char * command, char * passphrase, 45 | char * stdoutfile, char * stderrfile, 46 | int * bad_passphrase); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/low-level/imap/mailimap_id_sender.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef MAILIMAP_ID_SENDER_H 32 | 33 | #define MAILIMAP_ID_SENDER_H 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | #include 40 | #include 41 | #include 42 | 43 | LIBETPAN_EXPORT 44 | int mailimap_id_send(mailstream * fd, struct mailimap_id_params_list * client_identification); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/windows/dirent.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #include 32 | 33 | DIR *opendir (const char *__name) { 34 | #ifdef _DEBUG 35 | fprintf( stderr, "opendir inimplemented\n"); 36 | #endif 37 | return NULL; 38 | } 39 | 40 | int closedir (DIR *__dirp) { 41 | #ifdef _DEBUG 42 | fprintf( stderr, "closedir inimplemented\n"); 43 | #endif 44 | return 0; 45 | } 46 | 47 | struct dirent *readdir (DIR *__dirp) { 48 | #ifdef _DEBUG 49 | fprintf( stderr, "readdir inimplemented\n"); 50 | #endif 51 | return NULL; 52 | } 53 | -------------------------------------------------------------------------------- /src/windows/misc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | int mkstemp (char *tmp_template) { 38 | int fd; 39 | char * res; 40 | 41 | #ifdef _DEBUG 42 | printf("mkstemp:%s\n", tmp_template); 43 | #endif 44 | fd = -1; 45 | res = mktemp( tmp_template); 46 | if (res && *res) { 47 | fd = open( res, _O_BINARY | _O_CREAT | _O_TEMPORARY | _O_EXCL, _S_IREAD | _S_IWRITE); 48 | } 49 | 50 | return fd; 51 | } 52 | -------------------------------------------------------------------------------- /src/driver/implementation/mbox/mboxdriver_cached.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mboxdriver_cached.h,v 1.11 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef MBOXDRIVER_CACHED_H 37 | 38 | #define MBOXDRIVER_CACHED_H 39 | 40 | #include 41 | 42 | #include 43 | 44 | #ifdef __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | extern mailsession_driver * mbox_cached_session_driver; 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/low-level/imap/mailimap_print.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mailimap_print.h,v 1.6 2004/11/21 21:53:36 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAILIMAP_PRINT_H 37 | 38 | #define MAILIMAP_PRINT_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #include "mailimap_types.h" 45 | 46 | void mailimap_response_print(struct mailimap_response * resp); 47 | 48 | void mailimap_greeting_print(struct mailimap_greeting * greeting); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/low-level/imap/xgmmsgid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef XGMMSGID_H 32 | #define XGMMSGID_H 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | #include 39 | #include 40 | 41 | LIBETPAN_EXPORT 42 | extern struct mailimap_extension_api mailimap_extension_xgmmsgid; 43 | 44 | LIBETPAN_EXPORT 45 | struct mailimap_fetch_att * mailimap_fetch_att_new_xgmmsgid(void); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/low-level/imap/xgmthrid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef XGMTHRID_H 32 | #define XGMTHRID_H 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | #include 39 | #include 40 | 41 | LIBETPAN_EXPORT 42 | extern struct mailimap_extension_api mailimap_extension_xgmthrid; 43 | 44 | LIBETPAN_EXPORT 45 | struct mailimap_fetch_att * mailimap_fetch_att_new_xgmthrid(void); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/maildir/maildirdriver_cached_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: maildirdriver_cached_message.h,v 1.3 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAILDIRDRIVER_CACHED_MESSAGE_H 37 | 38 | #define MAILDIRDRIVER_CACHED_MESSAGE_H 39 | 40 | #include 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | extern mailmessage_driver * maildir_cached_message_driver; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/driver/implementation/maildir/maildirdriver_cached.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: maildirdriver_cached.h,v 1.4 2004/11/21 21:53:32 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAILDIRDRIVER_CACHED_H 37 | 38 | #define MAILDIRDRIVER_CACHED_H 39 | 40 | #include 41 | #include 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | extern mailsession_driver * maildir_cached_session_driver; 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/driver/tools/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | generic_cache_types.h \ 34 | mailthread.h mailthread_types.h 35 | 36 | AM_CPPFLAGS = -I$(top_builddir)/include \ 37 | -I$(top_srcdir)/src/low-level/imf \ 38 | -I$(top_srcdir)/src/low-level/mime \ 39 | -I$(top_srcdir)/src/data-types \ 40 | -I$(top_srcdir)/src/driver/interface 41 | 42 | noinst_LTLIBRARIES = libtools.la 43 | 44 | libtools_la_SOURCES = \ 45 | generic_cache.h generic_cache.c \ 46 | imfcache.h imfcache.c \ 47 | mailthread.c mailthread_types.c 48 | -------------------------------------------------------------------------------- /src/low-level/mbox/mailmbox_parse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mailmbox_parse.h,v 1.4 2008/02/20 22:15:52 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAILMBOX_PARSE_H 37 | 38 | #define MAILMBOX_PARSE_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #include "mailmbox_types.h" 45 | 46 | int mailmbox_parse(struct mailmbox_folder * folder); 47 | 48 | int 49 | mailmbox_parse_additionnal(struct mailmbox_folder * folder, 50 | size_t * indx); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /tests/README: -------------------------------------------------------------------------------- 1 | imap-sample 2 | ----------- 3 | connect to Gmail IMAP server and fetches the messages of INBOX to a folder "download" 4 | 5 | syntax: imap-sample mygmailaccount@gmail.com mypassword 6 | 7 | 8 | mime-parse 9 | ---------- 10 | parse a MIME message and show the structure 11 | 12 | syntax: mime-parse emailfile.eml 13 | 14 | 15 | mime-create 16 | ----------- 17 | create a message and show the resulting RFC 2822 format 18 | 19 | syntax: mime-create 20 | 21 | 22 | compose-msg 23 | ----------- 24 | 25 | creates a RFC 2822 message with MIME parts 26 | 27 | syntax: compose-msg "text" filename 28 | 29 | 30 | 31 | all the following programs will take as argument : 32 | 33 | --driver=(pop3|imap|nntp|mbox|mh) -d pop3 (pop3|imap|nntp|mbox|mh) 34 | 35 | default driver is mbox 36 | 37 | --server={server-name} -s {server-name} 38 | --port={port-number} -p {port-number} 39 | --tls -t 40 | --starttls -x 41 | --user={login} -u {login} 42 | --password={password} -v {password} 43 | --path={mailbox} -l {mailbox} 44 | --apop -a 45 | --cache={directory} -c {directory} 46 | 47 | the default driver is mbox with the path /var/mail/$USER 48 | 49 | frm-simple, frm, frm-tree 50 | ------------------------- 51 | 52 | frm-simple will list all the mails of a mailbox without any MIME decoding. 53 | 54 | frm will list all the mails of a mailbox and will decode the fields. 55 | 56 | frm-tree will do the same thing as frm and will also show the threads 57 | of the folder. 58 | 59 | 60 | fetch-attachment 61 | ---------------- 62 | 63 | fetch-attachment gets all the named attachment of the given message 64 | of the chosen mailbox and writes them on the current directory. 65 | 66 | The program should be given message numbers (as given by frm) as 67 | additionnal arguments. 68 | 69 | 70 | readmsg-simple, readmsg 71 | ----------------------- 72 | 73 | readmsg-simple will display the content of the given messages. 74 | All the content (headers and body) will be displayed. 75 | 76 | readmsg will display only the text parts of the given messages. 77 | 78 | The program should be given message numbers (as given by frm) as 79 | additionnal arguments. 80 | -------------------------------------------------------------------------------- /src/main/libetpan_version.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001 - 2003 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef LIBETPAN_VERSION_H 33 | 34 | #define LIBETPAN_VERSION_H 35 | 36 | #ifndef LIBETPAN_VERSION_MAJOR 37 | #define LIBETPAN_VERSION_MAJOR @VERSION_MAJOR@ 38 | #endif 39 | 40 | #ifndef LIBETPAN_VERSION_MINOR 41 | #define LIBETPAN_VERSION_MINOR @VERSION_MINOR@ 42 | #endif 43 | 44 | #ifndef LIBETPAN_REENTRANT 45 | #if @REENTRANT@ 46 | #define LIBETPAN_REENTRANT 1 47 | #endif 48 | #endif 49 | 50 | int libetpan_get_version_major(void); 51 | int libetpan_get_version_minor(void); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/data-types/maillock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: maillock.h,v 1.5 2004/11/21 21:53:31 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAILLOCK_H 37 | 38 | #define MAILLOCK_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | int maillock_read_lock(const char * filename, int fd); 45 | int maillock_read_unlock(const char * filename, int fd); 46 | int maillock_write_lock(const char * filename, int fd); 47 | int maillock_write_unlock(const char * filename, int fd); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/driver/implementation/db/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | dbdriver.h \ 34 | dbdriver_message.h \ 35 | dbdriver_types.h \ 36 | dbstorage.h 37 | 38 | AM_CPPFLAGS = -I$(top_builddir)/include \ 39 | -I$(top_srcdir)/src/driver/interface \ 40 | -I$(top_srcdir)/src/driver/tools \ 41 | -I$(top_srcdir)/src/low-level/mime \ 42 | -I$(top_srcdir)/src/low-level/imf \ 43 | -I$(top_srcdir)/src/data-types 44 | 45 | noinst_LTLIBRARIES = libdb.la 46 | 47 | libdb_la_SOURCES = \ 48 | dbdriver.c \ 49 | dbdriver_message.c \ 50 | dbstorage.c 51 | -------------------------------------------------------------------------------- /src/main/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | # We export the package name, version and reentrant flag in the public 33 | # header file, but these values are only known at compile time. Thus, 34 | # we use a file generated by configure. 35 | EXTRA_DIST = libetpan_version.h.in 36 | 37 | etpaninclude_HEADERS = libetpan.h libetpan_version.h 38 | 39 | AM_CPPFLAGS = -I$(top_builddir)/include 40 | 41 | noinst_LTLIBRARIES = libmain.la 42 | 43 | libmain_la_SOURCES = libetpan_version.c 44 | 45 | etpancompatincludedir = $(includedir) 46 | etpancompatinclude_HEADERS = libetpan.h 47 | -------------------------------------------------------------------------------- /src/low-level/imap/quota_parser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef QUOTA_PARSER_H 33 | 34 | #define QUOTA_PARSER_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | #include "mailimap_parser.h" 41 | #include "quota_types.h" 42 | 43 | int 44 | mailimap_quota_parse(int calling_parser, mailstream * fd, 45 | MMAPString * buffer, struct mailimap_parser_context * parser_ctx, size_t * indx, 46 | struct mailimap_extension_data ** result, 47 | size_t progr_rate, progress_function * progr_fun); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/low-level/imf/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | EXTRA_DIST = TODO 33 | 34 | etpaninclude_HEADERS = \ 35 | mailimf.h mailimf_types.h mailimf_write_file.h \ 36 | mailimf_types_helper.h \ 37 | mailimf_write_generic.h mailimf_write_mem.h 38 | 39 | AM_CPPFLAGS = -I$(top_builddir)/include \ 40 | -I$(top_srcdir)/src/data-types \ 41 | -I$(top_srcdir)/src/low-level/mime 42 | 43 | noinst_LTLIBRARIES = libimf.la 44 | 45 | libimf_la_SOURCES = \ 46 | mailimf.c mailimf_types.c mailimf_write.h \ 47 | mailimf_write_file.c mailimf_types_helper.c \ 48 | mailimf_write_generic.c mailimf_write_mem.c 49 | -------------------------------------------------------------------------------- /src/low-level/nntp/newsnntp_socket.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: newsnntp_socket.h,v 1.14 2006/05/22 13:39:42 hoa Exp $ 34 | */ 35 | 36 | #ifndef NEWSNNTP_SOCKET_H 37 | 38 | #define NEWSNNTP_SOCKET_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #include 45 | #ifdef HAVE_INTTYPES_H 46 | # include 47 | #endif 48 | 49 | #include 50 | 51 | LIBETPAN_EXPORT 52 | int newsnntp_socket_connect(newsnntp * f, const char * server, uint16_t port); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /src/low-level/smtp/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | EXTRA_DIST = TODO 33 | 34 | etpaninclude_HEADERS = \ 35 | mailsmtp.h mailsmtp_helper.h mailsmtp_socket.h mailsmtp_ssl.h \ 36 | mailsmtp_types.h mailsmtp_oauth2.h 37 | 38 | AM_CPPFLAGS = -I$(top_builddir)/include \ 39 | -I$(top_srcdir)/src/data-types 40 | 41 | noinst_LTLIBRARIES = libsmtp.la 42 | 43 | libsmtp_la_SOURCES = \ 44 | mailsmtp.h mailsmtp.c \ 45 | mailsmtp_helper.h mailsmtp_helper.c \ 46 | mailsmtp_socket.h mailsmtp_socket.c \ 47 | mailsmtp_ssl.h mailsmtp_ssl.c \ 48 | mailsmtp_oauth2.h mailsmtp_oauth2.c \ 49 | mailsmtp_private.h 50 | -------------------------------------------------------------------------------- /src/data-types/mailsem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mailsem.h,v 1.2 2004/11/21 21:53:31 hoa Exp $ 34 | */ 35 | 36 | #ifndef MAILSEM_H 37 | 38 | #define MAILSEM_H 39 | 40 | #include 41 | 42 | struct mailsem { 43 | void * sem_sem; 44 | int sem_kind; 45 | }; 46 | 47 | LIBETPAN_EXPORT 48 | struct mailsem * mailsem_new(void); 49 | 50 | LIBETPAN_EXPORT 51 | void mailsem_free(struct mailsem * sem); 52 | 53 | LIBETPAN_EXPORT 54 | int mailsem_up(struct mailsem * sem); 55 | 56 | LIBETPAN_EXPORT 57 | int mailsem_down(struct mailsem * sem); 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/data-types/mailstream_cancel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef MAILSTREAM_CANCEL_H 32 | 33 | #define MAILSTREAM_CANCEL_H 34 | 35 | #include "mailstream_cancel_types.h" 36 | 37 | struct mailstream_cancel * mailstream_cancel_new(void); 38 | void mailstream_cancel_free(struct mailstream_cancel * cancel); 39 | 40 | int mailstream_cancel_cancelled(struct mailstream_cancel * cancel); 41 | void mailstream_cancel_notify(struct mailstream_cancel * cancel); 42 | void mailstream_cancel_ack(struct mailstream_cancel * cancel); 43 | int mailstream_cancel_get_fd(struct mailstream_cancel * cancel); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/engine/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | mailengine.h \ 34 | mailprivacy.h \ 35 | mailprivacy_gnupg.h \ 36 | mailprivacy_smime.h \ 37 | mailprivacy_types.h \ 38 | mailprivacy_tools.h 39 | 40 | AM_CPPFLAGS = -I$(top_builddir)/include \ 41 | -I$(top_srcdir)/src/driver/interface \ 42 | -I$(top_srcdir)/src/driver/implementation/imap 43 | 44 | noinst_LTLIBRARIES = libengine.la 45 | 46 | libengine_la_SOURCES = \ 47 | mailprivacy_tools_private.h \ 48 | mailengine.c \ 49 | mailprivacy.c \ 50 | mailprivacy_gnupg.c \ 51 | mailprivacy_smime.c \ 52 | mailprivacy_tools.c 53 | -------------------------------------------------------------------------------- /src/windows/mmap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #include "win_etpan.h" 32 | 33 | 34 | void *mmap (void *__addr, size_t __len, int __prot, 35 | int __flags, int __fd, size_t __offset) { 36 | #ifdef _DEBUG 37 | fprintf( stderr, "mmap inimplemented\n"); 38 | #endif 39 | return MAP_FAILED; 40 | } 41 | 42 | int munmap (void *__addr, size_t __len) { 43 | #ifdef _DEBUG 44 | fprintf( stderr, "mmap inimplemented\n"); 45 | #endif 46 | return -1; 47 | } 48 | 49 | int msync (void *__addr, size_t __len, int __flags) { 50 | #ifdef _DEBUG 51 | fprintf( stderr, "mmap inimplemented\n"); 52 | #endif 53 | return -1; 54 | } 55 | -------------------------------------------------------------------------------- /src/low-level/imap/enable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2011 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef ENABLE_H 33 | 34 | #define ENABLE_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | #include 41 | 42 | LIBETPAN_EXPORT 43 | extern struct mailimap_extension_api mailimap_extension_enable; 44 | 45 | LIBETPAN_EXPORT 46 | int mailimap_enable(mailimap * session, struct mailimap_capability_data * capabilities, 47 | struct mailimap_capability_data ** result); 48 | 49 | LIBETPAN_EXPORT 50 | int mailimap_has_enable(mailimap * session); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/driver/implementation/feed/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | etpaninclude_HEADERS = \ 33 | feeddriver.h \ 34 | feeddriver_message.h \ 35 | feeddriver_types.h \ 36 | feedstorage.h 37 | 38 | AM_CPPFLAGS = -I$(top_builddir)/include \ 39 | -I$(top_srcdir)/src/driver/interface \ 40 | -I$(top_srcdir)/src/driver/tools \ 41 | -I$(top_srcdir)/src/low-level/feed \ 42 | -I$(top_srcdir)/src/low-level/mime \ 43 | -I$(top_srcdir)/src/low-level/imf \ 44 | -I$(top_srcdir)/src/data-types 45 | 46 | noinst_LTLIBRARIES = libfeed.la 47 | 48 | libfeed_la_SOURCES = \ 49 | feeddriver.c \ 50 | feeddriver_message.c \ 51 | feedstorage.c 52 | -------------------------------------------------------------------------------- /src/low-level/feed/newsfeed_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2014 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | #ifndef NEWSFEED_PRIVATE_H 32 | 33 | #define NEWSFEED_PRIVATE_H 34 | 35 | #include "newsfeed_types.h" 36 | #include "mmapstring.h" 37 | 38 | #ifdef HAVE_EXPAT 39 | #include 40 | #endif 41 | 42 | struct newsfeed_parser_context { 43 | unsigned int depth; 44 | unsigned int location; 45 | MMAPString *str; 46 | 47 | struct newsfeed * feed; 48 | struct newsfeed_item * curitem; 49 | 50 | int error; 51 | 52 | #ifdef HAVE_EXPAT 53 | void * parser; 54 | #endif 55 | }; 56 | 57 | time_t newsfeed_rfc822_date_parse(char * text); 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/driver/implementation/Makefile.am: -------------------------------------------------------------------------------- 1 | # libEtPan! -- a mail stuff library 2 | # 3 | # Copyright (C) 2007 g10 Code GmbH 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 3. Neither the name of the libEtPan! project nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | # SUCH DAMAGE. 29 | 30 | include $(top_srcdir)/rules.mk 31 | 32 | SUBDIRS = data-message \ 33 | imap \ 34 | maildir \ 35 | mbox \ 36 | mh \ 37 | mime-message \ 38 | nntp \ 39 | pop3 \ 40 | hotmail \ 41 | db \ 42 | feed 43 | 44 | noinst_LTLIBRARIES = libimplementation.la 45 | libimplementation_la_SOURCES = 46 | libimplementation_la_LIBADD = \ 47 | data-message/libdata-message.la \ 48 | imap/libimap.la \ 49 | maildir/libmaildir.la \ 50 | mbox/libmbox.la \ 51 | mh/libmh.la \ 52 | mime-message/libmime-message.la \ 53 | nntp/libnntp.la \ 54 | pop3/libpop3.la \ 55 | hotmail/libhotmail.la \ 56 | db/libdb.la \ 57 | feed/libfeed.la 58 | -------------------------------------------------------------------------------- /src/driver/implementation/mime-message/mime_message_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libEtPan! -- a mail stuff library 3 | * 4 | * Copyright (C) 2001, 2005 - DINH Viet Hoa 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the libEtPan! project nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | * SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * $Id: mime_message_driver.h,v 1.5 2004/12/13 23:18:28 hoa Exp $ 34 | */ 35 | 36 | #ifndef MIME_MESSAGE_DRIVER_H 37 | 38 | #define MIME_MESSAGE_DRIVER_H 39 | 40 | #include 41 | 42 | #define LIBETPAN_MIME_MESSAGE 43 | 44 | extern mailmessage_driver * mime_message_driver; 45 | 46 | mailmessage * mime_message_init(struct mailmime * mime); 47 | 48 | void mime_message_detach_mime(mailmessage * msg); 49 | 50 | /* deprecated */ 51 | int mime_message_set_tmpdir(mailmessage * msg, char * tmpdir); 52 | 53 | #endif 54 | --------------------------------------------------------------------------------