Permalink
Browse files

Updated to latest libetpan

  • Loading branch information...
2 parents 91b6a8e + 247437a commit e5fa785d33240dc23636aa685ee3e8ec8689ac04 @mronge committed May 24, 2012
Showing with 1,515 additions and 385 deletions.
  1. +3 −3 autogen.sh
  2. +4 −1 build-mac/include/config.h
  3. +0 −174 build-mac/include/config.h~
  4. +1 −0 build-mac/include/libetpan/mailimap.h
  5. +4 −2 build-mac/include/libetpan/mailimap_extension_types.h
  6. +3 −0 build-mac/include/libetpan/mailimap_socket.h
  7. +7 −0 build-mac/include/libetpan/mailimap_ssl.h
  8. +20 −8 build-mac/include/libetpan/mailimap_types.h
  9. +7 −0 build-mac/include/libetpan/mailimap_types_helper.h
  10. +2 −1 build-mac/include/libetpan/mailpop3_types.h
  11. +11 −0 build-mac/include/libetpan/mailsmtp.h
  12. +8 −0 build-mac/include/libetpan/mailsmtp_helper.h
  13. +3 −2 build-mac/include/libetpan/mailsmtp_types.h
  14. +1 −0 build-mac/include/libetpan/mailstream.h
  15. +98 −0 build-mac/include/libetpan/mailstream_cfstream.h
  16. +85 −0 build-mac/include/libetpan/xgmlabels.h
  17. +18 −5 build-mac/libetpan.xcodeproj/project.pbxproj
  18. +11 −6 build-windows/build_headers.list
  19. +28 −0 build-windows/libetpan/libetpan.vcproj
  20. +1 −1 src/data-types/Makefile.am
  21. +33 −16 src/data-types/charconv.c
  22. +1 −3 src/data-types/mailstream.c
  23. +1 −0 src/data-types/mailstream.h
  24. +114 −43 src/data-types/mailstream_cfstream.c
  25. +6 −1 src/data-types/mailstream_cfstream.h
  26. +12 −2 src/data-types/mailstream_socket.c
  27. +15 −3 src/data-types/mailstream_ssl.c
  28. +3 −2 src/low-level/imap/Makefile.am
  29. +7 −4 src/low-level/imap/mailimap.c
  30. +1 −0 src/low-level/imap/mailimap.h
  31. +2 −0 src/low-level/imap/mailimap_extension.c
  32. +4 −2 src/low-level/imap/mailimap_extension_types.h
  33. +16 −2 src/low-level/imap/mailimap_parser.c
  34. +6 −0 src/low-level/imap/mailimap_sender.c
  35. +42 −33 src/low-level/imap/mailimap_socket.c
  36. +3 −0 src/low-level/imap/mailimap_socket.h
  37. +25 −6 src/low-level/imap/mailimap_ssl.c
  38. +7 −0 src/low-level/imap/mailimap_ssl.h
  39. +14 −2 src/low-level/imap/mailimap_types.c
  40. +20 −8 src/low-level/imap/mailimap_types.h
  41. +19 −14 src/low-level/imap/mailimap_types_helper.c
  42. +7 −0 src/low-level/imap/mailimap_types_helper.h
  43. +478 −0 src/low-level/imap/xgmlabels.c
  44. +85 −0 src/low-level/imap/xgmlabels.h
  45. +4 −0 src/low-level/mime/mailmime_decode.c
  46. +3 −1 src/low-level/nntp/newsnntp_socket.c
  47. +12 −3 src/low-level/nntp/newsnntp_ssl.c
  48. +8 −1 src/low-level/pop3/mailpop3.c
  49. +4 −1 src/low-level/pop3/mailpop3_socket.c
  50. +11 −3 src/low-level/pop3/mailpop3_ssl.c
  51. +2 −1 src/low-level/pop3/mailpop3_types.h
  52. +128 −17 src/low-level/smtp/mailsmtp.c
  53. +11 −0 src/low-level/smtp/mailsmtp.h
  54. +53 −4 src/low-level/smtp/mailsmtp_helper.c
  55. +8 −0 src/low-level/smtp/mailsmtp_helper.h
  56. +4 −1 src/low-level/smtp/mailsmtp_socket.c
  57. +14 −5 src/low-level/smtp/mailsmtp_ssl.c
  58. +3 −2 src/low-level/smtp/mailsmtp_types.h
  59. +2 −2 tests/mime-create.c
  60. +12 −0 tests/smtpsend.c
