[balsa/wip/gtk4: 312/351] More header files: Add '; ' after G_DECLARE_*_TYPE
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gtk4: 312/351] More header files: Add '; ' after G_DECLARE_*_TYPE
- Date: Wed, 23 May 2018 21:43:12 +0000 (UTC)
commit 4b7f2515498ca4c13943240d19bfd6b0aaeeb95c
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Apr 29 13:18:07 2018 -0400
More header files: Add ';' after G_DECLARE_*_TYPE
and uncrustify them.
libbalsa/address-book-extern.h | 36 +++---
libbalsa/address-book-gpe.h | 36 +++---
libbalsa/address-book-ldap.h | 68 +++++-----
libbalsa/address-book-ldif.h | 12 +-
libbalsa/address-book-osmo.h | 8 +-
libbalsa/address-book-rubrica.h | 24 ++--
libbalsa/address-book-text.h | 40 +++---
libbalsa/address-book-vcard.h | 22 ++--
libbalsa/address-book.h | 140 ++++++++++---------
libbalsa/address-view.h | 56 ++++----
libbalsa/address.h | 93 +++++++------
libbalsa/gmime-gpgme-signature.h | 4 +-
libbalsa/identity.h | 5 +-
libbalsa/imap-server.h | 69 +++++-----
libbalsa/libbalsa-vfs.h | 96 +++++++-------
libbalsa/mailbox.h | 4 +-
libbalsa/mailbox_imap.h | 16 +-
libbalsa/mailbox_local.h | 2 +-
libbalsa/mailbox_maildir.h | 6 +-
libbalsa/mailbox_mbox.h | 6 +-
libbalsa/mailbox_mh.h | 6 +-
libbalsa/mailbox_pop3.h | 8 +-
libbalsa/mailbox_remote.h | 2 +-
libbalsa/message.h | 2 +-
libbalsa/rfc2445.h | 46 +++---
libbalsa/server.h | 140 +++++++++++---------
libbalsa/smtp-server.h | 38 +++---
libnetclient/net-client-pop.h | 215 ++++++++++++++++++++----------
libnetclient/net-client-smtp.h | 172 +++++++++++++++--------
libnetclient/net-client.h | 230 +++++++++++++++++++++-----------
src/ab-window.h | 17 ++-
src/balsa-cite-bar.h | 18 ++-
src/balsa-index.h | 276 ++++++++++++++++++++------------------
src/balsa-mblist.h | 71 +++++-----
src/balsa-message.h | 161 ++++++++++++-----------
src/balsa-mime-widget-image.h | 16 ++-
src/balsa-mime-widget-text.h | 26 ++--
src/balsa-mime-widget.h | 39 +++---
src/balsa-print-object-decor.h | 2 +-
src/balsa-print-object-header.h | 2 +-
src/balsa-print-object.h | 2 +-
41 files changed, 1268 insertions(+), 964 deletions(-)
---
diff --git a/libbalsa/address-book-extern.h b/libbalsa/address-book-extern.h
index e4e5281..43f52aa 100644
--- a/libbalsa/address-book-extern.h
+++ b/libbalsa/address-book-extern.h
@@ -6,14 +6,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,27 +29,31 @@
#include <time.h>
#define LIBBALSA_TYPE_ADDRESS_BOOK_EXTERN (libbalsa_address_book_extern_get_type())
-G_DECLARE_FINAL_TYPE(LibBalsaAddressBookExtern, libbalsa_address_book_extern,
- LIBBALSA, ADDRESS_BOOK_EXTERN, LibBalsaAddressBook)
-LibBalsaAddressBook *libbalsa_address_book_externq_new(const gchar * name,
- const gchar * load,
- const char * save);
+G_DECLARE_FINAL_TYPE(LibBalsaAddressBookExtern,
+ libbalsa_address_book_extern,
+ LIBBALSA,
+ ADDRESS_BOOK_EXTERN,
+ LibBalsaAddressBook);
+
+LibBalsaAddressBook *libbalsa_address_book_externq_new(const gchar *name,
+ const gchar *load,
+ const char *save);
/*
* Getters
*/
const gchar
- *libbalsa_address_book_extern_get_load(LibBalsaAddressBookExtern * addr_extern);
+*libbalsa_address_book_extern_get_load(LibBalsaAddressBookExtern *addr_extern);
const gchar
- *libbalsa_address_book_extern_get_save(LibBalsaAddressBookExtern * addr_extern);
+*libbalsa_address_book_extern_get_save(LibBalsaAddressBookExtern *addr_extern);
/*
* Setters
*/
-void libbalsa_address_book_extern_set_load(LibBalsaAddressBookExtern * addr_extern,
- const gchar * load);
-void libbalsa_address_book_extern_set_save(LibBalsaAddressBookExtern * addr_extern,
- const gchar * save);
+void libbalsa_address_book_extern_set_load(LibBalsaAddressBookExtern *addr_extern,
+ const gchar *load);
+void libbalsa_address_book_extern_set_save(LibBalsaAddressBookExtern *addr_extern,
+ const gchar *save);
#endif
diff --git a/libbalsa/address-book-gpe.h b/libbalsa/address-book-gpe.h
index 27a63d5..77bf73f 100644
--- a/libbalsa/address-book-gpe.h
+++ b/libbalsa/address-book-gpe.h
@@ -6,14 +6,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -26,24 +26,28 @@
#define __LIBBALSA_ADDRESS_BOOK_GPE_H__
#ifndef BALSA_VERSION
-# error "Include config.h before this file."
+# error "Include config.h before this file."
#endif
#ifdef HAVE_SQLITE
-#ifdef HAVE_SQLITE3
-#include <sqlite3.h>
-#else /* HAVE_SQLITE3 */
-#include <sqlite.h>
-#endif /* HAVE_SQLITE3 */
+# ifdef HAVE_SQLITE3
+# include <sqlite3.h>
+# else /* HAVE_SQLITE3 */
+# include <sqlite.h>
+# endif /* HAVE_SQLITE3 */
+
+# include "address-book.h"
-#include "address-book.h"
+# define LIBBALSA_TYPE_ADDRESS_BOOK_GPE (libbalsa_address_book_gpe_get_type())
-#define LIBBALSA_TYPE_ADDRESS_BOOK_GPE (libbalsa_address_book_gpe_get_type())
-G_DECLARE_FINAL_TYPE(LibBalsaAddressBookGpe, libbalsa_address_book_gpe,
- LIBBALSA, ADDRESS_BOOK_GPE, LibBalsaAddressBook)
+G_DECLARE_FINAL_TYPE(LibBalsaAddressBookGpe,
+ libbalsa_address_book_gpe,
+ LIBBALSA,
+ ADDRESS_BOOK_GPE,
+ LibBalsaAddressBook);
LibBalsaAddressBook *libbalsa_address_book_gpe_new(const gchar *name);
#endif /* HAVE_SQLITE */
-#endif /* __LIBBALSA_ADDRESS_BOOK_GPE_H__ */
+#endif /* __LIBBALSA_ADDRESS_BOOK_GPE_H__ */
diff --git a/libbalsa/address-book-ldap.h b/libbalsa/address-book-ldap.h
index 3481968..6cd42ad 100644
--- a/libbalsa/address-book-ldap.h
+++ b/libbalsa/address-book-ldap.h
@@ -6,14 +6,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -31,43 +31,47 @@
#include "address-book.h"
#define LIBBALSA_TYPE_ADDRESS_BOOK_LDAP (libbalsa_address_book_ldap_get_type())
-G_DECLARE_FINAL_TYPE(LibBalsaAddressBookLdap, libbalsa_address_book_ldap,
- LIBBALSA, ADDRESS_BOOK_LDAP, LibBalsaAddressBook)
+
+G_DECLARE_FINAL_TYPE(LibBalsaAddressBookLdap,
+ libbalsa_address_book_ldap,
+ LIBBALSA,
+ ADDRESS_BOOK_LDAP,
+ LibBalsaAddressBook);
LibBalsaAddressBook *libbalsa_address_book_ldap_new(const gchar *name,
- const gchar *host,
- const gchar *base_dn,
- const gchar *bind_dn,
- const gchar *passwd,
+ const gchar *host,
+ const gchar *base_dn,
+ const gchar *bind_dn,
+ const gchar *passwd,
const gchar *priv_book_dn,
- gboolean enable_tls);
+ gboolean enable_tls);
void libbalsa_address_book_ldap_close_connection(LibBalsaAddressBookLdap *ab);
/*
* Getters
*/
-const gchar * libbalsa_address_book_ldap_get_host (LibBalsaAddressBookLdap * ab_ldap);
-const gchar * libbalsa_address_book_ldap_get_passwd (LibBalsaAddressBookLdap * ab_ldap);
-const gchar * libbalsa_address_book_ldap_get_base_dn(LibBalsaAddressBookLdap * ab_ldap);
-const gchar * libbalsa_address_book_ldap_get_bind_dn(LibBalsaAddressBookLdap * ab_ldap);
-const gchar * libbalsa_address_book_ldap_get_book_dn(LibBalsaAddressBookLdap * ab_ldap);
-gboolean libbalsa_address_book_ldap_get_enable_tls(LibBalsaAddressBookLdap *
- ab_ldap);
+const gchar *libbalsa_address_book_ldap_get_host(LibBalsaAddressBookLdap *ab_ldap);
+const gchar *libbalsa_address_book_ldap_get_passwd(LibBalsaAddressBookLdap *ab_ldap);
+const gchar *libbalsa_address_book_ldap_get_base_dn(LibBalsaAddressBookLdap *ab_ldap);
+const gchar *libbalsa_address_book_ldap_get_bind_dn(LibBalsaAddressBookLdap *ab_ldap);
+const gchar *libbalsa_address_book_ldap_get_book_dn(LibBalsaAddressBookLdap *ab_ldap);
+gboolean libbalsa_address_book_ldap_get_enable_tls(LibBalsaAddressBookLdap *
+ ab_ldap);
/*
* Setters
*/
-void libbalsa_address_book_ldap_set_host (LibBalsaAddressBookLdap * ab_ldap,
- const gchar * host);
-void libbalsa_address_book_ldap_set_passwd (LibBalsaAddressBookLdap * ab_ldap,
- const gchar * passwd);
-void libbalsa_address_book_ldap_set_base_dn (LibBalsaAddressBookLdap * ab_ldap,
- const gchar * base_dn);
-void libbalsa_address_book_ldap_set_bind_dn (LibBalsaAddressBookLdap * ab_ldap,
- const gchar * bind_dn);
-void libbalsa_address_book_ldap_set_book_dn (LibBalsaAddressBookLdap * ab_ldap,
- const gchar * book_dn);
-void libbalsa_address_book_ldap_set_enable_tls(LibBalsaAddressBookLdap * ab_ldap,
- gboolean enable_tls);
+void libbalsa_address_book_ldap_set_host(LibBalsaAddressBookLdap *ab_ldap,
+ const gchar *host);
+void libbalsa_address_book_ldap_set_passwd(LibBalsaAddressBookLdap *ab_ldap,
+ const gchar *passwd);
+void libbalsa_address_book_ldap_set_base_dn(LibBalsaAddressBookLdap *ab_ldap,
+ const gchar *base_dn);
+void libbalsa_address_book_ldap_set_bind_dn(LibBalsaAddressBookLdap *ab_ldap,
+ const gchar *bind_dn);
+void libbalsa_address_book_ldap_set_book_dn(LibBalsaAddressBookLdap *ab_ldap,
+ const gchar *book_dn);
+void libbalsa_address_book_ldap_set_enable_tls(LibBalsaAddressBookLdap *ab_ldap,
+ gboolean enable_tls);
-#endif /* __LIBBALSA_ADDRESS_BOOK_LDAP_H__ */
+#endif /* __LIBBALSA_ADDRESS_BOOK_LDAP_H__ */
diff --git a/libbalsa/address-book-ldif.h b/libbalsa/address-book-ldif.h
index 15209d5..0043510 100644
--- a/libbalsa/address-book-ldif.h
+++ b/libbalsa/address-book-ldif.h
@@ -28,10 +28,14 @@
#include "address-book-text.h"
#define LIBBALSA_TYPE_ADDRESS_BOOK_LDIF (libbalsa_address_book_ldif_get_type())
-G_DECLARE_FINAL_TYPE(LibBalsaAddressBookLdif, libbalsa_address_book_ldif,
- LIBBALSA, ADDRESS_BOOK_LDIF, LibBalsaAddressBookText)
-LibBalsaAddressBook *libbalsa_address_book_ldif_new(const gchar * name,
- const gchar * path);
+G_DECLARE_FINAL_TYPE(LibBalsaAddressBookLdif,
+ libbalsa_address_book_ldif,
+ LIBBALSA,
+ ADDRESS_BOOK_LDIF,
+ LibBalsaAddressBookText);
+
+LibBalsaAddressBook *libbalsa_address_book_ldif_new(const gchar *name,
+ const gchar *path);
#endif /* __LIBBALSA_ADDRESS_BOOK_LDIF_H__ */
diff --git a/libbalsa/address-book-osmo.h b/libbalsa/address-book-osmo.h
index c73a6f3..c5de52b 100644
--- a/libbalsa/address-book-osmo.h
+++ b/libbalsa/address-book-osmo.h
@@ -32,8 +32,12 @@
#include "address-book.h"
#define LIBBALSA_TYPE_ADDRESS_BOOK_OSMO (libbalsa_address_book_osmo_get_type())
-G_DECLARE_FINAL_TYPE(LibBalsaAddressBookOsmo, libbalsa_address_book_osmo,
- LIBBALSA, ADDRESS_BOOK_OSMO, LibBalsaAddressBook)
+
+G_DECLARE_FINAL_TYPE(LibBalsaAddressBookOsmo,
+ libbalsa_address_book_osmo,
+ LIBBALSA,
+ ADDRESS_BOOK_OSMO,
+ LibBalsaAddressBook);
LibBalsaAddressBook *libbalsa_address_book_osmo_new(const gchar *name);
diff --git a/libbalsa/address-book-rubrica.h b/libbalsa/address-book-rubrica.h
index 2902c5a..5262b71 100644
--- a/libbalsa/address-book-rubrica.h
+++ b/libbalsa/address-book-rubrica.h
@@ -9,14 +9,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -31,10 +31,14 @@
#include "address-book-text.h"
#define LIBBALSA_TYPE_ADDRESS_BOOK_RUBRICA (libbalsa_address_book_rubrica_get_type())
-G_DECLARE_FINAL_TYPE(LibBalsaAddressBookRubrica, libbalsa_address_book_rubrica,
- LIBBALSA, ADDRESS_BOOK_RUBRICA, LibBalsaAddressBookText)
-LibBalsaAddressBook *libbalsa_address_book_rubrica_new(const gchar * name,
- const gchar * path);
+G_DECLARE_FINAL_TYPE(LibBalsaAddressBookRubrica,
+ libbalsa_address_book_rubrica,
+ LIBBALSA,
+ ADDRESS_BOOK_RUBRICA,
+ LibBalsaAddressBookText);
+
+LibBalsaAddressBook *libbalsa_address_book_rubrica_new(const gchar *name,
+ const gchar *path);
-#endif /* __LIBBALSA_ADDRESS_BOOK_RUBRICA_H__ */
+#endif /* __LIBBALSA_ADDRESS_BOOK_RUBRICA_H__ */
diff --git a/libbalsa/address-book-text.h b/libbalsa/address-book-text.h
index 6208adb..f7464ee 100644
--- a/libbalsa/address-book-text.h
+++ b/libbalsa/address-book-text.h
@@ -6,21 +6,21 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
/*
* LibBalsaAddressBookText
- *
+ *
* The code that is common to vCard (== GnomeCard) and LDIF address
* books ...
*/
@@ -33,18 +33,22 @@
#include "address-book.h"
#include "completion.h"
-#define LIBBALSA_TYPE_ADDRESS_BOOK_TEXT (libbalsa_address_book_text_get_type())
-G_DECLARE_DERIVABLE_TYPE(LibBalsaAddressBookText, libbalsa_address_book_text,
- LIBBALSA, ADDRESS_BOOK_TEXT, LibBalsaAddressBook)
+#define LIBBALSA_TYPE_ADDRESS_BOOK_TEXT (libbalsa_address_book_text_get_type())
+
+G_DECLARE_DERIVABLE_TYPE(LibBalsaAddressBookText,
+ libbalsa_address_book_text,
+ LIBBALSA,
+ ADDRESS_BOOK_TEXT,
+ LibBalsaAddressBook);
struct _LibBalsaAddressBookTextClass {
LibBalsaAddressBookClass parent_class;
- LibBalsaABErr(*parse_address) (FILE * stream_in,
- LibBalsaAddress * address_in,
- FILE * stream_out,
- LibBalsaAddress * address_out);
- LibBalsaABErr(*save_address) (FILE * stream,
- LibBalsaAddress * address);
+ LibBalsaABErr (*parse_address) (FILE *stream_in,
+ LibBalsaAddress *address_in,
+ FILE *stream_out,
+ LibBalsaAddress *address_out);
+ LibBalsaABErr (*save_address) (FILE *stream,
+ LibBalsaAddress *address);
};
typedef struct _LibBalsaAddressBookText LibBalsaAddressBookText;
@@ -54,13 +58,13 @@ typedef struct _LibBalsaAddressBookTextClass LibBalsaAddressBookTextClass;
* Getter
*/
-const gchar * libbalsa_address_book_text_get_path(LibBalsaAddressBookText * ab_text);
+const gchar *libbalsa_address_book_text_get_path(LibBalsaAddressBookText *ab_text);
/*
* Setter
*/
-void libbalsa_address_book_text_set_path(LibBalsaAddressBookText * ab_text,
- const gchar * path);
+void libbalsa_address_book_text_set_path(LibBalsaAddressBookText *ab_text,
+ const gchar *path);
#endif /* __LIBBALSA_ADDRESS_BOOK_TEXT_H__ */
diff --git a/libbalsa/address-book-vcard.h b/libbalsa/address-book-vcard.h
index 7d193a5..25fac92 100644
--- a/libbalsa/address-book-vcard.h
+++ b/libbalsa/address-book-vcard.h
@@ -6,14 +6,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -28,10 +28,14 @@
#include "address-book-text.h"
#define LIBBALSA_TYPE_ADDRESS_BOOK_VCARD (libbalsa_address_book_vcard_get_type())
-G_DECLARE_FINAL_TYPE(LibBalsaAddressBookVcard, libbalsa_address_book_vcard,
- LIBBALSA, ADDRESS_BOOK_VCARD, LibBalsaAddressBookText)
-LibBalsaAddressBook *libbalsa_address_book_vcard_new(const gchar * name,
- const gchar * path);
+G_DECLARE_FINAL_TYPE(LibBalsaAddressBookVcard,
+ libbalsa_address_book_vcard,
+ LIBBALSA,
+ ADDRESS_BOOK_VCARD,
+ LibBalsaAddressBookText);
+
+LibBalsaAddressBook *libbalsa_address_book_vcard_new(const gchar *name,
+ const gchar *path);
#endif /* __LIBBALSA_ADDRESS_BOOK_VCARD_H__ */
diff --git a/libbalsa/address-book.h b/libbalsa/address-book.h
index 39f5277..44b88ea 100644
--- a/libbalsa/address-book.h
+++ b/libbalsa/address-book.h
@@ -6,14 +6,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -24,8 +24,12 @@
#include "address.h"
#define LIBBALSA_TYPE_ADDRESS_BOOK (libbalsa_address_book_get_type())
-G_DECLARE_DERIVABLE_TYPE(LibBalsaAddressBook, libbalsa_address_book,
- LIBBALSA, ADDRESS_BOOK, GObject)
+
+G_DECLARE_DERIVABLE_TYPE(LibBalsaAddressBook,
+ libbalsa_address_book,
+ LIBBALSA,
+ ADDRESS_BOOK,
+ GObject);
typedef enum {
LBABERR_OK = 0,
@@ -36,109 +40,111 @@ typedef enum {
LBABERR_DUPLICATE,
LBABERR_ADDRESS_NOT_FOUND
} LibBalsaABErr;
-
+
typedef struct _LibBalsaAddressBook LibBalsaAddressBook;
typedef struct _LibBalsaAddressBookClass LibBalsaAddressBookClass;
typedef LibBalsaABErr (*LibBalsaAddressBookLoadFunc)(LibBalsaAddressBook *ab,
- LibBalsaAddress *address,
- gpointer closure);
+ LibBalsaAddress *address,
+ gpointer closure);
struct _LibBalsaAddressBookClass {
GObjectClass parent;
- LibBalsaABErr (*load) (LibBalsaAddressBook * ab,
- const gchar *filter,
+ LibBalsaABErr (*load) (LibBalsaAddressBook *ab,
+ const gchar *filter,
LibBalsaAddressBookLoadFunc callback,
- gpointer closure);
+ gpointer closure);
/* adds given address to the address book, updating the permanent
* storage. */
- LibBalsaABErr (*add_address) (LibBalsaAddressBook * ab,
- LibBalsaAddress * address);
+ LibBalsaABErr (*add_address) (LibBalsaAddressBook *ab,
+ LibBalsaAddress *address);
/* remove given address to the address book, updating the permanent
* storage. */
- LibBalsaABErr (*remove_address) (LibBalsaAddressBook * ab,
- LibBalsaAddress * address);
+ LibBalsaABErr (*remove_address) (LibBalsaAddressBook *ab,
+ LibBalsaAddress *address);
/* Sets new entries for given address, copying fields from newval.
* Updates the permanent storage. */
- LibBalsaABErr (*modify_address) (LibBalsaAddressBook * ab,
- LibBalsaAddress * address,
- LibBalsaAddress * newval);
+ LibBalsaABErr (*modify_address) (LibBalsaAddressBook *ab,
+ LibBalsaAddress *address,
+ LibBalsaAddress *newval);
- void (*save_config) (LibBalsaAddressBook * ab, const gchar * prefix);
- void (*load_config) (LibBalsaAddressBook * ab, const gchar * prefix);
+ void (*save_config) (LibBalsaAddressBook *ab,
+ const gchar *prefix);
+ void (*load_config) (LibBalsaAddressBook *ab,
+ const gchar *prefix);
- GList* (*alias_complete) (LibBalsaAddressBook * ab, const gchar *prefix);
+ GList * (*alias_complete) (LibBalsaAddressBook *ab,
+ const gchar *prefix);
};
LibBalsaAddressBook *libbalsa_address_book_new_from_config(const gchar *
- prefix);
+ prefix);
/*
- This will call the callback function once for each address in the
- address book. The recipient should make sure to ref the address if
- they will be keeping a reference to it around. The callback may
- occur asynchronously.
-
- After all addresses are loaded the callback will be called with
- address==NULL.
-*/
-LibBalsaABErr libbalsa_address_book_load(LibBalsaAddressBook * ab,
- const char *filter,
+ This will call the callback function once for each address in the
+ address book. The recipient should make sure to ref the address if
+ they will be keeping a reference to it around. The callback may
+ occur asynchronously.
+
+ After all addresses are loaded the callback will be called with
+ address==NULL.
+ */
+LibBalsaABErr libbalsa_address_book_load(LibBalsaAddressBook *ab,
+ const char *filter,
LibBalsaAddressBookLoadFunc callback,
- gpointer closure);
+ gpointer closure);
LibBalsaABErr libbalsa_address_book_add_address(LibBalsaAddressBook *ab,
- LibBalsaAddress *address);
+ LibBalsaAddress *address);
LibBalsaABErr libbalsa_address_book_remove_address(LibBalsaAddressBook *ab,
- LibBalsaAddress *address);
+ LibBalsaAddress *address);
LibBalsaABErr libbalsa_address_book_modify_address(LibBalsaAddressBook *ab,
- LibBalsaAddress *address,
- LibBalsaAddress *newval);
+ LibBalsaAddress *address,
+ LibBalsaAddress *newval);
-void libbalsa_address_book_set_status(LibBalsaAddressBook * ab,
- const gchar * status);
-void libbalsa_address_book_save_config(LibBalsaAddressBook * ab,
- const gchar * prefix);
-void libbalsa_address_book_load_config(LibBalsaAddressBook * ab,
- const gchar * prefix);
+void libbalsa_address_book_set_status(LibBalsaAddressBook *ab,
+ const gchar *status);
+void libbalsa_address_book_save_config(LibBalsaAddressBook *ab,
+ const gchar *prefix);
+void libbalsa_address_book_load_config(LibBalsaAddressBook *ab,
+ const gchar *prefix);
-const gchar* libbalsa_address_book_strerror(LibBalsaAddressBook * ab,
- LibBalsaABErr err);
+const gchar *libbalsa_address_book_strerror(LibBalsaAddressBook *ab,
+ LibBalsaABErr err);
/*
- Returns a list of LibBalsaAddress objects. The caller is responsible
- for unref()ing these address objects when it is finished with them
- and for freeing the list.
+ Returns a list of LibBalsaAddress objects. The caller is responsible
+ for unref()ing these address objects when it is finished with them
+ and for freeing the list.
-*/
-GList *libbalsa_address_book_alias_complete(LibBalsaAddressBook * ab,
- const gchar *prefix);
+ */
+GList *libbalsa_address_book_alias_complete(LibBalsaAddressBook *ab,
+ const gchar *prefix);
/*
* Getters
*/
-gboolean libbalsa_address_book_get_dist_list_mode(LibBalsaAddressBook * ab);
-gboolean libbalsa_address_book_get_expand_aliases(LibBalsaAddressBook * ab);
-gboolean libbalsa_address_book_get_is_expensive (LibBalsaAddressBook * ab);
-const gchar * libbalsa_address_book_get_name (LibBalsaAddressBook * ab);
-const gchar * libbalsa_address_book_get_config_prefix (LibBalsaAddressBook * ab);
+gboolean libbalsa_address_book_get_dist_list_mode(LibBalsaAddressBook *ab);
+gboolean libbalsa_address_book_get_expand_aliases(LibBalsaAddressBook *ab);
+gboolean libbalsa_address_book_get_is_expensive(LibBalsaAddressBook *ab);
+const gchar *libbalsa_address_book_get_name(LibBalsaAddressBook *ab);
+const gchar *libbalsa_address_book_get_config_prefix(LibBalsaAddressBook *ab);
/*
* Setters
*/
-void libbalsa_address_book_set_dist_list_mode(LibBalsaAddressBook * ab,
- gboolean dist_list_mode);
-void libbalsa_address_book_set_expand_aliases(LibBalsaAddressBook * ab,
- gboolean expand_aliases);
-void libbalsa_address_book_set_is_expensive (LibBalsaAddressBook * ab,
- gboolean is_expensive);
-void libbalsa_address_book_set_name (LibBalsaAddressBook * ab,
- const gchar * name);
+void libbalsa_address_book_set_dist_list_mode(LibBalsaAddressBook *ab,
+ gboolean dist_list_mode);
+void libbalsa_address_book_set_expand_aliases(LibBalsaAddressBook *ab,
+ gboolean expand_aliases);
+void libbalsa_address_book_set_is_expensive(LibBalsaAddressBook *ab,
+ gboolean is_expensive);
+void libbalsa_address_book_set_name(LibBalsaAddressBook *ab,
+ const gchar *name);
#endif
-
diff --git a/libbalsa/address-view.h b/libbalsa/address-view.h
index 9391823..973af1b 100644
--- a/libbalsa/address-view.h
+++ b/libbalsa/address-view.h
@@ -6,14 +6,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -28,40 +28,44 @@
G_BEGIN_DECLS
#define LIBBALSA_TYPE_ADDRESS_VIEW (libbalsa_address_view_get_type())
-G_DECLARE_FINAL_TYPE(LibBalsaAddressView, libbalsa_address_view,
- LIBBALSA, ADDRESS_VIEW, GtkGrid)
-LibBalsaAddressView *libbalsa_address_view_new(const gchar * const *types,
- guint n_types,
- GList * address_book_list,
- gboolean fallback);
-void libbalsa_address_view_set_domain(LibBalsaAddressView * address_view,
- const gchar * domain);
+G_DECLARE_FINAL_TYPE(LibBalsaAddressView,
+ libbalsa_address_view,
+ LIBBALSA,
+ ADDRESS_VIEW,
+ GtkGrid);
+
+LibBalsaAddressView *libbalsa_address_view_new(const gchar *const *types,
+ guint n_types,
+ GList *address_book_list,
+ gboolean fallback);
+void libbalsa_address_view_set_domain(LibBalsaAddressView *address_view,
+ const gchar *domain);
void libbalsa_address_view_set_from_string(LibBalsaAddressView *
address_view,
- const gchar * address_type,
- const gchar * addresses);
+ const gchar *address_type,
+ const gchar *addresses);
void libbalsa_address_view_add_from_string(LibBalsaAddressView *
address_view,
- const gchar * address_type,
- const gchar * addresses);
-void libbalsa_address_view_add_to_row(LibBalsaAddressView * address_view,
- GtkWidget * button,
- const gchar * addresses);
+ const gchar *address_type,
+ const gchar *addresses);
+void libbalsa_address_view_add_to_row(LibBalsaAddressView *address_view,
+ GtkWidget *button,
+ const gchar *addresses);
void libbalsa_address_view_set_from_list(LibBalsaAddressView *
address_view,
- const gchar * address_type,
- InternetAddressList * list);
+ const gchar *address_type,
+ InternetAddressList *list);
-gint libbalsa_address_view_n_addresses(LibBalsaAddressView * address_view);
+gint libbalsa_address_view_n_addresses(LibBalsaAddressView *address_view);
InternetAddressList *libbalsa_address_view_get_list(LibBalsaAddressView *
address_view,
const gchar *
address_type);
-void libbalsa_address_view_set_book_icon(GdkPixbuf * book_icon);
-void libbalsa_address_view_set_close_icon(GdkPixbuf * close_icon);
-void libbalsa_address_view_set_drop_down_icon(GdkPixbuf * drop_down_icon);
+void libbalsa_address_view_set_book_icon(GdkPixbuf *book_icon);
+void libbalsa_address_view_set_close_icon(GdkPixbuf *close_icon);
+void libbalsa_address_view_set_drop_down_icon(GdkPixbuf *drop_down_icon);
G_END_DECLS
diff --git a/libbalsa/address.h b/libbalsa/address.h
index f92c1ed..6dd2f74 100644
--- a/libbalsa/address.h
+++ b/libbalsa/address.h
@@ -6,14 +6,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -25,7 +25,7 @@
#include <gtk/gtk.h>
#define LIBBALSA_TYPE_ADDRESS (libbalsa_address_get_type())
-G_DECLARE_FINAL_TYPE(LibBalsaAddress, libbalsa_address, LIBBALSA, ADDRESS, GObject)
+G_DECLARE_FINAL_TYPE(LibBalsaAddress, libbalsa_address, LIBBALSA, ADDRESS, GObject);
typedef enum _LibBalsaAddressField LibBalsaAddressField;
@@ -41,20 +41,22 @@ enum _LibBalsaAddressField {
LibBalsaAddress *libbalsa_address_new(void);
LibBalsaAddress *libbalsa_address_new_from_vcard(const gchar *str,
- const gchar *charset);
-gchar * libbalsa_address_extract_name(const gchar * string,
- gchar ** last_name,
- gchar ** first_name);
+ const gchar *charset);
+gchar *libbalsa_address_extract_name(const gchar *string,
+ gchar **last_name,
+ gchar **first_name);
-void libbalsa_address_set_copy(LibBalsaAddress *dest, LibBalsaAddress *src);
-gchar *libbalsa_address_to_gchar(LibBalsaAddress * address, gint n);
+void libbalsa_address_set_copy(LibBalsaAddress *dest,
+ LibBalsaAddress *src);
+gchar *libbalsa_address_to_gchar(LibBalsaAddress *address,
+ gint n);
const gchar *libbalsa_address_get_name_from_list(InternetAddressList
- * addr_list);
+ *addr_list);
const gchar *libbalsa_address_get_mailbox_from_list(InternetAddressList *
addr_list);
-gint libbalsa_address_n_mailboxes_in_list(InternetAddressList *
- addr_list);
+gint libbalsa_address_n_mailboxes_in_list(InternetAddressList *
+ addr_list);
/* =================================================================== */
/* UI PART */
@@ -62,15 +64,16 @@ gint libbalsa_address_n_mailboxes_in_list(InternetAddressList *
/** libbalsa_address_set_edit_entries() initializes the GtkEntry widgets
in entries with values from address
-*/
-void libbalsa_address_set_edit_entries(const LibBalsaAddress * address,
- GtkWidget ** entries);
+ */
+void libbalsa_address_set_edit_entries(const LibBalsaAddress *address,
+ GtkWidget **entries);
+
/** libbalsa_address_get_edit_widget() returns an widget adapted for a
LibBalsaAddress edition, with initial values set if address is
provided. The edit entries are set in entries array and enumerated
with LibBalsaAddressField constants. The widget accepts drops of
type TARGET_ADDRESS and TARGET_STRING.
-*/
+ */
enum {
LIBBALSA_ADDRESS_TRG_STRING,
@@ -81,9 +84,9 @@ enum {
extern const gchar *libbalsa_address_target_list[2];
GtkWidget *libbalsa_address_get_edit_widget(const LibBalsaAddress *addr,
- GtkWidget **entries,
- GCallback changed_cb,
- gpointer changed_data);
+ GtkWidget **entries,
+ GCallback changed_cb,
+ gpointer changed_data);
LibBalsaAddress *libbalsa_address_new_from_edit_entries(GtkWidget **widget);
/*
@@ -96,31 +99,31 @@ gint libbalsa_address_compare(LibBalsaAddress *a,
* Getters
*/
-const gchar * libbalsa_address_get_full_name (const LibBalsaAddress * address);
-const gchar * libbalsa_address_get_first_name (const LibBalsaAddress * address);
-const gchar * libbalsa_address_get_last_name (const LibBalsaAddress * address);
-const gchar * libbalsa_address_get_nick_name (const LibBalsaAddress * address);
-const gchar * libbalsa_address_get_organization(const LibBalsaAddress * address);
-const gchar * libbalsa_address_get_addr (const LibBalsaAddress * address);
-GList * libbalsa_address_get_addr_list (const LibBalsaAddress * address);
+const gchar *libbalsa_address_get_full_name(const LibBalsaAddress *address);
+const gchar *libbalsa_address_get_first_name(const LibBalsaAddress *address);
+const gchar *libbalsa_address_get_last_name(const LibBalsaAddress *address);
+const gchar *libbalsa_address_get_nick_name(const LibBalsaAddress *address);
+const gchar *libbalsa_address_get_organization(const LibBalsaAddress *address);
+const gchar *libbalsa_address_get_addr(const LibBalsaAddress *address);
+GList *libbalsa_address_get_addr_list(const LibBalsaAddress *address);
/*
* Setters
*/
-void libbalsa_address_set_full_name (LibBalsaAddress * address,
- const gchar * full_name);
-void libbalsa_address_set_first_name (LibBalsaAddress * address,
- const gchar * first_name);
-void libbalsa_address_set_last_name (LibBalsaAddress * address,
- const gchar * last_name);
-void libbalsa_address_set_nick_name (LibBalsaAddress * address,
- const gchar * nick_name);
-void libbalsa_address_set_organization(LibBalsaAddress * address,
- const gchar * organization);
-void libbalsa_address_set_addr_list (LibBalsaAddress * address,
- GList * addr_list);
-void libbalsa_address_add_addr (LibBalsaAddress * address,
- const gchar * addr);
-
-#endif /* __LIBBALSA_ADDRESS_H__ */
+void libbalsa_address_set_full_name(LibBalsaAddress *address,
+ const gchar *full_name);
+void libbalsa_address_set_first_name(LibBalsaAddress *address,
+ const gchar *first_name);
+void libbalsa_address_set_last_name(LibBalsaAddress *address,
+ const gchar *last_name);
+void libbalsa_address_set_nick_name(LibBalsaAddress *address,
+ const gchar *nick_name);
+void libbalsa_address_set_organization(LibBalsaAddress *address,
+ const gchar *organization);
+void libbalsa_address_set_addr_list(LibBalsaAddress *address,
+ GList *addr_list);
+void libbalsa_address_add_addr(LibBalsaAddress *address,
+ const gchar *addr);
+
+#endif /* __LIBBALSA_ADDRESS_H__ */
diff --git a/libbalsa/gmime-gpgme-signature.h b/libbalsa/gmime-gpgme-signature.h
index 90711b0..ce466fb 100644
--- a/libbalsa/gmime-gpgme-signature.h
+++ b/libbalsa/gmime-gpgme-signature.h
@@ -33,9 +33,9 @@ G_DECLARE_FINAL_TYPE(GMimeGpgmeSigstat,
g_mime_gpgme_sigstat,
GMIME,
GPGME_SIGSTAT,
- GObject)
+ GObject);
-GMimeGpgmeSigstat * g_mime_gpgme_sigstat_new(gpgme_ctx_t ctx)
+GMimeGpgmeSigstat *g_mime_gpgme_sigstat_new(gpgme_ctx_t ctx)
G_GNUC_WARN_UNUSED_RESULT;
GMimeGpgmeSigstat *g_mime_gpgme_sigstat_new_from_gpgme_ctx(gpgme_ctx_t ctx)
G_GNUC_WARN_UNUSED_RESULT;
diff --git a/libbalsa/identity.h b/libbalsa/identity.h
index 8d91c96..0527ca9 100644
--- a/libbalsa/identity.h
+++ b/libbalsa/identity.h
@@ -33,14 +33,15 @@
G_BEGIN_DECLS
#define LIBBALSA_TYPE_IDENTITY (libbalsa_identity_get_type ())
+
G_DECLARE_FINAL_TYPE(LibBalsaIdentity,
libbalsa_identity,
LIBBALSA,
IDENTITY,
- GObject)
+ GObject);
/* Function prototypes */
-LibBalsaIdentity * libbalsa_identity_new(void);
+LibBalsaIdentity *libbalsa_identity_new(void);
LibBalsaIdentity *libbalsa_identity_new_with_name(const gchar *ident_name);
LibBalsaIdentity *libbalsa_identity_new_from_config(const gchar *name);
void libbalsa_identity_save(LibBalsaIdentity *ident,
diff --git a/libbalsa/imap-server.h b/libbalsa/imap-server.h
index 4ca2c21..9e4322e 100644
--- a/libbalsa/imap-server.h
+++ b/libbalsa/imap-server.h
@@ -6,14 +6,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,48 +29,51 @@ G_DECLARE_FINAL_TYPE(LibBalsaImapServer,
libbalsa_imap_server,
LIBBALSA,
IMAP_SERVER,
- LibBalsaServer)
+ LibBalsaServer);
-LibBalsaImapServer* libbalsa_imap_server_new(const gchar *username,
- const gchar *host);
-LibBalsaImapServer* libbalsa_imap_server_new_from_config(void);
-void libbalsa_imap_server_save_config(LibBalsaImapServer *server);
-struct _ImapMboxHandle* libbalsa_imap_server_get_handle
- (LibBalsaImapServer *server, GError **err);
-struct _ImapMboxHandle* libbalsa_imap_server_get_handle_with_user
- (LibBalsaImapServer *imap_server,
- gpointer user, GError **err);
-void libbalsa_imap_server_release_handle(LibBalsaImapServer *server,
- struct _ImapMboxHandle* handle);
-void libbalsa_imap_server_set_max_connections(LibBalsaImapServer *server,
- int max);
-int libbalsa_imap_server_get_max_connections(LibBalsaImapServer *server);
-void libbalsa_imap_server_enable_persistent_cache(LibBalsaImapServer *server,
- gboolean enable);
+LibBalsaImapServer *libbalsa_imap_server_new(const gchar *username,
+ const gchar *host);
+LibBalsaImapServer *libbalsa_imap_server_new_from_config(void);
+void libbalsa_imap_server_save_config(LibBalsaImapServer *server);
+struct _ImapMboxHandle *libbalsa_imap_server_get_handle
+ (LibBalsaImapServer *server,
+ GError **err);
+struct _ImapMboxHandle *libbalsa_imap_server_get_handle_with_user
+ (LibBalsaImapServer *imap_server,
+ gpointer user,
+ GError **err);
+void libbalsa_imap_server_release_handle(LibBalsaImapServer *server,
+ struct _ImapMboxHandle *handle);
+void libbalsa_imap_server_set_max_connections(LibBalsaImapServer *server,
+ int max);
+int libbalsa_imap_server_get_max_connections(LibBalsaImapServer *server);
+void libbalsa_imap_server_enable_persistent_cache(LibBalsaImapServer *server,
+ gboolean enable);
gboolean libbalsa_imap_server_has_persistent_cache(LibBalsaImapServer *srv);
-void libbalsa_imap_server_force_disconnect(LibBalsaImapServer *server);
-void libbalsa_imap_server_close_all_connections(void);
+void libbalsa_imap_server_force_disconnect(LibBalsaImapServer *server);
+void libbalsa_imap_server_close_all_connections(void);
gboolean libbalsa_imap_server_has_free_handles(LibBalsaImapServer *server);
gboolean libbalsa_imap_server_is_offline(LibBalsaImapServer *server);
-void libbalsa_imap_server_set_offline_mode(LibBalsaImapServer *server,
- gboolean offline);
+void libbalsa_imap_server_set_offline_mode(LibBalsaImapServer *server,
+ gboolean offline);
typedef enum {
ISBUG_FETCH /* Some servers cannot fetch message parts properly
* we will fetch entire messages instead. */
} LibBalsaImapServerBug;
-void libbalsa_imap_server_set_bug(LibBalsaImapServer *server,
- LibBalsaImapServerBug bug, gboolean hasp);
+void libbalsa_imap_server_set_bug(LibBalsaImapServer *server,
+ LibBalsaImapServerBug bug,
+ gboolean hasp);
-gboolean libbalsa_imap_server_has_bug(LibBalsaImapServer *server,
+gboolean libbalsa_imap_server_has_bug(LibBalsaImapServer *server,
LibBalsaImapServerBug bug);
-void libbalsa_imap_server_set_use_status(LibBalsaImapServer *server,
- gboolean use_status);
+void libbalsa_imap_server_set_use_status(LibBalsaImapServer *server,
+ gboolean use_status);
gboolean libbalsa_imap_server_get_use_status(LibBalsaImapServer *server);
-void libbalsa_imap_server_set_use_idle(LibBalsaImapServer *server,
- gboolean use_idle);
+void libbalsa_imap_server_set_use_idle(LibBalsaImapServer *server,
+ gboolean use_idle);
gboolean libbalsa_imap_server_get_use_idle(LibBalsaImapServer *server);
extern gint ImapDebug;
diff --git a/libbalsa/libbalsa-vfs.h b/libbalsa/libbalsa-vfs.h
index 5b18bb5..4a0ad6e 100644
--- a/libbalsa/libbalsa-vfs.h
+++ b/libbalsa/libbalsa-vfs.h
@@ -5,14 +5,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -39,56 +39,56 @@ G_DECLARE_FINAL_TYPE(LibbalsaVfs,
libbalsa_vfs,
LIBBALSA,
VFS,
- GObject)
+ GObject);
-gboolean libbalsa_vfs_local_only(void);
+gboolean libbalsa_vfs_local_only(void);
-LibbalsaVfs * libbalsa_vfs_new(void);
-LibbalsaVfs * libbalsa_vfs_new_from_uri(const gchar * uri);
-LibbalsaVfs * libbalsa_vfs_append(const LibbalsaVfs * file,
- const gchar * text);
-LibbalsaVfs * libbalsa_vfs_dir_append(const LibbalsaVfs * dir,
- const gchar * filename);
-const gchar * libbalsa_vfs_get_folder(const LibbalsaVfs * file);
-const gchar * libbalsa_vfs_get_uri(const LibbalsaVfs * file);
-const gchar * libbalsa_vfs_get_uri_utf8(const LibbalsaVfs * file);
-const gchar * libbalsa_vfs_get_basename_utf8(const LibbalsaVfs * file);
-const gchar * libbalsa_vfs_get_mime_type(const LibbalsaVfs * file);
-const gchar * libbalsa_vfs_get_charset(const LibbalsaVfs * file);
-LibBalsaTextAttribute libbalsa_vfs_get_text_attr(const LibbalsaVfs * file);
-guint64 libbalsa_vfs_get_size(const LibbalsaVfs * file);
-GMimeStream * libbalsa_vfs_create_stream(const LibbalsaVfs * file,
- mode_t mode,
- gboolean rdwr,
- GError ** err);
-gboolean libbalsa_vfs_file_exists(const LibbalsaVfs * file);
-gboolean libbalsa_vfs_is_regular_file(const LibbalsaVfs * file,
- GError **err);
-gint libbalsa_vfs_file_unlink(const LibbalsaVfs * file,
- GError **err);
+LibbalsaVfs *libbalsa_vfs_new(void);
+LibbalsaVfs *libbalsa_vfs_new_from_uri(const gchar *uri);
+LibbalsaVfs *libbalsa_vfs_append(const LibbalsaVfs *file,
+ const gchar *text);
+LibbalsaVfs *libbalsa_vfs_dir_append(const LibbalsaVfs *dir,
+ const gchar *filename);
+const gchar *libbalsa_vfs_get_folder(const LibbalsaVfs *file);
+const gchar *libbalsa_vfs_get_uri(const LibbalsaVfs *file);
+const gchar *libbalsa_vfs_get_uri_utf8(const LibbalsaVfs *file);
+const gchar *libbalsa_vfs_get_basename_utf8(const LibbalsaVfs *file);
+const gchar *libbalsa_vfs_get_mime_type(const LibbalsaVfs *file);
+const gchar *libbalsa_vfs_get_charset(const LibbalsaVfs *file);
+LibBalsaTextAttribute libbalsa_vfs_get_text_attr(const LibbalsaVfs *file);
+guint64 libbalsa_vfs_get_size(const LibbalsaVfs *file);
+GMimeStream *libbalsa_vfs_create_stream(const LibbalsaVfs *file,
+ mode_t mode,
+ gboolean rdwr,
+ GError **err);
+gboolean libbalsa_vfs_file_exists(const LibbalsaVfs *file);
+gboolean libbalsa_vfs_is_regular_file(const LibbalsaVfs *file,
+ GError **err);
+gint libbalsa_vfs_file_unlink(const LibbalsaVfs *file,
+ GError **err);
/* application launch helpers */
-gboolean libbalsa_vfs_launch_app(const LibbalsaVfs * file,
- GObject * object,
- GError **err);
-gboolean libbalsa_vfs_launch_app_for_body(LibBalsaMessageBody * mime_body,
- GObject * object,
- GError **err);
-void libbalsa_vfs_fill_menu_by_content_type(GtkMenu * menu,
- const gchar * content_type,
- GCallback callback,
- gpointer data);
-GtkWidget * libbalsa_vfs_mime_button(LibBalsaMessageBody * mime_body,
- const gchar * content_type,
- GCallback callback,
- gpointer data);
+gboolean libbalsa_vfs_launch_app(const LibbalsaVfs *file,
+ GObject *object,
+ GError **err);
+gboolean libbalsa_vfs_launch_app_for_body(LibBalsaMessageBody *mime_body,
+ GObject *object,
+ GError **err);
+void libbalsa_vfs_fill_menu_by_content_type(GtkMenu *menu,
+ const gchar *content_type,
+ GCallback callback,
+ gpointer data);
+GtkWidget *libbalsa_vfs_mime_button(LibBalsaMessageBody *mime_body,
+ const gchar *content_type,
+ GCallback callback,
+ gpointer data);
/* content type helpers */
-gchar * libbalsa_vfs_content_description(const gchar * mime_type);
-gchar * libbalsa_vfs_content_type_of_buffer(const guchar * buffer,
- gsize length);
+gchar *libbalsa_vfs_content_description(const gchar *mime_type);
+gchar *libbalsa_vfs_content_type_of_buffer(const guchar *buffer,
+ gsize length);
G_END_DECLS
-#endif /* __LIBBALSA_VFS_H__ */
+#endif /* __LIBBALSA_VFS_H__ */
diff --git a/libbalsa/mailbox.h b/libbalsa/mailbox.h
index a354266..d0c234e 100644
--- a/libbalsa/mailbox.h
+++ b/libbalsa/mailbox.h
@@ -34,7 +34,7 @@ G_DECLARE_DERIVABLE_TYPE(LibBalsaMailbox,
libbalsa_mailbox,
LIBBALSA,
MAILBOX,
- GObject)
+ GObject);
#define MAILBOX_OPEN(mailbox) \
(libbalsa_mailbox_get_state(mailbox) != LB_MAILBOX_STATE_CLOSED)
@@ -114,7 +114,7 @@ typedef enum {
typedef enum {
LB_FETCH_RFC822_HEADERS = 1 << 0, /* prepare all rfc822 headers */
- LB_FETCH_STRUCTURE = 1 << 1 /* prepare message structure */
+ LB_FETCH_STRUCTURE = 1 << 1 /* prepare message structure */
} LibBalsaFetchFlag;
typedef enum {
diff --git a/libbalsa/mailbox_imap.h b/libbalsa/mailbox_imap.h
index f68515f..75fee69 100644
--- a/libbalsa/mailbox_imap.h
+++ b/libbalsa/mailbox_imap.h
@@ -26,20 +26,20 @@ G_DECLARE_FINAL_TYPE(LibBalsaMailboxImap,
libbalsa_mailbox_imap,
LIBBALSA,
MAILBOX_IMAP,
- LibBalsaMailboxRemote)
+ LibBalsaMailboxRemote);
#define POINTER_TO_UID(p) GPOINTER_TO_UINT(p)
#define UID_TO_POINTER(p) GUINT_TO_POINTER(p)
-LibBalsaMailbox * libbalsa_mailbox_imap_new(void);
+LibBalsaMailbox *libbalsa_mailbox_imap_new(void);
-void libbalsa_mailbox_imap_update_url(LibBalsaMailboxImap *mailbox);
-void libbalsa_mailbox_imap_set_path(LibBalsaMailboxImap *mailbox,
- const gchar *path);
-const gchar *libbalsa_mailbox_imap_get_path(LibBalsaMailboxImap *mailbox);
+void libbalsa_mailbox_imap_update_url(LibBalsaMailboxImap *mailbox);
+void libbalsa_mailbox_imap_set_path(LibBalsaMailboxImap *mailbox,
+ const gchar *path);
+const gchar *libbalsa_mailbox_imap_get_path(LibBalsaMailboxImap *mailbox);
-gboolean libbalsa_mailbox_imap_subscribe(LibBalsaMailboxImap *mailbox,
- gboolean subscribe);
+gboolean libbalsa_mailbox_imap_subscribe(LibBalsaMailboxImap *mailbox,
+ gboolean subscribe);
GHashTable *libbalsa_mailbox_imap_get_matchings(LibBalsaMailboxImap *mbox,
LibBalsaCondition *condition,
diff --git a/libbalsa/mailbox_local.h b/libbalsa/mailbox_local.h
index 1924c3d..4adcf27 100644
--- a/libbalsa/mailbox_local.h
+++ b/libbalsa/mailbox_local.h
@@ -29,7 +29,7 @@ G_DECLARE_DERIVABLE_TYPE(LibBalsaMailboxLocal,
libbalsa_mailbox_local,
LIBBALSA,
MAILBOX_LOCAL,
- LibBalsaMailbox)
+ LibBalsaMailbox);
struct _LibBalsaMailboxLocalPool {
LibBalsaMessage *message;
diff --git a/libbalsa/mailbox_maildir.h b/libbalsa/mailbox_maildir.h
index 51fbcbc..387717c 100644
--- a/libbalsa/mailbox_maildir.h
+++ b/libbalsa/mailbox_maildir.h
@@ -27,9 +27,9 @@ G_DECLARE_FINAL_TYPE(LibBalsaMailboxMaildir,
libbalsa_mailbox_maildir,
LIBBALSA,
MAILBOX_MAILDIR,
- LibBalsaMailboxLocal)
+ LibBalsaMailboxLocal);
-LibBalsaMailbox * libbalsa_mailbox_maildir_new(const gchar * path,
- gboolean create);
+LibBalsaMailbox *libbalsa_mailbox_maildir_new(const gchar *path,
+ gboolean create);
#endif
diff --git a/libbalsa/mailbox_mbox.h b/libbalsa/mailbox_mbox.h
index 06d7924..dc2cfb4 100644
--- a/libbalsa/mailbox_mbox.h
+++ b/libbalsa/mailbox_mbox.h
@@ -27,9 +27,9 @@ G_DECLARE_FINAL_TYPE(LibBalsaMailboxMbox,
libbalsa_mailbox_mbox,
LIBBALSA,
MAILBOX_MBOX,
- LibBalsaMailboxLocal)
+ LibBalsaMailboxLocal);
-LibBalsaMailbox * libbalsa_mailbox_mbox_new(const gchar * path,
- gboolean create);
+LibBalsaMailbox *libbalsa_mailbox_mbox_new(const gchar *path,
+ gboolean create);
#endif
diff --git a/libbalsa/mailbox_mh.h b/libbalsa/mailbox_mh.h
index dd37be0..1e9d5d3 100644
--- a/libbalsa/mailbox_mh.h
+++ b/libbalsa/mailbox_mh.h
@@ -27,9 +27,9 @@ G_DECLARE_FINAL_TYPE(LibBalsaMailboxMh,
libbalsa_mailbox_mh,
LIBBALSA,
MAILBOX_MH,
- LibBalsaMailboxLocal)
+ LibBalsaMailboxLocal);
-LibBalsaMailbox * libbalsa_mailbox_mh_new(const gchar * path,
- gboolean create);
+LibBalsaMailbox *libbalsa_mailbox_mh_new(const gchar *path,
+ gboolean create);
#endif
diff --git a/libbalsa/mailbox_pop3.h b/libbalsa/mailbox_pop3.h
index 7dc6ca3..32d0823 100644
--- a/libbalsa/mailbox_pop3.h
+++ b/libbalsa/mailbox_pop3.h
@@ -27,11 +27,11 @@ G_DECLARE_FINAL_TYPE(LibBalsaMailboxPop3,
libbalsa_mailbox_pop3,
LIBBALSA,
MAILBOX_POP3,
- LibBalsaMailboxRemote)
+ LibBalsaMailboxRemote);
-LibBalsaMailboxPop3 * libbalsa_mailbox_pop3_new(void);
-void libbalsa_mailbox_pop3_set_inbox(LibBalsaMailbox *mailbox,
- LibBalsaMailbox *inbox);
+LibBalsaMailboxPop3 *libbalsa_mailbox_pop3_new(void);
+void libbalsa_mailbox_pop3_set_inbox(LibBalsaMailbox *mailbox,
+ LibBalsaMailbox *inbox);
/*
* Getters
diff --git a/libbalsa/mailbox_remote.h b/libbalsa/mailbox_remote.h
index 85f7b85..5775571 100644
--- a/libbalsa/mailbox_remote.h
+++ b/libbalsa/mailbox_remote.h
@@ -39,7 +39,7 @@ G_DECLARE_DERIVABLE_TYPE(LibBalsaMailboxRemote,
libbalsa_mailbox_remote,
LIBBALSA,
MAILBOX_REMOTE,
- LibBalsaMailbox)
+ LibBalsaMailbox);
struct _LibBalsaMailboxRemoteClass {
LibBalsaMailboxClass parent_class;
diff --git a/libbalsa/message.h b/libbalsa/message.h
index 40c07f0..4341673 100644
--- a/libbalsa/message.h
+++ b/libbalsa/message.h
@@ -43,7 +43,7 @@ G_DECLARE_FINAL_TYPE(LibBalsaMessage,
libbalsa_message,
LIBBALSA,
MESSAGE,
- GObject)
+ GObject);
typedef enum _LibBalsaMessageFlag LibBalsaMessageFlag;
diff --git a/libbalsa/rfc2445.h b/libbalsa/rfc2445.h
index 318a84a..a3aa726 100644
--- a/libbalsa/rfc2445.h
+++ b/libbalsa/rfc2445.h
@@ -5,14 +5,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -38,7 +38,7 @@ G_DECLARE_FINAL_TYPE(LibBalsaVCal,
libbalsa_vcal,
LIBBALSA,
VCAL,
- GObject)
+ GObject);
/* a VEvent object description as GObject */
@@ -48,7 +48,7 @@ G_DECLARE_FINAL_TYPE(LibBalsaVEvent,
libbalsa_vevent,
LIBBALSA,
VEVENT,
- GObject)
+ GObject);
/* methods as defined by RFC 2446 */
typedef enum {
@@ -74,16 +74,16 @@ typedef enum {
-LibBalsaVCal *libbalsa_vcal_new(void);
-LibBalsaVCal *libbalsa_vcal_new_from_body(LibBalsaMessageBody * body);
+LibBalsaVCal *libbalsa_vcal_new(void);
+LibBalsaVCal *libbalsa_vcal_new_from_body(LibBalsaMessageBody *body);
LibBalsaVEvent *libbalsa_vevent_new(void);
-gchar *libbalsa_vevent_reply(const LibBalsaVEvent * event,
- const gchar * sender,
- LibBalsaVCalPartStat new_stat);
+gchar *libbalsa_vevent_reply(const LibBalsaVEvent *event,
+ const gchar *sender,
+ LibBalsaVCalPartStat new_stat);
-gchar *libbalsa_vcal_attendee_to_str(LibBalsaAddress * person);
-gboolean libbalsa_vcal_attendee_rsvp(LibBalsaAddress * person);
+gchar *libbalsa_vcal_attendee_to_str(LibBalsaAddress *person);
+gboolean libbalsa_vcal_attendee_rsvp(LibBalsaAddress *person);
const gchar *libbalsa_vcal_method_to_str(LibBalsaVCalMethod method);
const gchar *libbalsa_vcal_part_stat_to_str(LibBalsaVCalPartStat pstat);
@@ -91,15 +91,15 @@ const gchar *libbalsa_vcal_part_stat_to_str(LibBalsaVCalPartStat pstat);
* Getters
*/
LibBalsaVCalMethod libbalsa_vcal_get_method(LibBalsaVCal *vcal);
-GList *libbalsa_vcal_get_vevent(LibBalsaVCal *vcal);
-const gchar * libbalsa_vevent_get_summary(LibBalsaVEvent *vevent);
-LibBalsaAddress * libbalsa_vevent_get_organizer(LibBalsaVEvent *vevent);
-time_t libbalsa_vevent_get_start(LibBalsaVEvent *vevent);
-time_t libbalsa_vevent_get_end(LibBalsaVEvent *vevent);
-const gchar * libbalsa_vevent_get_location(LibBalsaVEvent *vevent);
-GList * libbalsa_vevent_get_attendee(LibBalsaVEvent *vevent);
-const gchar * libbalsa_vevent_get_description(LibBalsaVEvent *vevent);
+GList *libbalsa_vcal_get_vevent(LibBalsaVCal *vcal);
+const gchar *libbalsa_vevent_get_summary(LibBalsaVEvent *vevent);
+LibBalsaAddress *libbalsa_vevent_get_organizer(LibBalsaVEvent *vevent);
+time_t libbalsa_vevent_get_start(LibBalsaVEvent *vevent);
+time_t libbalsa_vevent_get_end(LibBalsaVEvent *vevent);
+const gchar *libbalsa_vevent_get_location(LibBalsaVEvent *vevent);
+GList *libbalsa_vevent_get_attendee(LibBalsaVEvent *vevent);
+const gchar *libbalsa_vevent_get_description(LibBalsaVEvent *vevent);
G_END_DECLS
-#endif /* __RFC2445_H__ */
+#endif /* __RFC2445_H__ */
diff --git a/libbalsa/server.h b/libbalsa/server.h
index 3c27d70..c8ad781 100644
--- a/libbalsa/server.h
+++ b/libbalsa/server.h
@@ -6,14 +6,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,7 +22,7 @@
#define __LIBBALSA_SERVER_H__
#ifndef BALSA_VERSION
-# error "Include config.h before this file."
+# error "Include config.h before this file."
#endif
#include "imap/libimap.h"
@@ -30,11 +30,11 @@
#include "net-client.h"
#if defined(HAVE_LIBSECRET)
-#include <libsecret/secret.h>
+# include <libsecret/secret.h>
extern const SecretSchema *LIBBALSA_SERVER_SECRET_SCHEMA;
-#define libbalsa_free_password secret_password_free
+# define libbalsa_free_password secret_password_free
#else
-#define libbalsa_free_password g_free
+# define libbalsa_free_password g_free
#endif /* defined(HAVE_LIBSECRET) */
#define LIBBALSA_TYPE_SERVER (libbalsa_server_get_type())
@@ -43,7 +43,7 @@ G_DECLARE_DERIVABLE_TYPE(LibBalsaServer,
libbalsa_server,
LIBBALSA,
SERVER,
- GObject)
+ GObject);
typedef enum {
LIBBALSA_TLS_DISABLED,
@@ -54,84 +54,98 @@ typedef enum {
struct _LibBalsaServerClass {
GObjectClass parent_class;
- void (*set_username) (LibBalsaServer * server, const gchar * name);
- void (*set_host) (LibBalsaServer * server,
- const gchar * host, gboolean use_ssl);
- void (*config_changed) (LibBalsaServer * server);
- gchar *(*get_password) (LibBalsaServer * server);
+ void (*set_username) (LibBalsaServer *server,
+ const gchar *name);
+ void (*set_host) (LibBalsaServer *server,
+ const gchar *host,
+ gboolean use_ssl);
+ void (*config_changed) (LibBalsaServer *server);
+ gchar *(*get_password) (LibBalsaServer *server);
};
LibBalsaServer *libbalsa_server_new(void);
-void libbalsa_server_set_username(LibBalsaServer * server,
- const gchar * username);
-void libbalsa_server_set_password(LibBalsaServer * server,
- const gchar * passwd);
-void libbalsa_server_set_host(LibBalsaServer * server, const gchar * host,
- gboolean use_ssl);
+void libbalsa_server_set_username(LibBalsaServer *server,
+ const gchar *username);
+void libbalsa_server_set_password(LibBalsaServer *server,
+ const gchar *passwd);
+void libbalsa_server_set_host(LibBalsaServer *server,
+ const gchar *host,
+ gboolean use_ssl);
-void libbalsa_server_config_changed(LibBalsaServer * server);
-void libbalsa_server_load_config(LibBalsaServer * server);
-void libbalsa_server_save_config(LibBalsaServer * server);
+void libbalsa_server_config_changed(LibBalsaServer *server);
+void libbalsa_server_load_config(LibBalsaServer *server);
+void libbalsa_server_save_config(LibBalsaServer *server);
-void libbalsa_server_user_cb(ImapUserEventType ue, void *arg, ...);
+void libbalsa_server_user_cb(ImapUserEventType ue,
+ void *arg,
+ ...);
/* NetClient related signal handlers */
gchar **libbalsa_server_get_auth(NetClient *client,
- gboolean need_passwd,
- gpointer user_data);
+ gboolean need_passwd,
+ gpointer user_data);
gboolean libbalsa_server_check_cert(NetClient *client,
- GTlsCertificate *peer_cert,
- GTlsCertificateFlags errors,
- gpointer user_data);
+ GTlsCertificate *peer_cert,
+ GTlsCertificateFlags errors,
+ gpointer user_data);
gchar *libbalsa_server_get_cert_pass(NetClient *client,
- const GByteArray *cert_der,
- gpointer user_data);
+ const GByteArray *cert_der,
+ gpointer user_data);
-void libbalsa_server_connect_get_password(LibBalsaServer * server, GCallback cb,
- gpointer cb_data);
+void libbalsa_server_connect_get_password(LibBalsaServer *server,
+ GCallback cb,
+ gpointer cb_data);
/* Check whether a server can be reached */
-void libbalsa_server_test_can_reach(LibBalsaServer * server,
- LibBalsaCanReachCallback * cb,
- gpointer cb_data);
+void libbalsa_server_test_can_reach(LibBalsaServer *server,
+ LibBalsaCanReachCallback *cb,
+ gpointer cb_data);
/* Private: used only by LibBalsaMailboxRemote */
-void libbalsa_server_test_can_reach_full(LibBalsaServer * server,
- LibBalsaCanReachCallback * cb,
- gpointer cb_data,
- GObject * source_object);
+void libbalsa_server_test_can_reach_full(LibBalsaServer *server,
+ LibBalsaCanReachCallback *cb,
+ gpointer cb_data,
+ GObject *source_object);
/*
* Getters
*/
-LibBalsaTlsMode libbalsa_server_get_tls_mode(LibBalsaServer * server);
-NetClientCryptMode libbalsa_server_get_security(LibBalsaServer * server);
-gboolean libbalsa_server_get_use_ssl(LibBalsaServer * server);
-gboolean libbalsa_server_get_client_cert(LibBalsaServer * server);
-gboolean libbalsa_server_get_try_anonymous(LibBalsaServer * server);
-gboolean libbalsa_server_get_remember_passwd(LibBalsaServer * server);
-const gchar * libbalsa_server_get_username(LibBalsaServer * server);
-const gchar * libbalsa_server_get_host(LibBalsaServer * server);
-const gchar * libbalsa_server_get_protocol(LibBalsaServer * server);
-const gchar * libbalsa_server_get_cert_file(LibBalsaServer * server);
-const gchar * libbalsa_server_get_cert_passphrase(LibBalsaServer * server);
-const gchar * libbalsa_server_get_password(LibBalsaServer * server);
+LibBalsaTlsMode libbalsa_server_get_tls_mode(LibBalsaServer *server);
+NetClientCryptMode libbalsa_server_get_security(LibBalsaServer *server);
+gboolean libbalsa_server_get_use_ssl(LibBalsaServer *server);
+gboolean libbalsa_server_get_client_cert(LibBalsaServer *server);
+gboolean libbalsa_server_get_try_anonymous(LibBalsaServer *server);
+gboolean libbalsa_server_get_remember_passwd(LibBalsaServer *server);
+const gchar *libbalsa_server_get_username(LibBalsaServer *server);
+const gchar *libbalsa_server_get_host(LibBalsaServer *server);
+const gchar *libbalsa_server_get_protocol(LibBalsaServer *server);
+const gchar *libbalsa_server_get_cert_file(LibBalsaServer *server);
+const gchar *libbalsa_server_get_cert_passphrase(LibBalsaServer *server);
+const gchar *libbalsa_server_get_password(LibBalsaServer *server);
/*
* Setters
*/
-void libbalsa_server_set_tls_mode(LibBalsaServer * server, LibBalsaTlsMode tls_mode);
-void libbalsa_server_set_security(LibBalsaServer * server, NetClientCryptMode security);
-void libbalsa_server_set_try_anonymous(LibBalsaServer * server, gboolean try_anonymous);
-void libbalsa_server_set_remember_passwd(LibBalsaServer * server, gboolean remember_passwd);
-void libbalsa_server_set_client_cert(LibBalsaServer * server, gboolean client_cert);
-void libbalsa_server_set_protocol(LibBalsaServer * server, const gchar * protocol);
-void libbalsa_server_set_cert_file(LibBalsaServer * server, const gchar * cert_file);
-void libbalsa_server_set_cert_passphrase(LibBalsaServer * server, const gchar * cert_passphrase);
-
-#endif /* __LIBBALSA_SERVER_H__ */
+void libbalsa_server_set_tls_mode(LibBalsaServer *server,
+ LibBalsaTlsMode tls_mode);
+void libbalsa_server_set_security(LibBalsaServer *server,
+ NetClientCryptMode security);
+void libbalsa_server_set_try_anonymous(LibBalsaServer *server,
+ gboolean try_anonymous);
+void libbalsa_server_set_remember_passwd(LibBalsaServer *server,
+ gboolean remember_passwd);
+void libbalsa_server_set_client_cert(LibBalsaServer *server,
+ gboolean client_cert);
+void libbalsa_server_set_protocol(LibBalsaServer *server,
+ const gchar *protocol);
+void libbalsa_server_set_cert_file(LibBalsaServer *server,
+ const gchar *cert_file);
+void libbalsa_server_set_cert_passphrase(LibBalsaServer *server,
+ const gchar *cert_passphrase);
+
+#endif /* __LIBBALSA_SERVER_H__ */
diff --git a/libbalsa/smtp-server.h b/libbalsa/smtp-server.h
index 3927df4..c537232 100644
--- a/libbalsa/smtp-server.h
+++ b/libbalsa/smtp-server.h
@@ -6,12 +6,12 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
@@ -30,26 +30,26 @@ G_DECLARE_FINAL_TYPE(LibBalsaSmtpServer,
libbalsa_smtp_server,
LIBBALSA,
SMTP_SERVER,
- LibBalsaServer)
+ LibBalsaServer);
LibBalsaSmtpServer *libbalsa_smtp_server_new(void);
-LibBalsaSmtpServer *libbalsa_smtp_server_new_from_config(const gchar * name);
-void libbalsa_smtp_server_save_config(LibBalsaSmtpServer * server);
-void libbalsa_smtp_server_set_name(LibBalsaSmtpServer * smtp_server,
- const gchar * name);
-const gchar *libbalsa_smtp_server_get_name(LibBalsaSmtpServer * smtp_server);
-guint libbalsa_smtp_server_get_big_message(LibBalsaSmtpServer * smtp_server);
-void libbalsa_smtp_server_add_to_list(LibBalsaSmtpServer * smtp_server,
- GSList ** server_list);
+LibBalsaSmtpServer *libbalsa_smtp_server_new_from_config(const gchar *name);
+void libbalsa_smtp_server_save_config(LibBalsaSmtpServer *server);
+void libbalsa_smtp_server_set_name(LibBalsaSmtpServer *smtp_server,
+ const gchar *name);
+const gchar *libbalsa_smtp_server_get_name(LibBalsaSmtpServer *smtp_server);
+guint libbalsa_smtp_server_get_big_message(LibBalsaSmtpServer *smtp_server);
+void libbalsa_smtp_server_add_to_list(LibBalsaSmtpServer *smtp_server,
+ GSList **server_list);
-typedef void (*LibBalsaSmtpServerUpdate) (LibBalsaSmtpServer * smtp_server,
- GtkResponseType response,
- const gchar * old_name);
-void libbalsa_smtp_server_dialog(LibBalsaSmtpServer * smtp_server,
- GtkWindow * parent,
+typedef void (*LibBalsaSmtpServerUpdate) (LibBalsaSmtpServer *smtp_server,
+ GtkResponseType response,
+ const gchar *old_name);
+void libbalsa_smtp_server_dialog(LibBalsaSmtpServer *smtp_server,
+ GtkWindow *parent,
LibBalsaSmtpServerUpdate update);
gboolean libbalsa_smtp_server_trylock(LibBalsaSmtpServer *smtp_server);
-void libbalsa_smtp_server_unlock(LibBalsaSmtpServer *smtp_server);
+void libbalsa_smtp_server_unlock(LibBalsaSmtpServer *smtp_server);
#endif /* __SMTP_SERVER_H__ */
diff --git a/libnetclient/net-client-pop.h b/libnetclient/net-client-pop.h
index d199f59..639010c 100644
--- a/libnetclient/net-client-pop.h
+++ b/libnetclient/net-client-pop.h
@@ -2,13 +2,18 @@
*
* Copyright (C) Albrecht Dreß <mailto:albrecht dress arcor de> 2017
*
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
General Public License
- * as published by the Free Software Foundation; either version 3 of the License, or (at your option) any
later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
- *
- * You should have received a copy of the GNU Lesser General Public License along with this library. If not,
see
+ * This library is free software; you can redistribute it and/or modify it under the terms of
+ * the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along with this
+ * library. If not, see
* <http://www.gnu.org/licenses/>.
*/
@@ -28,7 +33,7 @@ G_DECLARE_FINAL_TYPE(NetClientPop,
net_client_pop,
NET,
CLIENT_POP,
- NetClient)
+ NetClient);
#define NET_CLIENT_POP_ERROR_QUARK (g_quark_from_static_string("net-client-pop"))
@@ -38,87 +43,113 @@ typedef struct _NetClientPopMessageInfo NetClientPopMessageInfo;
/** @brief POP-specific error codes */
enum _NetClientPopError {
- NET_CLIENT_ERROR_POP_PROTOCOL = 1, /**< A bad server reply has been received. */
- NET_CLIENT_ERROR_POP_SERVER_ERR, /**< The server replied with an error. */
- NET_CLIENT_ERROR_POP_NO_AUTH, /**< The server offers no suitable authentication
mechanism. */
- NET_CLIENT_ERROR_POP_NO_STARTTLS /**< The server does not support STARTTLS. */
+ NET_CLIENT_ERROR_POP_PROTOCOL = 1, /**< A bad server reply has been
+ received. */
+ NET_CLIENT_ERROR_POP_SERVER_ERR, /**< The server replied with an error.
+ */
+ NET_CLIENT_ERROR_POP_NO_AUTH, /**< The server offers no suitable
+ authentication mechanism. */
+ NET_CLIENT_ERROR_POP_NO_STARTTLS /**< The server does not support
+ STARTTLS. */
};
/** @name POP authentication methods
*
- * Note that the availability of these authentication methods depends upon the result of the CAPABILITY
list. According to RFC
+ * Note that the availability of these authentication methods depends upon the result of the
+ * CAPABILITY list. According to RFC
* 1939, Section 4, at least either APOP or USER/PASS @em must be supported.
* @{
*/
/** RFC 1939 "USER" and "PASS" authentication method. */
-#define NET_CLIENT_POP_AUTH_USER_PASS 0x01U
+#define NET_CLIENT_POP_AUTH_USER_PASS 0x01U
/** RFC 1939 "APOP" authentication method. */
-#define NET_CLIENT_POP_AUTH_APOP 0x02U
+#define NET_CLIENT_POP_AUTH_APOP 0x02U
/** RFC 5034 SASL "LOGIN" authentication method. */
-#define NET_CLIENT_POP_AUTH_LOGIN 0x04U
+#define NET_CLIENT_POP_AUTH_LOGIN 0x04U
/** RFC 5034 SASL "PLAIN" authentication method. */
-#define NET_CLIENT_POP_AUTH_PLAIN 0x08U
+#define NET_CLIENT_POP_AUTH_PLAIN 0x08U
/** RFC 5034 SASL "CRAM-MD5" authentication method. */
-#define NET_CLIENT_POP_AUTH_CRAM_MD5 0x10U
+#define NET_CLIENT_POP_AUTH_CRAM_MD5 0x10U
/** RFC 5034 SASL "CRAM-SHA1" authentication method. */
-#define NET_CLIENT_POP_AUTH_CRAM_SHA1 0x20U
+#define NET_CLIENT_POP_AUTH_CRAM_SHA1 0x20U
/** RFC 4752 "GSSAPI" authentication method. */
-#define NET_CLIENT_POP_AUTH_GSSAPI 0x40U
-/** Mask of all safe authentication methods, i.e. all methods which do not send the cleartext password. */
-#define NET_CLIENT_POP_AUTH_SAFE \
- (NET_CLIENT_POP_AUTH_APOP + NET_CLIENT_POP_AUTH_CRAM_MD5 + NET_CLIENT_POP_AUTH_CRAM_SHA1 +
NET_CLIENT_POP_AUTH_GSSAPI)
+#define NET_CLIENT_POP_AUTH_GSSAPI 0x40U
+/** Mask of all safe authentication methods, i.e. all methods which do not send the cleartext
+ password. */
+#define NET_CLIENT_POP_AUTH_SAFE \
+ (NET_CLIENT_POP_AUTH_APOP + NET_CLIENT_POP_AUTH_CRAM_MD5 + NET_CLIENT_POP_AUTH_CRAM_SHA1 + \
+ NET_CLIENT_POP_AUTH_GSSAPI)
/** Mask of all authentication methods. */
-#define NET_CLIENT_POP_AUTH_ALL \
- (NET_CLIENT_POP_AUTH_USER_PASS + NET_CLIENT_POP_AUTH_PLAIN + NET_CLIENT_POP_AUTH_LOGIN +
NET_CLIENT_POP_AUTH_SAFE)
+#define NET_CLIENT_POP_AUTH_ALL \
+ (NET_CLIENT_POP_AUTH_USER_PASS + NET_CLIENT_POP_AUTH_PLAIN + NET_CLIENT_POP_AUTH_LOGIN + \
+ NET_CLIENT_POP_AUTH_SAFE)
/** Mask of all authentication methods which do not require a password. */
-#define NET_CLIENT_POP_AUTH_NO_PWD NET_CLIENT_POP_AUTH_GSSAPI
+#define NET_CLIENT_POP_AUTH_NO_PWD NET_CLIENT_POP_AUTH_GSSAPI
/** @} */
/** @brief Message information
*
- * This structure is returned in a GList by net_client_pop_list() and contains information about on message
in the remote mailbox.
+ * This structure is returned in a GList by net_client_pop_list() and contains information about
+ * on message in the remote mailbox.
*/
struct _NetClientPopMessageInfo {
- guint id; /**< Message ID in the remote mailbox. */
- gsize size; /**< Size of the message in bytes. */
- gchar *uid; /**< Message UID, or NULL if it was not requested or
the remote server does not support the UIDL
- * command. */
+ guint id; /**< Message ID in the remote mailbox.
+ */
+ gsize size; /**< Size of the message in bytes. */
+ gchar *uid; /**< Message UID, or NULL if it was not
+ requested or the remote server does
+ not support the UIDL
+ * command. */
};
/** @brief POP3 Message Read Callback Function
*
* The user-provided callback function to receive a message from the remote POP3 server:
- * - @em buffer - the next NUL-terminated chunk of data, always guaranteed to consist of complete, LF
terminated lines, or NULL
+ * - @em buffer - the next NUL-terminated chunk of data, always guaranteed to consist of
+ * complete, LF terminated lines, or NULL
* when the @em count is <= 0 (see below)
- * - @em count - indicates the number of bytes in the buffer (> 0), the end of the message (== 0), or that
the download is
+ * - @em count - indicates the number of bytes in the buffer (> 0), the end of the message (==
+ * 0), or that the download is
* terminated due to an error condition (-1)
* - @em lines - number of lines in the buffer, valid only if @em count > 0
* - @em info - information for the current message
* - @em user_data - user data pointer
- * - @em error - shall be filled with error information if an error occurs in the callback; this location is
actually the @em error
- * parameter passed to net_client_pop_retr() with the exception of a call when the @em count is -1 when
this parameter is always
+ * - @em error - shall be filled with error information if an error occurs in the callback; this
+ * location is actually the @em error
+ * parameter passed to net_client_pop_retr() with the exception of a call when the @em count
+ * is -1 when this parameter is always
* NULL
- * - return value: TRUE if the message download shall proceed, or FALSE to terminate it because an error
occurred in the callback.
+ * - return value: TRUE if the message download shall proceed, or FALSE to terminate it because
+ * an error occurred in the callback.
* In the latter case, the callback function should set @em error appropriately.
*
- * The message retrieved from the remote POP3 server is passed as "raw" data. The line endings are always
LF (i.e. @em not CRLF),
- * and byte-stuffed termination '.' characters have been unstuffed. If the data passed to the callback
function shall be fed into
- * <a href="http://spruce.sourceforge.net/gmime/">GMime</a>, it is thus @em not necessary to run it through
a GMimeFilterCRLF
+ * The message retrieved from the remote POP3 server is passed as "raw" data. The line endings
+ * are always LF (i.e. @em not CRLF),
+ * and byte-stuffed termination '.' characters have been unstuffed. If the data passed to the
+ * callback function shall be fed into
+ * <a href="http://spruce.sourceforge.net/gmime/">GMime</a>, it is thus @em not necessary to run
+ * it through a GMimeFilterCRLF
* filter.
*
- * The download of every message is terminated by calling the callback with a @em count of 0. If the
callback returns FALSE for a
- * count >= 0, it is called again for the same message with count == -1 before the download is terminated.
The return value of the
+ * The download of every message is terminated by calling the callback with a @em count of 0.
+ * If the callback returns FALSE for a
+ * count >= 0, it is called again for the same message with count == -1 before the download is
+ * terminated. The return value of the
* callback called with count == -1 is ignored.
*/
-typedef gboolean (*NetClientPopMsgCb)(const gchar *buffer, gssize count, gsize lines, const
NetClientPopMessageInfo *info,
- gpointer user_data, GError **error);
+typedef gboolean (*NetClientPopMsgCb)(const gchar *buffer,
+ gssize count,
+ gsize lines,
+ const NetClientPopMessageInfo *info,
+ gpointer user_data,
+ GError **error);
GType net_client_pop_get_type(void)
- G_GNUC_CONST;
+G_GNUC_CONST;
/** @brief Create a new POP network client
@@ -129,7 +160,10 @@ GType net_client_pop_get_type(void)
* @param use_pipelining whether POP3 PIPELINING shall be used if supported by the remote server
* @return the POP network client object
*/
-NetClientPop *net_client_pop_new(const gchar *host, guint16 port, NetClientCryptMode crypt_mode, gboolean
use_pipelining);
+NetClientPop *net_client_pop_new(const gchar *host,
+ guint16 port,
+ NetClientCryptMode crypt_mode,
+ gboolean use_pipelining);
/** @brief Set allowed POP AUTH methods
@@ -139,12 +173,15 @@ NetClientPop *net_client_pop_new(const gchar *host, guint16 port, NetClientCrypt
* @param allow_auth mask of allowed authentication methods
* @return TRUE on success or FALSE on error
*
- * Set the allowed authentication methods for the passed connection. The default is @ref
NET_CLIENT_POP_AUTH_ALL for both encrypted
+ * Set the allowed authentication methods for the passed connection. The default is @ref
+ * NET_CLIENT_POP_AUTH_ALL for both encrypted
* and unencrypted connections.
*
* @note Call this function @em before calling net_client_pop_connect().
*/
-gboolean net_client_pop_allow_auth(NetClientPop *client, gboolean encrypted, guint allow_auth);
+gboolean net_client_pop_allow_auth(NetClientPop *client,
+ gboolean encrypted,
+ guint allow_auth);
/** @brief Connect a POP network client
@@ -154,32 +191,42 @@ gboolean net_client_pop_allow_auth(NetClientPop *client, gboolean encrypted, gui
* @param error filled with error information if the connection fails
* @return TRUE on success or FALSE if the connection failed
*
- * Connect the remote POP server, initialise the encryption if requested, and emit the @ref auth signal to
request authentication
+ * Connect the remote POP server, initialise the encryption if requested, and emit the @ref auth
+ * signal to request authentication
* information. Simply ignore the signal for an unauthenticated connection.
*
- * The function will try only @em one authentication method supported by the server and enabled for the
current encryption state
- * (see net_client_pop_allow_auth() and \ref NET_CLIENT_POP_AUTH_ALL etc.). The priority is, from highest
to lowest, GSSAPI (if
+ * The function will try only @em one authentication method supported by the server and enabled
+ * for the current encryption state
+ * (see net_client_pop_allow_auth() and \ref NET_CLIENT_POP_AUTH_ALL etc.). The priority is,
+ * from highest to lowest, GSSAPI (if
* configured), CRAM-SHA1, CRAM-MD5, APOP, PLAIN, USER/PASS or LOGIN.
*
- * In order to shut down a successfully established connection, just call <tt>g_object_unref()</tt> on the
POP network client
+ * In order to shut down a successfully established connection, just call
+ *<tt>g_object_unref()</tt> on the POP network client
* object.
*
* @note The caller must free the returned greeting when it is not needed any more.
*/
-gboolean net_client_pop_connect(NetClientPop *client, gchar **greeting, GError **error);
+gboolean net_client_pop_connect(NetClientPop *client,
+ gchar **greeting,
+ GError **error);
/** @brief Get the status of a POP3 mailbox
*
* @param client POP network client object
- * @param msg_count filled with the number of messages available in the mailbox, may be NULL to ignore the
value
+ * @param msg_count filled with the number of messages available in the mailbox, may be NULL to
+ * ignore the value
* @param mbox_size filled with the total mailbox size in bytes, may be NULL to ignore the value
* @param error filled with error information if the connection fails
* @return TRUE on success or FALSE if the command failed
*
* Run the POP3 STAT command to retrieve the mailbox status.
*/
-gboolean net_client_pop_stat(NetClientPop *client, gsize *msg_count, gsize *mbox_size, GError **error);
+gboolean net_client_pop_stat(NetClientPop *client,
+ gsize *msg_count,
+ gsize *mbox_size,
+ GError **error);
/** @brief List the messages in the POP3 mailbox
@@ -190,43 +237,61 @@ gboolean net_client_pop_stat(NetClientPop *client, gsize *msg_count, gsize *mbox
* @param error filled with error information if the connection fails
* @return TRUE on success or FALSE if the command failed
*
- * Run the LIST command and fill the passed list with the message identifier and message size for all
messages available in the
- * mailbox. If the parameter @em with_uid is TRUE, also run the UIDL command and include the UID's reported
by the remote server in
+ * Run the LIST command and fill the passed list with the message identifier and message size
+ * for all messages available in the
+ * mailbox. If the parameter @em with_uid is TRUE, also run the UIDL command and include the
+ * UID's reported by the remote server in
* the returned list.
*
- * The caller shall free the items in the returned list by calling net_client_pop_msg_info_free() on them.
+ * The caller shall free the items in the returned list by calling
+ * net_client_pop_msg_info_free() on them.
*
- * @note The UID's can be added only if the remote server reports in its @em CAPABILITY list that the @em
UIDL command is supported.
+ * @note The UID's can be added only if the remote server reports in its @em CAPABILITY list
+ * that the @em UIDL command is supported.
*/
-gboolean net_client_pop_list(NetClientPop *client, GList **msg_list, gboolean with_uid, GError **error);
+gboolean net_client_pop_list(NetClientPop *client,
+ GList **msg_list,
+ gboolean with_uid,
+ GError **error);
/** @brief Load messages from the POP3 mailbox
*
* @param client POP network client object
- * @param msg_list list of @ref NetClientPopMessageInfo items which shall be read from the server
- * @param callback callback function which shall be called to process the downloaded message data
+ * @param msg_list list of @ref NetClientPopMessageInfo items which shall be read from the
+ * server
+ * @param callback callback function which shall be called to process the downloaded message
+ * data
* @param user_data user data pointer passed to the callback function
* @param error filled with error information if the connection fails
* @return TRUE on success or FALSE if the command failed
*
- * Load all messages in the passed list from the remote server, passing them through the specified callback
function. The function
+ * Load all messages in the passed list from the remote server, passing them through the
+ * specified callback function. The function
* takes advantage of the RFC 2449 @em PIPELINING capability if supported by the remote server.
*/
-gboolean net_client_pop_retr(NetClientPop *client, GList *msg_list, NetClientPopMsgCb callback, gpointer
user_data, GError **error);
+gboolean net_client_pop_retr(NetClientPop *client,
+ GList *msg_list,
+ NetClientPopMsgCb callback,
+ gpointer user_data,
+ GError **error);
/** @brief Delete messages from the POP3 mailbox
*
* @param client POP network client object
- * @param msg_list list of @ref NetClientPopMessageInfo items which shall be deleted from the server
+ * @param msg_list list of @ref NetClientPopMessageInfo items which shall be deleted from the
+ * server
* @param error filled with error information if the connection fails
* @return TRUE on success or FALSE if the command failed
*
- * Delete all messages in the passed list from the remote server. The function takes advantage of the RFC
2449 @em PIPELINING
+ * Delete all messages in the passed list from the remote server. The function takes advantage
+ * of the RFC 2449 @em PIPELINING
* capability if supported by the remote server.
*/
-gboolean net_client_pop_dele(NetClientPop *client, GList *msg_list, GError **error);
+gboolean net_client_pop_dele(NetClientPop *client,
+ GList *msg_list,
+ GError **error);
/** @brief Free POP3 message item information
@@ -240,15 +305,21 @@ void net_client_pop_msg_info_free(NetClientPopMessageInfo *info);
/** @file
*
- * This module implements a POP3 client class conforming with <a
href="https://tools.ietf.org/html/rfc1939">RFC 1939</a>.
+ * This module implements a POP3 client class conforming with <a
+ * href="https://tools.ietf.org/html/rfc1939">RFC 1939</a>.
*
* The following features are supported:
* - the <i>STAT</i>, <i>LIST</i>, <i>RETR</i> and <i>DELE</i> commands as defined in RFC 1939;
- * - support for <i>PIPELINING</i> and <i>UIDL</i> as defined by <a
href="https://tools.ietf.org/html/rfc2449">RFC 2449</a>;
- * - <i>STLS</i> encryption as defined by <a href="https://tools.ietf.org/html/rfc2595">RFC 2595</a>;
- * - authentication using <i>APOP</i>, <i>USER/PASS</i> (both RFC 1939) or the SASL methods <i>PLAIN</i>,
<i>LOGIN</i>,
- * <i>CRAM-MD5</i>, <i>CRAM-SHA1</i> or <i>GSSAPI</i> (see <a
href="https://tools.ietf.org/html/rfc4752">RFC 4752</a> and
- * <a href="https://tools.ietf.org/html/rfc5034">RFC 5034</a>), depending upon the capabilities reported
by the server. Note the
+ * - support for <i>PIPELINING</i> and <i>UIDL</i> as defined by <a
+ * href="https://tools.ietf.org/html/rfc2449">RFC 2449</a>;
+ * - <i>STLS</i> encryption as defined by <a href="https://tools.ietf.org/html/rfc2595">RFC
+ * 2595</a>;
+ * - authentication using <i>APOP</i>, <i>USER/PASS</i> (both RFC 1939) or the SASL methods
+ *<i>PLAIN</i>, <i>LOGIN</i>,
+ * <i>CRAM-MD5</i>, <i>CRAM-SHA1</i> or <i>GSSAPI</i> (see <a
+ * href="https://tools.ietf.org/html/rfc4752">RFC 4752</a> and
+ * <a href="https://tools.ietf.org/html/rfc5034">RFC 5034</a>), depending upon the
+ * capabilities reported by the server. Note the
* <i>GSSAPI</i> is available only if configured with gssapi support.
*/
diff --git a/libnetclient/net-client-smtp.h b/libnetclient/net-client-smtp.h
index f7b0284..74cfc0c 100644
--- a/libnetclient/net-client-smtp.h
+++ b/libnetclient/net-client-smtp.h
@@ -2,13 +2,18 @@
*
* Copyright (C) Albrecht Dreß <mailto:albrecht dress arcor de> 2017
*
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
General Public License
- * as published by the Free Software Foundation; either version 3 of the License, or (at your option) any
later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
- *
- * You should have received a copy of the GNU Lesser General Public License along with this library. If not,
see
+ * This library is free software; you can redistribute it and/or modify it under the terms of
+ * the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along with this
+ * library. If not, see
* <http://www.gnu.org/licenses/>.
*/
@@ -28,7 +33,7 @@ G_DECLARE_FINAL_TYPE(NetClientSmtp,
net_client_smtp,
NET,
CLIENT_SMTP,
- NetClient)
+ NetClient);
#define NET_CLIENT_SMTP_ERROR_QUARK (g_quark_from_static_string("net-client-smtp"))
@@ -39,11 +44,16 @@ typedef enum _NetClientSmtpDsnMode NetClientSmtpDsnMode;
/** @brief SMTP-specific error codes */
enum _NetClientSmtpError {
- NET_CLIENT_ERROR_SMTP_PROTOCOL = 1, /**< A bad server reply has been received. */
- NET_CLIENT_ERROR_SMTP_TRANSIENT, /**< The server replied with a transient error code
(code 4yz). */
- NET_CLIENT_ERROR_SMTP_PERMANENT, /**< The server replied with a permanent error code
(code 5yz). */
- NET_CLIENT_ERROR_SMTP_NO_AUTH, /**< The server offers no suitable authentication mechanism.
*/
- NET_CLIENT_ERROR_SMTP_NO_STARTTLS /**< The server does not support STARTTLS. */
+ NET_CLIENT_ERROR_SMTP_PROTOCOL = 1, /**< A bad server reply has been
+ received. */
+ NET_CLIENT_ERROR_SMTP_TRANSIENT, /**< The server replied with a transient
+ error code (code 4yz). */
+ NET_CLIENT_ERROR_SMTP_PERMANENT, /**< The server replied with a permanent
+ error code (code 5yz). */
+ NET_CLIENT_ERROR_SMTP_NO_AUTH, /**< The server offers no suitable
+ authentication mechanism. */
+ NET_CLIENT_ERROR_SMTP_NO_STARTTLS /**< The server does not support
+ STARTTLS. */
};
@@ -51,36 +61,43 @@ enum _NetClientSmtpError {
* @{
*/
/** RFC 4616 "PLAIN" authentication method. */
-#define NET_CLIENT_SMTP_AUTH_PLAIN 0x01U
+#define NET_CLIENT_SMTP_AUTH_PLAIN 0x01U
/** "LOGIN" authentication method. */
-#define NET_CLIENT_SMTP_AUTH_LOGIN 0x02U
+#define NET_CLIENT_SMTP_AUTH_LOGIN 0x02U
/** RFC 2195 "CRAM-MD5" authentication method. */
-#define NET_CLIENT_SMTP_AUTH_CRAM_MD5 0x04U
+#define NET_CLIENT_SMTP_AUTH_CRAM_MD5 0x04U
/** RFC xxxx "CRAM-SHA1" authentication method. */
-#define NET_CLIENT_SMTP_AUTH_CRAM_SHA1 0x08U
+#define NET_CLIENT_SMTP_AUTH_CRAM_SHA1 0x08U
/** RFC 4752 "GSSAPI" authentication method. */
-#define NET_CLIENT_SMTP_AUTH_GSSAPI 0x10U
-/** Mask of all safe authentication methods, i.e. all methods which do not send the cleartext password. */
-#define NET_CLIENT_SMTP_AUTH_SAFE \
- (NET_CLIENT_SMTP_AUTH_CRAM_MD5 + NET_CLIENT_SMTP_AUTH_CRAM_SHA1 + NET_CLIENT_SMTP_AUTH_GSSAPI)
+#define NET_CLIENT_SMTP_AUTH_GSSAPI 0x10U
+/** Mask of all safe authentication methods, i.e. all methods which do not send the cleartext
+ password. */
+#define NET_CLIENT_SMTP_AUTH_SAFE \
+ (NET_CLIENT_SMTP_AUTH_CRAM_MD5 + NET_CLIENT_SMTP_AUTH_CRAM_SHA1 + \
+ NET_CLIENT_SMTP_AUTH_GSSAPI)
/** Mask of all authentication methods. */
-#define NET_CLIENT_SMTP_AUTH_ALL \
- (NET_CLIENT_SMTP_AUTH_PLAIN + NET_CLIENT_SMTP_AUTH_LOGIN + NET_CLIENT_SMTP_AUTH_SAFE)
+#define NET_CLIENT_SMTP_AUTH_ALL \
+ (NET_CLIENT_SMTP_AUTH_PLAIN + NET_CLIENT_SMTP_AUTH_LOGIN + NET_CLIENT_SMTP_AUTH_SAFE)
/** Mask of all authentication methods which do not require a password. */
-#define NET_CLIENT_SMTP_AUTH_NO_PWD NET_CLIENT_SMTP_AUTH_GSSAPI
+#define NET_CLIENT_SMTP_AUTH_NO_PWD NET_CLIENT_SMTP_AUTH_GSSAPI
/** @} */
/** @brief Delivery Status Notification mode
*
- * See <a href="https://tools.ietf.org/html/rfc3461">RFC 3461</a> for a description of Delivery Status
Notifications (DSNs). The
+ * See <a href="https://tools.ietf.org/html/rfc3461">RFC 3461</a> for a description of Delivery
+ * Status Notifications (DSNs). The
* DSN mode is the logical OR of these options.
*/
enum _NetClientSmtpDsnMode {
- NET_CLIENT_SMTP_DSN_NEVER = 0, /**< Never request a DSN (do not combine with other
options). */
- NET_CLIENT_SMTP_DSN_SUCCESS = 1, /**< Request a DSN on successful delivery. */
- NET_CLIENT_SMTP_DSN_FAILURE = 2, /**< Request a DSN on delivery failure. */
- NET_CLIENT_SMTP_DSN_DELAY = 4 /**< Request a DSN if delivery of a message has been
delayed. */
+ NET_CLIENT_SMTP_DSN_NEVER = 0, /**< Never request a DSN (do not combine
+ with other options). */
+ NET_CLIENT_SMTP_DSN_SUCCESS = 1, /**< Request a DSN on successful
+ delivery. */
+ NET_CLIENT_SMTP_DSN_FAILURE = 2, /**< Request a DSN on delivery failure.
+ */
+ NET_CLIENT_SMTP_DSN_DELAY = 4 /**< Request a DSN if delivery of a
+ message has been delayed. */
};
@@ -91,18 +108,25 @@ enum _NetClientSmtpDsnMode {
* - @em count - maximum number of bytes which may be written to @em buffer
* - @em user_data - user data pointer (_NetClientSmtpMessage::user_data)
* - @em error - shall be filled with error information if an error occurs in the callback
- * - return value: a value > 0 indicating the number of bytes written to @em buffer, or 0 to indicate that
all data has been
+ * - return value: a value > 0 indicating the number of bytes written to @em buffer, or 0 to
+ * indicate that all data has been
* transferred, or a value < 0 to indicate an error in the callback function.
*
- * @note The callback function is responsible for properly formatting the message body according to
- * <a href="https://tools.ietf.org/html/rfc5321">RFC 5321</a>, <a
href="https://tools.ietf.org/html/rfc5322">RFC 5322</a> and
- * further relevant standards, e.g. by using <a href="http://spruce.sourceforge.net/gmime/">GMime</a>.
+ * @note The callback function is responsible for properly formatting the message body according
+ * to
+ * <a href="https://tools.ietf.org/html/rfc5321">RFC 5321</a>, <a
+ * href="https://tools.ietf.org/html/rfc5322">RFC 5322</a> and
+ * further relevant standards, e.g. by using <a
+ * href="http://spruce.sourceforge.net/gmime/">GMime</a>.
*/
-typedef gssize (*NetClientSmtpSendCb)(gchar *buffer, gsize count, gpointer user_data, GError **error);
+typedef gssize (*NetClientSmtpSendCb)(gchar *buffer,
+ gsize count,
+ gpointer user_data,
+ GError **error);
GType net_client_smtp_get_type(void)
- G_GNUC_CONST;
+G_GNUC_CONST;
/** @brief Create a new SMTP network client
@@ -112,7 +136,9 @@ GType net_client_smtp_get_type(void)
* @param crypt_mode encryption mode
* @return the SMTP network client object
*/
-NetClientSmtp *net_client_smtp_new(const gchar *host, guint16 port, NetClientCryptMode crypt_mode);
+NetClientSmtp *net_client_smtp_new(const gchar *host,
+ guint16 port,
+ NetClientCryptMode crypt_mode);
/** @brief Set allowed SMTP AUTH methods
@@ -122,12 +148,15 @@ NetClientSmtp *net_client_smtp_new(const gchar *host, guint16 port, NetClientCry
* @param allow_auth mask of allowed authentication methods
* @return TRUE on success or FALSE on error
*
- * Set the allowed authentication methods for the passed connection. The default is @ref
NET_CLIENT_SMTP_AUTH_ALL for encrypted and
+ * Set the allowed authentication methods for the passed connection. The default is @ref
+ * NET_CLIENT_SMTP_AUTH_ALL for encrypted and
* @ref NET_CLIENT_SMTP_AUTH_SAFE for unencrypted connections, respectively.
*
* @note Call this function @em before calling net_client_smtp_connect().
*/
-gboolean net_client_smtp_allow_auth(NetClientSmtp *client, gboolean encrypted, guint allow_auth);
+gboolean net_client_smtp_allow_auth(NetClientSmtp *client,
+ gboolean encrypted,
+ guint allow_auth);
/** @brief Connect a SMTP network client
@@ -137,19 +166,25 @@ gboolean net_client_smtp_allow_auth(NetClientSmtp *client, gboolean encrypted, g
* @param error filled with error information if the connection fails
* @return TRUE on success or FALSE if the connection failed
*
- * Connect the remote SMTP server, initialise the encryption if requested, and emit the @ref auth signal to
request authentication
+ * Connect the remote SMTP server, initialise the encryption if requested, and emit the @ref
+ * auth signal to request authentication
* information. Simply ignore the signal for an unauthenticated connection.
*
- * The function will try only @em one authentication method supported by the server and enabled for the
current encryption state
- * (see net_client_smtp_allow_auth() and \ref NET_CLIENT_SMTP_AUTH_ALL etc.). The priority is, from highest
to lowest, GSSAPI (if
+ * The function will try only @em one authentication method supported by the server and enabled
+ * for the current encryption state
+ * (see net_client_smtp_allow_auth() and \ref NET_CLIENT_SMTP_AUTH_ALL etc.). The priority is,
+ * from highest to lowest, GSSAPI (if
* configured), CRAM-SHA1, CRAM-MD5, PLAIN or LOGIN.
*
- * In order to shut down a successfully established connection, just call <tt>g_object_unref()</tt> on the
SMTP network client
+ * In order to shut down a successfully established connection, just call
+ *<tt>g_object_unref()</tt> on the SMTP network client
* object.
*
* @note The caller must free the returned greeting when it is not needed any more.
*/
-gboolean net_client_smtp_connect(NetClientSmtp *client, gchar **greeting, GError **error);
+gboolean net_client_smtp_connect(NetClientSmtp *client,
+ gchar **greeting,
+ GError **error);
/** @brief Check if the SMTP network client supports Delivery Status Notifications
@@ -157,7 +192,8 @@ gboolean net_client_smtp_connect(NetClientSmtp *client, gchar **greeting, GError
* @param client connected SMTP network client object
* @return TRUE is DSN's are supported, FALSE if not
*
- * Return if the connected SMTP server announced support for Delivery Status Notifications (DSNs) according
to
+ * Return if the connected SMTP server announced support for Delivery Status Notifications
+ *(DSNs) according to
* <a href="https://tools.ietf.org/html/rfc3461">RFC 3461</a>.
*/
gboolean net_client_smtp_can_dsn(NetClientSmtp *client);
@@ -172,7 +208,9 @@ gboolean net_client_smtp_can_dsn(NetClientSmtp *client);
*
* Send the passed SMTP message to the connected SMTP server.
*/
-gboolean net_client_smtp_send_msg(NetClientSmtp *client, const NetClientSmtpMessage *message, GError
**error);
+gboolean net_client_smtp_send_msg(NetClientSmtp *client,
+ const NetClientSmtpMessage *message,
+ GError **error);
/** @brief Create a SMTP message
@@ -181,12 +219,15 @@ gboolean net_client_smtp_send_msg(NetClientSmtp *client, const NetClientSmtpMess
* @param user_data additional user data passed to the callback function
* @return a newly create SMTP message
*
- * Create a message suitable for transmission by calling net_client_smtp_send_msg(). At least one sender
and at least one recipient
- * must be added by calling net_client_smtp_msg_set_sender() and net_client_smtp_msg_add_recipient(),
respectively. When the SMTP
+ * Create a message suitable for transmission by calling net_client_smtp_send_msg(). At least
+ * one sender and at least one recipient
+ * must be added by calling net_client_smtp_msg_set_sender() and
+ * net_client_smtp_msg_add_recipient(), respectively. When the SMTP
* message is not needed any more, call net_client_smtp_msg_free() to free it.
*/
-NetClientSmtpMessage *net_client_smtp_msg_new(NetClientSmtpSendCb data_callback, gpointer user_data)
- G_GNUC_MALLOC;
+NetClientSmtpMessage *net_client_smtp_msg_new(NetClientSmtpSendCb data_callback,
+ gpointer user_data)
+G_GNUC_MALLOC;
/** @brief Set the sender of a SMTP message
@@ -195,10 +236,12 @@ NetClientSmtpMessage *net_client_smtp_msg_new(NetClientSmtpSendCb data_callback,
* @param rfc5321_sender RFC 5321-compliant sender address
* @return TRUE on success or FALSE on error
*
- * Set the sender address ("MAIL FROM" reverse-path, see <a href="https://tools.ietf.org/html/rfc5321">RFC
5321</a>) of the SMTP
+ * Set the sender address ("MAIL FROM" reverse-path, see <a
+ * href="https://tools.ietf.org/html/rfc5321">RFC 5321</a>) of the SMTP
* message.
*/
-gboolean net_client_smtp_msg_set_sender(NetClientSmtpMessage *smtp_msg, const gchar *rfc5321_sender);
+gboolean net_client_smtp_msg_set_sender(NetClientSmtpMessage *smtp_msg,
+ const gchar *rfc5321_sender);
/** @brief Set options for Delivery Status Notifications
@@ -208,10 +251,13 @@ gboolean net_client_smtp_msg_set_sender(NetClientSmtpMessage *smtp_msg, const gc
* @param ret_full return the full message on failure instead of the headers only
* @return TRUE on success or FALSE on error
*
- * Set the @em ENVID and @em RET parameters for Delivery Status Notifications (DSN's). The default is to
omit the ENVID and to
+ * Set the @em ENVID and @em RET parameters for Delivery Status Notifications (DSN's). The
+ * default is to omit the ENVID and to
* request headers only.
*/
-gboolean net_client_smtp_msg_set_dsn_opts(NetClientSmtpMessage *smtp_msg, const gchar *envid, gboolean
ret_full);
+gboolean net_client_smtp_msg_set_dsn_opts(NetClientSmtpMessage *smtp_msg,
+ const gchar *envid,
+ gboolean ret_full);
/** @brief Add a recipient to a SMTP message
@@ -221,11 +267,13 @@ gboolean net_client_smtp_msg_set_dsn_opts(NetClientSmtpMessage *smtp_msg, const
* @param dsn_mode Delivery Status Notification mode for the recipient
* @return TRUE on success or FALSE on error
*
- * Add a recipient address ("RCPT TO" forward-path, see <a href="https://tools.ietf.org/html/rfc5321">RFC
5321</a>) to the SMTP
+ * Add a recipient address ("RCPT TO" forward-path, see <a
+ * href="https://tools.ietf.org/html/rfc5321">RFC 5321</a>) to the SMTP
* message.
*/
-gboolean net_client_smtp_msg_add_recipient(NetClientSmtpMessage *smtp_msg, const gchar *rfc5321_rcpt,
- NetClientSmtpDsnMode
dsn_mode);
+gboolean net_client_smtp_msg_add_recipient(NetClientSmtpMessage *smtp_msg,
+ const gchar *rfc5321_rcpt,
+ NetClientSmtpDsnMode dsn_mode);
/** @brief Free a SMTP message
@@ -239,17 +287,21 @@ void net_client_smtp_msg_free(NetClientSmtpMessage *smtp_msg);
/** @file
*
- * This module implements a SMTP client class conforming with <a
href="https://tools.ietf.org/html/rfc5321">RFC 5321</a>.
+ * This module implements a SMTP client class conforming with <a
+ * href="https://tools.ietf.org/html/rfc5321">RFC 5321</a>.
*
* The following additional features are supported:
- * - Authentication according to <a href="https://tools.ietf.org/html/rfc4954">RFC 4954</a>, using the
methods
+ * - Authentication according to <a href="https://tools.ietf.org/html/rfc4954">RFC 4954</a>,
+ * using the methods
* - CRAM-MD5 according to <a href="https://tools.ietf.org/html/rfc2195">RFC 2195</a>
* - CRAM-SHA1 according to <a href="https://tools.ietf.org/html/rfc_TBD">TBD</a>
* - PLAIN according to <a href="https://tools.ietf.org/html/rfc4616">RFC 4616</a>
* - LOGIN
- * - GSSAPI according to <a href="https://tools.ietf.org/html/rfc4752">RFC 4752</a> (if configured with
gssapi support)
+ * - GSSAPI according to <a href="https://tools.ietf.org/html/rfc4752">RFC 4752</a> (if
+ * configured with gssapi support)
* - STARTTLS encryption according to <a href="https://tools.ietf.org/html/rfc3207">RFC 3207</a>
- * - Delivery Status Notifications (DSNs) according to <a href="https://tools.ietf.org/html/rfc3461">RFC
3461</a>
+ * - Delivery Status Notifications (DSNs) according to <a
+ * href="https://tools.ietf.org/html/rfc3461">RFC 3461</a>
*/
diff --git a/libnetclient/net-client.h b/libnetclient/net-client.h
index 9fcb870..e966187 100644
--- a/libnetclient/net-client.h
+++ b/libnetclient/net-client.h
@@ -2,13 +2,18 @@
*
* Copyright (C) Albrecht Dreß <mailto:albrecht dress arcor de> 2017
*
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
General Public License
- * as published by the Free Software Foundation; either version 3 of the License, or (at your option) any
later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
- *
- * You should have received a copy of the GNU Lesser General Public License along with this library. If not,
see
+ * This library is free software; you can redistribute it and/or modify it under the terms of
+ * the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along with this
+ * library. If not, see
* <http://www.gnu.org/licenses/>.
*/
@@ -30,7 +35,7 @@ G_DECLARE_DERIVABLE_TYPE(NetClient,
net_client,
NET,
CLIENT,
- GObject)
+ GObject);
#define NET_CLIENT_ERROR_QUARK g_quark_from_static_string("net-client")
@@ -46,56 +51,71 @@ struct _NetClientClass {
/** @brief Encryption mode */
enum _NetClientCryptMode {
- NET_CLIENT_CRYPT_ENCRYPTED = 1, /**< TLS encryption @em before starting the protocol
required (e.g. SMTPS). */
- NET_CLIENT_CRYPT_STARTTLS, /**< Protocol-specific STARTTLS encryption
required. */
- NET_CLIENT_CRYPT_STARTTLS_OPT, /**< Optional protocol-specific STARTTLS encryption,
proceed unencrypted on fail. */
- NET_CLIENT_CRYPT_NONE /**< Unencrypted connection. */
+ NET_CLIENT_CRYPT_ENCRYPTED = 1, /**< TLS encryption @em before starting
+ the protocol required (e.g. SMTPS).
+ */
+ NET_CLIENT_CRYPT_STARTTLS, /**< Protocol-specific STARTTLS
+ encryption required. */
+ NET_CLIENT_CRYPT_STARTTLS_OPT, /**< Optional protocol-specific STARTTLS
+ encryption, proceed unencrypted on
+ fail. */
+ NET_CLIENT_CRYPT_NONE /**< Unencrypted connection. */
};
/** @brief Error codes */
enum _NetClientError {
- NET_CLIENT_ERROR_CONNECTED = 1, /**< The client is already connected. */
- NET_CLIENT_ERROR_NOT_CONNECTED, /**< The client is not connected. */
- NET_CLIENT_ERROR_CONNECTION_LOST, /**< The connection is lost. */
- NET_CLIENT_ERROR_TLS_ACTIVE, /**< TLS is already active for the connection. */
- NET_CLIENT_ERROR_LINE_TOO_LONG, /**< The line is too long. */
- NET_CLIENT_ERROR_GNUTLS, /**< A GnuTLS error occurred. */
- NET_CLIENT_ERROR_GSSAPI /**< A GSSAPI error occurred. */
+ NET_CLIENT_ERROR_CONNECTED = 1, /**< The client is already connected. */
+ NET_CLIENT_ERROR_NOT_CONNECTED, /**< The client is not connected. */
+ NET_CLIENT_ERROR_CONNECTION_LOST, /**< The connection is lost. */
+ NET_CLIENT_ERROR_TLS_ACTIVE, /**< TLS is already active for the
+ connection. */
+ NET_CLIENT_ERROR_LINE_TOO_LONG, /**< The line is too long. */
+ NET_CLIENT_ERROR_GNUTLS, /**< A GnuTLS error occurred. */
+ NET_CLIENT_ERROR_GSSAPI /**< A GSSAPI error occurred. */
};
GType net_client_get_type(void)
- G_GNUC_CONST;
+G_GNUC_CONST;
/** @brief Create a new network client
*
- * @param host_and_port remote host and port or service, separated by a colon, which shall be connected
+ * @param host_and_port remote host and port or service, separated by a colon, which shall be
+ * connected
* @param default_port default remote port if host_and_port does not contain a port
* @param max_line_len maximum line length supported by the underlying protocol, 0 for no limit
* @return the net network client object
*
- * Create a new network client object with the passed parameters. Call <tt>g_object_unref()</tt> on it to
shut down the connection
+ * Create a new network client object with the passed parameters. Call
+ *<tt>g_object_unref()</tt> on it to shut down the connection
* and to free all resources of it.
*/
-NetClient *net_client_new(const gchar *host_and_port, guint16 default_port, gsize max_line_len);
+NetClient *net_client_new(const gchar *host_and_port,
+ guint16 default_port,
+ gsize max_line_len);
/** @brief Configure a network client
*
* @param client network client
- * @param host_and_port remote host and port or service, separated by a colon, which shall be connected
+ * @param host_and_port remote host and port or service, separated by a colon, which shall be
+ * connected
* @param default_port default remote port if host_and_port does not contain a port
* @param max_line_len maximum line length supported by the underlying protocol, 0 for no limit
* @param error filled with error information on error
* @return TRUE is the connection was successful, FALSE on error
*
- * Set the remote host and port and the maximum line length to the passed parameters, replacing the previous
values set by calling
+ * Set the remote host and port and the maximum line length to the passed parameters, replacing
+ * the previous values set by calling
* net_client_new().
*/
-gboolean net_client_configure(NetClient *client, const gchar *host_and_port, guint16 default_port, gsize
max_line_len,
- GError **error);
+gboolean net_client_configure(NetClient *client,
+ const gchar *host_and_port,
+ guint16 default_port,
+ gsize max_line_len,
+ GError **error);
/** @brief Get the target host of a network client
@@ -103,7 +123,8 @@ gboolean net_client_configure(NetClient *client, const gchar *host_and_port, gui
* @param client network client
* @return the currently set host on success, or NULL on error
*
- * @note The function returns the value of @em host_and_port set by net_client_new() or
net_client_configure().
+ * @note The function returns the value of @em host_and_port set by net_client_new() or
+ * net_client_configure().
*/
const gchar *net_client_get_host(NetClient *client);
@@ -116,14 +137,16 @@ const gchar *net_client_get_host(NetClient *client);
*
* Try to connect the remote host and TCP port.
*/
-gboolean net_client_connect(NetClient *client, GError **error);
+gboolean net_client_connect(NetClient *client,
+ GError **error);
/** @brief Shut down the connection to a network client
*
* @param client network client
*
- * Shut down the connection. Note that it is usually not necessary to call this function, as the connection
will be shut down when
+ * Shut down the connection. Note that it is usually not necessary to call this function, as
+ * the connection will be shut down when
* the client is destroyed by calling <tt>g_object_unref()</tt>.
*/
void net_client_shutdown(NetClient *client);
@@ -152,12 +175,16 @@ gboolean net_client_is_encrypted(NetClient *client);
* @param error filled with error information on error
* @return TRUE is the certificate and private key were loaded, FALSE on error
*
- * Load a client certificate and private key form the passed PEM data. If the private key is encrypted, the
signal @ref cert-pass
+ * Load a client certificate and private key form the passed PEM data. If the private key is
+ * encrypted, the signal @ref cert-pass
* is emitted.
*
- * Use this function (or net_client_set_cert_from_file()) if the remote server requires a client certificate.
+ * Use this function (or net_client_set_cert_from_file()) if the remote server requires a client
+ * certificate.
*/
-gboolean net_client_set_cert_from_pem(NetClient *client, const gchar *pem_data, GError **error);
+gboolean net_client_set_cert_from_pem(NetClient *client,
+ const gchar *pem_data,
+ GError **error);
/** @brief Load a certificate and private key from a PEM file
@@ -167,12 +194,16 @@ gboolean net_client_set_cert_from_pem(NetClient *client, const gchar *pem_data,
* @param error filled with error information on error
* @return TRUE is the certificate and private key were loaded, FALSE on error
*
- * Load a client certificate and private key form the passed PEM file. If the private key is encrypted, the
signal @ref cert-pass
+ * Load a client certificate and private key form the passed PEM file. If the private key is
+ * encrypted, the signal @ref cert-pass
* is emitted.
*
- * Use this function (or net_client_set_cert_from_pem()) if the remote server requires a client certificate.
+ * Use this function (or net_client_set_cert_from_pem()) if the remote server requires a client
+ * certificate.
*/
-gboolean net_client_set_cert_from_file(NetClient *client, const gchar *pem_path, GError **error);
+gboolean net_client_set_cert_from_file(NetClient *client,
+ const gchar *pem_path,
+ GError **error);
/** @brief Start encryption
@@ -181,24 +212,31 @@ gboolean net_client_set_cert_from_file(NetClient *client, const gchar *pem_path,
* @param error filled with error information on error
* @return TRUE if the connection is now TLS encrypted, FALSE on error
*
- * Try to negotiate TLS encryption. If the remote server presents an untrusted certificate, the signal @ref
cert-check is emitted.
+ * Try to negotiate TLS encryption. If the remote server presents an untrusted certificate, the
+ * signal @ref cert-check is emitted.
*/
-gboolean net_client_start_tls(NetClient *client, GError **error);
+gboolean net_client_start_tls(NetClient *client,
+ GError **error);
/** @brief Read a CRLF-terminated line from a network client
*
* @param client network client
- * @param recv_line filled with the response buffer on success, may be NULL to discard the line read
+ * @param recv_line filled with the response buffer on success, may be NULL to discard the line
+ * read
* @param error filled with error information on error
* @return TRUE is the read operation was successful, FALSE on error
*
- * Read a CRLF-terminated line from the remote server and return it in the passed buffer. The terminating
CRLF is always stripped.
+ * Read a CRLF-terminated line from the remote server and return it in the passed buffer. The
+ * terminating CRLF is always stripped.
*
- * @note If supplied, the response buffer is never NULL on success. The caller must free the returned
buffer when it is not needed
+ * @note If supplied, the response buffer is never NULL on success. The caller must free the
+ * returned buffer when it is not needed
* any more.
*/
-gboolean net_client_read_line(NetClient *client, gchar **recv_line, GError **error);
+gboolean net_client_read_line(NetClient *client,
+ gchar **recv_line,
+ GError **error);
/** @brief Write data to a network client
@@ -209,10 +247,14 @@ gboolean net_client_read_line(NetClient *client, gchar **recv_line, GError **err
* @param error filled with error information on error
* @return TRUE is the send operation was successful, FALSE on error
*
- * Send the complete data buffer to the remote server. The caller must ensure that the allowed line length
is not exceeded, and
+ * Send the complete data buffer to the remote server. The caller must ensure that the allowed
+ * line length is not exceeded, and
* that the lines are CRLF-terminated.
*/
-gboolean net_client_write_buffer(NetClient *client, const gchar *buffer, gsize count, GError **error);
+gboolean net_client_write_buffer(NetClient *client,
+ const gchar *buffer,
+ gsize count,
+ GError **error);
/** @brief Write a line to a network client
@@ -223,9 +265,13 @@ gboolean net_client_write_buffer(NetClient *client, const gchar *buffer, gsize c
* @param error filled with error information on error
* @return TRUE is the send operation was successful, FALSE on error
*
- * Format a line according to the passed arguments, append CRLF, and send it to the remote server.
+ * Format a line according to the passed arguments, append CRLF, and send it to the remote
+ * server.
*/
-gboolean net_client_vwrite_line(NetClient *client, const gchar *format, va_list args, GError **error);
+gboolean net_client_vwrite_line(NetClient *client,
+ const gchar *format,
+ va_list args,
+ GError **error);
/** @brief Write a line with a variable argument list to a network client
@@ -236,28 +282,39 @@ gboolean net_client_vwrite_line(NetClient *client, const gchar *format, va_list
* @param ... additional arguments according to the format string
* @return TRUE is the send operation was successful, FALSE on error
*
- * Format a line according to the passed arguments, append CRLF, and send it to the remote server.
+ * Format a line according to the passed arguments, append CRLF, and send it to the remote
+ * server.
*/
-gboolean net_client_write_line(NetClient *client, const gchar *format, GError **error, ...)
- G_GNUC_PRINTF(2, 4);
+gboolean net_client_write_line(NetClient *client,
+ const gchar *format,
+ GError **error,
+ ...)
+G_GNUC_PRINTF(2, 4);
/** @brief Execute a command-response sequence with a network client
*
* @param client network client
- * @param response filled with the response buffer on success, may be NULL to discard the response
+ * @param response filled with the response buffer on success, may be NULL to discard the
+ * response
* @param request_fmt printf-like request format string
* @param error filled with error information on error
* @param ... additional arguments according to the format string
* @return TRUE is the operation was successful, FALSE on error
*
- * This convenience function calls net_client_vwrite_line() to write a one-line command to the remote
server, and then
- * net_client_read_line() to read the response. The terminating CRLF of the response is always stripped.
+ * This convenience function calls net_client_vwrite_line() to write a one-line command to the
+ * remote server, and then
+ * net_client_read_line() to read the response. The terminating CRLF of the response is always
+ * stripped.
*
* @note The caller must free the returned buffer when it is not needed any more.
*/
-gboolean net_client_execute(NetClient *client, gchar **response, const gchar *request_fmt, GError **error,
...)
- G_GNUC_PRINTF(3, 5);
+gboolean net_client_execute(NetClient *client,
+ gchar **response,
+ const gchar *request_fmt,
+ GError **error,
+ ...)
+G_GNUC_PRINTF(3, 5);
/** @brief Set the connection time-out
@@ -268,48 +325,69 @@ gboolean net_client_execute(NetClient *client, gchar **response, const gchar *re
*
* @note The default timeout is 180 seconds (3 minutes).
*/
-gboolean net_client_set_timeout(NetClient *client, guint timeout_secs);
+gboolean net_client_set_timeout(NetClient *client,
+ guint timeout_secs);
-/**
+/**
* @mainpage
*
- * This library provides an implementation of CRLF-terminated line-based client protocols built on top of
GIO. It provides a base
- * module (see file net-client.h), containing the line-based IO methods, and on top of that SMTP (RFC 5321)
and POP3 (RFC 1939)
- * client classes (see files net-client-smtp.h and net-client-pop.h, respectively). The file
net-client-utils.h contains some
+ * This library provides an implementation of CRLF-terminated line-based client protocols built
+ * on top of GIO. It provides a base
+ * module (see file net-client.h), containing the line-based IO methods, and on top of that SMTP
+ *(RFC 5321) and POP3 (RFC 1939)
+ * client classes (see files net-client-smtp.h and net-client-pop.h, respectively). The file
+ * net-client-utils.h contains some
* helper functions for authentication.
*
* \author Written by Albrecht Dreß mailto:albrecht dress arcor de
* \copyright Copyright © Albrecht Dreß 2017<br/>
- * This library is free software: you can redistribute it and/or modify it under the terms of the GNU
General Public License as
- * published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later
version.<br/>
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.<br/>
- * You should have received a copy of the GNU General Public License along with this library. If not, see
+ * This library is free software: you can redistribute it and/or modify it under the terms of
+ * the GNU General Public License as
+ * published bythe Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.<br/>
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.<br/>
+ * You should have received a copy of the GNU General Public License along with this library.
+ * If not, see
* http://www.gnu.org/licenses/.
*
* @file
*
- * This module implements the base class for a simple network client communication on the basis of
CRLF-terminated lines.
+ * This module implements the base class for a simple network client communication on the basis
+ * of CRLF-terminated lines.
*
* @section signals Signals
*
* The following signals are implemented:
*
* - @anchor cert-pass cert-pass
- * @code gchar *cert_pass(NetClient *client, GByteArray *peer_cert_der, gpointer user_data) @endcode The
client certificate used
- * for the connection has a password-protected key. The certificate in DER format is passed to the signal
handler, and shall
- * return a newly allocated string containing the password. The string is wiped and freed when it is not
needed any more.
+ * @code gchar *cert_pass(NetClient *client, GByteArray *peer_cert_der, gpointer user_data)
+ *@endcode The client certificate used
+ * for the connection has a password-protected key. The certificate in DER format is passed
+ * to the signal handler, and shall
+ * return a newly allocated string containing the password. The string is wiped and freed
+ * when it is not needed any more.
* - @anchor cert-check cert-check
- * @code gboolean check_cert(NetClient *client, GTlsCertificate *peer_cert, GTlsCertificateFlags errors,
gpointer user_data)
- * @endcode The server certificate is not trusted. The received certificate and the errors which occurred
during the check are
- * passed to the signal handler. The handler shall return TRUE to accept the certificate, or FALSE to
reject it.
+ * @code gboolean check_cert(NetClient *client, GTlsCertificate *peer_cert,
+ * GTlsCertificateFlags errors, gpointer user_data)
+ * @endcode The server certificate is not trusted. The received certificate and the errors
+ * which occurred during the check are
+ * passed to the signal handler. The handler shall return TRUE to accept the certificate, or
+ * FALSE to reject it.
* - @anchor auth auth
- * @code gchar **get_auth(NetClient *client, gboolean need_passwd, gpointer user_data) @endcode
Authentication is required by the
- * remote server. The signal handler shall return a NULL-terminated array of strings, containing the user
name in the first and
- * the password in the second element. If the parameter @em need_passwd is FALSE, no password is required
(e.g. for kerberos
- * ticket-based authentication). In this case, the password element must be present in the reply, but it
is ignored an may be
- * NULL. The strings are wiped and freed when they are not needed any more. Return NULL if no
authentication is required.
+ * @code gchar **get_auth(NetClient *client, gboolean need_passwd, gpointer user_data)
+ *@endcode Authentication is required by the
+ * remote server. The signal handler shall return a NULL-terminated array of strings,
+ * containing the user name in the first and
+ * the password in the second element. If the parameter @em need_passwd is FALSE, no password
+ * is required (e.g. for kerberos
+ * ticket-based authentication). In this case, the password element must be present in the
+ * reply, but it is ignored an may be
+ * NULL. The strings are wiped and freed when they are not needed any more. Return NULL if
+ * no authentication is required.
*/
diff --git a/src/ab-window.h b/src/ab-window.h
index a158c55..3f1c4a8 100644
--- a/src/ab-window.h
+++ b/src/ab-window.h
@@ -5,14 +5,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,11 +29,12 @@ G_DECLARE_FINAL_TYPE(BalsaAbWindow,
balsa_ab_window,
BALSA,
AB_WINDOW,
- GtkDialog)
+ GtkDialog);
-GtkWidget *balsa_ab_window_new(gboolean composing, GtkWindow* parent);
+GtkWidget *balsa_ab_window_new(gboolean composing,
+ GtkWindow *parent);
gchar *balsa_ab_window_get_recipients(BalsaAbWindow *ab);
-#endif /* __ADDRESS_BOOK_H__ */
+#endif /* __ADDRESS_BOOK_H__ */
diff --git a/src/balsa-cite-bar.h b/src/balsa-cite-bar.h
index 1f07c9a..72bb302 100644
--- a/src/balsa-cite-bar.h
+++ b/src/balsa-cite-bar.h
@@ -5,12 +5,12 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
@@ -32,14 +32,16 @@ G_DECLARE_FINAL_TYPE(BalsaCiteBar,
balsa_cite_bar,
BALSA,
CITE_BAR,
- GtkWidget)
+ GtkWidget);
-GtkWidget* balsa_cite_bar_new (gint height, gint bars, gint dimension);
-void balsa_cite_bar_resize (BalsaCiteBar *cite_bar, gint height);
+GtkWidget *balsa_cite_bar_new(gint height,
+ gint bars,
+ gint dimension);
+void balsa_cite_bar_resize(BalsaCiteBar *cite_bar,
+ gint height);
G_END_DECLS
#endif /* __BALSA_CITE_BAR_H__ */
-
diff --git a/src/balsa-index.h b/src/balsa-index.h
index 3f0f09c..c065621 100644
--- a/src/balsa-index.h
+++ b/src/balsa-index.h
@@ -5,14 +5,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -32,151 +32,161 @@ G_DECLARE_FINAL_TYPE(BalsaIndex,
balsa_index,
BALSA,
INDEX,
- GtkTreeView)
-
-
- typedef enum { BALSA_INDEX_WIDE, BALSA_INDEX_NARROW }
- BalsaIndexWidthPreference;
-
- struct _BalsaIndex {
- GtkTreeView tree_view;
-
- /* the popup menu and some items we need to refer to */
- GtkWidget *popup_menu;
- GtkWidget *delete_item;
- GtkWidget *undelete_item;
- GtkWidget *move_to_trash_item;
- GtkWidget *toggle_item;
- GtkWidget *move_to_item;
-
- BalsaMailboxNode* mailbox_node;
- guint current_msgno;
- guint next_msgno;
- gboolean current_message_is_deleted:1;
- gboolean prev_message:1;
- gboolean next_message:1;
- gboolean has_selection_changed_idle:1;
- gboolean has_mailbox_changed_idle:1;
- gboolean collapsing:1;
- int filter_no;
- gchar *filter_string; /* Quick view filter string, if any */
-
- /* signal handler ids */
- gulong row_expanded_id;
- gulong row_collapsed_id;
- gulong selection_changed_id;
-
- LibBalsaMailboxSearchIter *search_iter;
- BalsaIndexWidthPreference width_preference;
-
- GtkGesture *gesture;
- };
+ GtkTreeView);
+
+
+typedef enum {
+ BALSA_INDEX_WIDE, BALSA_INDEX_NARROW
+}
+BalsaIndexWidthPreference;
+
+struct _BalsaIndex {
+ GtkTreeView tree_view;
+
+ /* the popup menu and some items we need to refer to */
+ GtkWidget *popup_menu;
+ GtkWidget *delete_item;
+ GtkWidget *undelete_item;
+ GtkWidget *move_to_trash_item;
+ GtkWidget *toggle_item;
+ GtkWidget *move_to_item;
+
+ BalsaMailboxNode *mailbox_node;
+ guint current_msgno;
+ guint next_msgno;
+ gboolean current_message_is_deleted : 1;
+ gboolean prev_message : 1;
+ gboolean next_message : 1;
+ gboolean has_selection_changed_idle : 1;
+ gboolean has_mailbox_changed_idle : 1;
+ gboolean collapsing : 1;
+ int filter_no;
+ gchar *filter_string; /* Quick view filter string, if any */
+
+ /* signal handler ids */
+ gulong row_expanded_id;
+ gulong row_collapsed_id;
+ gulong selection_changed_id;
+
+ LibBalsaMailboxSearchIter *search_iter;
+ BalsaIndexWidthPreference width_preference;
+
+ GtkGesture *gesture;
+};
/* tree model columns */
- enum {
- BNDX_MESSAGE_COLUMN,
- BNDX_INDEX_COLUMN,
- BNDX_STATUS_COLUMN,
- BNDX_ATTACH_COLUMN,
- BNDX_FROM_COLUMN,
- BNDX_SUBJECT_COLUMN,
- BNDX_DATE_COLUMN,
- BNDX_SIZE_COLUMN,
- BNDX_COLOR_COLUMN,
- BNDX_WEIGHT_COLUMN,
- BNDX_N_COLUMNS
- };
+enum {
+ BNDX_MESSAGE_COLUMN,
+ BNDX_INDEX_COLUMN,
+ BNDX_STATUS_COLUMN,
+ BNDX_ATTACH_COLUMN,
+ BNDX_FROM_COLUMN,
+ BNDX_SUBJECT_COLUMN,
+ BNDX_DATE_COLUMN,
+ BNDX_SIZE_COLUMN,
+ BNDX_COLOR_COLUMN,
+ BNDX_WEIGHT_COLUMN,
+ BNDX_N_COLUMNS
+};
/* function prototypes */
-
- GtkWidget *balsa_index_new(void);
+GtkWidget *balsa_index_new(void);
-/* sets the mail stream; if it's a new stream, then it's
+
+/* sets the mail stream; if it's a new stream, then it's
* contents is loaded into the index */
- gboolean balsa_index_load_mailbox_node(BalsaIndex * bindex,
- BalsaMailboxNode * mbnode);
- void balsa_index_set_width_preference(BalsaIndex *bindex,
+gboolean balsa_index_load_mailbox_node(BalsaIndex *bindex,
+ BalsaMailboxNode *mbnode);
+void balsa_index_set_width_preference(BalsaIndex *bindex,
BalsaIndexWidthPreference pref);
- void balsa_index_scroll_on_open(BalsaIndex *index);
- void balsa_index_update_tree(BalsaIndex *bindex, gboolean expand);
- void balsa_index_set_threading_type(BalsaIndex * bindex, int thtype);
- void balsa_index_set_view_filter(BalsaIndex *bindex,
- int filter_no,
- const gchar *filter_string,
+void balsa_index_scroll_on_open(BalsaIndex *index);
+void balsa_index_update_tree(BalsaIndex *bindex,
+ gboolean expand);
+void balsa_index_set_threading_type(BalsaIndex *bindex,
+ int thtype);
+void balsa_index_set_view_filter(BalsaIndex *bindex,
+ int filter_no,
+ const gchar *filter_string,
LibBalsaCondition *filter);
/* move or copy a list of messages */
- void balsa_index_transfer(BalsaIndex * index, GArray * msgnos,
- LibBalsaMailbox * to_mailbox, gboolean copy);
+void balsa_index_transfer(BalsaIndex *index,
+ GArray *msgnos,
+ LibBalsaMailbox *to_mailbox,
+ gboolean copy);
/* select up/down the index */
- void balsa_index_select_next(BalsaIndex *);
- gboolean balsa_index_select_next_unread(BalsaIndex * index);
- void balsa_index_select_next_flagged(BalsaIndex * bindex);
- void balsa_index_select_previous(BalsaIndex *);
- void balsa_index_set_next_msgno(BalsaIndex * bindex, guint msgno);
- guint balsa_index_get_next_msgno(BalsaIndex * bindex);
-
- void balsa_index_find(BalsaIndex * bindex,
- LibBalsaMailboxSearchIter * search_iter,
- gboolean previous, gboolean wrap);
+void balsa_index_select_next(BalsaIndex *);
+gboolean balsa_index_select_next_unread(BalsaIndex *index);
+void balsa_index_select_next_flagged(BalsaIndex *bindex);
+void balsa_index_select_previous(BalsaIndex *);
+void balsa_index_set_next_msgno(BalsaIndex *bindex,
+ guint msgno);
+guint balsa_index_get_next_msgno(BalsaIndex *bindex);
+
+void balsa_index_find(BalsaIndex *bindex,
+ LibBalsaMailboxSearchIter *search_iter,
+ gboolean previous,
+ gboolean wrap);
/* balsa index page stuff */
- void balsa_message_reply(gpointer user_data);
- void balsa_message_replytoall(gpointer user_data);
- void balsa_message_replytogroup(gpointer user_data);
-
- void balsa_message_forward_attached(gpointer data);
- void balsa_message_forward_inline(gpointer data);
- void balsa_message_forward_quoted(gpointer data);
- void balsa_message_forward_default(gpointer data);
- void balsa_message_continue(gpointer data);
-
- void balsa_message_move_to_trash(gpointer user_data);
-
- void balsa_index_toggle_flag(BalsaIndex *index,
- LibBalsaMessageFlag flag);
-
- void balsa_index_reset(BalsaIndex * index);
- gint balsa_find_notebook_page_num(LibBalsaMailbox * mailbox);
- void balsa_index_set_column_widths(BalsaIndex * index);
- GList * balsa_index_selected_list(BalsaIndex * index);
- GArray * balsa_index_selected_msgnos_new(BalsaIndex * index);
- void balsa_index_selected_msgnos_free(BalsaIndex * index, GArray * msgnos);
- void balsa_index_move_subtree(BalsaIndex * index,
- GtkTreePath * root,
- GtkTreePath * new_parent);
-
- /* Updating index columns when preferences change */
- void balsa_index_refresh_date (BalsaIndex * index);
- void balsa_index_refresh_size (BalsaIndex * index);
-
- /* Expunge deleted messages. */
- void balsa_index_expunge(BalsaIndex * index);
-
- /* Message window */
- guint balsa_index_next_msgno(BalsaIndex * index, guint current_msgno);
- guint balsa_index_previous_msgno(BalsaIndex * index,
- guint current_msgno);
-
- /* Pipe messages */
- void balsa_index_pipe(BalsaIndex * index);
-
- /* Make sure messages are visible. */
- void balsa_index_ensure_visible(BalsaIndex * index);
-
- /* Select all without previewing any. */
- void balsa_index_select_all(BalsaIndex * bindex);
-
- /* Select thread containing current message. */
- void balsa_index_select_thread(BalsaIndex * bindex);
-
- /* Count of selected messages. */
- gint balsa_index_count_selected_messages(BalsaIndex * bindex);
+void balsa_message_reply(gpointer user_data);
+void balsa_message_replytoall(gpointer user_data);
+void balsa_message_replytogroup(gpointer user_data);
+
+void balsa_message_forward_attached(gpointer data);
+void balsa_message_forward_inline(gpointer data);
+void balsa_message_forward_quoted(gpointer data);
+void balsa_message_forward_default(gpointer data);
+void balsa_message_continue(gpointer data);
+
+void balsa_message_move_to_trash(gpointer user_data);
+
+void balsa_index_toggle_flag(BalsaIndex *index,
+ LibBalsaMessageFlag flag);
+
+void balsa_index_reset(BalsaIndex *index);
+gint balsa_find_notebook_page_num(LibBalsaMailbox *mailbox);
+void balsa_index_set_column_widths(BalsaIndex *index);
+GList *balsa_index_selected_list(BalsaIndex *index);
+GArray *balsa_index_selected_msgnos_new(BalsaIndex *index);
+void balsa_index_selected_msgnos_free(BalsaIndex *index,
+ GArray *msgnos);
+void balsa_index_move_subtree(BalsaIndex *index,
+ GtkTreePath *root,
+ GtkTreePath *new_parent);
+
+/* Updating index columns when preferences change */
+void balsa_index_refresh_date(BalsaIndex *index);
+void balsa_index_refresh_size(BalsaIndex *index);
+
+/* Expunge deleted messages. */
+void balsa_index_expunge(BalsaIndex *index);
+
+/* Message window */
+guint balsa_index_next_msgno(BalsaIndex *index,
+ guint current_msgno);
+guint balsa_index_previous_msgno(BalsaIndex *index,
+ guint current_msgno);
+
+/* Pipe messages */
+void balsa_index_pipe(BalsaIndex *index);
+
+/* Make sure messages are visible. */
+void balsa_index_ensure_visible(BalsaIndex *index);
+
+/* Select all without previewing any. */
+void balsa_index_select_all(BalsaIndex *bindex);
+
+/* Select thread containing current message. */
+void balsa_index_select_thread(BalsaIndex *bindex);
+
+/* Count of selected messages. */
+gint balsa_index_count_selected_messages(BalsaIndex *bindex);
#define BALSA_INDEX_VIEW_ON_OPEN "balsa-index-view-on-open"
G_END_DECLS
-#endif /* __BALSA_INDEX_H__ */
+#endif /* __BALSA_INDEX_H__ */
diff --git a/src/balsa-mblist.h b/src/balsa-mblist.h
index f8453a3..9644875 100644
--- a/src/balsa-mblist.h
+++ b/src/balsa-mblist.h
@@ -5,14 +5,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,7 +29,7 @@ G_DECLARE_FINAL_TYPE(BalsaMBList,
balsa_mblist,
BALSA,
MBLIST,
- GtkTreeView)
+ GtkTreeView);
struct _BalsaMBList {
GtkTreeView tree_view;
@@ -40,49 +40,54 @@ struct _BalsaMBList {
gulong toggled_handler_id;
/* to set sort order in an idle callback */
- gint sort_column_id;
+ gint sort_column_id;
guint sort_idle_id;
GtkGesture *gesture;
};
-GtkWidget *balsa_mblist_new(void);
+GtkWidget *balsa_mblist_new(void);
GtkTreeStore *balsa_mblist_get_store(void);
-void balsa_mblist_default_signal_bindings(BalsaMBList * tree);
+void balsa_mblist_default_signal_bindings(BalsaMBList *tree);
+
+void balsa_mblist_update_mailbox(GtkTreeStore *store,
+ LibBalsaMailbox *mailbox);
+gboolean balsa_mblist_focus_mailbox(BalsaMBList *mblist,
+ LibBalsaMailbox *mailbox);
-void balsa_mblist_update_mailbox(GtkTreeStore * store,
- LibBalsaMailbox * mailbox);
-gboolean balsa_mblist_focus_mailbox(BalsaMBList * mblist,
- LibBalsaMailbox * mailbox);
+GList *balsa_mblist_find_all_unread_mboxes(LibBalsaMailbox *mailbox);
+void balsa_mblist_open_mailbox(LibBalsaMailbox *mailbox);
+void balsa_mblist_open_mailbox_hidden(LibBalsaMailbox *mailbox);
+void balsa_mblist_close_mailbox(LibBalsaMailbox *mailbox);
-GList *balsa_mblist_find_all_unread_mboxes(LibBalsaMailbox * mailbox);
-void balsa_mblist_open_mailbox(LibBalsaMailbox * mailbox);
-void balsa_mblist_open_mailbox_hidden(LibBalsaMailbox * mailbox);
-void balsa_mblist_close_mailbox(LibBalsaMailbox * mailbox);
/* balsa_mblist_close_lru_peer_mbx closes least recently used mailbox
* on the same server as the one given as the argument */
-gboolean balsa_mblist_close_lru_peer_mbx(BalsaMBList * mblist,
+gboolean balsa_mblist_close_lru_peer_mbx(BalsaMBList *mblist,
LibBalsaMailbox *mailbox);
-BalsaMailboxNode *balsa_mblist_get_selected_node(BalsaMBList * mblist);
-BalsaMailboxNode *balsa_mblist_get_node_by_mailbox(BalsaMBList * mblist,
+BalsaMailboxNode *balsa_mblist_get_selected_node(BalsaMBList *mblist);
+BalsaMailboxNode *balsa_mblist_get_node_by_mailbox(BalsaMBList *mblist,
LibBalsaMailbox *
mailbox);
-GtkWidget *balsa_mblist_mru_menu(GtkWindow * window, GList ** url_list,
- GCallback user_func, gpointer user_data);
-void balsa_mblist_mru_add(GList ** url_list, const gchar * url);
-void balsa_mblist_mru_drop(GList ** url_list, const gchar * url);
-GtkWidget *balsa_mblist_mru_option_menu(GtkWindow * window,
- GList ** url_list);
-void balsa_mblist_mru_option_menu_set(GtkWidget * option_menu,
- const gchar * url);
-const gchar *balsa_mblist_mru_option_menu_get(GtkWidget * option_menu);
+GtkWidget *balsa_mblist_mru_menu(GtkWindow *window,
+ GList **url_list,
+ GCallback user_func,
+ gpointer user_data);
+void balsa_mblist_mru_add(GList **url_list,
+ const gchar *url);
+void balsa_mblist_mru_drop(GList **url_list,
+ const gchar *url);
+GtkWidget *balsa_mblist_mru_option_menu(GtkWindow *window,
+ GList **url_list);
+void balsa_mblist_mru_option_menu_set(GtkWidget *option_menu,
+ const gchar *url);
+const gchar *balsa_mblist_mru_option_menu_get(GtkWidget *option_menu);
/* BalsaMailboxNode methods */
-void balsa_mblist_mailbox_node_append(BalsaMailboxNode * root,
- BalsaMailboxNode * mbnode);
-void balsa_mblist_mailbox_node_redraw(BalsaMailboxNode * mbnode);
-gboolean balsa_mblist_mailbox_node_remove(BalsaMailboxNode * mbnode);
+void balsa_mblist_mailbox_node_append(BalsaMailboxNode *root,
+ BalsaMailboxNode *mbnode);
+void balsa_mblist_mailbox_node_redraw(BalsaMailboxNode *mbnode);
+gboolean balsa_mblist_mailbox_node_remove(BalsaMailboxNode *mbnode);
#endif
diff --git a/src/balsa-message.h b/src/balsa-message.h
index 754d692..ff3bbb4 100644
--- a/src/balsa-message.h
+++ b/src/balsa-message.h
@@ -5,14 +5,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -21,7 +21,7 @@
#define __BALSA_MESSAGE_H__
#ifndef BALSA_VERSION
-# error "Include config.h before this file."
+# error "Include config.h before this file."
#endif
#include "libbalsa.h"
@@ -36,7 +36,7 @@ G_DECLARE_FINAL_TYPE(BalsaMessage,
balsa_message,
BALSA,
MESSAGE,
- GtkBox)
+ GtkBox);
typedef struct _BalsaPartInfo BalsaPartInfo;
@@ -50,102 +50,109 @@ typedef enum {
} BalsaMessageFocusState;
struct _BalsaMessage {
- GtkBox parent;
+ GtkBox parent;
- GtkWidget *stack;
- GtkWidget *switcher;
+ GtkWidget *stack;
+ GtkWidget *switcher;
- /* Top-level MIME widget */
- BalsaMimeWidget *bm_widget;
+ /* Top-level MIME widget */
+ BalsaMimeWidget *bm_widget;
- /* header-related information */
- ShownHeaders shown_headers;
+ /* header-related information */
+ ShownHeaders shown_headers;
- /* Widgets to hold content */
- GtkWidget *scroll;
+ /* Widgets to hold content */
+ GtkWidget *scroll;
- /* Widget to hold structure tree */
- GtkWidget *treeview;
- gint info_count;
- GList *save_all_list;
- GtkWidget *save_all_popup;
+ /* Widget to hold structure tree */
+ GtkWidget *treeview;
+ gint info_count;
+ GList *save_all_list;
+ GtkWidget *save_all_popup;
- gboolean wrap_text;
+ gboolean wrap_text;
- BalsaPartInfo *current_part;
- GtkWidget *parts_popup;
- gboolean force_inline;
+ BalsaPartInfo *current_part;
+ GtkWidget *parts_popup;
+ gboolean force_inline;
- LibBalsaMessage *message;
+ LibBalsaMessage *message;
- BalsaMessageFocusState focus_state;
+ BalsaMessageFocusState focus_state;
- /* Find-in-message stuff */
- GtkWidget *find_bar;
- GtkWidget *find_entry;
- GtkWidget *find_next;
- GtkWidget *find_prev;
- GtkWidget *find_sep;
- GtkWidget *find_label;
- GtkTextIter find_iter;
- gboolean find_forward;
+ /* Find-in-message stuff */
+ GtkWidget *find_bar;
+ GtkWidget *find_entry;
+ GtkWidget *find_next;
+ GtkWidget *find_prev;
+ GtkWidget *find_sep;
+ GtkWidget *find_label;
+ GtkTextIter find_iter;
+ gboolean find_forward;
- /* Tab position for headers */
- gint tab_position;
+ /* Tab position for headers */
+ gint tab_position;
- /* Widget to hold Faces */
- GtkWidget *face_box;
+ /* Widget to hold Faces */
+ GtkWidget *face_box;
#ifdef HAVE_HTML_WIDGET
- gpointer html_find_info;
-#endif /* HAVE_HTML_WIDGET */
-
- GtkGesture *gesture;
- GtkEventController *scroll_key_controller;
- GtkEventController *button_key_controller;
- GtkEventController *header_key_controller;
- GtkEventController *find_key_controller;
- gulong key_pressed_id;
+ gpointer html_find_info;
+#endif /* HAVE_HTML_WIDGET */
+
+ GtkGesture *gesture;
+ GtkEventController *scroll_key_controller;
+ GtkEventController *button_key_controller;
+ GtkEventController *header_key_controller;
+ GtkEventController *find_key_controller;
+ gulong key_pressed_id;
};
GtkWidget *balsa_message_new(void);
-gboolean balsa_message_set(BalsaMessage * bmessage,
- LibBalsaMailbox * mailbox, guint msgno);
-
-void balsa_message_next_part(BalsaMessage * bmessage);
-gboolean balsa_message_has_next_part(BalsaMessage * bmessage);
-void balsa_message_previous_part(BalsaMessage * bmessage);
-gboolean balsa_message_has_previous_part(BalsaMessage * bmessage);
-void balsa_message_save_current_part(BalsaMessage * bmessage);
-void balsa_message_copy_part(const gchar *url, LibBalsaMessageBody *part);
-
-void balsa_message_set_displayed_headers(BalsaMessage * bmessage,
- ShownHeaders sh);
-void balsa_message_set_wrap(BalsaMessage * bmessage, gboolean wrap);
-
-gboolean balsa_message_can_select(BalsaMessage * bmessage);
-gboolean balsa_message_grab_focus(BalsaMessage * bmessage);
-gchar * balsa_message_sender_to_gchar(InternetAddressList * list, gint which);
-GtkWidget *balsa_message_current_part_widget(BalsaMessage * bmessage);
+gboolean balsa_message_set(BalsaMessage *bmessage,
+ LibBalsaMailbox *mailbox,
+ guint msgno);
+
+void balsa_message_next_part(BalsaMessage *bmessage);
+gboolean balsa_message_has_next_part(BalsaMessage *bmessage);
+void balsa_message_previous_part(BalsaMessage *bmessage);
+gboolean balsa_message_has_previous_part(BalsaMessage *bmessage);
+void balsa_message_save_current_part(BalsaMessage *bmessage);
+void balsa_message_copy_part(const gchar *url,
+ LibBalsaMessageBody *part);
+
+void balsa_message_set_displayed_headers(BalsaMessage *bmessage,
+ ShownHeaders sh);
+void balsa_message_set_wrap(BalsaMessage *bmessage,
+ gboolean wrap);
+
+gboolean balsa_message_can_select(BalsaMessage *bmessage);
+gboolean balsa_message_grab_focus(BalsaMessage *bmessage);
+gchar *balsa_message_sender_to_gchar(InternetAddressList *list,
+ gint which);
+GtkWidget *balsa_message_current_part_widget(BalsaMessage *bmessage);
GtkWindow *balsa_get_parent_window(GtkWidget *widget);
#ifdef HAVE_HTML_WIDGET
-#define BALSA_MESSAGE_ZOOM_KEY "balsa-message-zoom"
-gboolean balsa_message_can_zoom(BalsaMessage * bm);
-void balsa_message_zoom(BalsaMessage * bm, gint in_out);
-#endif /* HAVE_HTML_WIDGET */
+# define BALSA_MESSAGE_ZOOM_KEY "balsa-message-zoom"
+gboolean balsa_message_can_zoom(BalsaMessage *bm);
+void balsa_message_zoom(BalsaMessage *bm,
+ gint in_out);
+
+#endif /* HAVE_HTML_WIDGET */
#ifdef HAVE_GPGME
-void balsa_message_perform_crypto(LibBalsaMessage * message,
- LibBalsaChkCryptoMode chk_mode,
- gboolean no_mp_signed,
- guint max_ref);
+void balsa_message_perform_crypto(LibBalsaMessage *message,
+ LibBalsaChkCryptoMode chk_mode,
+ gboolean no_mp_signed,
+ guint max_ref);
+
#endif
-void balsa_message_find_in_message (BalsaMessage * bm);
+void balsa_message_find_in_message(BalsaMessage *bm);
G_END_DECLS
-#endif /* __BALSA_MESSAGE_H__ */
+#endif /* __BALSA_MESSAGE_H__ */
diff --git a/src/balsa-mime-widget-image.h b/src/balsa-mime-widget-image.h
index 4f6feb3..a0c97a5 100644
--- a/src/balsa-mime-widget-image.h
+++ b/src/balsa-mime-widget-image.h
@@ -32,18 +32,22 @@ G_BEGIN_DECLS
#define BALSA_TYPE_MIME_WIDGET_IMAGE balsa_mime_widget_image_get_type()
-G_DECLARE_FINAL_TYPE(BalsaMimeWidgetImage, balsa_mime_widget_image,
- BALSA, MIME_WIDGET_IMAGE, BalsaMimeWidget)
+G_DECLARE_FINAL_TYPE(BalsaMimeWidgetImage,
+ balsa_mime_widget_image,
+ BALSA,
+ MIME_WIDGET_IMAGE,
+ BalsaMimeWidget);
/*
* End of GObject class definitions
*/
-BalsaMimeWidget *balsa_mime_widget_new_image(BalsaMessage * bm,
- LibBalsaMessageBody * mime_body,
- const gchar * content_type, gpointer data);
+BalsaMimeWidget *balsa_mime_widget_new_image(BalsaMessage *bm,
+ LibBalsaMessageBody *mime_body,
+ const gchar *content_type,
+ gpointer data);
G_END_DECLS
-#endif /* __BALSA_MIME_WIDGET_IMAGE_H__ */
+#endif /* __BALSA_MIME_WIDGET_IMAGE_H__ */
diff --git a/src/balsa-mime-widget-text.h b/src/balsa-mime-widget-text.h
index 32f1c49..da3e31d 100644
--- a/src/balsa-mime-widget-text.h
+++ b/src/balsa-mime-widget-text.h
@@ -5,14 +5,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -32,18 +32,22 @@ G_BEGIN_DECLS
#define BALSA_TYPE_MIME_WIDGET_TEXT balsa_mime_widget_text_get_type()
-G_DECLARE_FINAL_TYPE(BalsaMimeWidgetText, balsa_mime_widget_text,
- BALSA, MIME_WIDGET_TEXT, BalsaMimeWidget)
+G_DECLARE_FINAL_TYPE(BalsaMimeWidgetText,
+ balsa_mime_widget_text,
+ BALSA,
+ MIME_WIDGET_TEXT,
+ BalsaMimeWidget);
/*
* Method definitions.
*/
-BalsaMimeWidget *balsa_mime_widget_new_text(BalsaMessage * bm,
- LibBalsaMessageBody * mime_body,
- const gchar * content_type, gpointer data);
+BalsaMimeWidget *balsa_mime_widget_new_text(BalsaMessage *bm,
+ LibBalsaMessageBody *mime_body,
+ const gchar *content_type,
+ gpointer data);
G_END_DECLS
-#endif /* __BALSA_MIME_WIDGET_TEXT_H__ */
+#endif /* __BALSA_MIME_WIDGET_TEXT_H__ */
diff --git a/src/balsa-mime-widget.h b/src/balsa-mime-widget.h
index 43375a2..da05a1d 100644
--- a/src/balsa-mime-widget.h
+++ b/src/balsa-mime-widget.h
@@ -5,14 +5,14 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -45,32 +45,39 @@ struct _BalsaMimeWidgetClass {
#define BALSA_TYPE_MIME_WIDGET balsa_mime_widget_get_type()
-G_DECLARE_DERIVABLE_TYPE(BalsaMimeWidget, balsa_mime_widget, BALSA, MIME_WIDGET, GObject)
+G_DECLARE_DERIVABLE_TYPE(BalsaMimeWidget,
+ balsa_mime_widget,
+ BALSA,
+ MIME_WIDGET,
+ GObject);
/*
* Method definitions.
*/
-BalsaMimeWidget *balsa_mime_widget_new(BalsaMessage * bm,
- LibBalsaMessageBody * mime_body,
- gpointer data);
+BalsaMimeWidget *balsa_mime_widget_new(BalsaMessage *bm,
+ LibBalsaMessageBody *mime_body,
+ gpointer data);
/*
* Getters
*/
-GtkWidget *balsa_mime_widget_get_widget (BalsaMimeWidget * mw);
-GtkWidget *balsa_mime_widget_get_container (BalsaMimeWidget * mw);
-GtkWidget *balsa_mime_widget_get_header_widget(BalsaMimeWidget * mw);
+GtkWidget *balsa_mime_widget_get_widget(BalsaMimeWidget *mw);
+GtkWidget *balsa_mime_widget_get_container(BalsaMimeWidget *mw);
+GtkWidget *balsa_mime_widget_get_header_widget(BalsaMimeWidget *mw);
/*
* Setters
*/
-void balsa_mime_widget_set_widget (BalsaMimeWidget * mw, GtkWidget * widget);
-void balsa_mime_widget_set_container (BalsaMimeWidget * mw, GtkWidget * widget);
-void balsa_mime_widget_set_header_widget(BalsaMimeWidget * mw, GtkWidget * widget);
+void balsa_mime_widget_set_widget(BalsaMimeWidget *mw,
+ GtkWidget *widget);
+void balsa_mime_widget_set_container(BalsaMimeWidget *mw,
+ GtkWidget *widget);
+void balsa_mime_widget_set_header_widget(BalsaMimeWidget *mw,
+ GtkWidget *widget);
G_END_DECLS
-#endif /* __BALSA_MIME_WIDGET_H__ */
+#endif /* __BALSA_MIME_WIDGET_H__ */
diff --git a/src/balsa-print-object-decor.h b/src/balsa-print-object-decor.h
index fe76e09..dc13b98 100644
--- a/src/balsa-print-object-decor.h
+++ b/src/balsa-print-object-decor.h
@@ -29,7 +29,7 @@ G_DECLARE_FINAL_TYPE(BalsaPrintObjectDecor,
balsa_print_object_decor,
BALSA,
PRINT_OBJECT_DECOR,
- BalsaPrintObject)
+ BalsaPrintObject);
typedef enum {
BALSA_PRINT_DECOR_FRAME_BEGIN,
diff --git a/src/balsa-print-object-header.h b/src/balsa-print-object-header.h
index affd4ea..69309ae 100644
--- a/src/balsa-print-object-header.h
+++ b/src/balsa-print-object-header.h
@@ -33,7 +33,7 @@ G_DECLARE_FINAL_TYPE(BalsaPrintObjectHeader,
balsa_print_object_header,
BALSA,
PRINT_OBJECT_HEADER,
- BalsaPrintObject)
+ BalsaPrintObject);
struct _BalsaPrintObjectHeader {
diff --git a/src/balsa-print-object.h b/src/balsa-print-object.h
index 1d583d9..17f20f7 100644
--- a/src/balsa-print-object.h
+++ b/src/balsa-print-object.h
@@ -81,7 +81,7 @@ G_DECLARE_DERIVABLE_TYPE(BalsaPrintObject,
balsa_print_object,
BALSA,
PRINT_OBJECT,
- GObject)
+ GObject);
struct _BalsaPrintObjectClass {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]