"LDAP error 0x%x (%s)", ldap_error,
ldap_err2string (ldap_error) ? ldap_err2string (ldap_error) : "Unknown error");
-
e_data_book_view_notify_complete (view, edb_err);
if (edb_err)
g_error_free (edb_err);
* Adds @contact to @book without blocking.
*
* Returns: %TRUE if the operation was started, %FALSE otherwise.
+ *
* Since: 3.0
**/
gboolean
* @book without blocking.
*
* Returns: %TRUE if the operation was started, %FALSE otherwise.
+ *
* Since: 3.0
**/
gboolean
e_book_async_commit_contact_ex (EBook *book,
- EContact *contact,
- EBookExCallback cb,
- gpointer closure)
+ EContact *contact,
+ EBookExCallback cb,
+ gpointer closure)
{
gchar *vcard;
AsyncData *data;
* all contacts in this @book. This function does not block.
*
* Returns: %TRUE if the operation was started, %FALSE otherwise.
+ *
* Since: 3.0
**/
gboolean
* function does not block.
*
* Returns: %TRUE if successful, %FALSE otherwise.
+ *
* Since: 3.0
**/
gboolean
* This function does not block.
*
* Returns: %TRUE if successful, %FALSE otherwise.
+ *
* Since: 3.0
**/
gboolean
* This function does not block.
*
* Returns: %FALSE if successful, %TRUE otherwise.
+ *
* Since: 3.0
**/
gboolean
* Retrieves a contact specified by @id from @book.
*
* Returns: %FALSE if successful, %TRUE otherwise
+ *
* Since: 3.0
**/
gboolean
* Removes @contact from @book.
*
* Returns: %TRUE if successful, %FALSE otherwise
+ *
* Since: 3.0
**/
gboolean
e_book_async_remove_contact_ex (EBook *book,
- EContact *contact,
- EBookExCallback cb,
- gpointer closure)
+ EContact *contact,
+ EBookExCallback cb,
+ gpointer closure)
{
AsyncData *data;
const gchar *l[2];
* Removes the contact with id @id from @book.
*
* Returns: %TRUE if successful, %FALSE otherwise
+ *
* Since: 3.0
**/
gboolean
* as a batch request.
*
* Returns: %TRUE if successful, %FALSE otherwise
+ *
* Since: 3.0
**/
gboolean
e_book_async_remove_contacts_ex (EBook *book,
- GList *ids,
- EBookExCallback cb,
- gpointer closure)
+ GList *ids,
+ EBookExCallback cb,
+ gpointer closure)
{
AsyncData *data;
gchar **l;
* specified by @requested_fields and limited at @max_results records.
*
* Returns: %FALSE if successful, %TRUE otherwise
+ *
* Since: 3.0
**/
gboolean
* Query @book with @query.
*
* Returns: %FALSE on success, %TRUE otherwise
+ *
* Since: 3.0
**/
gboolean
* for a given change ID.
*
* Returns: TRUE on success, FALSE otherwise
+ *
* Since: 3.0
*/
gboolean
* This function does not block.
*
* Returns: %FALSE if successful, %TRUE otherwise.
+ *
* Since: 3.0
**/
gboolean
* deletes the database file. You cannot get it back!
*
* Returns: %FALSE if successful, %TRUE otherwise.
+ *
* Since: 3.0
**/
gboolean
e_book_async_remove_ex (EBook *book,
- EBookExCallback cb,
- gpointer closure)
+ EBookExCallback cb,
+ gpointer closure)
{
AsyncData *data;
static gboolean
strcaseequal_no_underscore (const gchar *str1, const gchar *str2)
{
- int i, j;
+ gint i, j;
if (!str1 || !str2)
return FALSE;
"file %s: line %d (%s): assertion `%s' failed", \
__FILE__, \
__LINE__, \
- G_STRFUNC, \
+ G_STRFUNC, \
#expr); \
- g_set_error (error, E_BOOK_ERROR, (error_code), \
+ g_set_error (error, E_BOOK_ERROR, (error_code), \
"file %s: line %d (%s): assertion `%s' failed", \
__FILE__, \
__LINE__, \
- G_STRFUNC, \
+ G_STRFUNC, \
#expr); \
return FALSE; \
}; }G_STMT_END
} \
} G_STMT_END \
-
-#define e_return_ex_async_error_if_fail(expr, error) G_STMT_START { \
- if G_LIKELY (expr) {} else { \
- GError *err; \
- g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \
- "file %s: line %d (%s): assertion `%s' failed", \
- __FILE__, __LINE__, G_STRFUNC, #expr); \
- err = g_error_new (E_BOOK_ERROR, (error), \
+#define e_return_ex_async_error_if_fail(expr, error) G_STMT_START { \
+ if G_LIKELY (expr) {} else { \
+ GError *err; \
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \
+ "file %s: line %d (%s): assertion `%s' failed", \
+ __FILE__, __LINE__, G_STRFUNC, #expr); \
+ err = g_error_new (E_BOOK_ERROR, (error), \
"file %s: line %d (%s): assertion `%s' failed", \
__FILE__, __LINE__, G_STRFUNC, #expr); \
- cb (book, err, closure); \
+ cb (book, err, closure); \
g_error_free (err); \
- return FALSE; \
- } \
+ return FALSE; \
+ } \
} G_STMT_END
#define e_return_ex_async_error_val_if_fail(expr, error) G_STMT_START { \
- if G_LIKELY (expr) {} else { \
- GError *err; \
- g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \
- "file %s: line %d (%s): assertion `%s' failed", \
- __FILE__, __LINE__, G_STRFUNC, #expr); \
- err = g_error_new (E_BOOK_ERROR, (error), \
+ if G_LIKELY (expr) {} else { \
+ GError *err; \
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \
+ "file %s: line %d (%s): assertion `%s' failed", \
+ __FILE__, __LINE__, G_STRFUNC, #expr); \
+ err = g_error_new (E_BOOK_ERROR, (error), \
"file %s: line %d (%s): assertion `%s' failed", \
__FILE__, __LINE__, G_STRFUNC, #expr); \
- cb (book, err, NULL, closure); \
+ cb (book, err, NULL, closure); \
g_error_free (err); \
- return 0; \
- } \
+ return 0; \
+ } \
} G_STMT_END
if (error) {
#ifndef E_CAL_DISABLE_DEPRECATED
status = get_status_from_error (error);
-
+
} else {
status = E_CALENDAR_STATUS_OK;
#endif
error, CAMEL_ERROR,
CAMEL_ERROR_GENERIC,
_("Could not lock '%s'"), path);
- d(printf("locking failed ! status = %d\n", msg->id));
+ d(printf("locking failed !status = %d\n", msg->id));
break;
}
} else if (retry > 0) {
static gint
nss_has_system_db(void)
{
- int found = FALSE;
+ gint found = FALSE;
#ifndef G_OS_WIN32
FILE *f;
- char buf[80];
+ gchar buf[80];
f = fopen(NSS_SYSTEM_DB "/pkcs11.txt", "r");
if (!f)
return FALSE;
-
+
/* Check whether the system NSS db is actually enabled */
while (fgets(buf, 80, f) && !found) {
if (!strcmp(buf, "library=libnsssysinit.so\n"))
#endif
}
-
#if NSS_VMAJOR > 3 || (NSS_VMAJOR == 3 && NSS_VMINOR >= 12)
/* See: https://wiki.mozilla.org/NSS_Shared_DB,
* particularly "Mode 3A". Note that the target
if (encoded) {
s = encoded;
goto output_string;
- } else
+ } else
camel_stream_write((CamelStream *)ic->mem, "\"\"", 2, NULL);
break;
if (ic->mem)
g_object_unref (ic->mem);
imapx_free_status(ic->status);
-
+
while ((cp = ((CamelIMAPXCommandPart *)camel_dlist_remhead(&ic->parts)))) {
g_free(cp->data);
if (cp->ob) {
{
switch (job->type) {
case IMAPX_JOB_GET_MESSAGE:
- if (folder == job->folder &&
+ if (folder == job->folder &&
strcmp(job->u.get_message.uid, uid) == 0)
return TRUE;
break;
case IMAPX_VANISHED: {
GPtrArray *uids;
gboolean unsolicited = TRUE;
- int i;
+ gint i;
guint len;
guchar *token;
gint tok;
path_name = camel_imapx_store_summary_full_to_path(s, sinfo->name, ns->sep);
c(printf("Got folder path '%s' for full '%s'\n", path_name, sinfo->name));
if (path_name) {
- ifolder = (void *)camel_store_get_folder(imap->store, path_name, 0, error);
+ ifolder = (gpointer)camel_store_get_folder(imap->store, path_name, 0, error);
g_free (path_name);
}
}
if (camel_imapx_stream_text (imap->stream, &token, error))
return -1;
-
+
resp = camel_sasl_challenge_base64((CamelSasl *)cp->ob, (const gchar *) token, error);
g_free(token);
if (resp == NULL)
while (ic->status == NULL && ic->error == NULL)
imapx_step(is, &ic->error);
-
+
if (is->literal == ic)
is->literal = NULL;
/* ********************************************************************** */
// IDLE support
-
/*TODO handle negative cases sanely */
static gboolean
imapx_command_idle_stop (CamelIMAPXServer *is, GError **error)
continue;
}
IDLE_UNLOCK(is->idle);
- camel_imapx_server_idle (is, (void *)ifolder, &local_error);
+ camel_imapx_server_idle (is, (gpointer)ifolder, &local_error);
if (local_error == NULL && ifolder->exists_on_server >
camel_folder_summary_count (((CamelFolder *) ifolder)->summary) && imapx_is_command_queue_empty (is))
imapx_stop_idle (CamelIMAPXServer *is, GError **error)
{
CamelIMAPXIdle *idle = is->idle;
- int stopped = FALSE;
+ gint stopped = FALSE;
time_t now;
time(&now);
IDLE_LOCK (idle);
- switch(idle->state) {
+ switch (idle->state) {
case IMAPX_IDLE_ISSUED:
idle->state = IMAPX_IDLE_CANCEL;
case IMAPX_IDLE_CANCEL:
camel_imapx_command_add(ic, " (QRESYNC (%" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %s:*", ifolder->uidvalidity_on_server, isum->modseq, uid);
if (total > 10) {
- int i;
+ gint i;
GString *seqs, *uids;
seqs = g_string_new(" ");
uids = g_string_new(")");
- /* Include some seq/uid pairs to avoid a huge VANISHED list
+ /* Include some seq/uid pairs to avoid a huge VANISHED list
(see RFC5162 ยง3.1). Work backwards exponentially from the
end of the mailbox, starting with the message 9 from the
end, then 27 from the end, then 81 from the end... */
the summary starts from zero. */
sprintf(buf, "%d", total - i + 1);
g_string_prepend(seqs, buf);
- g_string_prepend(uids, camel_folder_summary_uid_from_index(folder->summary, total - i));
+ g_string_prepend(uids, camel_folder_summary_uid_from_index(folder->summary, total - i));
} while (i < total);
g_string_prepend(seqs, " (");
c(printf("adding QRESYNC seq/uidset %s%s\n", seqs->str, uids->str));
camel_imapx_command_add(ic, seqs->str);
camel_imapx_command_add(ic, uids->str);
-
+
g_string_free(seqs, TRUE);
g_string_free(uids, TRUE);
return TRUE;
}
-#endif /* !G_OS_WIN32 */
+#endif /* G_OS_WIN32 */
gboolean
imapx_connect_to_server (CamelIMAPXServer *is, GError **error)
else
goto connected;
}
-#endif
+#endif
if (is->url->port) {
serv = g_alloca(16);
sprintf((gchar *) serv, "%d", is->url->port);
"Connection to server cancelled\n");
return FALSE;
}
-
+
tok = camel_imapx_stream_token (is->stream, &token, &len, error);
if (tok < 0)
return FALSE;
gsize really_fetched = CAMEL_SEEKABLE_STREAM(job->u.get_message.stream)->position;
/* Don't automatically stop when we reach the reported message
size -- some crappy servers (like Microsoft Exchange) have
- a tendency to lie about it. Keep going (one request at a
+ a tendency to lie about it. Keep going (one request at a
time) until the data actually stop coming. */
if (job->u.get_message.fetch_offset < job->u.get_message.size ||
job->u.get_message.fetch_offset == really_fetched) {
/* should we update the message count ? */
camel_folder_summary_add (job->folder->summary, mi);
- imapx_set_message_info_flags_for_new_message (mi,
+ imapx_set_message_info_flags_for_new_message (mi,
((CamelMessageInfoBase *)job->u.append_message.info)->flags,
((CamelMessageInfoBase *)job->u.append_message.info)->user_flags,
job->folder);
folder->summary->unread_count != ifolder->unread_on_server ||
(!is_selected && isum->modseq != ifolder->modseq_on_server))
need_rescan = TRUE;
-
+
/* This is probably the first check of this folder after startup;
use STATUS to check whether the cached summary is valid, rather
than blindly updating. Only for servers which support CONDSTORE
/* If we don't think there's anything to do, poke it to check */
if (!need_rescan) {
CamelIMAPXCommand *ic;
-
+
if (is_selected) {
/* We may not issue STATUS on the current folder. Use SELECT or NOOP instead. */
if (0 /* server needs SELECT not just NOOP*/) {
ic = camel_imapx_command_new (is, "STATUS", NULL, "STATUS %f (MESSAGES UNSEEN UIDVALIDITY UIDNEXT HIGHESTMODSEQ)", folder);
else
ic = camel_imapx_command_new (is, "STATUS", NULL, "STATUS %f (MESSAGES UNSEEN UIDVALIDITY UIDNEXT)", folder);
-
+
ic->job = job;
ic->pri = job->pri;
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
class->tagprefix = 'A';
}
g_hash_table_insert (jinfo->folders, g_strdup (full_name), GINT_TO_POINTER (1));
}
}
-
+
QUEUE_UNLOCK(is);
return jinfo;
gchar tagprefix;
};
-
GType camel_imapx_server_get_type (void);
CamelIMAPXServer *
camel_imapx_server_new (CamelStore *store,
const gchar *old_name,
const gchar *new_name,
GError **error);
-struct _IMAPXJobQueueInfo *
+struct _IMAPXJobQueueInfo *
camel_imapx_server_get_job_queue_info
(CamelIMAPXServer *is);
guint len;
guchar *token;
-
tok = camel_imapx_stream_token(is, &token, &len, NULL);
if (tok != '(') {
g_set_error (error, CAMEL_IMAPX_ERROR, 1, "fetch: expecting '('");
/* list of folders for which jobs are in the queue */
GHashTable *folders;
-} IMAPXJobQueueInfo;
+} IMAPXJobQueueInfo;
void camel_imapx_server_destroy_job_queue_info (IMAPXJobQueueInfo *jinfo);
@const gchar *tzid, gconstpointer custom, GError **error:
@const gchar *tzid, gconstpointer custom, GError **error:
@const gchar *tzid, gconstpointer custom, GError **error:
+@const gchar *tzid, gconstpointer custom, GError **error:
@const gchar *tzid, gconstpointer custom, GError **error:
@custom:
@error:
@gpointer cert_data:
@gpointer cert_data:
@gpointer cert_data:
+@gpointer cert_data:
+@gpointer cert_data:
@gpointer cert_data:
gtk_widget_show (GTK_WIDGET (dialog));
}
-
/**
* e_name_selector_peek_section_entry:
* @name_selector: an #ENameSelector
#define gdk_drag_context_get_suggested_action(context) (context)->suggested_action
#define gdk_drag_context_get_selected_action(context) (context)->action
-#endif
+#endif
#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION == 21 && GTK_MICRO_VERSION == 1
#define gdk_drag_context_get_selected_action(context) gdk_drag_context_get_action(context)