View
@@ -56,9 +56,6 @@ else
unset conf_flags
fi
-echo "Running aclocal..."
-aclocal -I m4
-
if test "$gettext" -eq 1; then
echo "Running gettextize... Ignore non-fatal messages."
echo "no" | gettextize --force --copy
@@ -69,6 +66,9 @@ if test "$libtool" -eq 1; then
$libtoolize --force --copy
fi
+echo "Running aclocal..."
+aclocal -I m4
+
echo "Running autoheader..."
autoheader
echo "Running autoconf ..."
@@ -119,7 +119,7 @@
#define LIBETPAN_REENTRANT 1
/* Define this to the version of libEtPan */
-#define LIBETPAN_VERSION "1.1-dev-20111016"
+#define LIBETPAN_VERSION "1.1-dev-20120524"
/* Define this to the major version of libEtPan */
#define LIBETPAN_VERSION_MAJOR 1
@@ -146,6 +146,9 @@
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libetpan"
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.1"
View
@@ -1,174 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Check for Linux's /usr/include/features.h
- */
-#ifdef _FEATURES_H
-# error config.h must be first file included
-#endif
-
-/* Define to detected Berkeley DB major version number */
-#define DBVERS 1
-
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#define HAVE_ARPA_INET_H 1
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#define HAVE_CTYPE_H 1
-
-/* Define to use curl */
-#define HAVE_CURL 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to use expat */
-#define HAVE_EXPAT 1
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define to use getopt_long */
-#define HAVE_GETOPT_LONG 1
-
-/* Define to 1 if you have the `getpagesize' function. */
-#define HAVE_GETPAGESIZE 1
-
-/* Define if you have the iconv() function. */
-#define HAVE_ICONV 1
-
-/* prototype of iconv() has const parameters */
-/* #undef HAVE_ICONV_PROTO_CONST */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to enable IPv6 support. */
-#define HAVE_IPV6 1
-
-/* Define to 1 if you have the `lockfile' library (-llockfile). */
-/* #undef HAVE_LIBLOCKFILE */
-
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-/* #undef HAVE_LIBNSL */
-
-/* Define to 1 if you have the `socket' library (-lsocket). */
-/* #undef HAVE_LIBSOCKET */
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Defined if we run on a W32 API based system */
-/* #undef HAVE_MINGW32_SYSTEM */
-
-/* Define to 1 if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#define HAVE_NETDB_H 1
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#define HAVE_NETINET_IN_H 1
-
-/* Define to 1 if you have the <pthread.h> header file. */
-#define HAVE_PTHREAD_H 1
-
-/* Define to use setenv */
-#define HAVE_SETENV 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-#define HAVE_SYS_MMAN_H 1
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#define HAVE_SYS_SELECT_H 1
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#define HAVE_SYS_SOCKET_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the <winsock2.h> header file. */
-/* #undef HAVE_WINSOCK2_H */
-
-/* Define to include multithreading support */
-#define LIBETPAN_REENTRANT 1
-
-/* Define this to the version of libEtPan */
-#define LIBETPAN_VERSION "1.1-dev-20111016"
-
-/* Define this to the major version of libEtPan */
-#define LIBETPAN_VERSION_MAJOR 1
-
-/* Define this to the minor version of libEtPan */
-#define LIBETPAN_VERSION_MINOR 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libetpan"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "libetpan-devel@lists.sourceforge.net"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "libetpan"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libetpan 1.1"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "libetpan"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.1"
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to be lazy on protocol syntax */
-#define UNSTRICT_SYNTAX 1
-
-/* Define to use GnuTLS */
-/* #undef USE_GNUTLS */
-
-/* Define to use SASL */
-#define USE_SASL 1
-
-/* Define to use OpenSSL */
-#define USE_SSL 1
-
-/* Version number of package */
-#define VERSION "1.1"
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
@@ -55,6 +55,7 @@ extern "C" {
#include <libetpan/quota.h>
#include <libetpan/namespace.h>
#include <libetpan/xlist.h>
+#include <libetpan/xgmlabels.h>
/*
mailimap_connect()
@@ -13,7 +13,8 @@ enum {
MAILIMAP_EXTENSION_UIDPLUS, /* UIDPLUS */
MAILIMAP_EXTENSION_QUOTA, /* quota */
MAILIMAP_EXTENSION_NAMESPACE, /* namespace */
- MAILIMAP_EXTENSION_XLIST /* XLIST (Gmail and Zimbra have this) */
+ MAILIMAP_EXTENSION_XLIST, /* XLIST (Gmail and Zimbra have this) */
+ MAILIMAP_EXTENSION_XGMLABELS /* X-GM-LABELS (Gmail) */
};
@@ -25,7 +26,8 @@ enum {
enum {
MAILIMAP_EXTENDED_PARSER_RESPONSE_DATA,
MAILIMAP_EXTENDED_PARSER_RESP_TEXT_CODE,
- MAILIMAP_EXTENDED_PARSER_MAILBOX_DATA
+ MAILIMAP_EXTENDED_PARSER_MAILBOX_DATA,
+ MAILIMAP_EXTENDED_PARSER_FETCH_DATA
};
/*
@@ -48,6 +48,9 @@ extern "C" {
#include <libetpan/mailimap_types.h>
LIBETPAN_EXPORT
+int mailimap_socket_connect_voip(mailimap * f, const char * server, uint16_t port, int voip_enabled);
+
+LIBETPAN_EXPORT
int mailimap_socket_connect(mailimap * f, const char * server, uint16_t port);
LIBETPAN_EXPORT
@@ -51,9 +51,16 @@ LIBETPAN_EXPORT
int mailimap_ssl_connect(mailimap * f, const char * server, uint16_t port);
LIBETPAN_EXPORT
+int mailimap_ssl_connect_voip(mailimap * f, const char * server, uint16_t port, int voip_enabled);
+
+LIBETPAN_EXPORT
int mailimap_ssl_connect_with_callback(mailimap * f, const char * server, uint16_t port,
void (* callback)(struct mailstream_ssl_context * ssl_context, void * data), void * data);
+LIBETPAN_EXPORT
+int mailimap_ssl_connect_voip_with_callback(mailimap * f, const char * server, uint16_t port, int voip_enabled,
+ void (* callback)(struct mailstream_ssl_context * ssl_context, void * data), void * data);
+
#ifdef __cplusplus
}
#endif
@@ -1824,35 +1824,40 @@ mailimap_message_data_free(struct mailimap_message_data * msg_data);
enum {
MAILIMAP_MSG_ATT_ITEM_ERROR, /* on parse error */
MAILIMAP_MSG_ATT_ITEM_DYNAMIC, /* dynamic message attributes (flags) */
- MAILIMAP_MSG_ATT_ITEM_STATIC /* static messages attributes
+ MAILIMAP_MSG_ATT_ITEM_STATIC, /* static messages attributes
(message content) */
+ MAILIMAP_MSG_ATT_ITEM_EXTENSION /* extension data */
};
/*
mailimap_msg_att_item is a message attribute
- type is the type of message attribute, the value can be
- MAILIMAP_MSG_ATT_ITEM_DYNAMIC or MAILIMAP_MSG_ATT_ITEM_STATIC
+ MAILIMAP_MSG_ATT_ITEM_DYNAMIC, MAILIMAP_MSG_ATT_ITEM_STATIC or MAILIMAP_MSG_ATT_ITEM_EXTENSION
- - msg_att_dyn is a dynamic message attribute when type is
+ - att_dyn is a dynamic message attribute when type is
MAILIMAP_MSG_ATT_ITEM_DYNAMIC
- - msg_att_static is a static message attribute when type is
+ - att_static is a static message attribute when type is
MAILIMAP_MSG_ATT_ITEM_STATIC
+
+ - att_extension_data is an extension data.
*/
struct mailimap_msg_att_item {
int att_type;
union {
struct mailimap_msg_att_dynamic * att_dyn; /* can be NULL */
struct mailimap_msg_att_static * att_static; /* can be NULL */
+ struct mailimap_extension_data * att_extension_data; /* can be NULL */
} att_data;
};
struct mailimap_msg_att_item *
mailimap_msg_att_item_new(int att_type,
struct mailimap_msg_att_dynamic * att_dyn,
- struct mailimap_msg_att_static * att_static);
+ struct mailimap_msg_att_static * att_static,
+ struct mailimap_extension_data * att_extension_data);
void
mailimap_msg_att_item_free(struct mailimap_msg_att_item * item);
@@ -2659,8 +2664,9 @@ enum {
additional information */
MAILIMAP_FETCH_ATT_UID, /* to fetch the unique identifier */
MAILIMAP_FETCH_ATT_BODY_SECTION, /* to fetch a given part */
- MAILIMAP_FETCH_ATT_BODY_PEEK_SECTION /* to fetch a given part without
+ MAILIMAP_FETCH_ATT_BODY_PEEK_SECTION, /* to fetch a given part without
marking the message as read */
+ MAILIMAP_FETCH_ATT_EXTENSION
};
@@ -2673,27 +2679,31 @@ enum {
MAILIMAP_FETCH_ATT_RFC822_HEADER, MAILIMAP_FETCH_ATT_RFC822_SIZE,
MAILIMAP_FETCH_ATT_RFC822_TEXT, MAILIMAP_FETCH_ATT_BODY,
MAILIMAP_FETCH_ATT_BODYSTRUCTURE, MAILIMAP_FETCH_ATT_UID,
- MAILIMAP_FETCH_ATT_BODY_SECTION or MAILIMAP_FETCH_ATT_BODY_PEEK_SECTION
+ MAILIMAP_FETCH_ATT_BODY_SECTION, MAILIMAP_FETCH_ATT_BODY_PEEK_SECTION,
+ MAILIMAP_FETCH_ATT_EXTENSION
- section is the location of the part to fetch if type is
MAILIMAP_FETCH_ATT_BODY_SECTION or MAILIMAP_FETCH_ATT_BODY_PEEK_SECTION
- offset is the first byte to fetch in the given part
- size is the maximum size of the part to fetch
+
+ - att_extension: keyword to send when MAILIMAP_FETCH_ATT_EXTENSION is used
*/
struct mailimap_fetch_att {
int att_type;
struct mailimap_section * att_section;
uint32_t att_offset;
uint32_t att_size;
+ char * att_extension; /* can be NULL */
};
LIBETPAN_EXPORT
struct mailimap_fetch_att *
mailimap_fetch_att_new(int att_type, struct mailimap_section * att_section,
- uint32_t att_offset, uint32_t att_size);
+ uint32_t att_offset, uint32_t att_size, char * att_extension);
LIBETPAN_EXPORT
@@ -3217,6 +3227,8 @@ struct mailimap_selection_info {
uint32_t sel_exists;
uint32_t sel_recent;
uint32_t sel_unseen;
+ uint8_t sel_has_exists:1;
+ uint8_t sel_has_recent:1;
};
struct mailimap_selection_info *
@@ -320,6 +320,13 @@ mailimap_fetch_att_new_body_peek_section_partial(struct mailimap_section * secti
uint32_t offset, uint32_t size);
/*
+ creates a mailimap_fetch_att extension
+*/
+
+struct mailimap_fetch_att *
+ mailimap_fetch_att_new_extension(char * ext_keyword);
+
+/*
this function creates a mailimap_fetch_type structure to request
(FLAGS INTERNALDATE RFC822.SIZE ENVELOPE) of a message
*/
@@ -62,7 +62,8 @@ enum {
MAILPOP3_ERROR_APOP_NOT_SUPPORTED,
MAILPOP3_ERROR_CAPA_NOT_SUPPORTED,
MAILPOP3_ERROR_STLS_NOT_SUPPORTED,
- MAILPOP3_ERROR_SSL
+ MAILPOP3_ERROR_SSL,
+ MAILPOP3_ERROR_QUIT_FAILED
};
struct mailpop3
Oops, something went wrong.

0 comments on commit e5fa785

Please sign in to comment.