if (errno == EACCES || errno == EPERM) {
g_propagate_error (error, EDB_ERROR (PERMISSION_DENIED));
} else {
- g_propagate_error (error, e_data_book_create_error_fmt
- (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("Failed to remove file '%s': %s"),
- filename, g_strerror (errno)));
+ g_propagate_error (
+ error, e_data_book_create_error_fmt (
+ E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("Failed to remove file '%s': %s"),
+ filename, g_strerror (errno)));
}
return FALSE;
}
if (errno == EACCES || errno == EPERM)
g_propagate_error (error, EDB_ERROR (PERMISSION_DENIED));
else
- g_propagate_error (error,
- e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("Failed to make directory %s: %s"),
- dirname, g_strerror (errno)));
+ g_propagate_error (
+ error, e_data_book_create_error_fmt (
+ E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("Failed to make directory %s: %s"),
+ dirname, g_strerror (errno)));
return FALSE;
}
return TRUE;
/* Get a suitable filename extension */
if (photo->data.inlined.mime_type != NULL &&
photo->data.inlined.mime_type[0] != '\0') {
- suffix = g_uri_escape_string (photo->data.inlined.mime_type,
- NULL, TRUE);
+ suffix = g_uri_escape_string (
+ photo->data.inlined.mime_type,
+ NULL, TRUE);
} else {
gchar *mime_type = NULL;
gchar *content_type = NULL;
- content_type = g_content_type_guess (NULL,
- photo->data.inlined.data,
- photo->data.inlined.length,
- NULL);
+ content_type = g_content_type_guess (
+ NULL,
+ photo->data.inlined.data,
+ photo->data.inlined.length,
+ NULL);
if (content_type)
mime_type = g_content_type_get_mime_type (content_type);
}
/* Create a filename based on the uid/field */
- name = g_strconcat (e_contact_get_const (contact, E_CONTACT_UID), "_",
- e_contact_field_name (field), NULL);
+ name = g_strconcat (
+ e_contact_get_const (contact, E_CONTACT_UID), "_",
+ e_contact_field_name (field), NULL);
name = g_strdelimit (name, NULL, '_');
do {
suffix = "data";
/* Create a filename based on uid/field */
- name = g_strconcat (e_contact_get_const (contact, E_CONTACT_UID), "_",
- e_contact_field_name (field), NULL);
+ name = g_strconcat (
+ e_contact_get_const (contact, E_CONTACT_UID), "_",
+ e_contact_field_name (field), NULL);
name = g_strdelimit (name, NULL, '_');
do {
if (errno == EACCES || errno == EPERM) {
g_propagate_error (error, EDB_ERROR (PERMISSION_DENIED));
} else {
- g_propagate_error (error, e_data_book_create_error_fmt
- (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("Failed to create hardlink for resource '%s': %s"),
- src_filename, g_strerror (errno)));
+ g_propagate_error (
+ error, e_data_book_create_error_fmt (
+ E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("Failed to create hardlink for resource '%s': %s"),
+ src_filename, g_strerror (errno)));
}
g_free (fullname);
fullname = NULL;
PhotoModifiedStatus status;
gboolean modified = FALSE;
- status = maybe_transform_vcard_field_for_photo (bf, old_contact, contact,
- E_CONTACT_PHOTO, error);
+ status = maybe_transform_vcard_field_for_photo (
+ bf, old_contact, contact,
+ E_CONTACT_PHOTO, error);
modified = (status == STATUS_MODIFIED);
if (status != STATUS_ERROR) {
- status = maybe_transform_vcard_field_for_photo (bf, old_contact, contact,
- E_CONTACT_LOGO, error);
+ status = maybe_transform_vcard_field_for_photo (
+ bf, old_contact, contact,
+ E_CONTACT_LOGO, error);
modified = modified || (status == STATUS_MODIFIED);
}
db_error = db->put (db, NULL, &revision_name_dbt, &revision_dbt, 0);
if (db_error != 0)
- g_warning (G_STRLOC ": db->put failed while bumping the revision string: %s",
- db_strerror (db_error));
+ g_warning (
+ G_STRLOC ": db->put failed while bumping the revision string: %s",
+ db_strerror (db_error));
e_book_backend_notify_property_changed (E_BOOK_BACKEND (bf),
BOOK_BACKEND_PROPERTY_REVISION,
break;
} else if (status == STATUS_ERROR) {
/* Contact could not be added */
- g_warning (G_STRLOC ": db->put failed with %s",
- (perror && *perror) ? (*perror)->message :
- "Unknown error transforming vcard");
+ g_warning (
+ G_STRLOC ": db->put failed with %s",
+ (perror && *perror) ? (*perror)->message :
+ "Unknown error transforming vcard");
g_object_unref (contact);
/* Abort as soon as an error occurs */
/* Transform incomming photo blobs to uris before storing this to the DB */
status = maybe_transform_vcard_for_photo (bf, old_contact, contact, NULL, perror);
if (status == STATUS_ERROR) {
- g_warning (G_STRLOC ": Error transforming contact %s: %s",
- id, (perror && *perror) ? (*perror)->message : "Unknown Error");
+ g_warning (
+ G_STRLOC ": Error transforming contact %s: %s",
+ id, (perror && *perror) ? (*perror)->message : "Unknown Error");
g_free (id);
g_object_unref (old_contact);
return;
}
- summary_list = e_book_backend_sqlitedb_search (bf->priv->sqlitedb,
- SQLITEDB_FOLDER_ID,
- search, NULL,
- &searched_summary,
- &with_all_required_fields, NULL);
+ summary_list = e_book_backend_sqlitedb_search (
+ bf->priv->sqlitedb,
+ SQLITEDB_FOLDER_ID,
+ search, NULL,
+ &searched_summary,
+ &with_all_required_fields, NULL);
if (summary_list) {
return;
}
- uids = e_book_backend_sqlitedb_search_uids (bf->priv->sqlitedb,
- SQLITEDB_FOLDER_ID,
- search, &searched, NULL);
+ uids = e_book_backend_sqlitedb_search_uids (
+ bf->priv->sqlitedb,
+ SQLITEDB_FOLDER_ID,
+ search, &searched, NULL);
if (!searched) {
search_needed = TRUE;
closure->thread = NULL;
closure->running = e_flag_new ();
- g_object_set_data_full (G_OBJECT (book_view), "EBookBackendFile.BookView::closure",
- closure, (GDestroyNotify) closure_destroy);
+ g_object_set_data_full (
+ G_OBJECT (book_view),
+ "EBookBackendFile.BookView::closure",
+ closure, (GDestroyNotify) closure_destroy);
return closure;
}
static FileBackendSearchClosure *
get_closure (EDataBookView *book_view)
{
- return g_object_get_data (G_OBJECT (book_view), "EBookBackendFile.BookView::closure");
+ return g_object_get_data (
+ G_OBJECT (book_view),
+ "EBookBackendFile.BookView::closure");
}
static void
d (printf ("signalling parent thread\n"));
e_flag_set (closure->running);
- summary_list = e_book_backend_sqlitedb_search (bf->priv->sqlitedb,
- SQLITEDB_FOLDER_ID,
- query, fields_of_interest,
- &searched, &with_all_required_fields, NULL);
+ summary_list = e_book_backend_sqlitedb_search (
+ bf->priv->sqlitedb,
+ SQLITEDB_FOLDER_ID,
+ query, fields_of_interest,
+ &searched, &with_all_required_fields, NULL);
if (searched) {
vcard = load_vcard (bf, NULL, data->uid, &error);
if (error) {
- g_warning ("Error loading contact %s: %s",
- data->uid, error->message);
+ g_warning (
+ "Error loading contact %s: %s",
+ data->uid, error->message);
g_error_free (error);
}
dbc->c_close (dbc);
if (db_error && db_error != DB_NOTFOUND)
- g_warning ("e_book_backend_file_search: error building list: %s",
- db_strerror (db_error));
+ g_warning (
+ "e_book_backend_file_search: error building list: %s",
+ db_strerror (db_error));
}
else if (db_error == DB_RUNRECOVERY) {
- g_warning ("e_book_backend_file_search: error getting the cursor for %s",
- bf->priv->filename);
+ g_warning (
+ "e_book_backend_file_search: error getting the cursor for %s",
+ bf->priv->filename);
abort ();
}
if (strcmp (old_version, "0.0")
&& strcmp (old_version, "0.1")) {
- g_warning ("unsupported version '%s' found in PAS backend file\n",
- old_version);
+ g_warning (
+ "unsupported version '%s' found in PAS backend file\n",
+ old_version);
return FALSE;
}
bf->priv->dirname = dirname;
bf->priv->filename = filename;
- bf->priv->sqlitedb = e_book_backend_sqlitedb_new (bf->priv->dirname,
- SQLITEDB_EMAIL_ID,
- SQLITEDB_FOLDER_ID,
- SQLITEDB_FOLDER_NAME,
- FALSE,
- perror);
+ bf->priv->sqlitedb = e_book_backend_sqlitedb_new (
+ bf->priv->dirname,
+ SQLITEDB_EMAIL_ID,
+ SQLITEDB_FOLDER_ID,
+ SQLITEDB_FOLDER_NAME,
+ FALSE,
+ perror);
if (!bf->priv->sqlitedb)
return;
g_propagate_error (perror, local_error);
return;
} else if (!build_sqlitedb (bf->priv)) {
- g_propagate_error (perror, e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("Failed to build summary for an address book %s"),
- bf->priv->filename));
+ g_propagate_error (
+ perror, e_data_book_create_error_fmt (
+ E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("Failed to build summary for an address book %s"),
+ bf->priv->filename));
}
}
/* Are we finished yet? */
if (data->update_complete == FALSE || data->num_contacts_pending_photos > 0) {
- __debug__ ("Bailing from check_get_new_contacts_finished(): update_complete: %u, num_contacts_pending_photos: %u, data: %p",
- data->update_complete, data->num_contacts_pending_photos, data);
+ __debug__ (
+ "Bailing from check_get_new_contacts_finished(): update_complete: %u, num_contacts_pending_photos: %u, data: %p",
+ data->update_complete, data->num_contacts_pending_photos, data);
return;
}
cancellable = g_cancellable_new ();
photo_data->cancellable = g_object_ref (cancellable);
- photo_data->cancelled_handle = g_cancellable_connect (data->cancellable, (GCallback) process_contact_photo_cancelled_cb,
- g_object_ref (cancellable), (GDestroyNotify) g_object_unref);
+ photo_data->cancelled_handle = g_cancellable_connect (
+ data->cancellable, (GCallback) process_contact_photo_cancelled_cb,
+ g_object_ref (cancellable), (GDestroyNotify) g_object_unref);
/* Download the photo. */
- gdata_contacts_contact_get_photo_async (GDATA_CONTACTS_CONTACT (entry),
- GDATA_CONTACTS_SERVICE (priv->service), cancellable,
- (GAsyncReadyCallback) process_contact_photo_cb, photo_data);
+ gdata_contacts_contact_get_photo_async (
+ GDATA_CONTACTS_CONTACT (entry),
+ GDATA_CONTACTS_SERVICE (priv->service), cancellable,
+ (GAsyncReadyCallback) process_contact_photo_cb, photo_data);
g_object_unref (cancellable);
g_free (old_photo_etag);
__debug__ ("Creating group %s", category_name);
/* Insert the new group */
- new_group = GDATA_ENTRY (gdata_contacts_service_insert_group (GDATA_CONTACTS_SERVICE (priv->service), GDATA_CONTACTS_GROUP (group),
- NULL, error));
+ new_group = GDATA_ENTRY (
+ gdata_contacts_service_insert_group (
+ GDATA_CONTACTS_SERVICE (priv->service),
+ GDATA_CONTACTS_GROUP (group),
+ NULL, error));
g_object_unref (group);
if (new_group == NULL)
data->photo = NULL;
/* We now have to re-query for the contact, since setting its photo changes the contact's ETag. */
- gdata_service_query_single_entry_async (priv->service,
- gdata_contacts_service_get_primary_authorization_domain (),
- gdata_entry_get_id (GDATA_ENTRY (contact)), NULL, GDATA_TYPE_CONTACTS_CONTACT,
- data->cancellable, (GAsyncReadyCallback) create_contact_photo_query_cb, data);
+ gdata_service_query_single_entry_async (
+ priv->service,
+ gdata_contacts_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (contact)), NULL, GDATA_TYPE_CONTACTS_CONTACT,
+ data->cancellable, (GAsyncReadyCallback) create_contact_photo_query_cb, data);
return;
} else {
/* Error. */
/* Add a photo for the new contact, if appropriate. This has to be done before we respond to the contact creation operation so that
* we can update the EContact with the photo data and ETag. */
if (data->photo != NULL) {
- gdata_contacts_contact_set_photo_async (GDATA_CONTACTS_CONTACT (new_contact), GDATA_CONTACTS_SERVICE (service),
- (const guint8 *) data->photo->data.inlined.data, data->photo->data.inlined.length,
- data->photo->data.inlined.mime_type, data->cancellable,
- (GAsyncReadyCallback) create_contact_photo_cb, data);
+ gdata_contacts_contact_set_photo_async (
+ GDATA_CONTACTS_CONTACT (new_contact), GDATA_CONTACTS_SERVICE (service),
+ (const guint8 *) data->photo->data.inlined.data, data->photo->data.inlined.length,
+ data->photo->data.inlined.mime_type, data->cancellable,
+ (GAsyncReadyCallback) create_contact_photo_cb, data);
return;
}
/* We make the assumption that the vCard list we're passed is always exactly one element long, since we haven't specified "bulk-adds"
* in our static capability list. This simplifies a lot of the logic, especially around asynchronous results. */
if (vcards->next != NULL) {
- e_data_book_respond_create_contacts (book, opid,
- EDB_ERROR_EX (NOT_SUPPORTED,
- _("The backend does not support bulk additions")),
- NULL);
+ e_data_book_respond_create_contacts (
+ book, opid,
+ EDB_ERROR_EX (NOT_SUPPORTED,
+ _("The backend does not support bulk additions")),
+ NULL);
return;
}
data->new_contact = NULL;
data->photo = g_object_steal_data (G_OBJECT (entry), "photo");
- gdata_contacts_service_insert_contact_async (GDATA_CONTACTS_SERVICE (priv->service), GDATA_CONTACTS_CONTACT (entry), cancellable,
- (GAsyncReadyCallback) create_contact_cb, data);
+ gdata_contacts_service_insert_contact_async (
+ GDATA_CONTACTS_SERVICE (priv->service), GDATA_CONTACTS_CONTACT (entry), cancellable,
+ (GAsyncReadyCallback) create_contact_cb, data);
g_object_unref (cancellable);
g_object_unref (entry);
/* We make the assumption that the ID list we're passed is always exactly one element long, since we haven't specified "bulk-removes"
* in our static capability list. This simplifies a lot of the logic, especially around asynchronous results. */
if (id_list->next != NULL) {
- e_data_book_respond_remove_contacts (book, opid,
- EDB_ERROR_EX (NOT_SUPPORTED,
- _("The backend does not support bulk removals")),
- NULL);
+ e_data_book_respond_remove_contacts (
+ book, opid,
+ EDB_ERROR_EX (NOT_SUPPORTED,
+ _("The backend does not support bulk removals")),
+ NULL);
return;
}
g_return_if_fail (!id_list->next);
data->uid = g_strdup (uid);
cancellable = start_operation (backend, opid, cancellable, _("Deleting contact…"));
- gdata_service_delete_entry_async (GDATA_SERVICE (priv->service), gdata_contacts_service_get_primary_authorization_domain (),
- entry, cancellable, (GAsyncReadyCallback) remove_contact_cb, data);
+ gdata_service_delete_entry_async (
+ GDATA_SERVICE (priv->service), gdata_contacts_service_get_primary_authorization_domain (),
+ entry, cancellable, (GAsyncReadyCallback) remove_contact_cb, data);
g_object_unref (cancellable);
g_object_unref (entry);
}
}
/* We now have to re-query for the contact, since setting its photo changes the contact's ETag. */
- gdata_service_query_single_entry_async (priv->service,
- gdata_contacts_service_get_primary_authorization_domain (),
- gdata_entry_get_id (GDATA_ENTRY (contact)), NULL, GDATA_TYPE_CONTACTS_CONTACT,
- data->cancellable, (GAsyncReadyCallback) modify_contact_photo_query_cb, data);
+ gdata_service_query_single_entry_async (
+ priv->service,
+ gdata_contacts_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (contact)), NULL, GDATA_TYPE_CONTACTS_CONTACT,
+ data->cancellable, (GAsyncReadyCallback) modify_contact_photo_query_cb, data);
return;
} else {
/* Error. */
case UPDATE_PHOTO:
/* Set the photo. */
g_return_if_fail (data->photo != NULL);
- gdata_contacts_contact_set_photo_async (GDATA_CONTACTS_CONTACT (new_contact), GDATA_CONTACTS_SERVICE (service),
- (const guint8 *) data->photo->data.inlined.data, data->photo->data.inlined.length,
- data->photo->data.inlined.mime_type, data->cancellable,
- (GAsyncReadyCallback) modify_contact_photo_cb, data);
+ gdata_contacts_contact_set_photo_async (
+ GDATA_CONTACTS_CONTACT (new_contact), GDATA_CONTACTS_SERVICE (service),
+ (const guint8 *) data->photo->data.inlined.data, data->photo->data.inlined.length,
+ data->photo->data.inlined.mime_type, data->cancellable,
+ (GAsyncReadyCallback) modify_contact_photo_cb, data);
return;
case REMOVE_PHOTO:
/* Unset the photo. */
g_return_if_fail (data->photo == NULL);
- gdata_contacts_contact_set_photo_async (GDATA_CONTACTS_CONTACT (new_contact), GDATA_CONTACTS_SERVICE (service),
- NULL, 0, NULL, data->cancellable, (GAsyncReadyCallback) modify_contact_photo_cb, data);
+ gdata_contacts_contact_set_photo_async (
+ GDATA_CONTACTS_CONTACT (new_contact), GDATA_CONTACTS_SERVICE (service),
+ NULL, 0, NULL, data->cancellable, (GAsyncReadyCallback) modify_contact_photo_cb, data);
return;
default:
g_assert_not_reached ();
e_contact_photo_free (old_photo);
}
- gdata_service_update_entry_async (GDATA_SERVICE (priv->service), gdata_contacts_service_get_primary_authorization_domain (),
- entry, cancellable, (GAsyncReadyCallback) modify_contact_cb, data);
+ gdata_service_update_entry_async (
+ GDATA_SERVICE (priv->service), gdata_contacts_service_get_primary_authorization_domain (),
+ entry, cancellable, (GAsyncReadyCallback) modify_contact_cb, data);
g_object_unref (cancellable);
g_object_unref (cached_contact);
email = gdata_gd_email_address_new (values->data, rel, label, primary);
g_free (rel);
- __debug__ ("New %semail entry %s (%s/%s)",
- gdata_gd_email_address_is_primary (email) ? "primary " : "",
- gdata_gd_email_address_get_address (email),
- gdata_gd_email_address_get_relation_type (email),
- gdata_gd_email_address_get_label (email));
+ __debug__ (
+ "New %semail entry %s (%s/%s)",
+ gdata_gd_email_address_is_primary (email) ? "primary " : "",
+ gdata_gd_email_address_get_address (email),
+ gdata_gd_email_address_get_relation_type (email),
+ gdata_gd_email_address_get_label (email));
}
return email;
g_free (rel);
g_free (protocol);
- __debug__ ("New %s%s entry %s (%s/%s)",
- gdata_gd_im_address_is_primary (im) ? "primary " : "",
- gdata_gd_im_address_get_protocol (im),
- gdata_gd_im_address_get_address (im),
- gdata_gd_im_address_get_relation_type (im),
- gdata_gd_im_address_get_label (im));
+ __debug__ (
+ "New %s%s entry %s (%s/%s)",
+ gdata_gd_im_address_is_primary (im) ? "primary " : "",
+ gdata_gd_im_address_get_protocol (im),
+ gdata_gd_im_address_get_address (im),
+ gdata_gd_im_address_get_relation_type (im),
+ gdata_gd_im_address_get_label (im));
}
return im;
number = gdata_gd_phone_number_new (values->data, rel, label, NULL, primary);
g_free (rel);
- __debug__ ("New %sphone-number entry %s (%s/%s)",
- gdata_gd_phone_number_is_primary (number) ? "primary " : "",
- gdata_gd_phone_number_get_number (number),
- gdata_gd_phone_number_get_relation_type (number),
- gdata_gd_phone_number_get_label (number));
+ __debug__ (
+ "New %sphone-number entry %s (%s/%s)",
+ gdata_gd_phone_number_is_primary (number) ? "primary " : "",
+ gdata_gd_phone_number_get_number (number),
+ gdata_gd_phone_number_get_relation_type (number),
+ gdata_gd_phone_number_get_label (number));
}
return number;
return NULL;
}
- __debug__ ("New %spostal address entry %s (%s/%s)",
- gdata_gd_postal_address_is_primary (address) ? "primary " : "",
- gdata_gd_postal_address_get_address (address),
- gdata_gd_postal_address_get_relation_type (address),
- gdata_gd_postal_address_get_label (address));
+ __debug__ (
+ "New %spostal address entry %s (%s/%s)",
+ gdata_gd_postal_address_is_primary (address) ? "primary " : "",
+ gdata_gd_postal_address_get_address (address),
+ gdata_gd_postal_address_get_relation_type (address),
+ gdata_gd_postal_address_get_label (address));
}
return address;
/* TITLE and ROLE are dealt with separately in gdata_entry_update_from_e_contact() */
- __debug__ ("New %sorganization entry %s (%s/%s)",
- gdata_gd_organization_is_primary (org) ? "primary " : "",
- gdata_gd_organization_get_name (org),
- gdata_gd_organization_get_relation_type (org),
- gdata_gd_organization_get_label (org));
+ __debug__ (
+ "New %sorganization entry %s (%s/%s)",
+ gdata_gd_organization_is_primary (org) ? "primary " : "",
+ gdata_gd_organization_get_name (org),
+ gdata_gd_organization_get_relation_type (org),
+ gdata_gd_organization_get_label (org));
}
return org;
website = gdata_gcontact_website_new (values->data, rel, label, primary);
g_free (rel);
- __debug__ ("New %suri entry %s (%s/%s)",
- gdata_gcontact_website_is_primary (website) ? "primary " : "",
- gdata_gcontact_website_get_uri (website),
- gdata_gcontact_website_get_relation_type (website),
- gdata_gcontact_website_get_label (website));
+ __debug__ (
+ "New %suri entry %s (%s/%s)",
+ gdata_gcontact_website_is_primary (website) ? "primary " : "",
+ gdata_gcontact_website_get_uri (website),
+ gdata_gcontact_website_get_relation_type (website),
+ gdata_gcontact_website_get_label (website));
}
return website;
else {
gint i;
if (enable_debug) {
- g_message ("libldap vendor/version: %s %2d.%02d.%02d",
- info.ldapai_vendor_name,
- info.ldapai_vendor_version / 10000,
- (info.ldapai_vendor_version % 10000) / 1000,
- info.ldapai_vendor_version % 1000);
+ g_message (
+ "libldap vendor/version: %s %2d.%02d.%02d",
+ info.ldapai_vendor_name,
+ info.ldapai_vendor_version / 10000,
+ (info.ldapai_vendor_version % 10000) / 1000,
+ info.ldapai_vendor_version % 1000);
g_message ("library extensions present:");
}
timeout.tv_usec = 0;
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_search_ext_s (bl->priv->ldap,
- LDAP_ROOT_DSE, LDAP_SCOPE_BASE,
- "(objectclass=*)",
- (gchar **) attrs, 0, NULL, NULL, &timeout, LDAP_NO_LIMIT, &resp);
+ ldap_error = ldap_search_ext_s (
+ bl->priv->ldap,
+ LDAP_ROOT_DSE, LDAP_SCOPE_BASE,
+ "(objectclass=*)",
+ (gchar **) attrs, 0, NULL, NULL, &timeout, LDAP_NO_LIMIT, &resp);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error != LDAP_SUCCESS) {
g_warning ("could not perform query on Root DSE (ldap_error 0x%02x/%s)", ldap_error, ldap_err2string (ldap_error) ? ldap_err2string (ldap_error) : "Unknown error");
g_get_current_time (&end);
diff = end.tv_sec * 1000 + end.tv_usec / 1000;
diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
- printf ("e_book_backend_ldap_connect took %ld.%03ld seconds\n",
+ printf (
+ "e_book_backend_ldap_connect took %ld.%03ld seconds\n",
diff / 1000,diff % 1000);
}
return TRUE;
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
- g_warning ("e_book_backend_ldap_connect failed for "
- "'ldap://%s:%d/%s'\n",
- blpriv->ldap_host,
- blpriv->ldap_port,
- blpriv->ldap_rootdn ? blpriv->ldap_rootdn : "");
+ g_warning (
+ "e_book_backend_ldap_connect failed for "
+ "'ldap://%s:%d/%s'\n",
+ blpriv->ldap_host,
+ blpriv->ldap_port,
+ blpriv->ldap_rootdn ? blpriv->ldap_rootdn : "");
blpriv->connected = FALSE;
g_propagate_error (error, EDB_ERROR (REPOSITORY_OFFLINE));
if (bl->priv->auth_dn) {
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_simple_bind_s (bl->priv->ldap,
- bl->priv->auth_dn,
- bl->priv->auth_secret);
+ ldap_error = ldap_simple_bind_s (
+ bl->priv->ldap,
+ bl->priv->auth_dn,
+ bl->priv->auth_secret);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
book_view_notify_status (bl, book_view, "");
g_get_current_time (&end);
diff = end.tv_sec * 1000 + end.tv_usec / 1000;
diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
- printf ("e_book_backend_ldap_reconnect took %ld.%03ld seconds\n",
+ printf (
+ "e_book_backend_ldap_reconnect took %ld.%03ld seconds\n",
diff / 1000,diff % 1000);
}
g_warning ("conflicting ldap msgid's");
}
- g_hash_table_insert (bl->priv->id_to_op,
- &op->id, op);
+ g_hash_table_insert (bl->priv->id_to_op, &op->id, op);
bl->priv->active_ops++;
op->id = msg_id;
- g_hash_table_insert (bl->priv->id_to_op,
- &op->id, op);
+ g_hash_table_insert (bl->priv->id_to_op, &op->id, op);
g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
}
else if (ldap_error == LDAP_TYPE_OR_VALUE_EXISTS )
return EDB_ERROR (CONTACTID_ALREADY_EXISTS);
else
- return e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("LDAP error 0x%x (%s)"), ldap_error,
- ldap_err2string (ldap_error) ? ldap_err2string (ldap_error) : _("Unknown error"));
+ return e_data_book_create_error_fmt (
+ E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("LDAP error 0x%x (%s)"), ldap_error,
+ ldap_err2string (ldap_error) ?
+ ldap_err2string (ldap_error) :
+ _("Unknown error"));
}
static const gchar *
}
}
- dn = g_strdup_printf ("%s=%s%s%lu",
- get_dn_attribute_name (rootdn),
- (cn_part && *cn_part) ? cn_part : "",
- (cn_part && *cn_part) ? "." : "",
- time (NULL));
+ dn = g_strdup_printf (
+ "%s=%s%s%lu",
+ get_dn_attribute_name (rootdn),
+ (cn_part && *cn_part) ? cn_part : "",
+ (cn_part && *cn_part) ? "." : "",
+ time (NULL));
g_free (cn_part);
create_full_dn_from_contact (gchar *dn,
const gchar *root_dn)
{
- gchar *full_dn = g_strdup_printf ("%s%s%s", dn,
- (root_dn && *root_dn) ? "," : "",
- (root_dn && *root_dn) ? root_dn: "");
+ gchar *full_dn = g_strdup_printf (
+ "%s%s%s", dn,
+ (root_dn && *root_dn) ? "," : "",
+ (root_dn && *root_dn) ? root_dn: "");
g_print ("generated full dn: %s\n", full_dn);
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
if (!bl->priv->ldap) {
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
- e_data_book_respond_create_contacts (op->book,
- op->opid,
- EDB_ERROR_NOT_CONNECTED (),
- NULL);
+ e_data_book_respond_create_contacts (
+ op->book,
+ op->opid,
+ EDB_ERROR_NOT_CONNECTED (),
+ NULL);
ldap_op_finished (op);
return;
}
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (LDAP_RES_ADD != ldap_msgtype (res)) {
- e_data_book_respond_create_contacts (op->book,
- op->opid,
- EDB_ERROR_MSG_TYPE (ldap_msgtype (res)),
- NULL);
+ e_data_book_respond_create_contacts (
+ op->book,
+ op->opid,
+ EDB_ERROR_MSG_TYPE (ldap_msgtype (res)),
+ NULL);
ldap_op_finished (op);
return;
}
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_parse_result (bl->priv->ldap, res, &ldap_error,
- NULL, &ldap_error_msg, NULL, NULL, 0);
+ ldap_parse_result (
+ bl->priv->ldap, res, &ldap_error,
+ NULL, &ldap_error_msg, NULL, NULL, 0);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error != LDAP_SUCCESS) {
- g_warning ("create_contact_handler: %02X (%s), additional info: %s",
- ldap_error,
- ldap_err2string (ldap_error), ldap_error_msg);
+ g_warning (
+ "create_contact_handler: %02X (%s), additional info: %s",
+ ldap_error,
+ ldap_err2string (ldap_error), ldap_error_msg);
} else {
if (bl->priv->cache)
e_book_backend_cache_add_contact (bl->priv->cache, create_op->new_contact);
/* and lastly respond */
added_contacts.data = create_op->new_contact;
- e_data_book_respond_create_contacts (op->book,
- op->opid,
- ldap_error_to_response (ldap_error),
- &added_contacts);
+ e_data_book_respond_create_contacts (
+ op->book,
+ op->opid,
+ ldap_error_to_response (ldap_error),
+ &added_contacts);
ldap_op_finished (op);
}
/* We make the assumption that the vCard list we're passed is always exactly one element long, since we haven't specified "bulk-adds"
* in our static capability list. This is because there is no clean way to roll back changes in case of an error. */
if (vcards->next != NULL) {
- e_data_book_respond_create_contacts (book, opid,
- EDB_ERROR_EX (NOT_SUPPORTED,
- _("The backend does not support bulk additions")),
- NULL);
+ e_data_book_respond_create_contacts (
+ book, opid,
+ EDB_ERROR_EX (NOT_SUPPORTED,
+ _("The backend does not support bulk additions")),
+ NULL);
return;
}
do {
book_view_notify_status (bl, book_view, _("Adding contact to LDAP server..."));
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- err = ldap_add_ext (bl->priv->ldap, create_op->dn, ldap_mods,
- NULL, NULL, &create_contact_msgid);
+ err = ldap_add_ext (
+ bl->priv->ldap, create_op->dn, ldap_mods,
+ NULL, NULL, &create_contact_msgid);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
} while (e_book_backend_ldap_reconnect (bl, book_view, err));
free_mods (mod_array);
if (LDAP_SUCCESS != err) {
- e_data_book_respond_create_contacts (create_op->op.book,
- opid,
- ldap_error_to_response (err),
- NULL);
+ e_data_book_respond_create_contacts (
+ create_op->op.book,
+ opid,
+ ldap_error_to_response (err),
+ NULL);
create_contact_dtor ((LDAPOp *) create_op);
return;
} else {
g_print ("ldap_add_ext returned %d\n", err);
- ldap_op_add ((LDAPOp *) create_op, backend, book,
- book_view, opid, create_contact_msgid,
- create_contact_handler, create_contact_dtor);
+ ldap_op_add (
+ (LDAPOp *) create_op, backend, book,
+ book_view, opid, create_contact_msgid,
+ create_contact_handler, create_contact_dtor);
}
}
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (LDAP_RES_DELETE != ldap_msgtype (res)) {
- e_data_book_respond_remove_contacts (op->book,
- op->opid,
- EDB_ERROR_MSG_TYPE (ldap_msgtype (res)),
- NULL);
+ e_data_book_respond_remove_contacts (
+ op->book,
+ op->opid,
+ EDB_ERROR_MSG_TYPE (ldap_msgtype (res)),
+ NULL);
ldap_op_finished (op);
return;
}
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_parse_result (bl->priv->ldap, res, &ldap_error,
- NULL, &ldap_error_msg, NULL, NULL, 0);
+ ldap_parse_result (
+ bl->priv->ldap, res, &ldap_error,
+ NULL, &ldap_error_msg, NULL, NULL, 0);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error != LDAP_SUCCESS) {
- g_warning ("remove_contact_handler: %02X (%s), additional info: %s",
- ldap_error,
- ldap_err2string (ldap_error), ldap_error_msg);
+ g_warning (
+ "remove_contact_handler: %02X (%s), additional info: %s",
+ ldap_error,
+ ldap_err2string (ldap_error), ldap_error_msg);
} else {
/* Remove from cache too */
if (bl->priv->cache)
ldap_memfree (ldap_error_msg);
ids = g_slist_append (ids, remove_op->id);
- e_data_book_respond_remove_contacts (remove_op->op.book,
- op->opid,
- ldap_error_to_response (ldap_error),
- ldap_error == LDAP_SUCCESS ? ids : NULL);
+ e_data_book_respond_remove_contacts (
+ remove_op->op.book,
+ op->opid,
+ ldap_error_to_response (ldap_error),
+ ldap_error == LDAP_SUCCESS ? ids : NULL);
g_slist_free (ids);
ldap_op_finished (op);
}
book_view_notify_status (bl, book_view, _("Removing contact from LDAP server..."));
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_delete_ext (bl->priv->ldap,
- remove_op->id,
- NULL, NULL, &remove_msgid);
+ ldap_error = ldap_delete_ext (
+ bl->priv->ldap,
+ remove_op->id,
+ NULL, NULL, &remove_msgid);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
} while (e_book_backend_ldap_reconnect (bl, book_view, ldap_error));
if (ldap_error != LDAP_SUCCESS) {
- e_data_book_respond_remove_contacts (remove_op->op.book,
- opid,
- ldap_error_to_response (ldap_error),
- NULL);
+ e_data_book_respond_remove_contacts (
+ remove_op->op.book,
+ opid,
+ ldap_error_to_response (ldap_error),
+ NULL);
ldap_op_finished ((LDAPOp *) remove_op);
remove_contact_dtor ((LDAPOp *) remove_op);
return;
} else {
g_print ("ldap_delete_ext returned %d\n", ldap_error);
- ldap_op_add ((LDAPOp *) remove_op, backend, book,
- book_view, opid, remove_msgid,
- remove_contact_handler, remove_contact_dtor);
+ ldap_op_add (
+ (LDAPOp *) remove_op, backend, book,
+ book_view, opid, remove_msgid,
+ remove_contact_handler, remove_contact_dtor);
}
}
}
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_parse_result (bl->priv->ldap, res, &ldap_error,
- NULL, &ldap_error_msg, NULL, NULL, 0);
+ ldap_parse_result (
+ bl->priv->ldap, res, &ldap_error,
+ NULL, &ldap_error_msg, NULL, NULL, 0);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error != LDAP_SUCCESS) {
- g_warning ("modify_contact_modify_handler: %02X (%s), additional info: %s",
- ldap_error,
- ldap_err2string (ldap_error), ldap_error_msg);
+ g_warning (
+ "modify_contact_modify_handler: %02X (%s), additional info: %s",
+ ldap_error,
+ ldap_err2string (ldap_error), ldap_error_msg);
} else {
if (bl->priv->cache)
e_book_backend_cache_add_contact (bl->priv->cache, modify_op->contact);
/* grab the result code, and set up the actual modify (or rename)
* if it was successful */
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_parse_result (bl->priv->ldap, res, &ldap_error,
- NULL, &ldap_error_msg, NULL, NULL, 0);
+ ldap_parse_result (
+ bl->priv->ldap, res, &ldap_error,
+ NULL, &ldap_error_msg, NULL, NULL, 0);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error != LDAP_SUCCESS) {
- g_warning ("modify_contact_search_handler: %02X (%s), additional info: %s",
- ldap_error,
- ldap_err2string (ldap_error), ldap_error_msg);
+ g_warning (
+ "modify_contact_search_handler: %02X (%s), additional info: %s",
+ ldap_error,
+ ldap_err2string (ldap_error), ldap_error_msg);
}
ldap_memfree (ldap_error_msg);
gchar *new_uid;
if (modify_op->ldap_uid)
- new_uid = g_strdup_printf ("%s=%s", get_dn_attribute_name (bl->priv->ldap_rootdn),
- modify_op->ldap_uid);
+ new_uid = g_strdup_printf (
+ "%s=%s", get_dn_attribute_name (bl->priv->ldap_rootdn),
+ modify_op->ldap_uid);
else
new_uid = create_dn_from_contact (modify_op->contact, bl->priv->ldap_rootdn);
/* actually perform the ldap rename */
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_rename (bl->priv->ldap, current_dn,
- new_uid /* newRDN */,
- NULL /* NewSuperior */,
- 0 /* deleteOldRDN */,
- NULL, NULL, &rename_contact_msgid);
+ ldap_error = ldap_rename (
+ bl->priv->ldap, current_dn,
+ new_uid /* newRDN */,
+ NULL /* NewSuperior */,
+ 0 /* deleteOldRDN */,
+ NULL, NULL, &rename_contact_msgid);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
g_free (new_uid);
if (ldap_error == LDAP_SUCCESS) {
op->handler = modify_contact_rename_handler;
- ldap_op_change_id ((LDAPOp *) modify_op,
- rename_contact_msgid);
+ ldap_op_change_id (
+ (LDAPOp *) modify_op,
+ rename_contact_msgid);
/* Remove old entry from cache */
if (bl->priv->cache)
}
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_parse_result (bl->priv->ldap, res, &ldap_error,
- NULL, &ldap_error_msg, NULL, NULL, 0);
+ ldap_parse_result (
+ bl->priv->ldap, res, &ldap_error,
+ NULL, &ldap_error_msg, NULL, NULL, 0);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error != LDAP_SUCCESS) {
- g_warning ("modify_contact_rename_handler: %02X (%s), additional info: %s",
- ldap_error,
- ldap_err2string (ldap_error), ldap_error_msg);
+ g_warning (
+ "modify_contact_rename_handler: %02X (%s), additional info: %s",
+ ldap_error,
+ ldap_err2string (ldap_error), ldap_error_msg);
} else {
if (bl->priv->cache)
e_book_backend_cache_add_contact (bl->priv->cache, modify_op->contact);
#endif
/* actually perform the ldap modify */
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_modify_ext (bl->priv->ldap, modify_op->id, ldap_mods,
- NULL, NULL, &modify_contact_msgid);
+ ldap_error = ldap_modify_ext (
+ bl->priv->ldap, modify_op->id, ldap_mods,
+ NULL, NULL, &modify_contact_msgid);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error == LDAP_SUCCESS) {
op->handler = modify_contact_modify_handler;
- ldap_op_change_id ((LDAPOp *) modify_op,
- modify_contact_msgid);
+ ldap_op_change_id (
+ (LDAPOp *) modify_op,
+ modify_contact_msgid);
} else {
g_warning ("ldap_modify_ext returned %d\n", ldap_error);
e_data_book_respond_modify_contacts (op->book,
book_view_notify_status (bl, book_view, _("Modifying contact from LDAP server..."));
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_search_ext (bl->priv->ldap, modify_op->id,
- LDAP_SCOPE_BASE,
- "(objectclass=*)",
- NULL, 0, NULL, NULL,
- NULL, /* XXX timeout */
- 1, &modify_contact_msgid);
+ ldap_error = ldap_search_ext (
+ bl->priv->ldap, modify_op->id,
+ LDAP_SCOPE_BASE,
+ "(objectclass=*)",
+ NULL, 0, NULL, NULL,
+ NULL, /* XXX timeout */
+ 1, &modify_contact_msgid);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
} while (e_book_backend_ldap_reconnect (bl, book_view, ldap_error));
if (ldap_error == LDAP_SUCCESS) {
- ldap_op_add ((LDAPOp *) modify_op, backend, book,
- book_view, opid, modify_contact_msgid,
- modify_contact_search_handler, modify_contact_dtor);
+ ldap_op_add (
+ (LDAPOp *) modify_op, backend, book,
+ book_view, opid, modify_contact_msgid,
+ modify_contact_search_handler, modify_contact_dtor);
} else {
e_data_book_respond_modify_contacts (book,
opid,
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (!e) {
- e_data_book_respond_get_contact (op->book,
- op->opid,
- e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR, _("%s: NULL returned from ldap_first_entry"), G_STRFUNC),
- NULL);
+ e_data_book_respond_get_contact (
+ op->book,
+ op->opid,
+ e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR, _("%s: NULL returned from ldap_first_entry"), G_STRFUNC),
+ NULL);
ldap_op_finished (op);
return;
}
contact = build_contact_from_entry (bl, e, NULL, NULL);
vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
- e_data_book_respond_get_contact (op->book,
- op->opid,
- EDB_ERROR (SUCCESS),
- vcard);
+ e_data_book_respond_get_contact (
+ op->book,
+ op->opid,
+ EDB_ERROR (SUCCESS),
+ vcard);
g_free (vcard);
g_object_unref (contact);
ldap_op_finished (op);
g_get_current_time (&end);
diff = end.tv_sec * 1000 + end.tv_usec / 1000;
diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
- printf ("get_contact_handler took %ld.%03ld seconds \n",
- diff / 1000, diff % 1000);
+ printf (
+ "get_contact_handler took %ld.%03ld seconds \n",
+ diff / 1000, diff % 1000);
}
} else if (msg_type == LDAP_RES_SEARCH_REFERENCE) {
/* ignore references */
gint ldap_error;
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_parse_result (bl->priv->ldap, res, &ldap_error,
- NULL, &ldap_error_msg, NULL, NULL, 0);
+ ldap_parse_result (
+ bl->priv->ldap, res, &ldap_error,
+ NULL, &ldap_error_msg, NULL, NULL, 0);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error != LDAP_SUCCESS) {
- g_warning ("get_contact_handler: %02X (%s), additional info: %s",
- ldap_error,
- ldap_err2string (ldap_error), ldap_error_msg);
+ g_warning (
+ "get_contact_handler: %02X (%s), additional info: %s",
+ ldap_error,
+ ldap_err2string (ldap_error), ldap_error_msg);
}
ldap_memfree (ldap_error_msg);
- e_data_book_respond_get_contact (op->book,
- op->opid,
- ldap_error_to_response (ldap_error),
- NULL);
+ e_data_book_respond_get_contact (
+ op->book,
+ op->opid,
+ ldap_error_to_response (ldap_error),
+ NULL);
ldap_op_finished (op);
}
else {
- e_data_book_respond_get_contact (op->book,
- op->opid,
- e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
+ e_data_book_respond_get_contact (
+ op->book,
+ op->opid,
+ e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
_("%s: Unhandled result type %d returned"), G_STRFUNC, msg_type),
- NULL);
+ NULL);
ldap_op_finished (op);
}
vcard_str = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
- e_data_book_respond_get_contact (book,
- opid,
- EDB_ERROR (SUCCESS),
- vcard_str);
+ e_data_book_respond_get_contact (
+ book,
+ opid,
+ EDB_ERROR (SUCCESS),
+ vcard_str);
g_free (vcard_str);
g_object_unref (contact);
return;
do {
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_search_ext (bl->priv->ldap, id,
- LDAP_SCOPE_BASE,
- "(objectclass=*)",
- NULL, 0, NULL, NULL,
- NULL, /* XXX timeout */
- 1, &get_contact_msgid);
+ ldap_error = ldap_search_ext (
+ bl->priv->ldap, id,
+ LDAP_SCOPE_BASE,
+ "(objectclass=*)",
+ NULL, 0, NULL, NULL,
+ NULL, /* XXX timeout */
+ 1, &get_contact_msgid);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
} while (e_book_backend_ldap_reconnect (bl, book_view, ldap_error));
if (ldap_error == LDAP_SUCCESS) {
- ldap_op_add ((LDAPOp *) get_contact_op, backend, book,
- book_view, opid, get_contact_msgid,
- get_contact_handler, get_contact_dtor);
+ ldap_op_add (
+ (LDAPOp *) get_contact_op, backend, book,
+ book_view, opid, get_contact_msgid,
+ get_contact_handler, get_contact_dtor);
if (enable_debug) {
printf ("e_book_backend_ldap_get_contact invoked get_contact_handler\n");
g_get_current_time (&end);
diff = end.tv_sec * 1000 + end.tv_usec / 1000;
diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
- printf ("and took %ld.%03ld seconds\n",
- diff / 1000, diff % 1000);
+ printf (
+ "and took %ld.%03ld seconds\n",
+ diff / 1000, diff % 1000);
}
} else {
- e_data_book_respond_get_contact (book,
- opid,
- ldap_error_to_response (ldap_error),
- NULL);
+ e_data_book_respond_get_contact (
+ book,
+ opid,
+ ldap_error_to_response (ldap_error),
+ NULL);
get_contact_dtor ((LDAPOp *) get_contact_op);
}
}
gint ldap_error;
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_parse_result (bl->priv->ldap, res, &ldap_error,
- NULL, &ldap_error_msg, NULL, NULL, 0);
+ ldap_parse_result (
+ bl->priv->ldap, res, &ldap_error,
+ NULL, &ldap_error_msg, NULL, NULL, 0);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error != LDAP_SUCCESS) {
- g_warning ("contact_list_handler: %02X (%s), additional info: %s",
- ldap_error,
- ldap_err2string (ldap_error), ldap_error_msg);
+ g_warning (
+ "contact_list_handler: %02X (%s), additional info: %s",
+ ldap_error,
+ ldap_err2string (ldap_error), ldap_error_msg);
}
ldap_memfree (ldap_error_msg);
g_warning ("search returned %d\n", ldap_error);
if (ldap_error == LDAP_TIMELIMIT_EXCEEDED)
- e_data_book_respond_get_contact_list (op->book,
- op->opid,
- EDB_ERROR (SEARCH_TIME_LIMIT_EXCEEDED),
- contact_list_op->contacts);
+ e_data_book_respond_get_contact_list (
+ op->book,
+ op->opid,
+ EDB_ERROR (SEARCH_TIME_LIMIT_EXCEEDED),
+ contact_list_op->contacts);
else if (ldap_error == LDAP_SIZELIMIT_EXCEEDED)
- e_data_book_respond_get_contact_list (op->book,
- op->opid,
- EDB_ERROR (SEARCH_SIZE_LIMIT_EXCEEDED),
- contact_list_op->contacts);
+ e_data_book_respond_get_contact_list (
+ op->book,
+ op->opid,
+ EDB_ERROR (SEARCH_SIZE_LIMIT_EXCEEDED),
+ contact_list_op->contacts);
else if (ldap_error == LDAP_SUCCESS)
- e_data_book_respond_get_contact_list (op->book,
- op->opid,
- EDB_ERROR (SUCCESS),
- contact_list_op->contacts);
+ e_data_book_respond_get_contact_list (
+ op->book,
+ op->opid,
+ EDB_ERROR (SUCCESS),
+ contact_list_op->contacts);
else
- e_data_book_respond_get_contact_list (op->book,
- op->opid,
- ldap_error_to_response (ldap_error),
- contact_list_op->contacts);
+ e_data_book_respond_get_contact_list (
+ op->book,
+ op->opid,
+ ldap_error_to_response (ldap_error),
+ contact_list_op->contacts);
ldap_op_finished (op);
if (enable_debug) {
}
else {
g_warning ("unhandled search result type %d returned", msg_type);
- e_data_book_respond_get_contact_list (op->book,
- op->opid,
- e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("%s: Unhandled search result type %d returned"), G_STRFUNC, msg_type),
- NULL);
+ e_data_book_respond_get_contact_list (
+ op->book,
+ op->opid,
+ e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("%s: Unhandled search result type %d returned"), G_STRFUNC, msg_type),
+ NULL);
ldap_op_finished (op);
}
}
for (l = contacts; l; l = g_list_next (l)) {
EContact *contact = l->data;
- vcard_strings = g_slist_prepend (vcard_strings, e_vcard_to_string (E_VCARD (contact),
- EVC_FORMAT_VCARD_30));
+ vcard_strings = g_slist_prepend (
+ vcard_strings, e_vcard_to_string (E_VCARD (contact),
+ EVC_FORMAT_VCARD_30));
g_object_unref (contact);
}
do {
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_search_ext (bl->priv->ldap,
- bl->priv->ldap_rootdn,
- bl->priv->ldap_scope,
- ldap_query,
- NULL, 0, NULL, NULL,
- NULL, /* XXX timeout */
- LDAP_NO_LIMIT, &contact_list_msgid);
+ ldap_error = ldap_search_ext (
+ bl->priv->ldap,
+ bl->priv->ldap_rootdn,
+ bl->priv->ldap_scope,
+ ldap_query,
+ NULL, 0, NULL, NULL,
+ NULL, /* XXX timeout */
+ LDAP_NO_LIMIT, &contact_list_msgid);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
} while (e_book_backend_ldap_reconnect (bl, book_view, ldap_error));
g_free (ldap_query);
if (ldap_error == LDAP_SUCCESS) {
- ldap_op_add ((LDAPOp *) contact_list_op, backend, book,
- book_view, opid, contact_list_msgid,
- contact_list_handler, contact_list_dtor);
+ ldap_op_add (
+ (LDAPOp *) contact_list_op, backend, book,
+ book_view, opid, contact_list_msgid,
+ contact_list_handler, contact_list_dtor);
if (enable_debug) {
g_get_current_time (&end);
printf ("and took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
}
} else {
- e_data_book_respond_get_contact_list (book,
- opid,
- ldap_error_to_response (ldap_error),
- NULL);
+ e_data_book_respond_get_contact_list (
+ book,
+ opid,
+ ldap_error_to_response (ldap_error),
+ NULL);
contact_list_dtor ((LDAPOp *) contact_list_op);
}
}
gint ldap_error;
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_parse_result (bl->priv->ldap, res, &ldap_error,
- NULL, &ldap_error_msg, NULL, NULL, 0);
+ ldap_parse_result (
+ bl->priv->ldap, res, &ldap_error,
+ NULL, &ldap_error_msg, NULL, NULL, 0);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error != LDAP_SUCCESS) {
- g_warning ("contact_list_uids_handler: %02X (%s), additional info: %s",
- ldap_error,
- ldap_err2string (ldap_error), ldap_error_msg);
+ g_warning (
+ "contact_list_uids_handler: %02X (%s), additional info: %s",
+ ldap_error,
+ ldap_err2string (ldap_error), ldap_error_msg);
}
ldap_memfree (ldap_error_msg);
}
else {
g_warning ("unhandled search result type %d returned", msg_type);
- e_data_book_respond_get_contact_list_uids (op->book, op->opid,
- e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("%s: Unhandled search result type %d returned"), G_STRFUNC, msg_type),
- NULL);
+ e_data_book_respond_get_contact_list_uids (
+ op->book, op->opid,
+ e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("%s: Unhandled search result type %d returned"), G_STRFUNC, msg_type),
+ NULL);
ldap_op_finished (op);
}
}
do {
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_search_ext (bl->priv->ldap,
- bl->priv->ldap_rootdn,
- bl->priv->ldap_scope,
- ldap_query,
- NULL, 0, NULL, NULL,
- NULL, /* XXX timeout */
- LDAP_NO_LIMIT, &contact_list_uids_msgid);
+ ldap_error = ldap_search_ext (
+ bl->priv->ldap,
+ bl->priv->ldap_rootdn,
+ bl->priv->ldap_scope,
+ ldap_query,
+ NULL, 0, NULL, NULL,
+ NULL, /* XXX timeout */
+ LDAP_NO_LIMIT, &contact_list_uids_msgid);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
} while (e_book_backend_ldap_reconnect (bl, book_view, ldap_error));
g_free (ldap_query);
if (ldap_error == LDAP_SUCCESS) {
- ldap_op_add ((LDAPOp *) contact_list_uids_op, backend, book,
- book_view, opid, contact_list_uids_msgid,
- contact_list_uids_handler, contact_list_uids_dtor);
+ ldap_op_add (
+ (LDAPOp *) contact_list_uids_op, backend, book,
+ book_view, opid, contact_list_uids_msgid,
+ contact_list_uids_handler, contact_list_uids_dtor);
if (enable_debug) {
g_get_current_time (&end);
const gchar *ldap_attr = query_prop_to_ldap (propname);
if (ldap_attr)
- ldap_data->list = g_list_prepend (ldap_data->list,
- g_strdup_printf ("(%s=*%s%s)",
- ldap_attr,
- str,
- one_star ? "" : "*"));
+ ldap_data->list = g_list_prepend (
+ ldap_data->list,
+ g_strdup_printf (
+ "(%s=*%s%s)",
+ ldap_attr,
+ str,
+ one_star ? "" : "*"));
}
g_free (str);
const gchar *ldap_attr = query_prop_to_ldap (propname);
if (ldap_attr)
- ldap_data->list = g_list_prepend (ldap_data->list,
- g_strdup_printf ("(%s=%s)",
- ldap_attr, str));
+ ldap_data->list = g_list_prepend (
+ ldap_data->list,
+ g_strdup_printf (
+ "(%s=%s)",
+ ldap_attr, str));
else {
g_warning ("unknown query property\n");
/* we want something that'll always be false */
- ldap_data->list = g_list_prepend (ldap_data->list,
- g_strdup ("objectClass=MyBarnIsBiggerThanYourBarn"));
+ ldap_data->list = g_list_prepend (
+ ldap_data->list,
+ g_strdup ("objectClass=MyBarnIsBiggerThanYourBarn"));
}
g_free (str);
* and for entries that have no fileAs attribute. */
if (ldap_attr) {
if (!strcmp (propname, "full_name")) {
- ldap_data->list = g_list_prepend (ldap_data->list,
- g_strdup_printf (
- "(|(cn=%s*)(sn=%s*))",
- str, str));
+ ldap_data->list = g_list_prepend (
+ ldap_data->list,
+ g_strdup_printf (
+ "(|(cn=%s*)(sn=%s*))",
+ str, str));
}
else if (!strcmp (ldap_attr, "fileAs")) {
if (ldap_data->bl->priv->evolutionPersonSupported)
- ldap_data->list = g_list_prepend (ldap_data->list,
- g_strdup_printf ("(|(fileAs=%s*)(&(!(fileAs=*))(sn=%s*)))",
- str, str));
+ ldap_data->list = g_list_prepend (
+ ldap_data->list,
+ g_strdup_printf (
+ "(|(fileAs=%s*)"
+ "(&(!(fileAs=*))"
+ "(sn=%s*)))",
+ str, str));
else
- ldap_data->list = g_list_prepend (ldap_data->list,
- g_strdup_printf ("(sn=%s*)", str));
+ ldap_data->list = g_list_prepend (
+ ldap_data->list,
+ g_strdup_printf (
+ "(sn=%s*)", str));
}
else {
- ldap_data->list = g_list_prepend (ldap_data->list,
- g_strdup_printf ("(%s=%s*)",
- ldap_attr,
- str));
+ ldap_data->list = g_list_prepend (
+ ldap_data->list,
+ g_strdup_printf (
+ "(%s=%s*)",
+ ldap_attr, str));
}
}
const gchar *ldap_attr = query_prop_to_ldap (propname);
if (ldap_attr)
- ldap_data->list = g_list_prepend (ldap_data->list,
- g_strdup_printf ("(%s=*%s)",
- ldap_attr,
- str));
+ ldap_data->list = g_list_prepend (
+ ldap_data->list,
+ g_strdup_printf (
+ "(%s=*%s)",
+ ldap_attr, str));
g_free (str);
}
const gchar *ldap_attr = query_prop_to_ldap (propname);
if (ldap_attr)
- ldap_data->list = g_list_prepend (ldap_data->list,
- g_strdup_printf ("(%s=*)", ldap_attr));
+ ldap_data->list = g_list_prepend (
+ ldap_data->list,
+ g_strdup_printf (
+ "(%s=*)", ldap_attr));
}
}
e_sexp_add_ifunction (sexp, 0, symbols[i].name,
(ESExpIFunc *) symbols[i].func, &data);
} else {
- e_sexp_add_function (sexp, 0, symbols[i].name,
- symbols[i].func, &data);
+ e_sexp_add_function (
+ sexp, 0, symbols[i].name,
+ symbols[i].func, &data);
}
}
if (enable_debug)
printf ("email = %s \n", email_values[0]);
*(member_info + j) =
- g_strdup_printf ("%s;%s;",
- email_values[0], values[j]);
+ g_strdup_printf (
+ "%s;%s;",
+ email_values[0], values[j]);
ldap_value_free (email_values);
}
if (cn_values) {
if (enable_debug)
printf ("cn = %s \n", cn_values[0]);
*(member_info + j) =
- g_strconcat (*(member_info + j),
- cn_values[0], NULL);
+ g_strconcat (
+ *(member_info + j),
+ cn_values[0], NULL);
ldap_value_free (cn_values);
}
}
gint ldap_error;
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_parse_result (bl->priv->ldap, res, &ldap_error,
- NULL, &ldap_error_msg, NULL, NULL, 0);
+ ldap_parse_result (
+ bl->priv->ldap, res, &ldap_error,
+ NULL, &ldap_error_msg, NULL, NULL, 0);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (ldap_error != LDAP_SUCCESS) {
- g_warning ("ldap_search_handler: %02X (%s), additional info: %s",
- ldap_error,
- ldap_err2string (ldap_error), ldap_error_msg);
+ g_warning (
+ "ldap_search_handler: %02X (%s), additional info: %s",
+ ldap_error,
+ ldap_err2string (ldap_error), ldap_error_msg);
}
ldap_memfree (ldap_error_msg);
else if (ldap_error == LDAP_SUCCESS)
edb_err = EDB_ERROR (SUCCESS);
else
- edb_err = e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
+ edb_err = e_data_book_create_error_fmt (
+ E_DATA_BOOK_STATUS_OTHER_ERROR,
_("LDAP error 0x%x (%s)"), ldap_error,
ldap_err2string (ldap_error) ? ldap_err2string (ldap_error) : _("Unknown error"));
book_view_notify_status (bl, view, _("Searching..."));
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_err = ldap_search_ext (bl->priv->ldap, bl->priv->ldap_rootdn,
- bl->priv->ldap_scope,
- ldap_query,
- NULL, 0,
- NULL, /* XXX */
- NULL, /* XXX */
- NULL, /* XXX timeout */
- view_limit, &search_msgid);
+ ldap_err = ldap_search_ext (
+ bl->priv->ldap, bl->priv->ldap_rootdn,
+ bl->priv->ldap_scope,
+ ldap_query,
+ NULL, 0,
+ NULL, /* XXX */
+ NULL, /* XXX */
+ NULL, /* XXX timeout */
+ view_limit, &search_msgid);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
} while (e_book_backend_ldap_reconnect (bl, view, ldap_err));
op->aborted = FALSE;
g_object_ref (view);
- ldap_op_add ((LDAPOp *) op, E_BOOK_BACKEND (bl), book, view,
- 0, search_msgid,
- ldap_search_handler, ldap_search_dtor);
+ ldap_op_add (
+ (LDAPOp *) op, E_BOOK_BACKEND (bl), book, view,
+ 0, search_msgid,
+ ldap_search_handler, ldap_search_dtor);
if (enable_debug) {
printf ("e_book_backend_ldap_search invoked ldap_search_handler ");
contact_num++;
if (book_view) {
- status_msg = g_strdup_printf (_("Downloading contacts (%d)... "),
- contact_num);
+ status_msg = g_strdup_printf (
+ _("Downloading contacts (%d)... "),
+ contact_num);
book_view_notify_status (bl, book_view, status_msg);
g_free (status_msg);
}
g_get_current_time (&end);
diff = end.tv_sec * 1000 + end.tv_usec / 1000;
diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
- printf ("generate_cache_handler ... completed in %ld.%03ld seconds\n",
- diff / 1000,diff % 1000);
+ printf (
+ "generate_cache_handler ... completed in %ld.%03ld seconds\n",
+ diff / 1000,diff % 1000);
}
}
}
do {
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_search_ext (priv->ldap,
- priv->ldap_rootdn,
- priv->ldap_scope,
- "(cn=*)",
- NULL, 0, NULL, NULL,
- NULL, /* XXX timeout */
- LDAP_NO_LIMIT, &contact_list_msgid);
+ ldap_error = ldap_search_ext (
+ priv->ldap,
+ priv->ldap_rootdn,
+ priv->ldap_scope,
+ "(cn=*)",
+ NULL, 0, NULL, NULL,
+ NULL, /* XXX timeout */
+ LDAP_NO_LIMIT, &contact_list_msgid);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
} while (e_book_backend_ldap_reconnect (book_backend_ldap, NULL, ldap_error));
if (ldap_error == LDAP_SUCCESS) {
- ldap_op_add ((LDAPOp *) contact_list_op, (EBookBackend *) book_backend_ldap, NULL /* book */,
- NULL /* book_view */, 0 /* opid */, contact_list_msgid,
- generate_cache_handler, generate_cache_dtor);
+ ldap_op_add (
+ (LDAPOp *) contact_list_op, (EBookBackend *) book_backend_ldap, NULL /* book */,
+ NULL /* book_view */, 0 /* opid */, contact_list_msgid,
+ generate_cache_handler, generate_cache_dtor);
if (enable_debug) {
printf ("generating offline cache invoked generate_cache_handler ");
g_get_current_time (&end);
gchar *entry_dn;
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
- ldap_error = ldap_search_s (bl->priv->ldap,
- bl->priv->ldap_rootdn,
- bl->priv->ldap_scope,
- query,
- NULL, 0, &res);
+ ldap_error = ldap_search_s (
+ bl->priv->ldap,
+ bl->priv->ldap_rootdn,
+ bl->priv->ldap_scope,
+ query,
+ NULL, 0, &res);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
g_free (query);
error, G_IO_ERROR,
G_IO_ERROR_INVALID_DATA,
_("Failed to get the DN "
- "for user '%s'"), user);
+ "for user '%s'"), user);
return E_SOURCE_AUTHENTICATION_ERROR;
}
}
}
- ldap_error = ldap_simple_bind_s (bl->priv->ldap,
- bl->priv->auth_dn,
- bl->priv->auth_secret);
+ ldap_error = ldap_simple_bind_s (
+ bl->priv->ldap,
+ bl->priv->auth_dn,
+ bl->priv->auth_secret);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
/* Some ldap servers are returning (ex active directory ones)
}
}
- ldap_error = ldap_sasl_bind_s (bl->priv->ldap,
- NULL,
- method + strlen (SASL_PREFIX),
- bl->priv->auth_secret,
- NULL,
- NULL,
- NULL);
+ ldap_error = ldap_sasl_bind_s (
+ bl->priv->ldap,
+ NULL,
+ method + strlen (SASL_PREFIX),
+ bl->priv->auth_secret,
+ NULL,
+ NULL,
+ NULL);
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
#endif
vcf->priv->contact_list = g_list_prepend (vcf->priv->contact_list, vcard);
- g_hash_table_insert (vcf->priv->contacts,
- id,
- vcf->priv->contact_list);
+ g_hash_table_insert (
+ vcf->priv->contacts,
+ id,
+ vcf->priv->contact_list);
}
}
bvcf->priv->dirty = TRUE;
if (!bvcf->priv->flush_timeout_tag)
- bvcf->priv->flush_timeout_tag = g_timeout_add (FILE_FLUSH_TIMEOUT,
- vcf_flush_file, bvcf);
+ bvcf->priv->flush_timeout_tag = g_timeout_add (
+ FILE_FLUSH_TIMEOUT,
+ vcf_flush_file, bvcf);
}
g_mutex_unlock (bvcf->priv->mutex);
/* We make the assumption that the vCard list we're passed is always exactly one element long, since we haven't specified "bulk-adds"
* in our static capability list. */
if (vcards->next != NULL) {
- g_propagate_error (perror,
- EDB_ERROR_EX (NOT_SUPPORTED,
- _("The backend does not support bulk additions")));
+ g_propagate_error (
+ perror,
+ EDB_ERROR_EX (NOT_SUPPORTED,
+ _("The backend does not support bulk additions")));
return;
}
/* We make the assumption that the ID list we're passed is always exactly one element long, since we haven't specified "bulk-removes"
* in our static capability list. */
if (id_list->next != NULL) {
- g_propagate_error (perror,
- EDB_ERROR_EX (NOT_SUPPORTED,
- _("The backend does not support bulk removals")));
+ g_propagate_error (
+ perror,
+ EDB_ERROR_EX (NOT_SUPPORTED,
+ _("The backend does not support bulk removals")));
return;
}
bvcf->priv->dirty = TRUE;
if (!bvcf->priv->flush_timeout_tag)
- bvcf->priv->flush_timeout_tag = g_timeout_add (FILE_FLUSH_TIMEOUT,
- vcf_flush_file, bvcf);
+ bvcf->priv->flush_timeout_tag = g_timeout_add (
+ FILE_FLUSH_TIMEOUT,
+ vcf_flush_file, bvcf);
g_mutex_unlock (bvcf->priv->mutex);
*ids = g_slist_append (*ids, g_strdup (id));
/* We make the assumption that the vCard list we're passed is always exactly one element long, since we haven't specified "bulk-modifies"
* in our static capability list. */
if (vcards->next != NULL) {
- g_propagate_error (perror,
- EDB_ERROR_EX (NOT_SUPPORTED,
- _("The backend does not support bulk modifications")));
+ g_propagate_error (
+ perror,
+ EDB_ERROR_EX (NOT_SUPPORTED,
+ _("The backend does not support bulk modifications")));
return;
}
elem->data = g_strdup (vcards->data);
bvcf->priv->dirty = TRUE;
if (!bvcf->priv->flush_timeout_tag)
- bvcf->priv->flush_timeout_tag = g_timeout_add (FILE_FLUSH_TIMEOUT,
- vcf_flush_file, bvcf);
+ bvcf->priv->flush_timeout_tag = g_timeout_add (
+ FILE_FLUSH_TIMEOUT,
+ vcf_flush_file, bvcf);
g_mutex_unlock (bvcf->priv->mutex);
*modified_contacts = g_slist_append (*modified_contacts, contact);
closure->thread = NULL;
closure->running = e_flag_new ();
- g_object_set_data_full (G_OBJECT (book_view), "EBookBackendVCF.BookView::closure",
- closure, (GDestroyNotify) closure_destroy);
+ g_object_set_data_full (
+ G_OBJECT (book_view),
+ "EBookBackendVCF.BookView::closure",
+ closure, (GDestroyNotify) closure_destroy);
return closure;
}
static VCFBackendSearchClosure *
get_closure (EDataBookView *book_view)
{
- return g_object_get_data (G_OBJECT (book_view), "EBookBackendVCF.BookView::closure");
+ return g_object_get_data (
+ G_OBJECT (book_view),
+ "EBookBackendVCF.BookView::closure");
}
static gpointer
closure->thread = NULL;
closure->running = e_flag_new ();
- g_object_set_data_full (G_OBJECT (book_view), WEBDAV_CLOSURE_NAME, closure,
- (GDestroyNotify) closure_destroy);
+ g_object_set_data_full (
+ G_OBJECT (book_view), WEBDAV_CLOSURE_NAME,
+ closure, (GDestroyNotify) closure_destroy);
return closure;
}
/* only override if etag is still the same on the server */
etag = e_contact_get (contact, E_CONTACT_REV);
if (etag == NULL) {
- soup_message_headers_append (message->request_headers,
- "If-None-Match", "*");
+ soup_message_headers_append (
+ message->request_headers,
+ "If-None-Match", "*");
} else if (etag[0] == 'W' && etag[1] == '/') {
g_warning ("we only have a weak ETag, don't use If-Match synchronisation");
} else {
- soup_message_headers_append (message->request_headers,
- "If-Match", etag);
+ soup_message_headers_append (
+ message->request_headers,
+ "If-Match", etag);
g_free (etag);
}
}
e_contact_set (contact, E_CONTACT_UID, NULL);
e_contact_set (contact, E_CONTACT_REV, NULL);
request = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
- soup_message_set_request (message, "text/vcard", SOUP_MEMORY_TEMPORARY,
- request, strlen (request));
+ soup_message_set_request (
+ message, "text/vcard", SOUP_MEMORY_TEMPORARY,
+ request, strlen (request));
status = soup_session_send_message (webdav->priv->session, message);
new_etag = soup_message_headers_get (message->response_headers, "ETag");
/* We make the assumption that the vCard list we're passed is always exactly one element long, since we haven't specified "bulk-adds"
* in our static capability list. This is because there is no clean way to roll back changes in case of an error. */
if (vcards->next != NULL) {
- e_data_book_respond_create_contacts (book, opid,
- EDB_ERROR_EX (NOT_SUPPORTED,
- _("The backend does not support bulk additions")),
- NULL);
+ e_data_book_respond_create_contacts (
+ book, opid,
+ EDB_ERROR_EX (NOT_SUPPORTED,
+ _("The backend does not support bulk additions")),
+ NULL);
return;
}
/* do 3 rand() calls to construct a unique ID... poor way but should be
* good enough for us */
- uid = g_strdup_printf ("%s%08X-%08X-%08X.vcf", priv->uri, rand (), rand (),
- rand ());
+ uid = g_strdup_printf (
+ "%s%08X-%08X-%08X.vcf",
+ priv->uri, rand (), rand (), rand ());
contact = e_contact_new_from_vcard_with_uid (vcard, uid);
if (status == 401 || status == 407) {
e_data_book_respond_create_contacts (book, opid, webdav_handle_auth_request (webdav), NULL);
} else {
- e_data_book_respond_create_contacts (book, opid,
- e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("Create resource '%s' failed with HTTP status: %d (%s)"), uid, status, status_reason),
+ e_data_book_respond_create_contacts (
+ book, opid,
+ e_data_book_create_error_fmt (
+ E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("Create resource '%s' failed with HTTP status: %d (%s)"),
+ uid, status, status_reason),
NULL);
}
g_free (uid);
g_object_unref (contact);
if (new_contact == NULL) {
- e_data_book_respond_create_contacts (book, opid,
- EDB_ERROR (OTHER_ERROR), NULL);
+ e_data_book_respond_create_contacts (
+ book, opid,
+ EDB_ERROR (OTHER_ERROR), NULL);
g_free (uid);
return;
}
guint status;
if (!e_backend_get_online (E_BACKEND (backend))) {
- e_data_book_respond_remove_contacts (book, opid,
- EDB_ERROR (REPOSITORY_OFFLINE), NULL);
+ e_data_book_respond_remove_contacts (
+ book, opid,
+ EDB_ERROR (REPOSITORY_OFFLINE), NULL);
return;
}
/* We make the assumption that the ID list we're passed is always exactly one element long, since we haven't specified "bulk-removes"
* in our static capability list. */
if (id_list->next != NULL) {
- e_data_book_respond_remove_contacts (book, opid,
- EDB_ERROR_EX (NOT_SUPPORTED,
- _("The backend does not support bulk removals")),
- NULL);
+ e_data_book_respond_remove_contacts (
+ book, opid,
+ EDB_ERROR_EX (NOT_SUPPORTED,
+ _("The backend does not support bulk removals")),
+ NULL);
return;
}
status = delete_contact (webdav, uid);
if (status != 204) {
if (status == 401 || status == 407) {
- e_data_book_respond_remove_contacts (book, opid,
- webdav_handle_auth_request (webdav), NULL);
+ e_data_book_respond_remove_contacts (
+ book, opid,
+ webdav_handle_auth_request (webdav), NULL);
} else {
g_warning ("DELETE failed with HTTP status %d", status);
- e_data_book_respond_remove_contacts (book, opid,
- e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("DELETE failed with HTTP status %d"), status),
- NULL);
+ e_data_book_respond_remove_contacts (
+ book, opid,
+ e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("DELETE failed with HTTP status %d"), status),
+ NULL);
}
return;
}
const gchar *vcard = vcards->data;
if (!e_backend_get_online (E_BACKEND (backend))) {
- e_data_book_respond_create_contacts (book, opid,
- EDB_ERROR (REPOSITORY_OFFLINE), NULL);
+ e_data_book_respond_create_contacts (
+ book, opid,
+ EDB_ERROR (REPOSITORY_OFFLINE), NULL);
return;
}
/* We make the assumption that the vCard list we're passed is always exactly one element long, since we haven't specified "bulk-modifies"
* in our static capability list. This is because there is no clean way to roll back changes in case of an error. */
if (vcards->next != NULL) {
- e_data_book_respond_modify_contacts (book, opid,
- EDB_ERROR_EX (NOT_SUPPORTED,
- _("The backend does not support bulk modifications")),
- NULL);
+ e_data_book_respond_modify_contacts (
+ book, opid,
+ EDB_ERROR_EX (
+ NOT_SUPPORTED,
+ _("The backend does not support bulk modifications")),
+ NULL);
return;
}
if (status == 412) {
/* too bad no special error code in evolution for this... */
e_data_book_respond_modify_contacts (book, opid,
- e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("Contact on server changed -> not modifying")),
- NULL);
+ e_data_book_create_error_fmt (
+ E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("Contact on server changed -> not modifying")),
+ NULL);
g_free (status_reason);
return;
}
e_data_book_respond_modify_contacts (book, opid,
- e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR,
- _("Modify contact failed with HTTP status: %d (%s)"), status, status_reason),
- NULL);
+ e_data_book_create_error_fmt (
+ E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("Modify contact failed with HTTP status: %d (%s)"),
+ status, status_reason),
+ NULL);
g_free (status_reason);
return;
}
soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
soup_message_headers_append (message->request_headers, "Connection", "close");
soup_message_headers_append (message->request_headers, "Depth", "1");
- soup_message_set_request (message, "text/xml", SOUP_MEMORY_TEMPORARY,
- (gchar *) request, strlen (request));
+ soup_message_set_request (
+ message, "text/xml", SOUP_MEMORY_TEMPORARY,
+ (gchar *) request, strlen (request));
soup_session_send_message (priv->session, message);
if (status != 207) {
GError *error;
- error = e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR, _("PROPFIND on webdav failed with HTTP status %d (%s)"),
+ error = e_data_book_create_error_fmt (
+ E_DATA_BOOK_STATUS_OTHER_ERROR,
+ _("PROPFIND on webdav failed with HTTP status %d (%s)"),
status,
message->reason_phrase && *message->reason_phrase ? message->reason_phrase :
(soup_status_get_phrase (message->status_code) ? soup_status_get_phrase (message->status_code) : _("Unknown error")));
}
/* parse response */
- reader = xmlReaderForMemory (message->response_body->data,
- message->response_body->length, NULL, NULL,
- XML_PARSE_NOWARNING);
+ reader = xmlReaderForMemory (
+ message->response_body->data,
+ message->response_body->length, NULL, NULL,
+ XML_PARSE_NOWARNING);
elements = parse_propfind_response (reader);
g_list_free (contacts);
/* this way the UI is notified about cached contacts immediately,
- and the update thread notifies about possible changes only */
+ * and the update thread notifies about possible changes only */
e_data_book_view_notify_complete (book_view, NULL /* Success */);
if (e_backend_get_online (E_BACKEND (backend))) {
}
else {
if (eaw->street == NULL) {
- e_address_western_extract_street (lines[cntr], &eaw->street,
- &eaw->extended );
+ e_address_western_extract_street (
+ lines[cntr], &eaw->street,
+ &eaw->extended );
}
else {
gchar *temp;
e_client_unwrap_dbus_error (E_CLIENT (priv->client), local_error, error);
} else {
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR,
- "Cannot set flags on view, D-Bus proxy gone");
+ g_set_error_literal (
+ error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR,
+ "Cannot set flags on view, D-Bus proxy gone");
}
}
object_class = G_OBJECT_CLASS (class);
object_class->dispose = book_client_view_dispose;
- signals[OBJECTS_ADDED] =
- g_signal_new ("objects-added",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookClientViewClass, objects_added),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- signals[OBJECTS_MODIFIED] =
- g_signal_new ("objects-modified",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookClientViewClass, objects_modified),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- signals[OBJECTS_REMOVED] =
- g_signal_new ("objects-removed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookClientViewClass, objects_removed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- signals[PROGRESS] =
- g_signal_new ("progress",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookClientViewClass, progress),
- NULL, NULL,
- e_gdbus_marshallers_VOID__UINT_STRING,
- G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
-
- signals[COMPLETE] =
- g_signal_new ("complete",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookClientViewClass, complete),
- NULL, NULL,
- g_cclosure_marshal_VOID__BOXED,
- G_TYPE_NONE, 1, G_TYPE_ERROR);
+ signals[OBJECTS_ADDED] = g_signal_new (
+ "objects-added",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookClientViewClass, objects_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ signals[OBJECTS_MODIFIED] = g_signal_new (
+ "objects-modified",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookClientViewClass, objects_modified),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ signals[OBJECTS_REMOVED] = g_signal_new (
+ "objects-removed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookClientViewClass, objects_removed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ signals[PROGRESS] = g_signal_new (
+ "progress",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookClientViewClass, progress),
+ NULL, NULL,
+ e_gdbus_marshallers_VOID__UINT_STRING,
+ G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
+
+ signals[COMPLETE] = g_signal_new (
+ "complete",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookClientViewClass, complete),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOXED,
+ G_TYPE_NONE, 1, G_TYPE_ERROR);
}
g_string_append_printf (vcard, "FN:%s\n", s);
western = e_name_western_parse (s);
- g_string_append_printf (vcard, "N:%s;%s;%s;%s;%s\n",
- western->last ? western->last : "",
- western->first ? western->first : "",
- western->middle ? western->middle : "",
- western->prefix ? western->prefix : "",
- western->suffix ? western->suffix : "");
+ g_string_append_printf (
+ vcard, "N:%s;%s;%s;%s;%s\n",
+ western->last ? western->last : "",
+ western->first ? western->first : "",
+ western->middle ? western->middle : "",
+ western->prefix ? western->prefix : "",
+ western->suffix ? western->suffix : "");
e_name_western_free (western);
}
g_string_append (vcard, "END:VCARD");
e_sexp_add_ifunction (sexp, 0, symbols[i].name,
(ESExpIFunc *) symbols[i].func, &list);
} else {
- e_sexp_add_function (sexp, 0, symbols[i].name,
- symbols[i].func, &list);
+ e_sexp_add_function (
+ sexp, 0, symbols[i].name,
+ symbols[i].func, &list);
}
}
e_sexp_encode_string (encoded, q->query.field_test.value);
- g_string_append_printf (str, "%s \"%s\" %s",
- cs,
- q->query.field_test.field_name,
- encoded->str);
+ g_string_append_printf (
+ str, "%s \"%s\" %s",
+ cs,
+ q->query.field_test.field_name,
+ encoded->str);
break;
case E_BOOK_QUERY_TYPE_ANY_FIELD_CONTAINS:
g_string_append_printf (str, "contains \"x-evolution-any-field\"");
if (g_once_init_enter (&type_id__volatile)) {
GType type_id;
- type_id = g_boxed_type_register_static ("EBookQuery",
- (GBoxedCopyFunc) e_book_query_copy,
- (GBoxedFreeFunc) e_book_query_unref);
+ type_id = g_boxed_type_register_static (
+ "EBookQuery",
+ (GBoxedCopyFunc) e_book_query_copy,
+ (GBoxedFreeFunc) e_book_query_unref);
g_once_init_leave (&type_id__volatile, type_id);
}
g_type_class_add_private (class, sizeof (EBookViewPrivate));
- signals[CONTACTS_CHANGED] = g_signal_new ("contacts_changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookViewClass, contacts_changed),
- NULL, NULL,
- e_book_marshal_NONE__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
- signals[CONTACTS_REMOVED] = g_signal_new ("contacts_removed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookViewClass, contacts_removed),
- NULL, NULL,
- e_book_marshal_NONE__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
- signals[CONTACTS_ADDED] = g_signal_new ("contacts_added",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookViewClass, contacts_added),
- NULL, NULL,
- e_book_marshal_NONE__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
+ signals[CONTACTS_CHANGED] = g_signal_new (
+ "contacts_changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookViewClass, contacts_changed),
+ NULL, NULL,
+ e_book_marshal_NONE__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ signals[CONTACTS_REMOVED] = g_signal_new (
+ "contacts_removed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookViewClass, contacts_removed),
+ NULL, NULL,
+ e_book_marshal_NONE__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ signals[CONTACTS_ADDED] = g_signal_new (
+ "contacts_added",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookViewClass, contacts_added),
+ NULL, NULL,
+ e_book_marshal_NONE__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
/* XXX The "sequence-complete" signal is deprecated. */
- signals[SEQUENCE_COMPLETE] = g_signal_new ("sequence_complete",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookViewClass, sequence_complete),
- NULL, NULL,
- e_book_marshal_NONE__INT,
- G_TYPE_NONE, 1, G_TYPE_UINT);
- signals[VIEW_COMPLETE] = g_signal_new ("view_complete",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookViewClass, view_complete),
- NULL, NULL,
- e_book_marshal_NONE__UINT_STRING,
- G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
- signals[STATUS_MESSAGE] = g_signal_new ("status_message",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookViewClass, status_message),
- NULL, NULL,
- e_book_marshal_NONE__STRING,
- G_TYPE_NONE, 1, G_TYPE_STRING);
+ signals[SEQUENCE_COMPLETE] = g_signal_new (
+ "sequence_complete",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookViewClass, sequence_complete),
+ NULL, NULL,
+ e_book_marshal_NONE__INT,
+ G_TYPE_NONE, 1, G_TYPE_UINT);
+
+ signals[VIEW_COMPLETE] = g_signal_new (
+ "view_complete",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookViewClass, view_complete),
+ NULL, NULL,
+ e_book_marshal_NONE__UINT_STRING,
+ G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
+
+ signals[STATUS_MESSAGE] = g_signal_new (
+ "status_message",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookViewClass, status_message),
+ NULL, NULL,
+ e_book_marshal_NONE__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
object_class->dispose = e_book_view_dispose;
}
{
GObjectClass *gobject_class = G_OBJECT_CLASS (e_book_class);
- e_book_signals[WRITABLE_STATUS] =
- g_signal_new ("writable_status",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookClass, writable_status),
- NULL, NULL,
- e_book_marshal_NONE__BOOL,
- G_TYPE_NONE, 1,
- G_TYPE_BOOLEAN);
-
- e_book_signals[CONNECTION_STATUS] =
- g_signal_new ("connection_status",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookClass, connection_status),
- NULL, NULL,
- e_book_marshal_NONE__BOOL,
- G_TYPE_NONE, 1,
- G_TYPE_BOOLEAN);
-
- e_book_signals[BACKEND_DIED] =
- g_signal_new ("backend_died",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EBookClass, backend_died),
- NULL, NULL,
- e_book_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
+ e_book_signals[WRITABLE_STATUS] = g_signal_new (
+ "writable_status",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookClass, writable_status),
+ NULL, NULL,
+ e_book_marshal_NONE__BOOL,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
+
+ e_book_signals[CONNECTION_STATUS] = g_signal_new (
+ "connection_status",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookClass, connection_status),
+ NULL, NULL,
+ e_book_marshal_NONE__BOOL,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
+
+ e_book_signals[BACKEND_DIED] = g_signal_new (
+ "backend_died",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EBookClass, backend_died),
+ NULL, NULL,
+ e_book_marshal_NONE__NONE,
+ G_TYPE_NONE, 0);
gobject_class->dispose = e_book_dispose;
gobject_class->finalize = e_book_finalize;
*book_view = _e_book_view_new (book, gdbus_bookview);
} else {
*book_view = NULL;
- g_set_error_literal (error, E_BOOK_ERROR, E_BOOK_ERROR_DBUS_EXCEPTION,
- "Cannot get connection to view");
+ g_set_error_literal (
+ error, E_BOOK_ERROR, E_BOOK_ERROR_DBUS_EXCEPTION,
+ "Cannot get connection to view");
ret = FALSE;
}
g_string_append_printf (vcard, "FN:%s\n", s);
western = e_name_western_parse (s);
- g_string_append_printf (vcard, "N:%s;%s;%s;%s;%s\n",
- western->last ? western->last : "",
- western->first ? western->first : "",
- western->middle ? western->middle : "",
- western->prefix ? western->prefix : "",
- western->suffix ? western->suffix : "");
+ g_string_append_printf (
+ vcard, "N:%s;%s;%s;%s;%s\n",
+ western->last ? western->last : "",
+ western->first ? western->first : "",
+ western->middle ? western->middle : "",
+ western->prefix ? western->prefix : "",
+ western->suffix ? western->suffix : "");
e_name_western_free (western);
}
g_string_append (vcard, "END:VCARD");
g_assert (i == field_info[i].field_id);
if (field_info[i].t & E_CONTACT_FIELD_TYPE_STRING)
- pspec = g_param_spec_string (field_info[i].field_name,
- _(field_info[i].pretty_name),
- field_info[i].pretty_name,
- NULL,
- (field_info[i].read_only ? G_PARAM_READABLE : G_PARAM_READWRITE)
- | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
+ pspec = g_param_spec_string (
+ field_info[i].field_name,
+ _(field_info[i].pretty_name),
+ field_info[i].pretty_name,
+ NULL,
+ (field_info[i].read_only ? G_PARAM_READABLE : G_PARAM_READWRITE) |
+ G_PARAM_STATIC_NICK |
+ G_PARAM_STATIC_BLURB);
else if (field_info[i].t & E_CONTACT_FIELD_TYPE_BOOLEAN)
- pspec = g_param_spec_boolean (field_info[i].field_name,
- _(field_info[i].pretty_name),
- field_info[i].pretty_name,
- FALSE,
- (field_info[i].read_only ? G_PARAM_READABLE : G_PARAM_READWRITE)
- | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
+ pspec = g_param_spec_boolean (
+ field_info[i].field_name,
+ _(field_info[i].pretty_name),
+ field_info[i].pretty_name,
+ FALSE,
+ (field_info[i].read_only ? G_PARAM_READABLE : G_PARAM_READWRITE) |
+ G_PARAM_STATIC_NICK |
+ G_PARAM_STATIC_BLURB);
else if (field_info[i].t & E_CONTACT_FIELD_TYPE_STRUCT)
- pspec = g_param_spec_boxed (field_info[i].field_name,
- _(field_info[i].pretty_name),
- field_info[i].pretty_name,
- field_info[i].boxed_type_getter (),
- (field_info[i].read_only ? G_PARAM_READABLE : G_PARAM_READWRITE)
- | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
+ pspec = g_param_spec_boxed (
+ field_info[i].field_name,
+ _(field_info[i].pretty_name),
+ field_info[i].pretty_name,
+ field_info[i].boxed_type_getter (),
+ (field_info[i].read_only ? G_PARAM_READABLE : G_PARAM_READWRITE) |
+ G_PARAM_STATIC_NICK |
+ G_PARAM_STATIC_BLURB);
else
- pspec = g_param_spec_pointer (field_info[i].field_name,
- _(field_info[i].pretty_name),
- field_info[i].pretty_name,
- (field_info[i].read_only ? G_PARAM_READABLE : G_PARAM_READWRITE)
- | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
-
- g_object_class_install_property (object_class, field_info[i].field_id,
- pspec);
+ pspec = g_param_spec_pointer (
+ field_info[i].field_name,
+ _(field_info[i].pretty_name),
+ field_info[i].pretty_name,
+ (field_info[i].read_only ? G_PARAM_READABLE : G_PARAM_READWRITE) |
+ G_PARAM_STATIC_NICK |
+ G_PARAM_STATIC_BLURB);
+
+ g_object_class_install_property (
+ object_class, field_info[i].field_id, pspec);
}
}
case E_CONTACT_PHOTO_TYPE_INLINED:
g_return_if_fail (photo->data.inlined.length > 0);
- e_vcard_attribute_add_param_with_value (attr,
- e_vcard_attribute_param_new (EVC_ENCODING),
- "b");
+ e_vcard_attribute_add_param_with_value (
+ attr,
+ e_vcard_attribute_param_new (EVC_ENCODING),
+ "b");
if (photo->data.inlined.mime_type && (p = strchr (photo->data.inlined.mime_type, '/'))) {
image_type = p + 1;
} else {
image_type = "X-EVOLUTION-UNKNOWN";
}
- e_vcard_attribute_add_param_with_value (attr,
- e_vcard_attribute_param_new (EVC_TYPE),
- image_type);
+ e_vcard_attribute_add_param_with_value (
+ attr,
+ e_vcard_attribute_param_new (EVC_TYPE),
+ image_type);
e_vcard_attribute_add_value_decoded (attr, (gchar *) photo->data.inlined.data, photo->data.inlined.length);
break;
case E_CONTACT_PHOTO_TYPE_URI:
- e_vcard_attribute_add_param_with_value (attr,
- e_vcard_attribute_param_new (EVC_VALUE),
- "uri");
+ e_vcard_attribute_add_param_with_value (
+ attr,
+ e_vcard_attribute_param_new (EVC_VALUE),
+ "uri");
e_vcard_attribute_add_value (attr, photo->data.uri);
break;
default:
{
EContactCert *cert = data;
- e_vcard_attribute_add_param_with_value (attr,
- e_vcard_attribute_param_new (EVC_ENCODING),
- "b");
+ e_vcard_attribute_add_param_with_value (
+ attr,
+ e_vcard_attribute_param_new (EVC_ENCODING),
+ "b");
e_vcard_attribute_add_value_decoded (attr, cert->data, cert->length);
}
e_vcard_remove_attributes (E_VCARD (contact), NULL, info->vcard_field_name);
for (l = new_values; l; l = l->next)
- e_vcard_append_attribute_with_value (E_VCARD (contact),
- e_vcard_attribute_new (NULL, info->vcard_field_name),
- (gchar *) l->data);
+ e_vcard_append_attribute_with_value (
+ E_VCARD (contact),
+ e_vcard_attribute_new (NULL, info->vcard_field_name),
+ (gchar *) l->data);
}
else if (info->t & E_CONTACT_FIELD_TYPE_SYNTHETIC) {
if (info->t & E_CONTACT_FIELD_TYPE_MULTI_ELEM) {
!info->attr_type1 &&
!info->attr_type2) {
/* Add default type */
- e_vcard_attribute_add_param_with_value ( attr,
- e_vcard_attribute_param_new (EVC_TYPE),
- "OTHER");
+ e_vcard_attribute_add_param_with_value (
+ attr,
+ e_vcard_attribute_param_new (EVC_TYPE),
+ "OTHER");
}
e_vcard_append_attribute (E_VCARD (contact), attr);
}
attr = e_vcard_attribute_new (NULL, info->vcard_field_name);
e_vcard_append_attribute (E_VCARD (contact), attr);
if (info->attr_type1)
- e_vcard_attribute_add_param_with_value (attr, e_vcard_attribute_param_new (EVC_TYPE),
- info->attr_type1);
+ e_vcard_attribute_add_param_with_value (
+ attr, e_vcard_attribute_param_new (EVC_TYPE),
+ info->attr_type1);
if (info->attr_type2)
- e_vcard_attribute_add_param_with_value (attr, e_vcard_attribute_param_new (EVC_TYPE),
- info->attr_type2);
+ e_vcard_attribute_add_param_with_value (
+ attr, e_vcard_attribute_param_new (EVC_TYPE),
+ info->attr_type2);
}
if (info->t & E_CONTACT_FIELD_TYPE_STRUCT || info->t & E_CONTACT_FIELD_TYPE_GETSET) {
}
else {
/* and if we don't find one we create a new attribute */
- e_vcard_append_attribute_with_value (E_VCARD (contact),
- e_vcard_attribute_new (NULL, info->vcard_field_name),
- g_value_get_boolean (value) ? "TRUE" : "FALSE");
+ e_vcard_append_attribute_with_value (
+ E_VCARD (contact),
+ e_vcard_attribute_new (NULL, info->vcard_field_name),
+ g_value_get_boolean (value) ? "TRUE" : "FALSE");
}
}
else if (info->t & E_CONTACT_FIELD_TYPE_STRING) {
}
else if (sval) {
/* and if we don't find one we create a new attribute */
- e_vcard_append_attribute_with_value (E_VCARD (contact),
- e_vcard_attribute_new (NULL, info->vcard_field_name),
- sval);
+ e_vcard_append_attribute_with_value (
+ E_VCARD (contact),
+ e_vcard_attribute_new (NULL, info->vcard_field_name),
+ sval);
}
}
else if (info->t & E_CONTACT_FIELD_TYPE_LIST) {
g_free (contact->priv->cached_strings[field_id]);
contact->priv->cached_strings[field_id] = NULL;
- g_object_set (contact,
- e_contact_field_name (field_id), value,
- NULL);
+ g_object_set (
+ contact,
+ e_contact_field_name (field_id), value,
+ NULL);
}
/**
e_vcard_remove_attributes (E_VCARD (contact), NULL, info->vcard_field_name);
for (l = attributes; l; l = l->next)
- e_vcard_append_attribute (E_VCARD (contact),
- e_vcard_attribute_copy ((EVCardAttribute *) l->data));
+ e_vcard_append_attribute (
+ E_VCARD (contact),
+ e_vcard_attribute_copy ((EVCardAttribute *) l->data));
}
/**
e_contact_date_to_string (EContactDate *dt)
{
if (dt)
- return g_strdup_printf ("%04d-%02d-%02d",
- CLAMP (dt->year, 1000, 9999),
- CLAMP (dt->month, 1, 12),
- CLAMP (dt->day, 1, 31));
+ return g_strdup_printf (
+ "%04d-%02d-%02d",
+ CLAMP (dt->year, 1000, 9999),
+ CLAMP (dt->month, 1, 12),
+ CLAMP (dt->day, 1, 31));
else
return NULL;
}
/* deep copy, recursively copy our children */
for (iter = dest->priv->list_dests; iter != NULL; iter = g_list_next (iter)) {
- new_dest->priv->list_dests = g_list_append (new_dest->priv->list_dests,
- e_destination_copy (E_DESTINATION (iter->data)));
+ new_dest->priv->list_dests = g_list_append (
+ new_dest->priv->list_dests,
+ e_destination_copy (E_DESTINATION (iter->data)));
}
/* XXX other settings? */
gint list_iterations = 0;
gint lists_count = 0;
- hash_table = g_hash_table_new_full (g_str_hash, g_str_equal,
- (GDestroyNotify) g_free, NULL);
+ hash_table = g_hash_table_new_full (
+ g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free, NULL);
g_hash_table_insert (hash_table, g_strdup ("0"), dest);
- e_destination_set_name (dest,
- e_contact_get_const (dest->priv->contact, E_CONTACT_FILE_AS));
+ e_destination_set_name (
+ dest,
+ e_contact_get_const (
+ dest->priv->contact,
+ E_CONTACT_FILE_AS));
attrs = g_list_copy (e_vcard_get_attributes (E_VCARD (dest->priv->contact)));
list_length = g_list_length (attrs);
}
xmlNewProp (dest_node, (xmlChar *)"is_list", (xmlChar *)"yes");
- xmlNewProp (dest_node, (xmlChar *)"show_addresses",
- e_destination_list_show_addresses (dest) ? (xmlChar *)"yes" : (xmlChar *)"no");
+ xmlNewProp (
+ dest_node, (xmlChar *)"show_addresses",
+ e_destination_list_show_addresses (dest) ?
+ (xmlChar *)"yes" : (xmlChar *)"no");
}
str = e_destination_get_source_uid (dest);
xmlNewProp (uri_node, (xmlChar *)"email_num", (xmlChar *) buf);
}
- xmlNewProp (dest_node, (xmlChar *)"html_mail", e_destination_get_html_mail_pref (dest) ? (xmlChar *)"yes" : (xmlChar *)"no");
+ xmlNewProp (
+ dest_node, (xmlChar *)"html_mail",
+ e_destination_get_html_mail_pref (dest) ?
+ (xmlChar *)"yes" : (xmlChar *)"no");
- xmlNewProp (dest_node, (xmlChar *)"auto_recipient",
- e_destination_is_auto_recipient (dest) ? (xmlChar *)"yes" : (xmlChar *)"no");
+ xmlNewProp (
+ dest_node, (xmlChar *)"auto_recipient",
+ e_destination_is_auto_recipient (dest) ?
+ (xmlChar *)"yes" : (xmlChar *)"no");
return dest_node;
}
e_vcard_attribute_remove_params (attr);
if (e_destination_get_contact_uid (dest))
- e_vcard_attribute_add_param_with_value (attr,
- e_vcard_attribute_param_new (EVC_X_DEST_CONTACT_UID),
- e_destination_get_contact_uid (dest));
+ e_vcard_attribute_add_param_with_value (
+ attr,
+ e_vcard_attribute_param_new (EVC_X_DEST_CONTACT_UID),
+ e_destination_get_contact_uid (dest));
if (e_destination_get_source_uid (dest))
- e_vcard_attribute_add_param_with_value (attr,
- e_vcard_attribute_param_new (EVC_X_DEST_SOURCE_UID),
- e_destination_get_source_uid (dest));
+ e_vcard_attribute_add_param_with_value (
+ attr,
+ e_vcard_attribute_param_new (EVC_X_DEST_SOURCE_UID),
+ e_destination_get_source_uid (dest));
if (-1 != e_destination_get_email_num (dest)) {
gchar buf[10];
g_snprintf (buf, sizeof (buf), "%d", e_destination_get_email_num (dest));
- e_vcard_attribute_add_param_with_value (attr,
- e_vcard_attribute_param_new (EVC_X_DEST_EMAIL_NUM),
- buf);
+ e_vcard_attribute_add_param_with_value (
+ attr,
+ e_vcard_attribute_param_new (EVC_X_DEST_EMAIL_NUM),
+ buf);
}
- e_vcard_attribute_add_param_with_value (attr,
- e_vcard_attribute_param_new (EVC_X_DEST_HTML_MAIL),
- e_destination_get_html_mail_pref (dest) ? "TRUE" : "FALSE");
+ e_vcard_attribute_add_param_with_value (
+ attr,
+ e_vcard_attribute_param_new (EVC_X_DEST_HTML_MAIL),
+ e_destination_get_html_mail_pref (dest) ? "TRUE" : "FALSE");
if (e_destination_get_address (dest))
e_vcard_attribute_add_value (attr, e_destination_get_address (dest));
* Create our new reordered version of the name.
*/
#define NULLSTR(a) ((a) == NULL ? "" : (a))
- newfull = g_strdup_printf ("%s %s %s %s", NULLSTR (prefix), NULLSTR (firstmidnick),
- NULLSTR (last), NULLSTR (suffix));
+ newfull = g_strdup_printf (
+ "%s %s %s %s",
+ NULLSTR (prefix),
+ NULLSTR (firstmidnick),
+ NULLSTR (last),
+ NULLSTR (suffix));
g_strstrip (newfull);
g_free (name->full);
name->full = newfull;
}
else if (*lp == '.') {
if (attr_group) {
- g_warning ("extra `.' in attribute specification. ignoring extra group `%s'",
- str->str);
+ g_warning (
+ "extra `.' in attribute specification. ignoring extra group `%s'",
+ str->str);
g_string_free (str, TRUE);
str = g_string_new ("");
}
if (g_once_init_enter (&type_id__volatile)) {
GType type_id;
- type_id = g_boxed_type_register_static ("EVCardAttribute",
- (GBoxedCopyFunc) e_vcard_attribute_copy,
- (GBoxedFreeFunc) e_vcard_attribute_free);
+ type_id = g_boxed_type_register_static (
+ "EVCardAttribute",
+ (GBoxedCopyFunc) e_vcard_attribute_copy,
+ (GBoxedFreeFunc) e_vcard_attribute_free);
g_once_init_leave (&type_id__volatile, type_id);
}
if (g_once_init_enter (&type_id__volatile)) {
GType type_id;
- type_id =
- g_boxed_type_register_static ("EVCardAttributeParam",
- (GBoxedCopyFunc)
- e_vcard_attribute_param_copy,
- (GBoxedFreeFunc)
- e_vcard_attribute_param_free);
+ type_id = g_boxed_type_register_static (
+ "EVCardAttributeParam",
+ (GBoxedCopyFunc) e_vcard_attribute_param_copy,
+ (GBoxedFreeFunc) e_vcard_attribute_param_free);
g_once_init_leave (&type_id__volatile, type_id);
}
else if (!g_ascii_strcasecmp ((gchar *) param->values->data, EVC_QUOTEDPRINTABLE))
attr->encoding = EVC_ENCODING_QP;
else {
- g_warning ("Unknown value `%s' for ENCODING parameter. values will be treated as raw",
- (gchar *) param->values->data);
+ g_warning (
+ "Unknown value `%s' for ENCODING parameter. values will be treated as raw",
+ (gchar *) param->values->data);
}
attr->encoding_set = TRUE;
uid = e_contact_get_const (contact, E_CONTACT_UID);
if (!uid) {
printf ("no uid\n");
- printf ("name:%s, email:%s\n",
+ printf (
+ "name:%s, email:%s\n",
(gchar *) e_contact_get (contact, E_CONTACT_GIVEN_NAME),
(gchar *) e_contact_get (contact, E_CONTACT_EMAIL_1));
return FALSE;
(ESExpIFunc *) symbols[i].func, sexp->priv->search_context);
}
else {
- e_sexp_add_function (sexp->priv->search_sexp, 0, symbols[i].name,
- symbols[i].func, sexp->priv->search_context);
+ e_sexp_add_function (
+ sexp->priv->search_sexp, 0, symbols[i].name,
+ symbols[i].func, sexp->priv->search_context);
}
}
book_backend_sqlitedb_start_transaction (ebsdb, &err);
if (!err) {
- stmt = sqlite3_mprintf ("INSERT OR IGNORE INTO folders VALUES ( %Q, %Q, %Q, %d, %d, %d ) ",
- folderid, folder_name, NULL, 0, 0, FOLDER_VERSION);
+ stmt = sqlite3_mprintf (
+ "INSERT OR IGNORE INTO folders VALUES ( %Q, %Q, %Q, %d, %d, %d ) ",
+ folderid, folder_name, NULL, 0, 0, FOLDER_VERSION);
book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
ebsdb->priv->store_vcard = store_vcard;
if (g_mkdir_with_parents (path, 0777) < 0) {
g_static_mutex_unlock (&dbcon_lock);
- g_set_error (error, E_BOOK_SDB_ERROR,
- 0, "Can not make parent directory: errno %d", errno);
+ g_set_error (
+ error, E_BOOK_SDB_ERROR, 0,
+ "Can not make parent directory: errno %d", errno);
return NULL;
}
filename = g_build_filename (path, DB_FILENAME, NULL);
GSList l;
l.data = contact;
l.next = NULL;
- return e_book_backend_sqlitedb_add_contacts (ebsdb, folderid, &l,
- partial_content, error);
+ return e_book_backend_sqlitedb_add_contacts (
+ ebsdb, folderid, &l,
+ partial_content, error);
}
/**
gchar *stmt;
EContact *contact = (EContact *) l->data;
- stmt = insert_stmt_from_contact (contact, partial_content, folderid,
- priv->store_vcard);
+ stmt = insert_stmt_from_contact (
+ contact, partial_content, folderid,
+ priv->store_vcard);
book_backend_sql_exec (priv->db, stmt, NULL, NULL, &err);
g_free (stmt);
GError **error)
{
GSList l;
+
l.data = (gchar *) uid; /* Won't modify it, I promise :) */
l.next = NULL;
- return e_book_backend_sqlitedb_remove_contacts (ebsdb, folderid, &l,
- error);
+
+ return e_book_backend_sqlitedb_remove_contacts (
+ ebsdb, folderid, &l, error);
}
/**
{
GError *err = NULL;
EContact *contact = NULL;
- gchar *vcard = e_book_backend_sqlitedb_get_vcard_string (ebsdb, folderid, uid,
- fields_of_interest, with_all_required_fields, &err);
+ gchar *vcard = e_book_backend_sqlitedb_get_vcard_string (
+ ebsdb, folderid, uid,
+ fields_of_interest, with_all_required_fields, &err);
if (!err && vcard) {
contact = e_contact_new_from_vcard_with_uid (vcard, uid);
g_free (vcard);
*with_all_required_fields = local_with_all_required_fields;
if (!vcard_str && error && !*error)
- g_set_error (error, E_BOOK_SDB_ERROR, 0,
+ g_set_error (
+ error, E_BOOK_SDB_ERROR, 0,
_("Contact '%s' not found"), uid ? uid : "NULL");
return vcard_str;
e_sexp_add_ifunction (sexp, 0, check_symbols[i].name,
(ESExpIFunc *) check_symbols[i].func, NULL);
} else {
- e_sexp_add_function (sexp, 0, check_symbols[i].name,
- check_symbols[i].func, NULL);
+ e_sexp_add_function (
+ sexp, 0, check_symbols[i].name,
+ check_symbols[i].func, NULL);
}
}
e_sexp_add_ifunction (sexp, 0, symbols[i].name,
(ESExpIFunc *) symbols[i].func, NULL);
else
- e_sexp_add_function (sexp, 0, symbols[i].name,
- symbols[i].func, NULL);
+ e_sexp_add_function (
+ sexp, 0, symbols[i].name,
+ symbols[i].func, NULL);
}
e_sexp_input_text (sexp, query, strlen (query));
book_backend_sql_exec (ebsdb->priv->db, stmt, store_data_to_vcard, &vcard_data, &err);
sqlite3_free (stmt);
} else
- book_backend_sql_exec (ebsdb->priv->db, select_stmt,
- store_data_to_vcard, &vcard_data, &err);
+ book_backend_sql_exec (
+ ebsdb->priv->db, select_stmt,
+ store_data_to_vcard, &vcard_data, &err);
g_free (select_stmt);
gchar *sql_query;
sql_query = sexp ? sexp_to_sql_query (sexp) : NULL;
- search_contacts = book_backend_sqlitedb_search_query (ebsdb, sql_query, folderid,
- fields_of_interest,
- &local_with_all_required_fields, error);
+ search_contacts = book_backend_sqlitedb_search_query (
+ ebsdb, sql_query, folderid,
+ fields_of_interest,
+ &local_with_all_required_fields, error);
g_free (sql_query);
local_searched = TRUE;
local_searched = TRUE;
local_with_all_required_fields = TRUE;
} else {
- g_set_error (error, E_BOOK_SDB_ERROR,
- 0, "Full search_contacts are not stored in cache. Hence only summary query is supported.");
+ g_set_error (
+ error, E_BOOK_SDB_ERROR, 0,
+ "Full search_contacts are not stored in cache. "
+ "Hence only summary query is supported.");
}
if (searched)
local_searched = TRUE;
} else {
- g_set_error (error, E_BOOK_SDB_ERROR,
- 0, "Full vcards are not stored in cache. Hence only summary query is supported.");
+ g_set_error (
+ error, E_BOOK_SDB_ERROR, 0,
+ "Full vcards are not stored in cache. "
+ "Hence only summary query is supported.");
}
if (searched)
book_backend_sqlitedb_start_transaction (ebsdb, &err);
if (!err) {
- stmt = sqlite3_mprintf ("UPDATE folders SET is_populated = %d WHERE folder_id = %Q",
- populated, folderid);
+ stmt = sqlite3_mprintf (
+ "UPDATE folders SET is_populated = %d WHERE folder_id = %Q",
+ populated, folderid);
book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
sqlite3_free (stmt);
}
book_backend_sqlitedb_start_transaction (ebsdb, &err);
if (!err) {
- stmt = sqlite3_mprintf ("UPDATE folders SET partial_content = %d WHERE folder_id = %Q",
+ stmt = sqlite3_mprintf (
+ "UPDATE folders SET partial_content = %d WHERE folder_id = %Q",
partial_content, folderid);
book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
sqlite3_free (stmt);
book_backend_sqlitedb_start_transaction (ebsdb, &err);
if (!err) {
- stmt = sqlite3_mprintf ("UPDATE %Q SET bdata = %Q WHERE uid = %Q", folderid,
- value, uid);
+ stmt = sqlite3_mprintf (
+ "UPDATE %Q SET bdata = %Q WHERE uid = %Q",
+ folderid, value, uid);
book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
sqlite3_free (stmt);
}
book_backend_sqlitedb_start_transaction (ebsdb, &err);
if (!err) {
- stmt = sqlite3_mprintf ("UPDATE folders SET sync_data = %Q WHERE folder_id = %Q",
- sync_data, folderid);
+ stmt = sqlite3_mprintf (
+ "UPDATE folders SET sync_data = %Q WHERE folder_id = %Q",
+ sync_data, folderid);
book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
sqlite3_free (stmt);
}
READER_LOCK (ebsdb);
- stmt = sqlite3_mprintf ("SELECT value FROM keys WHERE folder_id = %Q AND key = %Q",
- folderid, key);
+ stmt = sqlite3_mprintf (
+ "SELECT value FROM keys WHERE folder_id = %Q AND key = %Q",
+ folderid, key);
book_backend_sql_exec (ebsdb->priv->db, stmt, get_string_cb , &ret, error);
sqlite3_free (stmt);
book_backend_sqlitedb_start_transaction (ebsdb, &err);
if (!err) {
- stmt = sqlite3_mprintf ("INSERT or REPLACE INTO keys (key, value, folder_id) \
- values (%Q, %Q, %Q)", key, value, folderid);
+ stmt = sqlite3_mprintf (
+ "INSERT or REPLACE INTO keys (key, value, folder_id) "
+ "values (%Q, %Q, %Q)", key, value, folderid);
book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
sqlite3_free (stmt);
}
READER_LOCK (ebsdb);
- stmt = sqlite3_mprintf ("SELECT uid FROM %Q WHERE partial_content = 1",
- folderid);
+ stmt = sqlite3_mprintf (
+ "SELECT uid FROM %Q WHERE partial_content = 1",
+ folderid);
book_backend_sql_exec (ebsdb->priv->db, stmt, addto_slist_cb, &uids, error);
sqlite3_free (stmt);
g_free (filename);
if (ret == -1) {
- g_set_error (error, E_BOOK_SDB_ERROR,
+ g_set_error (
+ error, E_BOOK_SDB_ERROR,
0, "Unable to remove the db file: errno %d", errno);
return FALSE;
}
summary->priv->dirty = TRUE;
if (!summary->priv->flush_timeout
&& summary->priv->flush_timeout_millis)
- summary->priv->flush_timeout = g_timeout_add (summary->priv->flush_timeout_millis,
- summary_flush_func, summary);
+ summary->priv->flush_timeout = g_timeout_add (
+ summary->priv->flush_timeout_millis,
+ summary_flush_func, summary);
}
/**
e_sexp_add_ifunction (sexp, 0, check_symbols[i].name,
(ESExpIFunc *) check_symbols[i].func, summary);
} else {
- e_sexp_add_function (sexp, 0, check_symbols[i].name,
- check_symbols[i].func, summary);
+ e_sexp_add_function (
+ sexp, 0, check_symbols[i].name,
+ check_symbols[i].func, summary);
}
}
e_sexp_add_ifunction (sexp, 0, symbols[i].name,
(ESExpIFunc *) symbols[i].func, summary);
} else {
- e_sexp_add_function (sexp, 0, symbols[i].name,
- symbols[i].func, summary);
+ e_sexp_add_function (
+ sexp, 0, symbols[i].name,
+ symbols[i].func, summary);
}
}
#ifndef EDS_DISABLE_DEPRECATED
void e_book_backend_foreach_view (EBookBackend *backend,
gboolean (*callback) (EDataBookView *view,
- gpointer user_data),
- gpointer user_data);
+ gpointer user_data),
+ gpointer user_data);
#endif /* EDS_DISABLE_DEPRECATED */
G_END_DECLS
view->priv->sexp, (EContact *) contact);
if (want_in_view) {
- vcard = e_vcard_to_string (E_VCARD (contact),
- EVC_FORMAT_VCARD_30);
+ vcard = e_vcard_to_string (
+ E_VCARD (contact),
+ EVC_FORMAT_VCARD_30);
if (currently_in_view)
notify_change (view, id, vcard);
}
if (has_changes) {
- g_dbus_connection_emit_signal (connection,
- NULL,
- path,
- "org.freedesktop.DBus.Properties",
- "PropertiesChanged",
- g_variant_new ("(sa{sv}as)",
- GDBUS_BOOK_FACTORY_INTERFACE_NAME,
- builder,
- invalidated_builder),
- NULL);
+ g_dbus_connection_emit_signal (
+ connection, NULL, path,
+ "org.freedesktop.DBus.Properties",
+ "PropertiesChanged",
+ g_variant_new (
+ "(sa{sv}as)",
+ GDBUS_BOOK_FACTORY_INTERFACE_NAME,
+ builder,
+ invalidated_builder),
+ NULL);
} else {
g_variant_builder_unref (builder);
g_variant_builder_unref (invalidated_builder);
g_object_set_data (G_OBJECT (object), "gdbus-codegen-connection", (gpointer) connection);
g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-pvc", (gpointer) pvc, (GDestroyNotify) g_hash_table_unref);
- return g_dbus_connection_register_object (connection,
- object_path,
- (GDBusInterfaceInfo *) &_e_gdbus_book_factory_interface_info,
- &e_gdbus_book_factory_interface_vtable,
- object,
- (GDestroyNotify) on_object_unregistered,
- error);
+ return g_dbus_connection_register_object (
+ connection,
+ object_path,
+ (GDBusInterfaceInfo *) &_e_gdbus_book_factory_interface_info,
+ &e_gdbus_book_factory_interface_vtable,
+ object,
+ (GDestroyNotify) on_object_unregistered,
+ error);
}
/**
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_FACTORY_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_FACTORY_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_FACTORY_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_FACTORY_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_BOOK_FACTORY (initable);
else
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_FACTORY_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_FACTORY_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
+ initable = g_initable_new (
+ E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
cancellable,
error,
"g-flags", flags,
}
if (has_changes) {
- g_dbus_connection_emit_signal (connection,
- NULL,
- path,
- "org.freedesktop.DBus.Properties",
- "PropertiesChanged",
- g_variant_new ("(sa{sv}as)",
- GDBUS_BOOK_VIEW_INTERFACE_NAME,
- builder,
- invalidated_builder),
- NULL);
+ g_dbus_connection_emit_signal (
+ connection,
+ NULL,
+ path,
+ "org.freedesktop.DBus.Properties",
+ "PropertiesChanged",
+ g_variant_new (
+ "(sa{sv}as)",
+ GDBUS_BOOK_VIEW_INTERFACE_NAME,
+ builder,
+ invalidated_builder),
+ NULL);
} else {
g_variant_builder_unref (builder);
g_variant_builder_unref (invalidated_builder);
g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-path", (gpointer) g_strdup (object_path), g_free);
g_object_set_data (G_OBJECT (object), "gdbus-codegen-connection", (gpointer) connection);
g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-pvc", (gpointer) pvc, (GDestroyNotify) g_hash_table_unref);
- return g_dbus_connection_register_object (connection,
- object_path,
- (GDBusInterfaceInfo *) &_e_gdbus_book_view_interface_info,
- &e_gdbus_book_view_interface_vtable,
- object,
- (GDestroyNotify) on_object_unregistered,
- error);
+ return g_dbus_connection_register_object (
+ connection,
+ object_path,
+ (GDBusInterfaceInfo *) &_e_gdbus_book_view_interface_info,
+ &e_gdbus_book_view_interface_vtable,
+ object,
+ (GDestroyNotify) on_object_unregistered,
+ error);
}
/**
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_BOOK_VIEW_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_VIEW_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_BOOK_VIEW_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_VIEW_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_BOOK_VIEW_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_VIEW_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_BOOK_VIEW_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_VIEW_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_BOOK_VIEW (initable);
else
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_BOOK_VIEW_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_VIEW_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_BOOK_VIEW_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_VIEW_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_BOOK_VIEW_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_VIEW_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_BOOK_VIEW_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_VIEW_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_BOOK_VIEW (initable);
else
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_boolean__void (proxy, in_only_if_exists, cancellable, error,
+ return e_gdbus_proxy_call_sync_boolean__void (
+ proxy, in_only_if_exists, cancellable, error,
e_gdbus_book_call_open,
e_gdbus_book_call_open_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_void__void (proxy, cancellable, error,
+ return e_gdbus_proxy_call_sync_void__void (
+ proxy, cancellable, error,
e_gdbus_book_call_refresh,
e_gdbus_book_call_refresh_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__string (proxy, in_uid, out_vcard, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__string (
+ proxy, in_uid, out_vcard, cancellable, error,
e_gdbus_book_call_get_contact,
e_gdbus_book_call_get_contact_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__strv (proxy, in_query, out_vcards, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__strv (
+ proxy, in_query, out_vcards, cancellable, error,
e_gdbus_book_call_get_contact_list,
e_gdbus_book_call_get_contact_list_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__strv (proxy, in_query, out_uids, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__strv (
+ proxy, in_query, out_uids, cancellable, error,
e_gdbus_book_call_get_contact_list_uids,
e_gdbus_book_call_get_contact_list_uids_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__strv (proxy, in_vcards, out_uids, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__strv (
+ proxy, in_vcards, out_uids, cancellable, error,
e_gdbus_book_call_add_contacts,
e_gdbus_book_call_add_contacts_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__void (proxy, in_list, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__void (
+ proxy, in_list, cancellable, error,
e_gdbus_book_call_remove_contacts,
e_gdbus_book_call_remove_contacts_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__void (proxy, in_vcards, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__void (
+ proxy, in_vcards, cancellable, error,
e_gdbus_book_call_modify_contacts,
e_gdbus_book_call_modify_contacts_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__string (proxy, in_prop_name, out_prop_value, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__string (
+ proxy, in_prop_name, out_prop_value, cancellable, error,
e_gdbus_book_call_get_backend_property,
e_gdbus_book_call_get_backend_property_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__void (proxy, in_prop_name_value, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__void (
+ proxy, in_prop_name_value, cancellable, error,
e_gdbus_book_call_set_backend_property,
e_gdbus_book_call_set_backend_property_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__string (proxy, in_query, out_view_path, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__string (
+ proxy, in_query, out_view_path, cancellable, error,
e_gdbus_book_call_get_view,
e_gdbus_book_call_get_view_finish);
}
}
if (has_changes) {
- g_dbus_connection_emit_signal (connection, NULL, path, "org.freedesktop.DBus.Properties", "PropertiesChanged",
+ g_dbus_connection_emit_signal (
+ connection, NULL, path, "org.freedesktop.DBus.Properties", "PropertiesChanged",
g_variant_new ("(sa{sv}as)", GDBUS_BOOK_INTERFACE_NAME, builder, invalidated_builder),
NULL);
} else {
g_object_set_data (G_OBJECT (object), "gdbus-codegen-connection", (gpointer) connection);
g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-pvc", (gpointer) pvc, (GDestroyNotify) g_hash_table_unref);
- return g_dbus_connection_register_object (connection, object_path, (GDBusInterfaceInfo *) &_e_gdbus_book_interface_info,
+ return g_dbus_connection_register_object (
+ connection, object_path, (GDBusInterfaceInfo *) &_e_gdbus_book_interface_info,
&e_gdbus_book_interface_vtable, object, (GDestroyNotify) on_object_unregistered, error);
}
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_BOOK_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_BOOK_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_BOOK_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_BOOK_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_BOOK (initable);
else
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_BOOK_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_BOOK_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_INTERFACE_NAME,
+ NULL);
}
/**
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_BOOK_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_BOOK_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_BOOK_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_BOOK_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_BOOK (initable);
else
return;
}
- g_hash_table_insert (caldav_debug_table,
- debug_key,
- debug_value);
+ g_hash_table_insert (
+ caldav_debug_table,
+ debug_key,
+ debug_value);
d (g_debug ("Adding %s to enabled debugging keys", debug_key));
}
d (g_debug ("Got debug env variable: [%s]", dbg));
- caldav_debug_table = g_hash_table_new (g_str_hash,
- g_str_equal);
+ caldav_debug_table = g_hash_table_new (
+ g_str_hash,
+ g_str_equal);
ptr = dbg;
{
static GOnce debug_once = G_ONCE_INIT;
- g_once (&debug_once,
+ g_once (
+ &debug_once,
caldav_debug_init_once,
NULL);
}
switch (message->status_code) {
case SOUP_STATUS_CANT_CONNECT:
case SOUP_STATUS_CANT_CONNECT_PROXY:
- g_propagate_error (perror,
+ g_propagate_error (
+ perror,
e_data_cal_create_error_fmt (
OtherError,
_("Server is unreachable (%s)"),
case SOUP_STATUS_SSL_FAILED:
if (ignore_invalid_cert) {
- g_propagate_error (perror,
+ g_propagate_error (
+ perror,
e_data_cal_create_error_fmt ( OtherError,
_("Failed to connect to a server using SSL: %s"),
message->reason_phrase && *message->reason_phrase ? message->reason_phrase :
(soup_status_get_phrase (message->status_code) ? soup_status_get_phrase (message->status_code) : _("Unknown error"))));
} else {
- g_propagate_error (perror, EDC_ERROR_EX (OtherError,
+ g_propagate_error (
+ perror, EDC_ERROR_EX (OtherError,
_("Failed to connect to a server using SSL. "
"One possible reason is an invalid certificate being used by the server. "
"If this is expected, like self-signed certificate being used on the server, "
default:
d (g_debug ("CalDAV:%s: Unhandled status code %d\n", G_STRFUNC, status_code));
- g_propagate_error (perror,
+ g_propagate_error (
+ perror,
e_data_cal_create_error_fmt (
OtherError,
_("Unexpected HTTP status code %d returned (%s)"),
content = xmlNodeGetContent (node);
- res = soup_headers_parse_status_line ((gchar *) content,
- NULL,
- status_code,
- NULL);
+ res = soup_headers_parse_status_line (
+ (gchar *) content,
+ NULL,
+ status_code,
+ NULL);
xmlFree (content);
return res;
return ret;
if (result->type == XPATH_STRING) {
- res = soup_headers_parse_status_line ((gchar *) result->stringval,
- NULL,
- &ret,
- NULL);
+ res = soup_headers_parse_status_line (
+ (gchar *) result->stringval,
+ NULL,
+ &ret,
+ NULL);
if (!res) {
ret = 0;
g_return_val_if_fail (objs != NULL || len != NULL, FALSE);
res = TRUE;
- doc = xmlReadMemory (soup_message->response_body->data,
- soup_message->response_body->length,
- "response.xml",
- NULL,
- 0);
+ doc = xmlReadMemory (
+ soup_message->response_body->data,
+ soup_message->response_body->length,
+ "response.xml",
+ NULL,
+ 0);
if (doc == NULL) {
return FALSE;
xpctx = xmlXPathNewContext (doc);
- xmlXPathRegisterNs (xpctx, (xmlChar *) "D",
- (xmlChar *) "DAV:");
+ xmlXPathRegisterNs (
+ xpctx, (xmlChar *) "D",
+ (xmlChar *) "DAV:");
- xmlXPathRegisterNs (xpctx, (xmlChar *) "C",
- (xmlChar *) "urn:ietf:params:xml:ns:caldav");
+ xmlXPathRegisterNs (
+ xpctx, (xmlChar *) "C",
+ (xmlChar *) "urn:ietf:params:xml:ns:caldav");
result = xpath_eval (xpctx, "/D:multistatus/D:response");
g_return_val_if_fail (message != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
- doc = xmlReadMemory (message->response_body->data,
- message->response_body->length,
- "response.xml",
- NULL,
- 0);
+ doc = xmlReadMemory (
+ message->response_body->data,
+ message->response_body->length,
+ "response.xml",
+ NULL,
+ 0);
if (doc == NULL) {
return FALSE;
new_uri = soup_uri_new_with_base (soup_message_get_uri (msg), new_loc);
if (!new_uri) {
- soup_message_set_status_full (msg,
- SOUP_STATUS_MALFORMED,
- _("Invalid Redirect URL"));
+ soup_message_set_status_full (
+ msg,
+ SOUP_STATUS_MALFORMED,
+ _("Invalid Redirect URL"));
return;
}
g_propagate_error (perror, EDC_ERROR (NoSuchCal));
return FALSE;
}
- soup_message_headers_append (message->request_headers,
- "User-Agent", "Evolution/" VERSION);
+ soup_message_headers_append (
+ message->request_headers,
+ "User-Agent", "Evolution/" VERSION);
send_and_handle_redirection (cbdav->priv->session, message, NULL);
xmlNodeDumpOutput (buf, doc, root, 0, 1, NULL);
xmlOutputBufferFlush (buf);
- soup_message_headers_append (message->request_headers,
- "User-Agent", "Evolution/" VERSION);
- soup_message_headers_append (message->request_headers,
- "Depth", "0");
+ soup_message_headers_append (
+ message->request_headers,
+ "User-Agent", "Evolution/" VERSION);
+ soup_message_headers_append (
+ message->request_headers,
+ "Depth", "0");
buf_content = compat_libxml_output_buffer_get_content (buf, &buf_size);
- soup_message_set_request (message,
- "application/xml",
- SOUP_MEMORY_COPY,
- buf_content, buf_size);
+ soup_message_set_request (
+ message,
+ "application/xml",
+ SOUP_MEMORY_COPY,
+ buf_content, buf_size);
/* Send the request now */
send_and_handle_redirection (cbdav->priv->session, message, NULL);
xmlOutputBufferFlush (buf);
/* Prepare the soup message */
- soup_message_headers_append (message->request_headers,
- "User-Agent", "Evolution/" VERSION);
- soup_message_headers_append (message->request_headers,
- "Depth", "1");
+ soup_message_headers_append (
+ message->request_headers,
+ "User-Agent", "Evolution/" VERSION);
+ soup_message_headers_append (
+ message->request_headers,
+ "Depth", "1");
buf_content = compat_libxml_output_buffer_get_content (buf, &buf_size);
- soup_message_set_request (message,
- "application/xml",
- SOUP_MEMORY_COPY,
- buf_content, buf_size);
+ soup_message_set_request (
+ message,
+ "application/xml",
+ SOUP_MEMORY_COPY,
+ buf_content, buf_size);
/* Send the request now */
send_and_handle_redirection (cbdav->priv->session, message, NULL);
return FALSE;
}
- soup_message_headers_append (message->request_headers,
- "User-Agent", "Evolution/" VERSION);
+ soup_message_headers_append (
+ message->request_headers,
+ "User-Agent", "Evolution/" VERSION);
send_and_handle_redirection (cbdav->priv->session, message, NULL);
}
soup_message_headers_append (message->request_headers, "User-Agent", "Evolution/" VERSION);
- soup_message_set_request (message,
- "text/calendar; charset=utf-8",
- SOUP_MEMORY_COPY,
- *post_fb, strlen (*post_fb));
+ soup_message_set_request (
+ message,
+ "text/calendar; charset=utf-8",
+ SOUP_MEMORY_COPY,
+ *post_fb, strlen (*post_fb));
send_and_handle_redirection (cbdav->priv->session, message, NULL);
return FALSE;
}
- soup_message_headers_append (message->request_headers,
- "User-Agent", "Evolution/" VERSION);
+ soup_message_headers_append (
+ message->request_headers,
+ "User-Agent", "Evolution/" VERSION);
/* For new items we use the If-None-Match so we don't
* acidently override resources, for item updates we
if (object->etag == NULL) {
soup_message_headers_append (message->request_headers, "If-None-Match", "*");
} else {
- soup_message_headers_append (message->request_headers,
- "If-Match", object->etag);
+ soup_message_headers_append (
+ message->request_headers,
+ "If-Match", object->etag);
}
- soup_message_set_request (message,
- "text/calendar; charset=utf-8",
- SOUP_MEMORY_COPY,
- object->cdata,
- strlen (object->cdata));
+ soup_message_set_request (
+ message,
+ "text/calendar; charset=utf-8",
+ SOUP_MEMORY_COPY,
+ object->cdata,
+ strlen (object->cdata));
uri = NULL;
send_and_handle_redirection (cbdav->priv->session, message, &uri);
return;
}
- soup_message_headers_append (message->request_headers,
- "User-Agent", "Evolution/" VERSION);
+ soup_message_headers_append (
+ message->request_headers,
+ "User-Agent", "Evolution/" VERSION);
if (object->etag != NULL) {
- soup_message_headers_append (message->request_headers,
- "If-Match", object->etag);
+ soup_message_headers_append (
+ message->request_headers,
+ "If-Match", object->etag);
}
send_and_handle_redirection (cbdav->priv->session, message, NULL);
soup_message_headers_append (message->request_headers, "Depth", "0");
buf_content = compat_libxml_output_buffer_get_content (buf, &buf_size);
- soup_message_set_request (message,
- "application/xml",
- SOUP_MEMORY_COPY,
- buf_content, buf_size);
+ soup_message_set_request (
+ message,
+ "application/xml",
+ SOUP_MEMORY_COPY,
+ buf_content, buf_size);
/* Send the request now */
send_and_handle_redirection (cbdav->priv->session, message, NULL);
soup_message_headers_append (message->request_headers, "Depth", "0");
buf_content = compat_libxml_output_buffer_get_content (buf, &buf_size);
- soup_message_set_request (message,
- "application/xml",
- SOUP_MEMORY_COPY,
- buf_content, buf_size);
+ soup_message_set_request (
+ message,
+ "application/xml",
+ SOUP_MEMORY_COPY,
+ buf_content, buf_size);
/* Send the request now */
send_and_handle_redirection (cbdav->priv->session, message, NULL);
gchar *usermail;
const gchar *extension_name;
- caps = g_string_new (CAL_STATIC_CAPABILITY_NO_THISANDFUTURE ","
- CAL_STATIC_CAPABILITY_NO_THISANDPRIOR ","
- CAL_STATIC_CAPABILITY_REFRESH_SUPPORTED);
+ caps = g_string_new (
+ CAL_STATIC_CAPABILITY_NO_THISANDFUTURE ","
+ CAL_STATIC_CAPABILITY_NO_THISANDPRIOR ","
+ CAL_STATIC_CAPABILITY_REFRESH_SUPPORTED);
usermail = get_usermail (E_CAL_BACKEND (backend));
if (!usermail || !*usermail)
extension = e_source_get_extension (source, extension_name);
if (e_source_webdav_get_calendar_auto_schedule (extension)) {
- g_string_append (caps, "," CAL_STATIC_CAPABILITY_CREATE_MESSAGES
- "," CAL_STATIC_CAPABILITY_SAVE_SCHEDULES);
+ g_string_append (
+ caps,
+ "," CAL_STATIC_CAPABILITY_CREATE_MESSAGES
+ "," CAL_STATIC_CAPABILITY_SAVE_SCHEDULES);
}
*prop_value = g_string_free (caps, FALSE);
if (!vtz_comp)
return;
- icalcomponent_add_component (f_data->vcal_comp,
- icalcomponent_new_clone (vtz_comp));
+ icalcomponent_add_component (
+ f_data->vcal_comp,
+ icalcomponent_new_clone (vtz_comp));
}
static void
}
*objects = NULL;
- scomp = icalcomponent_get_first_component (icomp,
- ekind);
+ scomp = icalcomponent_get_first_component (icomp, ekind);
while (scomp) {
/* Remove components from toplevel here */
} else {
do_search = TRUE;
}
- prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (sexp,
- &occur_start,
- &occur_end);
+ prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (
+ sexp,
+ &occur_start,
+ &occur_end);
bkend = E_CAL_BACKEND (backend);
cbdav->priv->slave_cmd = SLAVE_SHOULD_SLEEP;
cbdav->priv->slave_busy = FALSE;
- g_signal_connect (cbdav->priv->session, "authenticate",
- G_CALLBACK (soup_authenticate), cbdav);
+ g_signal_connect (
+ cbdav->priv->session, "authenticate",
+ G_CALLBACK (soup_authenticate), cbdav);
e_cal_backend_sync_set_lock (E_CAL_BACKEND_SYNC (cbdav), FALSE);
goto done;
}
- d (g_message (G_STRLOC ": Got object with duplicated UID `%s' and rid `%s', changing it...",
- uid,
- rid ? rid : ""));
+ d (
+ g_message (G_STRLOC ": Got object with duplicated UID `%s' and rid `%s', changing it...",
+ uid,
+ rid ? rid : ""));
new_uid = e_cal_component_gen_uid ();
e_cal_component_set_uid (comp, new_uid);
priv = cbfile->priv;
- e_cal_util_get_component_occur_times (comp, &time_start, &time_end,
- resolve_tzid, priv->icalcomp, icaltimezone_get_utc_timezone (),
- e_cal_backend_get_kind (E_CAL_BACKEND (cbfile)));
+ e_cal_util_get_component_occur_times (
+ comp, &time_start, &time_end,
+ resolve_tzid, priv->icalcomp, icaltimezone_get_utc_timezone (),
+ e_cal_backend_get_kind (E_CAL_BACKEND (cbfile)));
if (time_end != -1 && time_start > time_end)
g_print ("Bogus component %s\n", e_cal_component_get_as_string (comp));
g_static_rec_mutex_lock (&priv->idle_save_rmutex);
- prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (match_data.obj_sexp,
- &occur_start,
- &occur_end);
+ prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (
+ match_data.obj_sexp,
+ &occur_start,
+ &occur_end);
objs_occuring_in_tw = NULL;
g_hash_table_foreach (priv->comp_uid_hash, (GHFunc) match_object_sexp,
&match_data);
} else {
- objs_occuring_in_tw = e_intervaltree_search (priv->interval_tree,
- occur_start, occur_end);
+ objs_occuring_in_tw = e_intervaltree_search (
+ priv->interval_tree,
+ occur_start, occur_end);
g_list_foreach (objs_occuring_in_tw, (GFunc) match_object_sexp_to_component,
&match_data);
g_error_free (error);
return;
}
- prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (match_data.obj_sexp,
- &occur_start,
- &occur_end);
+ prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (
+ match_data.obj_sexp,
+ &occur_start,
+ &occur_end);
objs_occuring_in_tw = NULL;
g_hash_table_foreach (priv->comp_uid_hash, (GHFunc) match_object_sexp,
&match_data);
- e_debug_log (FALSE, E_DEBUG_LOG_DOMAIN_CAL_QUERIES, "---;%p;QUERY-ITEMS;%s;%s;%d", query,
- e_cal_backend_sexp_text (sexp), G_OBJECT_TYPE_NAME (backend),
- g_hash_table_size (priv->comp_uid_hash));
+ e_debug_log (
+ FALSE, E_DEBUG_LOG_DOMAIN_CAL_QUERIES, "---;%p;QUERY-ITEMS;%s;%s;%d", query,
+ e_cal_backend_sexp_text (sexp), G_OBJECT_TYPE_NAME (backend),
+ g_hash_table_size (priv->comp_uid_hash));
} else {
/* matches objects in new "interval tree" way */
/* events occuring in time window */
g_list_foreach (objs_occuring_in_tw, (GFunc) match_object_sexp_to_component,
&match_data);
- e_debug_log (FALSE, E_DEBUG_LOG_DOMAIN_CAL_QUERIES, "---;%p;QUERY-ITEMS;%s;%s;%d", query,
- e_cal_backend_sexp_text (sexp), G_OBJECT_TYPE_NAME (backend),
- g_list_length (objs_occuring_in_tw));
+ e_debug_log (
+ FALSE, E_DEBUG_LOG_DOMAIN_CAL_QUERIES, "---;%p;QUERY-ITEMS;%s;%s;%d", query,
+ e_cal_backend_sexp_text (sexp), G_OBJECT_TYPE_NAME (backend),
+ g_list_length (objs_occuring_in_tw));
}
g_static_rec_mutex_unlock (&priv->idle_save_rmutex);
/* add all objects in the given interval */
iso_start = isodate_from_time_t (start);
iso_end = isodate_from_time_t (end);
- query = g_strdup_printf ("occur-in-time-range? (make-time \"%s\") (make-time \"%s\")",
- iso_start, iso_end);
+ query = g_strdup_printf (
+ "occur-in-time-range? (make-time \"%s\") (make-time \"%s\")",
+ iso_start, iso_end);
obj_sexp = e_cal_backend_sexp_new (query);
g_free (query);
g_free (iso_start);
continue;
/* If the event is TRANSPARENT, skip it. */
- prop = icalcomponent_get_first_property (icalcomp,
- ICAL_TRANSP_PROPERTY);
+ prop = icalcomponent_get_first_property (
+ icalcomp,
+ ICAL_TRANSP_PROPERTY);
if (prop) {
icalproperty_transp transp_val = icalproperty_get_transp (prop);
if (transp_val == ICAL_TRANSP_TRANSPARENT ||
continue;
vcalendar_comp = icalcomponent_get_parent (icalcomp);
- e_cal_recur_generate_instances (comp, start, end,
- free_busy_instance,
- vfb,
- resolve_tzid,
- vcalendar_comp,
- icaltimezone_get_utc_timezone ());
+ e_cal_recur_generate_instances (
+ comp, start, end,
+ free_busy_instance,
+ vfb,
+ resolve_tzid,
+ vcalendar_comp,
+ icaltimezone_get_utc_timezone ());
}
g_object_unref (obj_sexp);
if ((rrdata->mod == CALOBJ_MOD_THISANDPRIOR && instancett <= fromtt) ||
(rrdata->mod == CALOBJ_MOD_THISANDFUTURE && instancett >= fromtt)) {
/* remove the component from our data */
- icalcomponent_remove_component (rrdata->cbfile->priv->icalcomp,
- e_cal_component_get_icalcomponent (instance));
+ icalcomponent_remove_component (
+ rrdata->cbfile->priv->icalcomp,
+ e_cal_component_get_icalcomponent (instance));
rrdata->cbfile->priv->comp = g_list_remove (rrdata->cbfile->priv->comp, instance);
rrdata->obj_data->recurrences_list = g_list_remove (rrdata->obj_data->recurrences_list, instance);
/* replace only the full object */
if (obj_data->full_object) {
- icalcomponent_remove_component (priv->icalcomp,
- e_cal_component_get_icalcomponent (obj_data->full_object));
+ icalcomponent_remove_component (
+ priv->icalcomp,
+ e_cal_component_get_icalcomponent (obj_data->full_object));
priv->comp = g_list_remove (priv->comp, obj_data->full_object);
g_object_unref (obj_data->full_object);
/* add the new object */
obj_data->full_object = comp;
- icalcomponent_add_component (priv->icalcomp,
- e_cal_component_get_icalcomponent (obj_data->full_object));
+ icalcomponent_add_component (
+ priv->icalcomp,
+ e_cal_component_get_icalcomponent (obj_data->full_object));
priv->comp = g_list_prepend (priv->comp, obj_data->full_object);
break;
}
*old_components = g_slist_prepend (*old_components, e_cal_component_clone (recurrence));
/* remove the component from our data */
- icalcomponent_remove_component (priv->icalcomp,
- e_cal_component_get_icalcomponent (recurrence));
+ icalcomponent_remove_component (
+ priv->icalcomp,
+ e_cal_component_get_icalcomponent (recurrence));
priv->comp = g_list_remove (priv->comp, recurrence);
obj_data->recurrences_list = g_list_remove (obj_data->recurrences_list, recurrence);
g_hash_table_remove (obj_data->recurrences, rid);
}
/* add the detached instance */
- g_hash_table_insert (obj_data->recurrences,
- g_strdup (rid),
- comp);
- icalcomponent_add_component (priv->icalcomp,
- e_cal_component_get_icalcomponent (comp));
+ g_hash_table_insert (
+ obj_data->recurrences,
+ g_strdup (rid),
+ comp);
+ icalcomponent_add_component (
+ priv->icalcomp,
+ e_cal_component_get_icalcomponent (comp));
priv->comp = g_list_append (priv->comp, comp);
obj_data->recurrences_list = g_list_append (obj_data->recurrences_list, comp);
break;
/* remove the component from our data, temporarily */
if (obj_data->full_object) {
- icalcomponent_remove_component (priv->icalcomp,
- e_cal_component_get_icalcomponent (obj_data->full_object));
+ icalcomponent_remove_component (
+ priv->icalcomp,
+ e_cal_component_get_icalcomponent (obj_data->full_object));
priv->comp = g_list_remove (priv->comp, obj_data->full_object);
}
*old_components = g_slist_prepend (*old_components, e_cal_component_clone (recurrence));
/* remove the component from our data */
- icalcomponent_remove_component (priv->icalcomp,
- e_cal_component_get_icalcomponent (recurrence));
+ icalcomponent_remove_component (
+ priv->icalcomp,
+ e_cal_component_get_icalcomponent (recurrence));
priv->comp = g_list_remove (priv->comp, recurrence);
obj_data->recurrences_list = g_list_remove (obj_data->recurrences_list, recurrence);
g_hash_table_remove (obj_data->recurrences, rid);
* so that it's always before any detached instance we
* might have */
if (obj_data->full_object) {
- icalcomponent_add_component (priv->icalcomp,
- e_cal_component_get_icalcomponent (obj_data->full_object));
+ icalcomponent_add_component (
+ priv->icalcomp,
+ e_cal_component_get_icalcomponent (obj_data->full_object));
priv->comp = g_list_prepend (priv->comp, obj_data->full_object);
}
/* add the new detached recurrence */
- g_hash_table_insert (obj_data->recurrences,
- g_strdup (rid),
- comp);
- icalcomponent_add_component (priv->icalcomp,
- e_cal_component_get_icalcomponent (comp));
+ g_hash_table_insert (
+ obj_data->recurrences,
+ g_strdup (rid),
+ comp);
+ icalcomponent_add_component (
+ priv->icalcomp,
+ e_cal_component_get_icalcomponent (comp));
priv->comp = g_list_append (priv->comp, comp);
obj_data->recurrences_list = g_list_append (obj_data->recurrences_list, comp);
break;
}
/* remove the component from our data */
- icalcomponent_remove_component (cbfile->priv->icalcomp,
- e_cal_component_get_icalcomponent (comp));
+ icalcomponent_remove_component (
+ cbfile->priv->icalcomp,
+ e_cal_component_get_icalcomponent (comp));
cbfile->priv->comp = g_list_remove (cbfile->priv->comp, comp);
obj_data->recurrences_list = g_list_remove (obj_data->recurrences_list, comp);
g_hash_table_remove (obj_data->recurrences, rid);
return obj_data;
/* remove the main component from our data before modifying it */
- icalcomponent_remove_component (cbfile->priv->icalcomp,
- e_cal_component_get_icalcomponent (obj_data->full_object));
+ icalcomponent_remove_component (
+ cbfile->priv->icalcomp,
+ e_cal_component_get_icalcomponent (obj_data->full_object));
cbfile->priv->comp = g_list_remove (cbfile->priv->comp, obj_data->full_object);
/* add EXDATE or EXRULE to parent, report as update */
*old_comp = e_cal_component_clone (obj_data->full_object);
}
- e_cal_util_remove_instances (e_cal_component_get_icalcomponent (obj_data->full_object),
- icaltime_from_string (rid), CALOBJ_MOD_THIS);
+ e_cal_util_remove_instances (
+ e_cal_component_get_icalcomponent (obj_data->full_object),
+ icaltime_from_string (rid), CALOBJ_MOD_THIS);
/* Since we are only removing one instance of recurrence
* event, update the last modified time on the component */
/* add the modified object to the beginning of the list,
* so that it's always before any detached instance we
* might have */
- icalcomponent_add_component (cbfile->priv->icalcomp,
- e_cal_component_get_icalcomponent (obj_data->full_object));
+ icalcomponent_add_component (
+ cbfile->priv->icalcomp,
+ e_cal_component_get_icalcomponent (obj_data->full_object));
cbfile->priv->comp = g_list_prepend (cbfile->priv->comp, obj_data->full_object);
} else {
if (!obj_data->full_object) {
g_message (G_STRLOC " Could not remove component from interval tree!");
return obj_data;
}
- icalcomponent_remove_component (cbfile->priv->icalcomp,
- e_cal_component_get_icalcomponent (obj_data->full_object));
+ icalcomponent_remove_component (
+ cbfile->priv->icalcomp,
+ e_cal_component_get_icalcomponent (obj_data->full_object));
cbfile->priv->comp = g_list_remove (cbfile->priv->comp, obj_data->full_object);
/* remove parent, report as removal */
ECalComponent *old_component = NULL;
ECalComponent *new_component = NULL;
- obj_data = remove_instance (cbfile, obj_data, id->uid, recur_id, mod,
- &old_component, &new_component, error);
+ obj_data = remove_instance (
+ cbfile, obj_data, id->uid, recur_id, mod,
+ &old_component, &new_component, error);
*old_components = g_slist_prepend (*old_components, old_component);
*new_components = g_slist_prepend (*new_components, new_component);
*old_components = g_slist_prepend (*old_components, e_cal_component_clone (comp));
/* remove the component from our data, temporarily */
- icalcomponent_remove_component (priv->icalcomp,
- e_cal_component_get_icalcomponent (comp));
+ icalcomponent_remove_component (
+ priv->icalcomp,
+ e_cal_component_get_icalcomponent (comp));
priv->comp = g_list_remove (priv->comp, comp);
- e_cal_util_remove_instances (e_cal_component_get_icalcomponent (comp),
- icaltime_from_string (recur_id), mod);
+ e_cal_util_remove_instances (
+ e_cal_component_get_icalcomponent (comp),
+ icaltime_from_string (recur_id), mod);
} else {
*old_components = g_slist_prepend (*old_components, NULL);
}
/* And remove it */
rid = e_cal_component_get_recurid_as_string (comp);
if (rid && *rid) {
- obj_data = remove_instance (cbfile, obj_data, uid, rid, CALOBJ_MOD_THIS,
- old_comp, new_comp, NULL);
+ obj_data = remove_instance (
+ cbfile, obj_data, uid, rid, CALOBJ_MOD_THIS,
+ old_comp, new_comp, NULL);
if (obj_data && obj_data->full_object && !*new_comp) {
*new_comp = e_cal_component_clone (obj_data->full_object);
}
mapped_file = g_mapped_file_new (sfname, FALSE, &error);
if (!mapped_file) {
- g_message ("DEBUG: could not map %s: %s\n",
- sfname, error ? error->message : "???");
+ g_message (
+ "DEBUG: could not map %s: %s\n",
+ sfname, error ? error->message : "???");
g_error_free (error);
g_free (sfname);
continue;
fd = g_open (dest_file, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0600);
if (fd == -1) {
/* TODO handle error conditions */
- g_message ("DEBUG: could not open %s for writing\n",
- dest_file);
+ g_message (
+ "DEBUG: could not open %s for writing\n",
+ dest_file);
} else if (write (fd, g_mapped_file_get_contents (mapped_file),
g_mapped_file_get_length (mapped_file)) == -1) {
/* TODO handle error condition */
if (rid) {
ECalComponent *ignore_comp = NULL;
- remove_instance (cbfile, obj_data, uid, rid, CALOBJ_MOD_THIS,
- &old_component, &ignore_comp, NULL);
+ remove_instance (
+ cbfile, obj_data, uid, rid, CALOBJ_MOD_THIS,
+ &old_component, &ignore_comp, NULL);
if (ignore_comp)
g_object_unref (ignore_comp);
time_t time_start, time_end;
printf ("%s IS MISSING\n", uid);
- e_cal_util_get_component_occur_times (comp, &time_start, &time_end,
- resolve_tzid, cbfile->priv->icalcomp,
- icaltimezone_get_utc_timezone (),
- e_cal_backend_get_kind (E_CAL_BACKEND (cbfile)));
+ e_cal_util_get_component_occur_times (
+ comp, &time_start, &time_end,
+ resolve_tzid, cbfile->priv->icalcomp,
+ icaltimezone_get_utc_timezone (),
+ e_cal_backend_get_kind (E_CAL_BACKEND (cbfile)));
d (printf ("start %s\n", asctime (gmtime (&time_start))));
d (printf ("end %s\n", asctime (gmtime (&time_end))));
return FALSE;
}
- e_cal_util_get_component_occur_times (comp, &time_start, &time_end,
- resolve_tzid, cb, icaltimezone_get_utc_timezone (),
- e_cal_backend_get_kind (E_CAL_BACKEND (cb)));
+ e_cal_util_get_component_occur_times (
+ comp, &time_start, &time_end,
+ resolve_tzid, cb, icaltimezone_get_utc_timezone (),
+ e_cal_backend_get_kind (E_CAL_BACKEND (cb)));
e_cal_backend_store_put_component_with_time_range (priv->store, comp, time_start, time_end);
_("Could not create cache file")));
e_cal_backend_notify_opened (
E_CAL_BACKEND (backend),
- EDC_ERROR_EX (OtherError,
+ EDC_ERROR_EX (
+ OtherError,
_("Could not create cache file")));
return;
}
cbsexp = e_cal_backend_sexp_new (sexp);
*objects = NULL;
- prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (cbsexp,
- &occur_start,
- &occur_end);
+ prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (
+ cbsexp,
+ &occur_start,
+ &occur_end);
components = prunning_by_time ?
e_cal_backend_store_get_components_occuring_in_range (priv->store, occur_start, occur_end)
/* process all components in the cache */
objects = NULL;
- prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (cbsexp,
- &occur_start,
- &occur_end);
+ prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (
+ cbsexp,
+ &occur_start,
+ &occur_end);
components = prunning_by_time ?
e_cal_backend_store_get_components_occuring_in_range (priv->store, occur_start, occur_end)
/* add all objects in the given interval */
iso_start = isodate_from_time_t (start);
iso_end = isodate_from_time_t (end);
- query = g_strdup_printf ("occur-in-time-range? (make-time \"%s\") (make-time \"%s\")",
- iso_start, iso_end);
+ query = g_strdup_printf (
+ "occur-in-time-range? (make-time \"%s\") (make-time \"%s\")",
+ iso_start, iso_end);
obj_sexp = e_cal_backend_sexp_new (query);
g_free (query);
g_free (iso_start);
continue;
/* If the event is TRANSPARENT, skip it. */
- prop = icalcomponent_get_first_property (icalcomp,
- ICAL_TRANSP_PROPERTY);
+ prop = icalcomponent_get_first_property (
+ icalcomp,
+ ICAL_TRANSP_PROPERTY);
if (prop) {
icalproperty_transp transp_val = icalproperty_get_transp (prop);
if (transp_val == ICAL_TRANSP_TRANSPARENT ||
vcalendar_comp = icalcomponent_get_parent (icalcomp);
if (!vcalendar_comp)
vcalendar_comp = icalcomp;
- e_cal_recur_generate_instances (comp, start, end,
- free_busy_instance,
- vfb,
- resolve_tzid,
- vcalendar_comp,
- icaltimezone_get_utc_timezone ());
+ e_cal_recur_generate_instances (
+ comp, start, end,
+ free_busy_instance,
+ vfb,
+ resolve_tzid,
+ vcalendar_comp,
+ icaltimezone_get_utc_timezone ());
}
g_object_unref (obj_sexp);
priv = cb->priv;
- e_cal_util_get_component_occur_times (comp, &time_start, &time_end,
- resolve_tzid, cb, icaltimezone_get_utc_timezone (),
- e_cal_backend_get_kind (E_CAL_BACKEND (cb)));
+ e_cal_util_get_component_occur_times (
+ comp, &time_start, &time_end,
+ resolve_tzid, cb, icaltimezone_get_utc_timezone (),
+ e_cal_backend_get_kind (E_CAL_BACKEND (cb)));
e_cal_backend_store_put_component_with_time_range (priv->store, comp, time_start, time_end);
}
}
*objects = NULL;
- prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (sexp,
- &occur_start,
- &occur_end);
+ prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (
+ sexp,
+ &occur_start,
+ &occur_end);
components = prunning_by_time ?
e_cal_backend_store_get_components_occuring_in_range (priv->store, occur_start, occur_end)
*/
tzidprop = strstr (buffer, fulltzid);
if (tzidprop) {
- memmove (tzidprop + baselen,
- tzidprop + fulllen,
- strlen (tzidprop + fulllen) + 1);
+ memmove (
+ tzidprop + baselen,
+ tzidprop + fulllen,
+ strlen (tzidprop + fulllen) + 1);
}
g_free (fulltzid);
}
g_type_class_add_private (class, sizeof (ECalClientViewPrivate));
- g_object_class_install_property (object_class, PROP_VIEW,
- g_param_spec_pointer ("view", "The GDBus view proxy", NULL,
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_class_install_property (object_class, PROP_CLIENT,
- g_param_spec_object ("client", "The e-cal-client for the view", NULL, E_TYPE_CAL_CLIENT,
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- /**
- * ECalClientView::objects-added:
- * @view:: self
- * @objects: (type GSList) (transfer none) (element-type long):
- */
- signals[OBJECTS_ADDED] =
- g_signal_new ("objects-added",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalClientViewClass, objects_added),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
- /**
- * ECalClientView::objects-modified:
- * @view:: self
- * @objects: (type GSList) (transfer none) (element-type long):
- */
- signals[OBJECTS_MODIFIED] =
- g_signal_new ("objects-modified",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalClientViewClass, objects_modified),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
- /**
- * ECalClientView::objects-removed:
- * @view:: self
- * @objects: (type GSList) (transfer none) (element-type ECalComponentId):
- */
- signals[OBJECTS_REMOVED] =
- g_signal_new ("objects-removed",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalClientViewClass, objects_removed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- signals[PROGRESS] =
- g_signal_new ("progress",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalClientViewClass, progress),
- NULL, NULL,
- e_gdbus_marshallers_VOID__UINT_STRING,
- G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
-
- signals[COMPLETE] =
- g_signal_new ("complete",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalClientViewClass, complete),
- NULL, NULL,
- g_cclosure_marshal_VOID__BOXED,
- G_TYPE_NONE, 1, G_TYPE_ERROR);
+ g_object_class_install_property (
+ object_class,
+ PROP_VIEW,
+ g_param_spec_pointer (
+ "view",
+ "The GDBus view proxy",
+ NULL,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_CLIENT,
+ g_param_spec_object (
+ "client",
+ "The e-cal-client for the view",
+ NULL,
+ E_TYPE_CAL_CLIENT,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
+
+ /**
+ * ECalClientView::objects-added:
+ * @view:: self
+ * @objects: (type GSList) (transfer none) (element-type long):
+ */
+ signals[OBJECTS_ADDED] = g_signal_new (
+ "objects-added",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalClientViewClass, objects_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ /**
+ * ECalClientView::objects-modified:
+ * @view:: self
+ * @objects: (type GSList) (transfer none) (element-type long):
+ */
+ signals[OBJECTS_MODIFIED] = g_signal_new (
+ "objects-modified",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalClientViewClass, objects_modified),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ /**
+ * ECalClientView::objects-removed:
+ * @view:: self
+ * @objects: (type GSList) (transfer none) (element-type ECalComponentId):
+ */
+ signals[OBJECTS_REMOVED] = g_signal_new (
+ "objects-removed",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalClientViewClass, objects_removed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ signals[PROGRESS] = g_signal_new (
+ "progress",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalClientViewClass, progress),
+ NULL, NULL,
+ e_gdbus_marshallers_VOID__UINT_STRING,
+ G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
+
+ signals[COMPLETE] = g_signal_new (
+ "complete",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalClientViewClass, complete),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOXED,
+ G_TYPE_NONE, 1, G_TYPE_ERROR);
}
/**
{
ECalClientView *view;
- view = g_object_new (E_TYPE_CAL_CLIENT_VIEW,
+ view = g_object_new (
+ E_TYPE_CAL_CLIENT_VIEW,
"client", client,
"view", gdbus_calview,
NULL);
if (prop_value) {
e_client_finish_async_without_dbus (client, cancellable, callback, user_data, cal_client_get_backend_property_from_cache_finish, prop_value, g_free);
} else {
- e_client_proxy_call_string_with_res_op_data (client, prop_name, cancellable, callback, user_data, cal_client_get_backend_property, prop_name,
+ e_client_proxy_call_string_with_res_op_data (
+ client, prop_name, cancellable, callback, user_data, cal_client_get_backend_property, prop_name,
e_gdbus_cal_call_get_backend_property,
NULL, NULL, e_gdbus_cal_call_get_backend_property_finish, NULL, NULL);
}
prop_name_value = e_gdbus_cal_encode_set_backend_property (prop_name, prop_value);
- e_client_proxy_call_strv (client, (const gchar * const *) prop_name_value, cancellable, callback, user_data, cal_client_set_backend_property,
- e_gdbus_cal_call_set_backend_property,
- e_gdbus_cal_call_set_backend_property_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ client, (const gchar * const *) prop_name_value, cancellable, callback, user_data, cal_client_set_backend_property,
+ e_gdbus_cal_call_set_backend_property,
+ e_gdbus_cal_call_set_backend_property_finish, NULL, NULL, NULL, NULL);
g_strfreev (prop_name_value);
}
GAsyncReadyCallback callback,
gpointer user_data)
{
- e_client_proxy_call_boolean (client, only_if_exists, cancellable, callback, user_data, cal_client_open,
- e_gdbus_cal_call_open,
- e_gdbus_cal_call_open_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_boolean (
+ client, only_if_exists, cancellable, callback, user_data, cal_client_open,
+ e_gdbus_cal_call_open,
+ e_gdbus_cal_call_open_finish, NULL, NULL, NULL, NULL);
}
static gboolean
GAsyncReadyCallback callback,
gpointer user_data)
{
- e_client_proxy_call_void (client, cancellable, callback, user_data, cal_client_refresh,
- e_gdbus_cal_call_refresh,
- e_gdbus_cal_call_refresh_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_void (
+ client, cancellable, callback, user_data, cal_client_refresh,
+ e_gdbus_cal_call_refresh,
+ e_gdbus_cal_call_refresh_finish, NULL, NULL, NULL, NULL);
}
static gboolean
* recurrency ids. Real problem might be elsewhere,
* but anything is better than crashing...
*/
- g_log (G_LOG_DOMAIN,
- G_LOG_LEVEL_CRITICAL,
- "UID %s: instance RECURRENCE-ID %s + detached instance RECURRENCE-ID %s: cannot compare",
- uid,
- i_rid,
- d_rid);
+ g_log (
+ G_LOG_DOMAIN,
+ G_LOG_LEVEL_CRITICAL,
+ "UID %s: instance RECURRENCE-ID %s + detached instance RECURRENCE-ID %s: cannot compare",
+ uid,
+ i_rid,
+ d_rid);
e_cal_component_free_datetime (&instance_recur_id.datetime);
g_free (i_rid);
g_free (d_rid);
continue;
}
- cmp = icaltime_compare (*instance_recur_id.datetime.value,
- *recur_id.datetime.value);
+ cmp = icaltime_compare (
+ *instance_recur_id.datetime.value,
+ *recur_id.datetime.value);
if ((recur_id.type == E_CAL_COMPONENT_RANGE_THISPRIOR && cmp <= 0) ||
- (recur_id.type == E_CAL_COMPONENT_RANGE_THISFUTURE && cmp >= 0)) {
+ (recur_id.type == E_CAL_COMPONENT_RANGE_THISFUTURE && cmp >= 0)) {
ECalComponent *comp;
comp = e_cal_component_new ();
instances_hold->start_zone = start_zone;
instances_hold->end_zone = end_zone;
- e_cal_recur_generate_instances (comp, start, end, add_instance, instances_hold,
- e_cal_client_resolve_tzid_cb, client,
- default_zone);
+ e_cal_recur_generate_instances (
+ comp, start, end, add_instance, instances_hold,
+ e_cal_client_resolve_tzid_cb, client,
+ default_zone);
g_free (instances_hold);
}
return NULL;
}
- query = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\") (make-time \"%s\"))",
- iso_start, iso_end);
+ query = g_strdup_printf (
+ "(occur-in-time-range? (make-time \"%s\") (make-time \"%s\"))",
+ iso_start, iso_end);
g_free (iso_start);
g_free (iso_end);
if (!e_cal_client_get_object_list_as_comps_sync (client, query, &objects, NULL, NULL)) {
/* Create the start of a VCALENDAR, to add the VTIMEZONES to,
* and remember its length so we know if any VTIMEZONEs get added. */
vcal_string = g_string_new (NULL);
- g_string_append (vcal_string,
- "BEGIN:VCALENDAR\n"
- "PRODID:-//Ximian//NONSGML Evolution Calendar//EN\n"
- "VERSION:2.0\n"
- "METHOD:PUBLISH\n");
+ g_string_append (
+ vcal_string,
+ "BEGIN:VCALENDAR\n"
+ "PRODID:-//Ximian//NONSGML Evolution Calendar//EN\n"
+ "VERSION:2.0\n"
+ "METHOD:PUBLISH\n");
/* Now concatenate all the timezone strings. This also frees the
* timezone strings as it goes. */
if (prop_value) {
e_client_finish_async_without_dbus (base_client, cancellable, callback, user_data, cal_client_get_default_object_from_cache_finish, prop_value, g_free);
} else {
- e_client_proxy_call_string (base_client, CAL_BACKEND_PROPERTY_DEFAULT_OBJECT, cancellable, callback, user_data, e_cal_client_get_default_object,
+ e_client_proxy_call_string (
+ base_client, CAL_BACKEND_PROPERTY_DEFAULT_OBJECT, cancellable, callback, user_data, e_cal_client_get_default_object,
e_gdbus_cal_call_get_backend_property,
NULL, NULL, e_gdbus_cal_call_get_backend_property_finish, NULL, NULL);
}
strv = e_gdbus_cal_encode_get_object (uid, rid);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_get_object,
- e_gdbus_cal_call_get_object,
- NULL, NULL, e_gdbus_cal_call_get_object_finish, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_get_object,
+ e_gdbus_cal_call_get_object,
+ NULL, NULL, e_gdbus_cal_call_get_object_finish, NULL, NULL);
g_strfreev (strv);
}
strv = e_gdbus_cal_encode_get_object (uid, "");
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_get_objects_for_uid,
- e_gdbus_cal_call_get_object,
- NULL, NULL, e_gdbus_cal_call_get_object_finish, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_get_objects_for_uid,
+ e_gdbus_cal_call_get_object,
+ NULL, NULL, e_gdbus_cal_call_get_object_finish, NULL, NULL);
g_strfreev (strv);
}
g_return_if_fail (sexp != NULL);
- e_client_proxy_call_string (E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), cancellable, callback, user_data, e_cal_client_get_object_list,
- e_gdbus_cal_call_get_object_list,
- NULL, NULL, NULL, e_gdbus_cal_call_get_object_list_finish, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), cancellable, callback, user_data, e_cal_client_get_object_list,
+ e_gdbus_cal_call_get_object_list,
+ NULL, NULL, NULL, e_gdbus_cal_call_get_object_list_finish, NULL);
g_free (gdbus_sexp);
}
g_return_if_fail (sexp != NULL);
- e_client_proxy_call_string (E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), cancellable, callback, user_data, e_cal_client_get_object_list_as_comps,
- e_gdbus_cal_call_get_object_list,
- NULL, NULL, NULL, e_gdbus_cal_call_get_object_list_finish, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), cancellable, callback, user_data, e_cal_client_get_object_list_as_comps,
+ e_gdbus_cal_call_get_object_list,
+ NULL, NULL, NULL, e_gdbus_cal_call_get_object_list_finish, NULL);
g_free (gdbus_sexp);
}
strv = e_gdbus_cal_encode_get_free_busy (start, end, users);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_get_free_busy,
- e_gdbus_cal_call_get_free_busy,
- e_gdbus_cal_call_get_free_busy_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_get_free_busy,
+ e_gdbus_cal_call_get_free_busy,
+ e_gdbus_cal_call_get_free_busy_finish, NULL, NULL, NULL, NULL);
g_strfreev (strv);
}
g_return_if_fail (strv[0] != NULL);
- e_client_proxy_call_strv (E_CLIENT (client), strv, cancellable, callback, user_data, e_cal_client_create_object,
- e_gdbus_cal_call_create_objects,
- NULL, NULL, NULL, e_gdbus_cal_call_create_objects_finish, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), strv, cancellable, callback, user_data, e_cal_client_create_object,
+ e_gdbus_cal_call_create_objects,
+ NULL, NULL, NULL, e_gdbus_cal_call_create_objects_finish, NULL);
g_free (comp_str);
g_free (gdbus_comp);
array = icalcomponent_slist_to_utf8_icomp_array (icalcomps);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) array, cancellable, callback, user_data, e_cal_client_create_objects,
- e_gdbus_cal_call_create_objects,
- NULL, NULL, NULL, e_gdbus_cal_call_create_objects_finish, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), (const gchar * const *) array, cancellable, callback, user_data, e_cal_client_create_objects,
+ e_gdbus_cal_call_create_objects,
+ NULL, NULL, NULL, e_gdbus_cal_call_create_objects_finish, NULL);
g_strfreev (array);
}
comp_strings.data = comp_str;
strv = e_gdbus_cal_encode_modify_objects (&comp_strings, mod);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_modify_object,
- e_gdbus_cal_call_modify_objects,
- e_gdbus_cal_call_modify_objects_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_modify_object,
+ e_gdbus_cal_call_modify_objects,
+ e_gdbus_cal_call_modify_objects_finish, NULL, NULL, NULL, NULL);
g_strfreev (strv);
g_free (comp_str);
comp_strings = icalcomponent_slist_to_string_slist (comps);
strv = e_gdbus_cal_encode_modify_objects (comp_strings, mod);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_modify_objects,
- e_gdbus_cal_call_modify_objects,
- e_gdbus_cal_call_modify_objects_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_modify_objects,
+ e_gdbus_cal_call_modify_objects,
+ e_gdbus_cal_call_modify_objects_finish, NULL, NULL, NULL, NULL);
g_strfreev (strv);
e_client_util_free_string_slist (comp_strings);
ids.data = &id;
strv = e_gdbus_cal_encode_remove_objects (&ids, mod);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_remove_object,
- e_gdbus_cal_call_remove_objects,
- e_gdbus_cal_call_remove_objects_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_remove_object,
+ e_gdbus_cal_call_remove_objects,
+ e_gdbus_cal_call_remove_objects_finish, NULL, NULL, NULL, NULL);
g_strfreev (strv);
}
strv = e_gdbus_cal_encode_remove_objects (ids, mod);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_remove_objects,
- e_gdbus_cal_call_remove_objects,
- e_gdbus_cal_call_remove_objects_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_remove_objects,
+ e_gdbus_cal_call_remove_objects,
+ e_gdbus_cal_call_remove_objects_finish, NULL, NULL, NULL, NULL);
g_strfreev (strv);
}
comp_str = icalcomponent_as_ical_string_r (icalcomp);
- e_client_proxy_call_string (E_CLIENT (client), e_util_ensure_gdbus_string (comp_str, &gdbus_comp), cancellable, callback, user_data, e_cal_client_receive_objects,
- e_gdbus_cal_call_receive_objects,
- e_gdbus_cal_call_receive_objects_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client), e_util_ensure_gdbus_string (comp_str, &gdbus_comp), cancellable, callback, user_data, e_cal_client_receive_objects,
+ e_gdbus_cal_call_receive_objects,
+ e_gdbus_cal_call_receive_objects_finish, NULL, NULL, NULL, NULL);
g_free (comp_str);
g_free (gdbus_comp);
comp_str = icalcomponent_as_ical_string_r (icalcomp);
- e_client_proxy_call_string (E_CLIENT (client), e_util_ensure_gdbus_string (comp_str, &gdbus_comp), cancellable, callback, user_data, e_cal_client_send_objects,
- e_gdbus_cal_call_send_objects,
- NULL, NULL, NULL, e_gdbus_cal_call_send_objects_finish, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client), e_util_ensure_gdbus_string (comp_str, &gdbus_comp), cancellable, callback, user_data, e_cal_client_send_objects,
+ e_gdbus_cal_call_send_objects,
+ NULL, NULL, NULL, e_gdbus_cal_call_send_objects_finish, NULL);
g_free (comp_str);
g_free (gdbus_comp);
strv = e_gdbus_cal_encode_get_attachment_uris (uid, rid);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_get_attachment_uris,
- e_gdbus_cal_call_get_attachment_uris,
- NULL, NULL, NULL, e_gdbus_cal_call_get_attachment_uris_finish, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_get_attachment_uris,
+ e_gdbus_cal_call_get_attachment_uris,
+ NULL, NULL, NULL, e_gdbus_cal_call_get_attachment_uris_finish, NULL);
g_strfreev (strv);
}
strv = e_gdbus_cal_encode_discard_alarm (uid, rid, auid);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_discard_alarm,
- e_gdbus_cal_call_discard_alarm,
- e_gdbus_cal_call_discard_alarm_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_cal_client_discard_alarm,
+ e_gdbus_cal_call_discard_alarm,
+ e_gdbus_cal_call_discard_alarm_finish, NULL, NULL, NULL, NULL);
g_strfreev (strv);
}
g_return_if_fail (sexp != NULL);
- e_client_proxy_call_string (E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), cancellable, callback, user_data, e_cal_client_get_view,
- e_gdbus_cal_call_get_view,
- NULL, NULL, e_gdbus_cal_call_get_view_finish, NULL, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), cancellable, callback, user_data, e_cal_client_get_view,
+ e_gdbus_cal_call_get_view,
+ NULL, NULL, e_gdbus_cal_call_get_view_finish, NULL, NULL);
g_free (gdbus_sexp);
}
EGdbusCalView *gdbus_calview;
GError *local_error = NULL;
- gdbus_calview = e_gdbus_cal_view_proxy_new_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (cal_factory)),
- G_DBUS_PROXY_FLAGS_NONE,
- CALENDAR_DBUS_SERVICE_NAME,
- view_path,
- NULL,
- &local_error);
+ gdbus_calview = e_gdbus_cal_view_proxy_new_sync (
+ g_dbus_proxy_get_connection (G_DBUS_PROXY (cal_factory)),
+ G_DBUS_PROXY_FLAGS_NONE,
+ CALENDAR_DBUS_SERVICE_NAME,
+ view_path,
+ NULL,
+ &local_error);
if (gdbus_calview) {
*view = _e_cal_client_view_new (client, gdbus_calview);
if (zone) {
e_client_finish_async_without_dbus (E_CLIENT (client), cancellable, callback, user_data, cal_client_get_timezone_from_cache, zone, NULL);
} else {
- e_client_proxy_call_string (E_CLIENT (client), e_util_ensure_gdbus_string (tzid, &gdbus_tzid), cancellable, callback, user_data, e_cal_client_get_timezone,
- e_gdbus_cal_call_get_timezone,
- NULL, NULL, e_gdbus_cal_call_get_timezone_finish, NULL, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client), e_util_ensure_gdbus_string (tzid, &gdbus_tzid), cancellable, callback, user_data, e_cal_client_get_timezone,
+ e_gdbus_cal_call_get_timezone,
+ NULL, NULL, e_gdbus_cal_call_get_timezone_finish, NULL, NULL);
g_free (gdbus_tzid);
}
zone_str = icalcomponent_as_ical_string_r (icalcomp);
- e_client_proxy_call_string (E_CLIENT (client), e_util_ensure_gdbus_string (zone_str, &gdbus_zone), cancellable, callback, user_data, e_cal_client_add_timezone,
- e_gdbus_cal_call_add_timezone,
- e_gdbus_cal_call_add_timezone_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client), e_util_ensure_gdbus_string (zone_str, &gdbus_zone), cancellable, callback, user_data, e_cal_client_add_timezone,
+ e_gdbus_cal_call_add_timezone,
+ e_gdbus_cal_call_add_timezone_finish, NULL, NULL, NULL, NULL);
g_free (zone_str);
g_free (gdbus_zone);
}
iso = isodate_from_time_t (t);
- ret = g_strdup_printf ("%s-%d-%d-%d-%d@%s",
- iso,
- getpid (),
- getgid (),
- getppid (),
- serial++,
- hostname);
+ ret = g_strdup_printf (
+ "%s-%d-%d-%d-%d@%s",
+ iso,
+ getpid (),
+ getgid (),
+ getppid (),
+ serial++,
+ hostname);
g_free (iso);
return ret;
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
- set_icaltimetype (comp, &priv->completed,
- icalproperty_new_completed,
- icalproperty_set_completed,
- t);
+ set_icaltimetype (
+ comp, &priv->completed,
+ icalproperty_new_completed,
+ icalproperty_set_completed,
+ t);
}
/**
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
- set_icaltimetype (comp, &priv->created,
- icalproperty_new_created,
- icalproperty_set_created,
- t);
+ set_icaltimetype (
+ comp, &priv->created,
+ icalproperty_new_created,
+ icalproperty_set_created,
+ t);
}
/**
}
/* Add on the DURATION. */
- icaltime_adjust (dt->value, duration.days, duration.hours,
- duration.minutes, duration.seconds);
+ icaltime_adjust (
+ dt->value, duration.days, duration.hours,
+ duration.minutes, duration.seconds);
}
/**
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
- set_datetime (comp, &priv->dtend,
- icalproperty_new_dtend,
- icalproperty_set_dtend,
- dt);
+ set_datetime (
+ comp, &priv->dtend,
+ icalproperty_new_dtend,
+ icalproperty_set_dtend,
+ dt);
/* Make sure we remove any existing DURATION property, as it can't be
* used with a DTEND. If DTEND is set to NULL, i.e. removed, we also
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
- set_datetime (comp, &priv->dtstart,
- icalproperty_new_dtstart,
- icalproperty_set_dtstart,
- dt);
+ set_datetime (
+ comp, &priv->dtstart,
+ icalproperty_new_dtstart,
+ icalproperty_set_dtstart,
+ dt);
priv->need_sequence_inc = TRUE;
}
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
- set_datetime (comp, &priv->due,
- icalproperty_new_due,
- icalproperty_set_due,
- dt);
+ set_datetime (
+ comp, &priv->due,
+ icalproperty_new_due,
+ icalproperty_set_due,
+ dt);
/* Make sure we remove any existing DURATION property, as it can't be
* used with a DTEND. If DTEND is set to NULL, i.e. removed, we also
else
p->type = E_CAL_COMPONENT_PERIOD_DURATION;
} else {
- g_message ("get_period_list(): Unknown value for period %d; "
- "using DATETIME", value_type);
+ g_message (
+ "get_period_list(): Unknown value for period %d; "
+ "using DATETIME", value_type);
p->type = E_CAL_COMPONENT_PERIOD_DATETIME;
}
} else
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
- set_icaltimetype (comp, &priv->last_modified,
- icalproperty_new_lastmodified,
- icalproperty_set_lastmodified,
- t);
+ set_icaltimetype (
+ comp, &priv->last_modified,
+ icalproperty_new_lastmodified,
+ icalproperty_set_lastmodified,
+ t);
}
/**
g_return_if_fail (priv->organizer.prop != NULL);
if (priv->organizer.sentby_param)
- icalparameter_set_sentby (priv->organizer.sentby_param,
- (gchar *) organizer->sentby);
+ icalparameter_set_sentby (
+ priv->organizer.sentby_param,
+ (gchar *) organizer->sentby);
else {
priv->organizer.sentby_param = icalparameter_new_sentby (
(gchar *) organizer->sentby);
- icalproperty_add_parameter (priv->organizer.prop,
- priv->organizer.sentby_param);
+ icalproperty_add_parameter (
+ priv->organizer.prop,
+ priv->organizer.sentby_param);
}
} else if (priv->organizer.sentby_param) {
icalproperty_remove_parameter (priv->organizer.prop, ICAL_SENTBY_PARAMETER);
g_return_if_fail (priv->organizer.prop != NULL);
if (priv->organizer.cn_param)
- icalparameter_set_cn (priv->organizer.cn_param,
- (gchar *) organizer->cn);
+ icalparameter_set_cn (
+ priv->organizer.cn_param,
+ (gchar *) organizer->cn);
else {
priv->organizer.cn_param = icalparameter_new_cn (
(gchar *) organizer->cn);
- icalproperty_add_parameter (priv->organizer.prop,
- priv->organizer.cn_param);
+ icalproperty_add_parameter (
+ priv->organizer.prop,
+ priv->organizer.cn_param);
}
} else if (priv->organizer.cn_param) {
icalproperty_remove_parameter (priv->organizer.prop, ICAL_CN_PARAMETER);
g_return_if_fail (priv->organizer.prop != NULL);
if (priv->organizer.language_param)
- icalparameter_set_language (priv->organizer.language_param,
- (gchar *) organizer->language);
+ icalparameter_set_language (
+ priv->organizer.language_param,
+ (gchar *) organizer->language);
else {
priv->organizer.language_param = icalparameter_new_language (
(gchar *) organizer->language);
- icalproperty_add_parameter (priv->organizer.prop,
- priv->organizer.language_param);
+ icalproperty_add_parameter (
+ priv->organizer.prop,
+ priv->organizer.language_param);
}
} else if (priv->organizer.language_param) {
icalproperty_remove_parameter (priv->organizer.prop, ICAL_LANGUAGE_PARAMETER);
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
- get_datetime (&priv->recur_id.recur_time,
- icalproperty_get_recurrenceid,
- &recur_id->datetime);
+ get_datetime (
+ &priv->recur_id.recur_time,
+ icalproperty_get_recurrenceid,
+ &recur_id->datetime);
}
/**
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
- set_datetime (comp, &priv->recur_id.recur_time,
- icalproperty_new_recurrenceid,
- icalproperty_set_recurrenceid,
- recur_id ? &recur_id->datetime : NULL);
+ set_datetime (
+ comp, &priv->recur_id.recur_time,
+ icalproperty_new_recurrenceid,
+ icalproperty_set_recurrenceid,
+ recur_id ? &recur_id->datetime : NULL);
}
/**
g_return_if_fail (priv->summary.prop != NULL);
if (priv->summary.altrep_param)
- icalparameter_set_altrep (priv->summary.altrep_param,
- (gchar *) summary->altrep);
+ icalparameter_set_altrep (
+ priv->summary.altrep_param,
+ (gchar *) summary->altrep);
else {
priv->summary.altrep_param = icalparameter_new_altrep (
(gchar *) summary->altrep);
- icalproperty_add_parameter (priv->summary.prop,
- priv->summary.altrep_param);
+ icalproperty_add_parameter (
+ priv->summary.prop,
+ priv->summary.altrep_param);
}
} else if (priv->summary.altrep_param) {
icalproperty_remove_parameter (priv->summary.prop, ICAL_ALTREP_PARAMETER);
if (description->altrep) {
alarm->description.altrep_param = icalparameter_new_altrep (
(gchar *) description->altrep);
- icalproperty_add_parameter (alarm->description.prop,
- alarm->description.altrep_param);
+ icalproperty_add_parameter (
+ alarm->description.prop,
+ alarm->description.altrep_param);
}
}
break;
default:
- g_message ("e_cal_component_alarm_get_trigger(): Unknown value for trigger "
- "value %d; using RELATIVE", value);
+ g_message (
+ "e_cal_component_alarm_get_trigger(): "
+ "Unknown value for trigger "
+ "value %d; using RELATIVE", value);
relative = TRUE;
break;
g_print (" start: %li - %s", start, ctime (&start));
g_print (" end : %li - %s", end, ctime (&end));
#endif
- e_cal_recur_generate_instances_of_rule (comp, NULL, start, end,
- cb, cb_data, tz_cb, tz_cb_data,
- default_timezone);
+ e_cal_recur_generate_instances_of_rule (
+ comp, NULL, start, end,
+ cb, cb_data, tz_cb, tz_cb_data,
+ default_timezone);
}
/*
e_cal_component_get_dtend (comp, &dtend);
if (!dtstart.value) {
- g_message ("e_cal_recur_generate_instances_of_rule(): bogus "
- "component, does not have DTSTART. Skipping...");
+ g_message (
+ "e_cal_recur_generate_instances_of_rule(): bogus "
+ "component, does not have DTSTART. Skipping...");
goto out;
}
convert_end_date = TRUE;
}
- dtstart_time = icaltime_as_timet_with_zone (*dtstart.value,
- start_zone);
+ dtstart_time = icaltime_as_timet_with_zone (
+ *dtstart.value,
+ start_zone);
if (start == -1)
start = dtstart_time;
* occurrences. We can't just subtract start from end since that may
* be affected by daylight-saving time. So we want a value of days
* + seconds. */
- cal_object_compute_duration (&event_start, &event_end,
- &days, &seconds);
+ cal_object_compute_duration (
+ &event_start, &event_end,
+ &days, &seconds);
/* Take off the duration from interval_start, so we get occurrences
* that start just before the start time but overlap it. But only do
r->freq = ir.freq;
if (G_UNLIKELY (ir.interval < 1)) {
- g_warning ("Invalid interval in rule %s - using 1\n",
+ g_warning (
+ "Invalid interval in rule %s - using 1\n",
icalrecurrencetype_as_string (&ir));
r->interval = 1;
} else {
weekday = e_cal_recur_ical_weekday_to_weekday (day);
- r->byday = g_list_prepend (r->byday,
- GINT_TO_POINTER (weeknum));
- r->byday = g_list_prepend (r->byday,
- GINT_TO_POINTER (weekday));
+ r->byday = g_list_prepend (
+ r->byday,
+ GINT_TO_POINTER (weeknum));
+ r->byday = g_list_prepend (
+ r->byday,
+ GINT_TO_POINTER (weekday));
}
r->byhour = array_to_list (ir.by_hour, G_N_ELEMENTS (ir.by_hour));
weekday = 6;
break;
default:
- g_warning ("e_cal_recur_ical_weekday_to_weekday(): Unknown week day %d",
- day);
+ g_warning (
+ "e_cal_recur_ical_weekday_to_weekday(): Unknown week day %d",
+ day);
weekday = 0;
}
gboolean cb_status = TRUE, rule_finished, finished = TRUE;
#if 0
- g_print ("In generate_instances_for_chunk rrules: %p\n"
- " %i/%i/%i %02i:%02i:%02i - %i/%i/%i %02i:%02i:%02i\n",
- rrules,
- chunk_start->day, chunk_start->month + 1,
- chunk_start->year, chunk_start->hour,
- chunk_start->minute, chunk_start->second,
- chunk_end->day, chunk_end->month + 1,
- chunk_end->year, chunk_end->hour,
- chunk_end->minute, chunk_end->second);
+ g_print (
+ "In generate_instances_for_chunk rrules: %p\n"
+ " %i/%i/%i %02i:%02i:%02i - %i/%i/%i %02i:%02i:%02i\n",
+ rrules,
+ chunk_start->day, chunk_start->month + 1,
+ chunk_start->year, chunk_start->hour,
+ chunk_start->minute, chunk_start->second,
+ chunk_end->day, chunk_end->month + 1,
+ chunk_end->year, chunk_end->hour,
+ chunk_end->minute, chunk_end->second);
#endif
occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
ex_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- rdate_periods = g_array_new (FALSE, FALSE,
- sizeof (CalObjRecurrenceDate));
+ rdate_periods = g_array_new (
+ FALSE, FALSE,
+ sizeof (CalObjRecurrenceDate));
/* The original DTSTART property is included in the occurrence set,
* but not if we are just generating occurrences for a single rule. */
ECalRecurrence *r;
prop = elem->data;
- r = e_cal_recur_from_icalproperty (prop, FALSE, zone,
- convert_end_date);
-
- tmp_occs = cal_obj_expand_recurrence (event_start, zone, r,
- chunk_start,
- chunk_end,
- &rule_finished);
+ r = e_cal_recur_from_icalproperty (
+ prop, FALSE, zone,
+ convert_end_date);
+
+ tmp_occs = cal_obj_expand_recurrence (
+ event_start, zone, r,
+ chunk_start,
+ chunk_end,
+ &rule_finished);
e_cal_recur_free (r);
/* If any of the rules return FALSE for finished, we know we
ECalRecurrence *r;
prop = elem->data;
- r = e_cal_recur_from_icalproperty (prop, FALSE, zone,
- convert_end_date);
-
- tmp_occs = cal_obj_expand_recurrence (event_start, zone, r,
- chunk_start,
- chunk_end,
- &rule_finished);
+ r = e_cal_recur_from_icalproperty (
+ prop, FALSE, zone,
+ convert_end_date);
+
+ tmp_occs = cal_obj_expand_recurrence (
+ event_start, zone, r,
+ chunk_start,
+ chunk_end,
+ &rule_finished);
e_cal_recur_free (r);
g_array_append_vals (ex_occs, tmp_occs->data, tmp_occs->len);
cal_obj_sort_occurrences (occs);
cal_obj_sort_occurrences (ex_occs);
- qsort (rdate_periods->data, rdate_periods->len,
- sizeof (CalObjRecurrenceDate), cal_obj_time_compare_func);
+ qsort (
+ rdate_periods->data, rdate_periods->len,
+ sizeof (CalObjRecurrenceDate), cal_obj_time_compare_func);
/* Create the final array, by removing the exceptions from the
* occurrences, and removing any duplicates. */
* check it is within the bounds of the event & interval. */
occ = &g_array_index (occs, CalObjTime, i);
#if 0
- g_print ("Checking occurrence: %s\n",
- cal_obj_time_to_string (occ));
+ g_print (
+ "Checking occurrence: %s\n",
+ cal_obj_time_to_string (occ));
#endif
start_tt = icaltime_null_time ();
start_tt.year = occ->year;
* as the original occurrence. */
if (!cal_object_get_rdate_end (occ, rdate_periods, zone)) {
cal_obj_time_add_days (occ, duration_days);
- cal_obj_time_add_seconds (occ,
- duration_seconds);
+ cal_obj_time_add_seconds (
+ occ,
+ duration_seconds);
}
} else {
cal_obj_time_add_days (occ, duration_days);
occ->second = tt.second;
occ->flags = FALSE;
} else {
- cal_obj_time_add_days (occ, p->u.duration.weeks * 7
- + p->u.duration.days);
+ cal_obj_time_add_days (
+ occ,
+ p->u.duration.weeks * 7 +
+ p->u.duration.days);
cal_obj_time_add_hours (occ, p->u.duration.hours);
cal_obj_time_add_minutes (occ, p->u.duration.minutes);
cal_obj_time_add_seconds (occ, p->u.duration.seconds);
g_date_clear (&start_date, 1);
g_date_clear (&end_date, 1);
- g_date_set_dmy (&start_date, start->day, start->month + 1,
- start->year);
- g_date_set_dmy (&end_date, end->day, end->month + 1,
- end->year);
+ g_date_set_dmy (
+ &start_date, start->day, start->month + 1, start->year);
+ g_date_set_dmy (
+ &end_date, end->day, end->month + 1, end->year);
*days = g_date_get_julian (&end_date) - g_date_get_julian (&start_date);
start_seconds = start->hour * 3600 + start->minute * 60
/* Compute the event_end, if the recur's enddate is set. */
if (recur->enddate > 0) {
- cal_object_time_from_time (&event_end_cotime,
- recur->enddate, zone);
+ cal_object_time_from_time (
+ &event_end_cotime,
+ recur->enddate, zone);
event_end = &event_end_cotime;
/* If the enddate is before the requested interval return. */
/* Generate the set of occurrences for this period. */
switch (recur->freq) {
case ICAL_YEARLY_RECURRENCE:
- occs = cal_obj_generate_set_yearly (&recur_data,
- vtable, &occ);
+ occs = cal_obj_generate_set_yearly (
+ &recur_data,
+ vtable, &occ);
break;
case ICAL_MONTHLY_RECURRENCE:
- occs = cal_obj_generate_set_monthly (&recur_data,
- vtable, &occ);
+ occs = cal_obj_generate_set_monthly (
+ &recur_data,
+ vtable, &occ);
break;
default:
- occs = cal_obj_generate_set_default (&recur_data,
- vtable, &occ);
+ occs = cal_obj_generate_set_default (
+ &recur_data,
+ vtable, &occ);
break;
}
GArray *new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
/* Copy the occs array. */
- occs2 = g_array_new (FALSE, FALSE,
- sizeof (CalObjTime));
+ occs2 = g_array_new (
+ FALSE, FALSE,
+ sizeof (CalObjTime));
g_array_append_vals (occs2, occs->data, occs->len);
occs = (*vtable->bymonthday_filter) (recur_data, occs);
/* Note that we explicitly call the monthly version
* of the BYDAY expansion filter. */
- occs2 = cal_obj_byday_expand_monthly (recur_data,
- occs2);
+ occs2 = cal_obj_byday_expand_monthly (
+ recur_data,
+ occs2);
/* Add only intersection of those two arrays. */
g_array_append_vals (occs, occs2->data, occs2->len);
GArray *occs;
#if 0
- g_print ("Generating set for %i/%i/%i %02i:%02i:%02i\n",
- occ->day, occ->month + 1, occ->year, occ->hour, occ->minute,
- occ->second);
+ g_print (
+ "Generating set for %i/%i/%i %02i:%02i:%02i\n",
+ occ->day, occ->month + 1, occ->year, occ->hour, occ->minute,
+ occ->second);
#endif
/* We start with just the one time in the set. */
/* Set the weekday, used for the WEEKLY frequency and the BYWEEKNO
* modifier. */
- recur_data->weekday_offset = cal_obj_time_weekday_offset (event_start,
- recur);
+ recur_data->weekday_offset = cal_obj_time_weekday_offset (
+ event_start,
+ recur);
/* Create an array of months from bymonths for fast lookup. */
elem = recur->bymonth;
static void
cal_obj_sort_occurrences (GArray *occs)
{
- qsort (occs->data, occs->len, sizeof (CalObjTime),
- cal_obj_time_compare_func);
+ qsort (
+ occs->data, occs->len, sizeof (CalObjTime),
+ cal_obj_time_compare_func);
}
static void
/* Convert the event start and interval start to GDates, so we can
* easily find the number of days between them. */
g_date_clear (&event_start_date, 1);
- g_date_set_dmy (&event_start_date, event_start->day,
- event_start->month + 1, event_start->year);
+ g_date_set_dmy (
+ &event_start_date, event_start->day,
+ event_start->month + 1, event_start->year);
g_date_clear (&interval_start_date, 1);
- g_date_set_dmy (&interval_start_date, interval_start->day,
- interval_start->month + 1, interval_start->year);
+ g_date_set_dmy (
+ &interval_start_date, interval_start->day,
+ interval_start->month + 1, interval_start->year);
/* Calculate the start of the weeks corresponding to the event start
* and interval start. */
if (interval_end && cal_obj_time_compare (&week_start, interval_end,
CALOBJ_DAY) > 0) {
#ifdef CAL_OBJ_DEBUG
- g_print ("Interval end reached: %s\n",
- cal_obj_time_to_string (interval_end));
+ g_print (
+ "Interval end reached: %s\n",
+ cal_obj_time_to_string (interval_end));
#endif
return TRUE;
}
/* Convert the event start and interval start to GDates, so we can
* easily find the number of days between them. */
g_date_clear (&event_start_date, 1);
- g_date_set_dmy (&event_start_date, event_start->day,
- event_start->month + 1, event_start->year);
+ g_date_set_dmy (
+ &event_start_date, event_start->day,
+ event_start->month + 1, event_start->year);
g_date_clear (&interval_start_date, 1);
- g_date_set_dmy (&interval_start_date, interval_start->day,
- interval_start->month + 1, interval_start->year);
+ g_date_set_dmy (
+ &interval_start_date, interval_start->day,
+ interval_start->month + 1, interval_start->year);
event_start_julian = g_date_get_julian (&event_start_date);
interval_start_julian = g_date_get_julian (&interval_start_date);
cal_obj_time_add_days (cotime, days);
}
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_DAY) > 0)
+ if (event_end && cal_obj_time_compare (cotime, event_end, CALOBJ_DAY) > 0)
return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_DAY) > 0)
+ if (interval_end && cal_obj_time_compare (cotime, interval_end, CALOBJ_DAY) > 0)
return TRUE;
return FALSE;
/* Convert the event start and interval start to GDates, so we
* can easily find the number of days between them. */
g_date_clear (&event_start_date, 1);
- g_date_set_dmy (&event_start_date, event_start->day,
- event_start->month + 1, event_start->year);
+ g_date_set_dmy (
+ &event_start_date, event_start->day,
+ event_start->month + 1, event_start->year);
g_date_clear (&interval_start_date, 1);
- g_date_set_dmy (&interval_start_date, interval_start->day,
- interval_start->month + 1,
- interval_start->year);
+ g_date_set_dmy (
+ &interval_start_date, interval_start->day,
+ interval_start->month + 1,
+ interval_start->year);
event_start_julian = g_date_get_julian (&event_start_date);
interval_start_julian = g_date_get_julian (&interval_start_date);
/* Convert the event start and interval start to GDates, so we
* can easily find the number of days between them. */
g_date_clear (&event_start_date, 1);
- g_date_set_dmy (&event_start_date, event_start->day,
- event_start->month + 1, event_start->year);
+ g_date_set_dmy (
+ &event_start_date, event_start->day,
+ event_start->month + 1, event_start->year);
g_date_clear (&interval_start_date, 1);
- g_date_set_dmy (&interval_start_date, interval_start->day,
- interval_start->month + 1,
- interval_start->year);
+ g_date_set_dmy (
+ &interval_start_date, interval_start->day,
+ interval_start->month + 1,
+ interval_start->year);
event_start_julian = g_date_get_julian (&event_start_date);
interval_start_julian = g_date_get_julian (&interval_start_date);
/* Convert the event start and interval start to GDates, so we
* can easily find the number of days between them. */
g_date_clear (&event_start_date, 1);
- g_date_set_dmy (&event_start_date, event_start->day,
- event_start->month + 1, event_start->year);
+ g_date_set_dmy (
+ &event_start_date, event_start->day,
+ event_start->month + 1, event_start->year);
g_date_clear (&interval_start_date, 1);
- g_date_set_dmy (&interval_start_date, interval_start->day,
- interval_start->month + 1,
- interval_start->year);
+ g_date_set_dmy (
+ &interval_start_date, interval_start->day,
+ interval_start->month + 1,
+ interval_start->year);
event_start_julian = g_date_get_julian (&event_start_date);
interval_start_julian = g_date_get_julian (&interval_start_date);
* week 1 is the first week starting from the specified week
* start day that has 4 days in the new year). */
year_start_cotime = *occ;
- cal_obj_time_find_first_week (&year_start_cotime,
- recur_data);
+ cal_obj_time_find_first_week (
+ &year_start_cotime,
+ recur_data);
/* Find the day that would correspond to week 1 of the next
* year, which we use for -ve week numbers. */
year_end_cotime = *occ;
year_end_cotime.year++;
- cal_obj_time_find_first_week (&year_end_cotime,
- recur_data);
+ cal_obj_time_find_first_week (
+ &year_end_cotime,
+ recur_data);
/* Now iterate over the week numbers in byweekno, generating a
* new occurrence for each one. */
weekno = GPOINTER_TO_INT (elem->data);
if (weekno > 0) {
cotime = year_start_cotime;
- cal_obj_time_add_days (&cotime,
- (weekno - 1) * 7);
+ cal_obj_time_add_days (
+ &cotime,
+ (weekno - 1) * 7);
} else {
cotime = year_end_cotime;
cal_obj_time_add_days (&cotime, weekno * 7);
if (recur_data->monthdays[occ->day]) {
g_array_append_vals (new_occs, occ, 1);
} else {
- days_in_month = time_days_in_month (occ->year,
- occ->month);
+ days_in_month = time_days_in_month (
+ occ->year,
+ occ->month);
if (recur_data->neg_monthdays[days_in_month + 1
- occ->day])
g_array_append_vals (new_occs, occ, 1);
} else {
/* Add the -nth Mon/Tue/etc. in the month. */
- occ->day = time_days_in_month (occ->year,
- occ->month);
+ occ->day = time_days_in_month (
+ occ->year,
+ occ->month);
last_weekday = cal_obj_time_weekday (occ);
/* This calculates the number of days to step
if (days >= 0) {
for (;;) {
- days_in_month = time_days_in_month (cotime->year,
- cotime->month);
+ days_in_month = time_days_in_month (
+ cotime->year,
+ cotime->month);
if (day <= days_in_month)
break;
cotime->month--;
}
- days_in_month = time_days_in_month (cotime->year,
- cotime->month);
+ days_in_month = time_days_in_month (
+ cotime->year,
+ cotime->month);
day += days_in_month;
}
weekday = cal_obj_time_weekday (cotime);
- sprintf (buffer, "%s %02i/%02i/%04i %02i:%02i:%02i",
- weekdays[weekday],
- cotime->day, cotime->month + 1, cotime->year,
- cotime->hour, cotime->minute, cotime->second);
+ sprintf (
+ buffer, "%s %02i/%02i/%04i %02i:%02i:%02i",
+ weekdays[weekday],
+ cotime->day, cotime->month + 1, cotime->year,
+ cotime->hour, cotime->minute, cotime->second);
return buffer;
}
#endif
cb_data.count = rule.count;
cb_data.instances = 0;
cb_data.end_date = 0;
- e_cal_recur_generate_instances_of_rule (comp, prop, -1, -1,
- e_cal_recur_ensure_rule_end_date_cb,
- &cb_data, tz_cb, tz_cb_data,
- icaltimezone_get_utc_timezone ());
+ e_cal_recur_generate_instances_of_rule (
+ comp, prop, -1, -1,
+ e_cal_recur_ensure_rule_end_date_cb,
+ &cb_data, tz_cb, tz_cb_data,
+ icaltimezone_get_utc_timezone ());
/* Store the end date in the "X-EVOLUTION-ENDDATE" parameter of the
* rule. */
xname = icalparameter_get_xname (param);
if (xname && !strcmp (xname, EVOLUTION_END_DATE_PARAMETER)) {
xvalue = icalparameter_get_x (param);
- value = icalvalue_new_from_string (ICAL_DATETIME_VALUE,
- xvalue);
+ value = icalvalue_new_from_string (
+ ICAL_DATETIME_VALUE,
+ xvalue);
if (value) {
icaltime = icalvalue_get_datetime (value);
icalvalue_free (value);
zone = default_timezone ? default_timezone :
icaltimezone_get_utc_timezone ();
- return icaltime_as_timet_with_zone (icaltime,
- zone);
+ return icaltime_as_timet_with_zone (
+ icaltime,
+ zone);
}
}
- param = icalproperty_get_next_parameter (prop,
- ICAL_X_PARAMETER);
+ param = icalproperty_get_next_parameter (
+ prop,
+ ICAL_X_PARAMETER);
}
return -1;
if (retval)
g_free (retval);
- retval = g_strndup (value + 1,
- len - 2);
+ retval = g_strndup (
+ value + 1, len - 2);
}
} else {
if (retval)
static gchar *
system_timezone_read_etc_sysconfig_clock (GHashTable *ical_zones)
{
- return system_timezone_read_key_file (ETC_SYSCONFIG_CLOCK,
- "ZONE");
+ return system_timezone_read_key_file (
+ ETC_SYSCONFIG_CLOCK, "ZONE");
}
/* This works for openSUSE */
static gchar *
system_timezone_read_etc_sysconfig_clock_alt (GHashTable *ical_zones)
{
- return system_timezone_read_key_file (ETC_SYSCONFIG_CLOCK,
- "TIMEZONE");
+ return system_timezone_read_key_file (
+ ETC_SYSCONFIG_CLOCK, "TIMEZONE");
}
/* This works for Solaris/OpenSolaris */
static gchar *
system_timezone_read_etc_TIMEZONE (GHashTable *ical_zones)
{
- return system_timezone_read_key_file (ETC_TIMEZONE_MAJ,
- "TZ");
+ return system_timezone_read_key_file (
+ ETC_TIMEZONE_MAJ, "TZ");
}
/* This works for Arch Linux */
static gchar *
system_timezone_read_etc_rc_conf (GHashTable *ical_zones)
{
- return system_timezone_read_key_file (ETC_RC_CONF,
- "TIMEZONE");
+ return system_timezone_read_key_file (
+ ETC_RC_CONF, "TIMEZONE");
}
/* This works for old Gentoo */
static gchar *
system_timezone_read_etc_conf_d_clock (GHashTable *ical_zones)
{
- return system_timezone_read_key_file (ETC_CONF_D_CLOCK,
- "TIMEZONE");
+ return system_timezone_read_key_file (
+ ETC_CONF_D_CLOCK, "TIMEZONE");
}
static void
while ((subfile = g_dir_read_name (dir)) != NULL) {
subpath = g_build_filename (file, subfile, NULL);
- ret = recursive_compare (localtime_stat,
- localtime_content,
- localtime_content_len,
- subpath,
- compare_func,
- ical_zones,
- deep_level + 1,
- fallback);
+ ret = recursive_compare (
+ localtime_stat,
+ localtime_content,
+ localtime_content_len,
+ subpath,
+ compare_func,
+ ical_zones,
+ deep_level + 1,
+ fallback);
g_free (subpath);
if (!S_ISREG (stat_localtime.st_mode))
return NULL;
- retval = recursive_compare (&stat_localtime,
- NULL,
- 0,
- SYSTEM_ZONEINFODIR,
- files_are_identical_inode,
- ical_zones,
- 0,
- &fallback);
+ retval = recursive_compare (
+ &stat_localtime,
+ NULL,
+ 0,
+ SYSTEM_ZONEINFODIR,
+ files_are_identical_inode,
+ ical_zones,
+ 0,
+ &fallback);
if (retval)
g_free (fallback);
}
}
- retval = recursive_compare (&stat_localtime,
- localtime_content,
- localtime_content_len,
- SYSTEM_ZONEINFODIR,
- files_are_identical_content,
- ical_zones,
- 0,
- &fallback);
+ retval = recursive_compare (
+ &stat_localtime,
+ localtime_content,
+ localtime_content_len,
+ SYSTEM_ZONEINFODIR,
+ files_are_identical_content,
+ ical_zones,
+ 0,
+ &fallback);
if (retval)
g_free (fallback);
gchar timeZoneStd[MAX_VALUE_NAME] = "";
gchar subKey[MAX_VALUE_NAME] = "";
- res = RegOpenKeyExA (HKEY_LOCAL_MACHINE,
+ res = RegOpenKeyExA (
+ HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation", 0, KEY_READ, ®_key);
if (res != ERROR_SUCCESS) {
g_debug ("Could not find system timezone! (1)\n");
RegCloseKey (reg_key);
/* Windows NT and its family */
- res = RegOpenKeyExA (HKEY_LOCAL_MACHINE,
+ res = RegOpenKeyExA (
+ HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones",
0, KEY_READ, ®_key);
if (res != ERROR_SUCCESS) {
if (res != ERROR_SUCCESS)
continue;
size = MAX_VALUE_NAME;
- res = RegQueryValueExA (reg_subkey, "Std", 0, &type,
+ res = RegQueryValueExA (
+ reg_subkey, "Std", 0, &type,
(LPBYTE) timeZoneStd, &size);
RegCloseKey (reg_subkey);
if (type != REG_SZ || res != ERROR_SUCCESS) {
g_return_if_fail (date != NULL);
g_return_if_fail (time != -1);
- tt = icaltime_from_timet_with_zone (time, FALSE,
- zone ? zone : icaltimezone_get_utc_timezone ());
+ tt = icaltime_from_timet_with_zone (
+ time, FALSE,
+ zone ? zone : icaltimezone_get_utc_timezone ());
g_date_set_dmy (date, tt.day, tt.month, tt.year);
}
aod.triggers = NULL;
aod.n_triggers = 0;
- e_cal_recur_generate_instances (comp, alarm_start, alarm_end,
- add_alarm_occurrences_cb, &aod,
- resolve_tzid, user_data,
- default_timezone);
+ e_cal_recur_generate_instances (
+ comp, alarm_start, alarm_end,
+ add_alarm_occurrences_cb, &aod,
+ resolve_tzid, user_data,
+ default_timezone);
/* We add the ABSOLUTE triggers separately */
generate_absolute_triggers (comp, &aod, resolve_tzid, user_data, default_timezone);
if (!vtz_comp)
return;
- icalcomponent_add_component (f_data->vcal_comp,
- icalcomponent_new_clone (vtz_comp));
+ icalcomponent_add_component (
+ f_data->vcal_comp,
+ icalcomponent_new_clone (vtz_comp));
}
/**
e_cal_component_get_completed (comp, &tt);
if (tt) {
/* COMPLETED must be in UTC. */
- completed_time = icaltime_as_timet_with_zone (*tt,
- icaltimezone_get_utc_timezone ());
+ completed_time = icaltime_as_timet_with_zone (
+ *tt, icaltimezone_get_utc_timezone ());
e_cal_component_free_icaltimetype (tt);
}
e_cal_component_get_due (comp, &dt_due);
if (dt_due.value != NULL)
- due_time = componenttime_to_utc_timet (&dt_due, tz_cb, tz_cb_data,
- default_timezone);
+ due_time = componenttime_to_utc_timet (
+ &dt_due, tz_cb, tz_cb_data,
+ default_timezone);
e_cal_component_free_datetime (&dt_due);
g_type_class_add_private (class, sizeof (ECalViewPrivate));
- g_object_class_install_property (object_class, PROP_VIEW,
- g_param_spec_pointer ("view", "The GDBus view proxy", NULL,
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_class_install_property (object_class, PROP_CLIENT,
- g_param_spec_object ("client", "The e-cal for the view", NULL, E_TYPE_CAL,
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- /**
- * ECalView::objects-added:
- * @view:: self
- * @objects: (type GLib.List) (transfer none) (element-type long):
- */
- signals[OBJECTS_ADDED] =
- g_signal_new ("objects_added",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalViewClass, objects_added),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
- /**
- * ECalView::objects-modified:
- * @view:: self
- * @objects: (type GLib.List) (transfer none) (element-type long):
- */
- signals[OBJECTS_MODIFIED] =
- g_signal_new ("objects_modified",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalViewClass, objects_modified),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
- /**
- * ECalView::objects-removed:
- * @view:: self
- * @objects: (type GLib.List) (transfer none) (element-type ECalComponentId):
- */
- signals[OBJECTS_REMOVED] =
- g_signal_new ("objects_removed",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalViewClass, objects_removed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
- signals[VIEW_PROGRESS] =
- g_signal_new ("view_progress",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalViewClass, view_progress),
- NULL, NULL,
- e_cal_marshal_VOID__STRING_UINT,
- G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_UINT);
+ g_object_class_install_property (
+ object_class,
+ PROP_VIEW,
+ g_param_spec_pointer (
+ "view",
+ "The GDBus view proxy",
+ NULL,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_CLIENT,
+ g_param_spec_object (
+ "client",
+ "The e-cal for the view",
+ NULL,
+ E_TYPE_CAL,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
+
+ /**
+ * ECalView::objects-added:
+ * @view:: self
+ * @objects: (type GLib.List) (transfer none) (element-type long):
+ */
+ signals[OBJECTS_ADDED] = g_signal_new (
+ "objects_added",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalViewClass, objects_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ /**
+ * ECalView::objects-modified:
+ * @view:: self
+ * @objects: (type GLib.List) (transfer none) (element-type long):
+ */
+ signals[OBJECTS_MODIFIED] = g_signal_new (
+ "objects_modified",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalViewClass, objects_modified),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ /**
+ * ECalView::objects-removed:
+ * @view:: self
+ * @objects: (type GLib.List) (transfer none) (element-type ECalComponentId):
+ */
+ signals[OBJECTS_REMOVED] = g_signal_new (
+ "objects_removed",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalViewClass, objects_removed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ signals[VIEW_PROGRESS] = g_signal_new (
+ "view_progress",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalViewClass, view_progress),
+ NULL, NULL,
+ e_cal_marshal_VOID__STRING_UINT,
+ G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_UINT);
/* XXX The "view-done" signal is deprecated. */
- signals[VIEW_DONE] =
- g_signal_new ("view_done",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalViewClass, view_done),
- NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- signals[VIEW_COMPLETE] =
- g_signal_new ("view_complete",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalViewClass, view_complete),
- NULL, NULL,
- e_cal_marshal_VOID__UINT_STRING,
- G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
+ signals[VIEW_DONE] = g_signal_new (
+ "view_done",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalViewClass, view_done),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
+
+ signals[VIEW_COMPLETE] = g_signal_new (
+ "view_complete",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalViewClass, view_complete),
+ NULL, NULL,
+ e_cal_marshal_VOID__UINT_STRING,
+ G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
}
/**
{
ECalView *view;
- view = g_object_new (E_TYPE_CAL_VIEW,
+ view = g_object_new (
+ E_TYPE_CAL_VIEW,
"client", ecal,
"view", gdbus_calview,
NULL);
object_class = (GObjectClass *) class;
/* XXX The "cal-opened" signal is deprecated. */
- e_cal_signals[CAL_OPENED] =
- g_signal_new ("cal_opened",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalClass, cal_opened),
- NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- /**
- * ECal::cal-opened-ex:
- * @ecal:: self
- * @error: (type glong):
- */
- e_cal_signals[CAL_OPENED_EX] =
- g_signal_new ("cal_opened_ex",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalClass, cal_opened_ex),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- e_cal_signals[CAL_SET_MODE] =
- g_signal_new ("cal_set_mode",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalClass, cal_set_mode),
- NULL, NULL,
- e_cal_marshal_VOID__ENUM_ENUM,
- G_TYPE_NONE, 2,
- E_CAL_SET_MODE_STATUS_ENUM_TYPE,
- CAL_MODE_ENUM_TYPE);
- e_cal_signals[BACKEND_ERROR] =
- g_signal_new ("backend_error",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalClass, backend_error),
- NULL, NULL,
- g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE, 1,
- G_TYPE_STRING);
- e_cal_signals[BACKEND_DIED] =
- g_signal_new ("backend_died",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalClass, backend_died),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ e_cal_signals[CAL_OPENED] = g_signal_new (
+ "cal_opened",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalClass, cal_opened),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
+
+ /**
+ * ECal::cal-opened-ex:
+ * @ecal:: self
+ * @error: (type glong):
+ */
+ e_cal_signals[CAL_OPENED_EX] = g_signal_new (
+ "cal_opened_ex",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalClass, cal_opened_ex),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ e_cal_signals[CAL_SET_MODE] = g_signal_new (
+ "cal_set_mode",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalClass, cal_set_mode),
+ NULL, NULL,
+ e_cal_marshal_VOID__ENUM_ENUM,
+ G_TYPE_NONE, 2,
+ E_CAL_SET_MODE_STATUS_ENUM_TYPE,
+ CAL_MODE_ENUM_TYPE);
+
+ e_cal_signals[BACKEND_ERROR] = g_signal_new (
+ "backend_error",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalClass, backend_error),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1,
+ G_TYPE_STRING);
+
+ e_cal_signals[BACKEND_DIED] = g_signal_new (
+ "backend_died",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalClass, backend_died),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
class->cal_opened = NULL;
class->cal_opened_ex = NULL;
{
g_return_if_fail (E_IS_CAL (cal));
- g_signal_emit (G_OBJECT (cal), e_cal_signals[CAL_SET_MODE],
- 0, E_CALENDAR_STATUS_OK, is_online ? Remote : Local);
+ g_signal_emit (
+ G_OBJECT (cal), e_cal_signals[CAL_SET_MODE],
+ 0, E_CALENDAR_STATUS_OK, is_online ? Remote : Local);
}
/*
* recurrency ids. Real problem might be elsewhere,
* but anything is better than crashing...
*/
- g_log (G_LOG_DOMAIN,
- G_LOG_LEVEL_CRITICAL,
- "UID %s: instance RECURRENCE-ID %s + detached instance RECURRENCE-ID %s: cannot compare",
- uid,
- i_rid,
- d_rid);
+ g_log (
+ G_LOG_DOMAIN,
+ G_LOG_LEVEL_CRITICAL,
+ "UID %s: instance RECURRENCE-ID %s + detached instance RECURRENCE-ID %s: cannot compare",
+ uid,
+ i_rid,
+ d_rid);
e_cal_component_free_datetime (&instance_recur_id.datetime);
g_free (i_rid);
g_free (d_rid);
continue;
}
- cmp = icaltime_compare (*instance_recur_id.datetime.value,
- *recur_id.datetime.value);
+ cmp = icaltime_compare (
+ *instance_recur_id.datetime.value,
+ *recur_id.datetime.value);
if ((recur_id.type == E_CAL_COMPONENT_RANGE_THISPRIOR && cmp <= 0) ||
- (recur_id.type == E_CAL_COMPONENT_RANGE_THISFUTURE && cmp >= 0)) {
+ (recur_id.type == E_CAL_COMPONENT_RANGE_THISFUTURE && cmp >= 0)) {
ECalComponent *comp;
comp = e_cal_component_new ();
return;
}
- query = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\") (make-time \"%s\"))",
- iso_start, iso_end);
+ query = g_strdup_printf (
+ "(occur-in-time-range? (make-time \"%s\") (make-time \"%s\"))",
+ iso_start, iso_end);
g_free (iso_start);
g_free (iso_end);
if (!e_cal_get_object_list_as_comp (ecal, query, &objects, NULL)) {
instances_hold->instances = &instances;
instances_hold->start_zone = start_zone;
- e_cal_recur_generate_instances (comp, start, end, add_instance, instances_hold,
- e_cal_resolve_tzid_cb, ecal,
- default_zone);
+ e_cal_recur_generate_instances (
+ comp, start, end, add_instance, instances_hold,
+ e_cal_resolve_tzid_cb, ecal,
+ default_zone);
g_free (instances_hold);
g_object_unref (comp);
continue;
}
- alarms = e_cal_util_generate_alarms_for_comp (comp, start, end, omit, e_cal_resolve_tzid_cb,
- ecal, ecal->priv->default_zone);
+ alarms = e_cal_util_generate_alarms_for_comp (
+ comp, start, end, omit, e_cal_resolve_tzid_cb,
+ ecal, ecal->priv->default_zone);
if (alarms)
comp_alarms = g_slist_prepend (comp_alarms, alarms);
}
}
/* build the query string */
- sexp = g_strdup_printf ("(has-alarms-in-range? (make-time \"%s\") (make-time \"%s\"))",
- iso_start, iso_end);
+ sexp = g_strdup_printf (
+ "(has-alarms-in-range? "
+ "(make-time \"%s\") "
+ "(make-time \"%s\"))",
+ iso_start, iso_end);
g_free (iso_start);
g_free (iso_end);
vtimezone_as_string = icalcomponent_as_ical_string_r (vtimezone_comp);
- g_hash_table_insert (data->timezone_hash, (gchar *) tzid,
- vtimezone_as_string);
+ g_hash_table_insert (
+ data->timezone_hash, (gchar *) tzid,
+ vtimezone_as_string);
}
/* This appends the value string to the GString given in data. */
/* Create the start of a VCALENDAR, to add the VTIMEZONES to,
* and remember its length so we know if any VTIMEZONEs get added. */
vcal_string = g_string_new (NULL);
- g_string_append (vcal_string,
- "BEGIN:VCALENDAR\n"
- "PRODID:-//Ximian//NONSGML Evolution Calendar//EN\n"
- "VERSION:2.0\n"
- "METHOD:PUBLISH\n");
+ g_string_append (
+ vcal_string,
+ "BEGIN:VCALENDAR\n"
+ "PRODID:-//Ximian//NONSGML Evolution Calendar//EN\n"
+ "VERSION:2.0\n"
+ "METHOD:PUBLISH\n");
initial_vcal_string_len = vcal_string->len;
/* Now concatenate all the timezone strings. This also frees the
icalproperty *prop;
icalcomp = icalcomponent_new_clone (icaltimezone_get_component (syszone));
- prop = icalcomponent_get_first_property (icalcomp,
- ICAL_ANY_PROPERTY);
+ prop = icalcomponent_get_first_property (
+ icalcomp, ICAL_ANY_PROPERTY);
while (!found && prop) {
if (icalproperty_isa (prop) == ICAL_TZID_PROPERTY) {
icalproperty_set_value_from_string (prop, tzid, "NO");
found = TRUE;
}
- prop = icalcomponent_get_next_property (icalcomp,
- ICAL_ANY_PROPERTY);
+ prop = icalcomponent_get_next_property (
+ icalcomp, ICAL_ANY_PROPERTY);
}
} else {
status = E_CALENDAR_STATUS_INVALID_OBJECT;
status = E_CALENDAR_STATUS_OK;
- gdbus_calview = e_gdbus_cal_view_proxy_new_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (cal_factory)),
- G_DBUS_PROXY_FLAGS_NONE,
- CALENDAR_DBUS_SERVICE_NAME,
- query_path,
- NULL,
- error);
+ gdbus_calview = e_gdbus_cal_view_proxy_new_sync (
+ g_dbus_proxy_get_connection (G_DBUS_PROXY (cal_factory)),
+ G_DBUS_PROXY_FLAGS_NONE,
+ CALENDAR_DBUS_SERVICE_NAME,
+ query_path,
+ NULL,
+ error);
g_free (query_path);
obj = icalcomponent_as_ical_string_r (icalcomp);
if (e_file_cache_get_object (E_FILE_CACHE (cache), icaltimezone_get_tzid ((icaltimezone *) zone))) {
- retval = e_file_cache_replace_object (E_FILE_CACHE (cache),
- icaltimezone_get_tzid ((icaltimezone *) zone),
- obj);
+ retval = e_file_cache_replace_object (
+ E_FILE_CACHE (cache),
+ icaltimezone_get_tzid ((icaltimezone *) zone),
+ obj);
} else {
- retval = e_file_cache_add_object (E_FILE_CACHE (cache),
- icaltimezone_get_tzid ((icaltimezone *) zone),
- obj);
+ retval = e_file_cache_add_object (
+ E_FILE_CACHE (cache),
+ icaltimezone_get_tzid ((icaltimezone *) zone),
+ obj);
}
g_free (obj);
obj = icalcomponent_as_ical_string_r (icalcomp);
if (e_file_cache_get_object (E_FILE_CACHE (cache), "default_zone")) {
- retval = e_file_cache_replace_object (E_FILE_CACHE (cache), "default_zone",
- obj);
+ retval = e_file_cache_replace_object (
+ E_FILE_CACHE (cache), "default_zone",
+ obj);
} else {
- retval = e_file_cache_add_object (E_FILE_CACHE (cache),
- "default_zone",
- obj);
+ retval = e_file_cache_add_object (
+ E_FILE_CACHE (cache),
+ "default_zone",
+ obj);
}
g_free (obj);
}
dzone = e_cal_backend_store_get_default_timezone (store);
- e_cal_util_get_component_occur_times (comp, &time_start, &time_end,
- resolve_tzid, store, dzone, kind);
+ e_cal_util_get_component_occur_times (
+ comp, &time_start, &time_end,
+ resolve_tzid, store, dzone, kind);
put_component (fstore, comp);
e_cal_backend_store_interval_tree_add_comp (store, comp, time_start, time_end);
g_print ("%*s[%s - %s]\n", indent, "", start_time, end_time);
*/
EIntervalTreePrivate *priv = tree->priv;
- if (node != priv->nil)
- g_print ("%*s[%ld - %ld] [%ld - %ld] red %d\n", indent, "", node->start,
- node->end, node->min, node->max, node->red);
- else
- {
+ if (node != priv->nil) {
+ g_print (
+ "%*s[%ld - %ld] [%ld - %ld] red %d\n", indent, "", node->start,
+ node->end, node->min, node->max, node->red);
+ } else {
g_print ("%*s[ - ]\n", indent, "");
return;
}
priv = tree->priv;
if (!searched_uid)
{
- g_warning ("Searching the interval tree, the component "
- " does not have a valid UID skipping it\n");
+ g_warning (
+ "Searching the interval tree, the component "
+ " does not have a valid UID skipping it\n");
return NULL;
}
ESExpResult *result;
if (argc != 0) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects no arguments"),
- "time-now");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects no arguments"),
+ "time-now");
return NULL;
}
ESExpResult *result;
if (argc != 1) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects one argument"),
- "make-time");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects one argument"),
+ "make-time");
return NULL;
}
if (argv[0]->type != ESEXP_RES_STRING) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a string"),
- "make-time");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a string"),
+ "make-time");
return NULL;
}
str = argv[0]->value.string;
if (!str || !*str) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a string"),
- "make-time");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a string"),
+ "make-time");
return NULL;
}
t = time_from_isodate (str);
if (t == -1) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be an ISO 8601 "
- "date/time string"),
- "make-time");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be an ISO 8601 "
+ "date/time string"),
+ "make-time");
return NULL;
}
gint n;
if (argc != 2) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects two arguments"),
- "time-add-day");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects two arguments"),
+ "time-add-day");
return NULL;
}
if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a time_t"),
- "time-add-day");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a time_t"),
+ "time-add-day");
return NULL;
}
t = argv[0]->value.time;
if (argv[1]->type != ESEXP_RES_INT) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the second "
- "argument to be an integer"),
- "time-add-day");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the second "
+ "argument to be an integer"),
+ "time-add-day");
return NULL;
}
n = argv[1]->value.number;
ESExpResult *result;
if (argc != 1) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects one argument"),
- "time-day-begin");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects one argument"),
+ "time-day-begin");
return NULL;
}
if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a time_t"),
- "time-day-begin");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a time_t"),
+ "time-day-begin");
return NULL;
}
t = argv[0]->value.time;
ESExpResult *result;
if (argc != 1) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects one argument"),
- "time-day-end");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects one argument"),
+ "time-day-end");
return NULL;
}
if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a time_t"),
- "time-day-end");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a time_t"),
+ "time-day-end");
return NULL;
}
t = argv[0]->value.time;
/* Check argument types */
if (argc != 1) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects one argument"),
- "uid");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects one argument"),
+ "uid");
return NULL;
}
if (argv[0]->type != ESEXP_RES_STRING) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a string"),
- "uid");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a string"),
+ "uid");
return NULL;
}
/* Check argument types */
if (argc != 2 && argc != 3) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects two or three arguments"),
- "occur-in-time-range");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects two or three arguments"),
+ "occur-in-time-range");
return NULL;
}
if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a time_t"),
- "occur-in-time-range");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a time_t"),
+ "occur-in-time-range");
return NULL;
}
start = argv[0]->value.time;
if (argv[1]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the second "
- "argument to be a time_t"),
- "occur-in-time-range");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the second "
+ "argument to be a time_t"),
+ "occur-in-time-range");
return NULL;
}
end = argv[1]->value.time;
if (argc == 3) {
if (argv[2]->type != ESEXP_RES_STRING) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the third "
- "argument to be a string"),
- "occur-in-time-range");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the third "
+ "argument to be a string"),
+ "occur-in-time-range");
return NULL;
}
/* See if the object occurs in the specified time range */
ctx->occurs = FALSE;
- e_cal_recur_generate_instances (ctx->comp, start, end,
- (ECalRecurInstanceFn) check_instance_time_range_cb,
- ctx, resolve_tzid, ctx,
- default_zone);
+ e_cal_recur_generate_instances (
+ ctx->comp, start, end,
+ (ECalRecurInstanceFn) check_instance_time_range_cb,
+ ctx, resolve_tzid, ctx,
+ default_zone);
result = e_sexp_result_new (esexp, ESEXP_RES_BOOL);
result->value.boolean = ctx->occurs;
/* Check argument types */
if (argc != 2 && argc != 0) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects none or two arguments"), "occurrences-count");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects none or two arguments"),
+ "occurrences-count");
return NULL;
}
if (argc == 2) {
if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first argument to be a time_t"), "occurrences-count");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first argument to be a time_t"),
+ "occurrences-count");
return NULL;
}
start = argv[0]->value.time;
if (argv[1]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the second argument to be a time_t"), "occurrences-count");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the second argument to be a time_t"),
+ "occurrences-count");
return NULL;
}
end = argv[1]->value.time;
default_zone = icaltimezone_get_utc_timezone ();
ctx->occurrences_count = 0;
- e_cal_recur_generate_instances (ctx->comp, start, end,
+ e_cal_recur_generate_instances (
+ ctx->comp, start, end,
count_instances_time_range_cb, ctx,
resolve_tzid, ctx,
default_zone);
/* Check argument types */
if (argc != 2) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects two arguments"),
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects two arguments"),
"due-in-time-range");
return NULL;
}
if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a time_t"),
- "due-in-time-range");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a time_t"),
+ "due-in-time-range");
return NULL;
}
start = argv[0]->value.time;
if (argv[1]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the second "
- "argument to be a time_t"),
- "due-in-time-range");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the second "
+ "argument to be a time_t"),
+ "due-in-time-range");
return NULL;
}
ESExpResult *result;
if (argc != 0) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects no arguments"),
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects no arguments"),
"has-attachments?");
return NULL;
}
gint *percent;
if (argc != 0) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects no arguments"),
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects no arguments"),
"percent-completed");
return NULL;
}
/* Check argument types */
if (argc != 2) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects two arguments"),
- "contains");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects two arguments"),
+ "contains");
return NULL;
}
if (argv[0]->type != ESEXP_RES_STRING) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a string"),
- "contains");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a string"),
+ "contains");
return NULL;
}
field = argv[0]->value.string;
if (argv[1]->type != ESEXP_RES_STRING) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the second "
- "argument to be a string"),
- "contains");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the second "
+ "argument to be a string"),
+ "contains");
return NULL;
}
str = argv[1]->value.string;
else if (strcmp (field, "priority") == 0)
matches = matches_priority (ctx->comp, str);
else {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be either \"any\", "
- "\"summary\", or \"description\", or \"location\", or \"attendee\", or \"organizer\", or \"classification\""),
- "contains");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be either \"any\", "
+ "\"summary\", or \"description\", or \"location\", or \"attendee\", or \"organizer\", or \"classification\""),
+ "contains");
return NULL;
}
/* Check argument types */
if (argc != 0) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects no arguments"),
- "has-start");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects no arguments"),
+ "has-start");
return NULL;
}
/* Check argument types */
if (argc != 0) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects no arguments"),
- "has-alarms");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects no arguments"),
+ "has-alarms");
return NULL;
}
/* Check argument types */
if (argc != 2) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects two arguments"),
- "has-alarms-in-range");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects two arguments"),
+ "has-alarms-in-range");
return NULL;
}
if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a time_t"),
- "has-alarms-in-range");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a time_t"),
+ "has-alarms-in-range");
return NULL;
}
start = argv[0]->value.time;
if (argv[1]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the second "
- "argument to be a time_t"),
- "has-alarms-in-range");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the second "
+ "argument to be a time_t"),
+ "has-alarms-in-range");
return NULL;
}
end = argv[1]->value.time;
/* See if the object has alarms in the given time range */
default_zone = icaltimezone_get_utc_timezone ();
- alarms = e_cal_util_generate_alarms_for_comp (ctx->comp, start, end,
- omit, resolve_tzid,
- ctx, default_zone);
+ alarms = e_cal_util_generate_alarms_for_comp (
+ ctx->comp, start, end,
+ omit, resolve_tzid,
+ ctx, default_zone);
result = e_sexp_result_new (esexp, ESEXP_RES_BOOL);
if (alarms) {
/* Check argument types */
if (argc < 1) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects at least one "
- "argument"),
- "has-categories");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects at least one "
+ "argument"),
+ "has-categories");
return NULL;
}
if (!unfiled)
for (i = 0; i < argc; i++)
if (argv[i]->type != ESEXP_RES_STRING) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects "
- "all arguments to "
- "be strings or "
- "one and only one "
- "argument to be a "
- "boolean false "
- "(#f)"),
- "has-categories");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects "
+ "all arguments to "
+ "be strings or "
+ "one and only one "
+ "argument to be a "
+ "boolean false "
+ "(#f)"),
+ "has-categories");
return NULL;
}
/* Check argument types */
if (argc != 0) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects no arguments"),
- "has-recurrences");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects no arguments"),
+ "has-recurrences");
return NULL;
}
/* Check argument types */
if (argc != 0) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects no arguments"),
- "is-completed");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects no arguments"),
+ "is-completed");
return NULL;
}
/* Check argument types */
if (argc != 1) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects one argument"),
- "completed-before");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects one argument"),
+ "completed-before");
return NULL;
}
if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
- "argument to be a time_t"),
- "completed-before");
+ e_sexp_fatal_error (
+ esexp, _("\"%s\" expects the first "
+ "argument to be a time_t"),
+ "completed-before");
return NULL;
}
before_time = argv[0]->value.time;
e_sexp_add_ifunction (sexp->priv->search_sexp, 0, symbols[i].name,
(ESExpIFunc *) symbols[i].func, sexp->priv->search_context);
} else {
- e_sexp_add_function (sexp->priv->search_sexp, 0, symbols[i].name,
- symbols[i].func, sexp->priv->search_context);
+ e_sexp_add_function (
+ sexp->priv->search_sexp, 0, symbols[i].name,
+ symbols[i].func, sexp->priv->search_context);
}
}
cal_destroy_cb (gpointer data,
GObject *where_cal_was)
{
- e_cal_backend_remove_client_private (E_CAL_BACKEND (data),
- (EDataCal *) where_cal_was, FALSE);
+ e_cal_backend_remove_client_private (
+ E_CAL_BACKEND (data),
+ (EDataCal *) where_cal_was, FALSE);
}
/**
#ifndef EDS_DISABLE_DEPRECATED
void e_cal_backend_foreach_view (ECalBackend *backend,
gboolean (*callback) (EDataCalView *view,
- gpointer user_data),
- gpointer user_data);
+ gpointer user_data),
+ gpointer user_data);
#endif /* EDS_DISABLE_DEPRECATED */
G_END_DECLS
}
if (has_changes) {
- g_dbus_connection_emit_signal (connection,
- NULL,
- path,
- "org.freedesktop.DBus.Properties",
- "PropertiesChanged",
- g_variant_new ("(sa{sv}as)",
- GDBUS_CAL_FACTORY_INTERFACE_NAME,
- builder,
- invalidated_builder),
- NULL);
+ g_dbus_connection_emit_signal (
+ connection,
+ NULL,
+ path,
+ "org.freedesktop.DBus.Properties",
+ "PropertiesChanged",
+ g_variant_new (
+ "(sa{sv}as)",
+ GDBUS_CAL_FACTORY_INTERFACE_NAME,
+ builder,
+ invalidated_builder),
+ NULL);
} else {
g_variant_builder_unref (builder);
g_variant_builder_unref (invalidated_builder);
g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-path", (gpointer) g_strdup (object_path), g_free);
g_object_set_data (G_OBJECT (object), "gdbus-codegen-connection", (gpointer) connection);
g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-pvc", (gpointer) pvc, (GDestroyNotify) g_hash_table_unref);
- return g_dbus_connection_register_object (connection,
+ return g_dbus_connection_register_object (
+ connection,
object_path,
(GDBusInterfaceInfo *) &_e_gdbus_cal_factory_interface_info,
&e_gdbus_cal_factory_interface_vtable,
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_CAL_FACTORY_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_FACTORY_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_CAL_FACTORY_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_FACTORY_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_CAL_FACTORY_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_FACTORY_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_CAL_FACTORY_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_FACTORY_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_CAL_FACTORY (initable);
else
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_CAL_FACTORY_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_FACTORY_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_CAL_FACTORY_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_FACTORY_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_CAL_FACTORY_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_FACTORY_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_CAL_FACTORY_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_FACTORY_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_CAL_FACTORY (initable);
else
}
if (has_changes) {
- g_dbus_connection_emit_signal (connection,
- NULL,
- path,
- "org.freedesktop.DBus.Properties",
- "PropertiesChanged",
- g_variant_new ("(sa{sv}as)",
- GDBUS_CAL_VIEW_INTERFACE_NAME,
- builder,
- invalidated_builder),
- NULL);
+ g_dbus_connection_emit_signal (
+ connection,
+ NULL,
+ path,
+ "org.freedesktop.DBus.Properties",
+ "PropertiesChanged",
+ g_variant_new (
+ "(sa{sv}as)",
+ GDBUS_CAL_VIEW_INTERFACE_NAME,
+ builder,
+ invalidated_builder),
+ NULL);
} else {
g_variant_builder_unref (builder);
g_variant_builder_unref (invalidated_builder);
g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-path", (gpointer) g_strdup (object_path), g_free);
g_object_set_data (G_OBJECT (object), "gdbus-codegen-connection", (gpointer) connection);
g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-pvc", (gpointer) pvc, (GDestroyNotify) g_hash_table_unref);
- return g_dbus_connection_register_object (connection,
+ return g_dbus_connection_register_object (
+ connection,
object_path,
(GDBusInterfaceInfo *) &_e_gdbus_cal_view_interface_info,
&e_gdbus_cal_view_interface_vtable,
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_CAL_VIEW_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_VIEW_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_CAL_VIEW_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_VIEW_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_CAL_VIEW_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_VIEW_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_CAL_VIEW_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_VIEW_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_CAL_VIEW (initable);
else
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_CAL_VIEW_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_VIEW_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_CAL_VIEW_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_VIEW_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_CAL_VIEW_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_VIEW_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_CAL_VIEW_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_VIEW_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_CAL_VIEW (initable);
else
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_boolean__void (proxy, in_only_if_exists, cancellable, error,
+ return e_gdbus_proxy_call_sync_boolean__void (
+ proxy, in_only_if_exists, cancellable, error,
e_gdbus_cal_call_open,
e_gdbus_cal_call_open_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_void__void (proxy, cancellable, error,
+ return e_gdbus_proxy_call_sync_void__void (
+ proxy, cancellable, error,
e_gdbus_cal_call_refresh,
e_gdbus_cal_call_refresh_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__string (proxy, in_prop_name, out_prop_value, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__string (
+ proxy, in_prop_name, out_prop_value, cancellable, error,
e_gdbus_cal_call_get_backend_property,
e_gdbus_cal_call_get_backend_property_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__void (proxy, in_prop_name_value, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__void (
+ proxy, in_prop_name_value, cancellable, error,
e_gdbus_cal_call_set_backend_property,
e_gdbus_cal_call_set_backend_property_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__string (proxy, in_uid_rid, out_object, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__string (
+ proxy, in_uid_rid, out_object, cancellable, error,
e_gdbus_cal_call_get_object,
e_gdbus_cal_call_get_object_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__strv (proxy, in_sexp, out_objects, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__strv (
+ proxy, in_sexp, out_objects, cancellable, error,
e_gdbus_cal_call_get_object_list,
e_gdbus_cal_call_get_object_list_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__void (proxy, in_start_end_userlist, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__void (
+ proxy, in_start_end_userlist, cancellable, error,
e_gdbus_cal_call_get_free_busy,
e_gdbus_cal_call_get_free_busy_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__strv (proxy, in_calobjs, out_uids, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__strv (
+ proxy, in_calobjs, out_uids, cancellable, error,
e_gdbus_cal_call_create_objects,
e_gdbus_cal_call_create_objects_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__void (proxy, in_mod_calobjs, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__void (
+ proxy, in_mod_calobjs, cancellable, error,
e_gdbus_cal_call_modify_objects,
e_gdbus_cal_call_modify_objects_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__void (proxy, in_mod_ids, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__void (
+ proxy, in_mod_ids, cancellable, error,
e_gdbus_cal_call_remove_objects,
e_gdbus_cal_call_remove_objects_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__void (proxy, in_calobj, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__void (
+ proxy, in_calobj, cancellable, error,
e_gdbus_cal_call_receive_objects,
e_gdbus_cal_call_receive_objects_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__strv (proxy, in_calobj, out_calobj_users, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__strv (
+ proxy, in_calobj, out_calobj_users, cancellable, error,
e_gdbus_cal_call_send_objects,
e_gdbus_cal_call_send_objects_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__strv (proxy, in_uid_rid, out_attachments, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__strv (
+ proxy, in_uid_rid, out_attachments, cancellable, error,
e_gdbus_cal_call_get_attachment_uris,
e_gdbus_cal_call_get_attachment_uris_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_strv__void (proxy, in_uid_rid_auid, cancellable, error,
+ return e_gdbus_proxy_call_sync_strv__void (
+ proxy, in_uid_rid_auid, cancellable, error,
e_gdbus_cal_call_discard_alarm,
e_gdbus_cal_call_discard_alarm_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__string (proxy, in_sexp, out_view_path, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__string (
+ proxy, in_sexp, out_view_path, cancellable, error,
e_gdbus_cal_call_get_view,
e_gdbus_cal_call_get_view_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__string (proxy, in_tzid, out_tzobject, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__string (
+ proxy, in_tzid, out_tzobject, cancellable, error,
e_gdbus_cal_call_get_timezone,
e_gdbus_cal_call_get_timezone_finish);
}
GCancellable *cancellable,
GError **error)
{
- return e_gdbus_proxy_call_sync_string__void (proxy, in_tzobject, cancellable, error,
+ return e_gdbus_proxy_call_sync_string__void (
+ proxy, in_tzobject, cancellable, error,
e_gdbus_cal_call_add_timezone,
e_gdbus_cal_call_add_timezone_finish);
}
}
if (has_changes) {
- g_dbus_connection_emit_signal (connection,
- NULL,
- path,
- "org.freedesktop.DBus.Properties",
- "PropertiesChanged",
- g_variant_new ("(sa{sv}as)",
- GDBUS_CAL_INTERFACE_NAME,
- builder,
- invalidated_builder),
- NULL);
+ g_dbus_connection_emit_signal (
+ connection,
+ NULL,
+ path,
+ "org.freedesktop.DBus.Properties",
+ "PropertiesChanged",
+ g_variant_new (
+ "(sa{sv}as)",
+ GDBUS_CAL_INTERFACE_NAME,
+ builder,
+ invalidated_builder),
+ NULL);
} else {
g_variant_builder_unref (builder);
g_variant_builder_unref (invalidated_builder);
g_object_set_data (G_OBJECT (object), "gdbus-codegen-connection", (gpointer) connection);
g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-pvc", (gpointer) pvc, (GDestroyNotify) g_hash_table_unref);
- return g_dbus_connection_register_object (connection,
- object_path,
- (GDBusInterfaceInfo *) &_e_gdbus_cal_interface_info,
- &e_gdbus_cal_interface_vtable,
- object,
- (GDestroyNotify) on_object_unregistered,
- error);
+ return g_dbus_connection_register_object (
+ connection,
+ object_path,
+ (GDBusInterfaceInfo *) &_e_gdbus_cal_interface_info,
+ &e_gdbus_cal_interface_vtable,
+ object,
+ (GDestroyNotify) on_object_unregistered,
+ error);
}
/**
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_CAL_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_CAL_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_CAL_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-connection", connection,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_CAL_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-connection", connection,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_CAL (initable);
else
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_async_initable_new_async (E_TYPE_GDBUS_CAL_PROXY,
- G_PRIORITY_DEFAULT,
- cancellable,
- callback,
- user_data,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_INTERFACE_NAME,
- NULL);
+ g_async_initable_new_async (
+ E_TYPE_GDBUS_CAL_PROXY,
+ G_PRIORITY_DEFAULT,
+ cancellable,
+ callback,
+ user_data,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_INTERFACE_NAME,
+ NULL);
}
/**
GError **error)
{
GInitable *initable;
- initable = g_initable_new (E_TYPE_GDBUS_CAL_PROXY,
- cancellable,
- error,
- "g-flags", flags,
- "g-name", name,
- "g-bus-type", bus_type,
- "g-object-path", object_path,
- "g-interface-name", GDBUS_CAL_INTERFACE_NAME,
- NULL);
+ initable = g_initable_new (
+ E_TYPE_GDBUS_CAL_PROXY,
+ cancellable,
+ error,
+ "g-flags", flags,
+ "g-name", name,
+ "g-bus-type", bus_type,
+ "g-object-path", object_path,
+ "g-interface-name", GDBUS_CAL_INTERFACE_NAME,
+ NULL);
if (initable != NULL)
return E_GDBUS_CAL (initable);
else
has_attachment = camel_mime_message_has_attachment (msg);
if (((camel_message_info_flags (mi) & CAMEL_MESSAGE_ATTACHMENTS) && !has_attachment) ||
((camel_message_info_flags (mi) & CAMEL_MESSAGE_ATTACHMENTS) == 0 && has_attachment)) {
- camel_message_info_set_flags (mi,
- CAMEL_MESSAGE_ATTACHMENTS, has_attachment ? CAMEL_MESSAGE_ATTACHMENTS : 0);
+ camel_message_info_set_flags (
+ mi, CAMEL_MESSAGE_ATTACHMENTS,
+ has_attachment ? CAMEL_MESSAGE_ATTACHMENTS : 0);
}
camel_message_info_free (mi);
/* descr may be NULL (to delete a handler) */
prev = g_hash_table_lookup (untagged_handlers, key);
- g_hash_table_replace (untagged_handlers,
- g_strdup (key),
- (gpointer) descr);
+ g_hash_table_replace (
+ untagged_handlers,
+ g_strdup (key),
+ (gpointer) descr);
return prev;
}
g_return_if_fail (untagged_id < IMAPX_UNTAGGED_LAST_ID);
cur = &(_untagged_descr[untagged_id]);
- prev = replace_untagged_descriptor (untagged_handlers,
- cur->untagged_response,
- cur);
+ prev = replace_untagged_descriptor (
+ untagged_handlers,
+ cur->untagged_response,
+ cur);
/* there must not be any previous handler here */
g_return_if_fail (prev == NULL);
}
static GHashTable *
create_initial_untagged_handler_table (void)
{
- GHashTable *uh = g_hash_table_new_full (g_str_hash,
- g_str_equal,
- g_free,
- NULL);
+ GHashTable *uh = g_hash_table_new_full (
+ g_str_hash,
+ g_str_equal,
+ g_free,
+ NULL);
guint32 ii = 0;
/* CamelIMAPXServer predefined handlers*/
GList *head, *link;
gboolean commands_started = FALSE;
- c (is->tagprefix, "- we're selected on '%s', current jobs?\n",
- camel_folder_get_full_name (is->select_folder));
+ c (
+ is->tagprefix, "- we're selected on '%s', current jobs?\n",
+ camel_folder_get_full_name (is->select_folder));
head = camel_imapx_command_queue_peek_head_link (is->active);
/* If we need to select a folder for the first command, do it now,
* once it is complete it will re-call us if it succeeded. */
if (first_ic->select) {
- c (is->tagprefix, "Selecting folder '%s' for command '%s'(%p)\n",
- camel_folder_get_full_name (first_ic->select),
- first_ic->name, first_ic);
+ c (
+ is->tagprefix, "Selecting folder '%s' for command '%s'(%p)\n",
+ camel_folder_get_full_name (first_ic->select),
+ first_ic->name, first_ic);
imapx_select (is, first_ic->select, FALSE, cancellable, error);
} else {
GQueue start = G_QUEUE_INIT;
CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) is->select_folder;
if (ifolder->exists_on_server < uids->len) {
- c (is->tagprefix, "Error: exists_on_folder %d is fewer than vanished %d\n",
- ifolder->exists_on_server, uids->len);
+ c (
+ is->tagprefix, "Error: exists_on_folder %d is fewer than vanished %d\n",
+ ifolder->exists_on_server, uids->len);
ifolder->exists_on_server = 0;
} else
ifolder->exists_on_server -= uids->len;
data->body_len = camel_stream_write_to_stream (finfo->body, data->stream, job->cancellable, &job->error);
if (data->body_len == -1)
- g_prefix_error (&job->error,
- _("Error writing to cache stream: "));
+ g_prefix_error (
+ &job->error,
+ _("Error writing to cache stream: "));
}
}
if (camel_imapx_stream_text (stream, &token, cancellable, NULL)) {
c (is->tagprefix, "BYE: %s\n", token);
- g_set_error (error, CAMEL_IMAPX_ERROR, 1,
- "IMAP server said BYE: %s", token);
+ g_set_error (
+ error, CAMEL_IMAPX_ERROR, 1,
+ "IMAP server said BYE: %s", token);
}
is->state = IMAPX_SHUTDOWN;
}
if (is->priv->context->tok == '\n') {
- g_set_error (error, CAMEL_IMAPX_ERROR, 1,
+ g_set_error (
+ error, CAMEL_IMAPX_ERROR, 1,
"truncated server response");
goto exit;
}
}
is->idle->state = IMAPX_IDLE_OFF;
} else {
- c (is->tagprefix, "idle starts in wrong state %d\n",
- is->idle->state);
+ c (
+ is->tagprefix, "idle starts in wrong state %d\n",
+ is->idle->state);
}
IDLE_UNLOCK (is->idle);
break;
idle->state = IMAPX_IDLE_OFF;
- c (is->tagprefix, "Stopping idle after %ld seconds\n",
- (long)(now - idle->started));
+ c (
+ is->tagprefix, "Stopping idle after %ld seconds\n",
+ (long)(now - idle->started));
case IMAPX_IDLE_PENDING:
idle->state = IMAPX_IDLE_OFF;
case IMAPX_IDLE_OFF:
CamelIMAPXCommand *cw = link->data;
if (cw->select && cw->select == is->select_pending) {
- c (is->tagprefix, "Cancelling command '%s'(%p) for folder '%s'\n",
- cw->name, cw, camel_folder_get_full_name (cw->select));
+ c (
+ is->tagprefix, "Cancelling command '%s'(%p) for folder '%s'\n",
+ cw->name, cw, camel_folder_get_full_name (cw->select));
g_queue_push_tail (&trash, link);
}
}
/* We don't want to fetch new messages if the command we selected this
* folder for is *already* fetching all messages (i.e. scan_changes).
* Bug #667725. */
- CamelIMAPXJob *job = imapx_is_job_in_queue (is, is->select_pending,
- IMAPX_JOB_REFRESH_INFO, NULL);
+ CamelIMAPXJob *job = imapx_is_job_in_queue (
+ is, is->select_pending,
+ IMAPX_JOB_REFRESH_INFO, NULL);
if (job) {
RefreshInfoData *data = camel_imapx_job_get_data (job);
#if 0
/* This should trigger a new messages scan */
if (is->exists != is->select_folder->summary->root_view->total_count)
- g_warning ("exists is %d our summary is %d and summary exists is %d\n", is->exists,
- is->select_folder->summary->root_view->total_count,
- ((CamelIMAPXSummary *) is->select_folder->summary)->exists);
+ g_warning (
+ "exists is %d our summary is %d and summary exists is %d\n", is->exists,
+ is->select_folder->summary->root_view->total_count,
+ ((CamelIMAPXSummary *) is->select_folder->summary)->exists);
#endif
}
firstuid = imapx_get_uid_from_index (folder->summary, 0);
lastuid = imapx_get_uid_from_index (folder->summary, total - 1);
- c (is->tagprefix, "SELECT QRESYNC %" G_GUINT64_FORMAT
- " %" G_GUINT64_FORMAT "\n",
- ifolder->uidvalidity_on_server, isum->modseq);
+ c (
+ is->tagprefix, "SELECT QRESYNC %" G_GUINT64_FORMAT
+ " %" G_GUINT64_FORMAT "\n",
+ ifolder->uidvalidity_on_server, isum->modseq);
camel_imapx_command_add (
ic, " (QRESYNC (%"
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("IMAP server %s does not support %s "
- "authentication"), host, mechanism);
+ "authentication"), host, mechanism);
result = CAMEL_AUTHENTICATION_ERROR;
goto exit;
}
}
if (camel_folder_summary_count (job->folder->summary)) {
- gchar *uid = imapx_get_uid_from_index (job->folder->summary,
- camel_folder_summary_count (job->folder->summary) - 1);
+ gchar *uid = imapx_get_uid_from_index (
+ job->folder->summary,
+ camel_folder_summary_count (job->folder->summary) - 1);
guint64 uidl = strtoull (uid, NULL, 10);
g_free (uid);
uidl++;
if (uidl > ifolder->uidnext_on_server) {
- c (is->tagprefix, "Updating uidnext_on_server for '%s' to %" G_GUINT64_FORMAT "\n",
- camel_folder_get_full_name (job->folder), uidl);
+ c (
+ is->tagprefix, "Updating uidnext_on_server for '%s' to %" G_GUINT64_FORMAT "\n",
+ camel_folder_get_full_name (job->folder), uidl);
ifolder->uidnext_on_server = uidl;
}
}
_("Scanning for changed messages in '%s'"),
camel_folder_get_display_name (job->folder));
- e ('E', "Scanning from %s in %s\n", uid ? uid : "start",
- camel_folder_get_full_name (job->folder));
+ e (
+ 'E', "Scanning from %s in %s\n", uid ? uid : "start",
+ camel_folder_get_full_name (job->folder));
ic = camel_imapx_command_new (
is, "FETCH", job->folder,
}
if (camel_folder_summary_count (job->folder->summary)) {
- gchar *uid = imapx_get_uid_from_index (job->folder->summary,
- camel_folder_summary_count (job->folder->summary) - 1);
+ gchar *uid = imapx_get_uid_from_index (
+ job->folder->summary,
+ camel_folder_summary_count (job->folder->summary) - 1);
guint64 uidl = strtoull (uid, NULL, 10);
g_free (uid);
uidl++;
if (uidl > ifolder->uidnext_on_server) {
- c (is->tagprefix, "Updating uidnext_on_server for '%s' to %" G_GUINT64_FORMAT "\n",
- camel_folder_get_full_name (job->folder), uidl);
+ c (
+ is->tagprefix, "Updating uidnext_on_server for '%s' to %" G_GUINT64_FORMAT "\n",
+ camel_folder_get_full_name (job->folder), uidl);
ifolder->uidnext_on_server = uidl;
}
}
data->fetch_msg_limit,
camel_folder_get_display_name (folder));
- ic = camel_imapx_command_new (is, "FETCH", job->folder,
- "UID FETCH %s:%s (RFC822.SIZE RFC822.HEADER FLAGS)", start_uid, end_uid);
+ ic = camel_imapx_command_new (
+ is, "FETCH", job->folder,
+ "UID FETCH %s:%s (RFC822.SIZE RFC822.HEADER FLAGS)", start_uid, end_uid);
ic->pri = job->pri;
ic->complete = imapx_command_fetch_new_messages_done;
if (is->use_qresync && isum->modseq && ifolder->uidvalidity_on_server)
can_qresync = TRUE;
- e (is->tagprefix, "folder %s is %sselected, total %u / %u, unread %u / %u, modseq %" G_GUINT64_FORMAT " / %" G_GUINT64_FORMAT ", uidnext %u / %u: will %srescan\n",
- full_name, is_selected?"": "not ", total, ifolder->exists_on_server,
- camel_folder_summary_get_unread_count (folder->summary), ifolder->unread_on_server,
- (guint64) isum->modseq, (guint64) ifolder->modseq_on_server,
- isum->uidnext, ifolder->uidnext_on_server,
- need_rescan?"":"not ");
+ e (
+ is->tagprefix, "folder %s is %sselected, total %u / %u, unread %u / %u, modseq %" G_GUINT64_FORMAT " / %" G_GUINT64_FORMAT ", uidnext %u / %u: will %srescan\n",
+ full_name, is_selected?"": "not ", total, ifolder->exists_on_server,
+ camel_folder_summary_get_unread_count (folder->summary), ifolder->unread_on_server,
+ (guint64) isum->modseq, (guint64) ifolder->modseq_on_server,
+ isum->uidnext, ifolder->uidnext_on_server,
+ need_rescan?"":"not ");
/* Fetch new messages first, so that they appear to the user ASAP */
if (ifolder->exists_on_server > total ||
if (total != ifolder->exists_on_server ||
camel_folder_summary_get_unread_count (folder->summary) != ifolder->unread_on_server ||
(isum->modseq != ifolder->modseq_on_server)) {
- c (is->tagprefix, "Eep, after QRESYNC we're out of sync. total %u / %u, unread %u / %u, modseq %" G_GUINT64_FORMAT " / %" G_GUINT64_FORMAT "\n",
- total, ifolder->exists_on_server,
- camel_folder_summary_get_unread_count (folder->summary), ifolder->unread_on_server,
- isum->modseq, ifolder->modseq_on_server);
+ c (
+ is->tagprefix, "Eep, after QRESYNC we're out of sync. total %u / %u, unread %u / %u, modseq %" G_GUINT64_FORMAT " / %" G_GUINT64_FORMAT "\n",
+ total, ifolder->exists_on_server,
+ camel_folder_summary_get_unread_count (folder->summary), ifolder->unread_on_server,
+ isum->modseq, ifolder->modseq_on_server);
} else {
- c (is->tagprefix, "OK, after QRESYNC we're still in sync. total %u / %u, unread %u / %u, modseq %" G_GUINT64_FORMAT " / %" G_GUINT64_FORMAT "\n",
- total, ifolder->exists_on_server,
- camel_folder_summary_get_unread_count (folder->summary), ifolder->unread_on_server,
- isum->modseq, ifolder->modseq_on_server);
+ c (
+ is->tagprefix, "OK, after QRESYNC we're still in sync. total %u / %u, unread %u / %u, modseq %" G_GUINT64_FORMAT " / %" G_GUINT64_FORMAT "\n",
+ total, ifolder->exists_on_server,
+ camel_folder_summary_get_unread_count (folder->summary), ifolder->unread_on_server,
+ isum->modseq, ifolder->modseq_on_server);
goto done;
}
}
* But for the on-disk cache we do always capitalize the Inbox no matter what the
* server provided.
*/
- folder_dir = imapx_path_to_physical (storage_path,
+ folder_dir = imapx_path_to_physical (
+ storage_path,
g_ascii_strcasecmp (folder_name, "INBOX") == 0 ? "INBOX" : folder_name);
g_free (storage_path);
/* So do we care if this didn't work? Its just a cache? */
if (g_rename (oldpath, newpath) == -1) {
- g_warning ("Could not rename message cache '%s' to '%s': %s: cache reset",
- oldpath, newpath, g_strerror (errno));
+ g_warning (
+ "Could not rename message cache '%s' to '%s': %s: cache reset",
+ oldpath, newpath, g_strerror (errno));
}
g_free (oldpath);
* if we *know* there are data to receive. So set the error
* accordingly */
if (!left)
- g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
- _("Source stream returned no data"));
+ g_set_error (
+ error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+ _("Source stream returned no data"));
return -1;
}
}
fir = folder_summary_class->summary_header_to_db (s, error);
if (!fir)
return NULL;
- fir->bdata = g_strdup_printf ("%d %" G_GUINT64_FORMAT " %u %" G_GUINT64_FORMAT, CAMEL_IMAPX_SUMMARY_VERSION,
- (guint64) ims->validity, ims->uidnext,
- (guint64) ims->modseq);
+ fir->bdata = g_strdup_printf (
+ "%d %" G_GUINT64_FORMAT " %u %" G_GUINT64_FORMAT, CAMEL_IMAPX_SUMMARY_VERSION,
+ (guint64) ims->validity, ims->uidnext,
+ (guint64) ims->modseq);
return fir;
}
/* TODO add imapx_utils_uninit()
* to free hash table
*/
- capa_htable = g_hash_table_new_full (g_str_hash,
- g_str_equal,
- g_free,
- NULL);
+ capa_htable = g_hash_table_new_full (
+ g_str_hash,
+ g_str_equal,
+ g_free,
+ NULL);
for (i = 0; i < G_N_ELEMENTS (capa_table); i++) {
- g_hash_table_insert (capa_htable,
- g_strdup (capa_table[i].name),
- GUINT_TO_POINTER (capa_table[i].flag));
+ g_hash_table_insert (
+ capa_htable,
+ g_strdup (capa_table[i].name),
+ GUINT_TO_POINTER (capa_table[i].flag));
}
}
while ((c = *p))
*p++ = toupper(c);
if (!strncmp ((gchar *) token, "AUTH=", 5)) {
- g_hash_table_insert (cinfo->auth_types,
- g_strdup ((gchar *) token + 5),
- GINT_TO_POINTER (1));
+ g_hash_table_insert (
+ cinfo->auth_types,
+ g_strdup ((gchar *) token + 5),
+ GINT_TO_POINTER (1));
break;
}
case IMAPX_TOK_INT:
* (1 << 0), so we can use GPOINTER_TO_UINT (NULL) as
* invalid value
*/
- capa_id = GPOINTER_TO_UINT (g_hash_table_lookup (capa_htable,
- capability));
+ capa_id = GPOINTER_TO_UINT (
+ g_hash_table_lookup (capa_htable, capability));
if (capa_id > 0)
goto exit;
capa_id = (guint32) check_id;
/* insert */
- g_hash_table_insert (capa_htable,
- g_strdup (capability),
- GUINT_TO_POINTER (capa_id));
+ g_hash_table_insert (
+ capa_htable,
+ g_strdup (capability),
+ GUINT_TO_POINTER (capa_id));
exit:
g_mutex_unlock (&capa_htable_lock);
G_LOCK_DEFINE_STATIC (lock);
G_LOCK (lock);
- res = g_strdup_printf ("tempuid-%lx-%d",
- (gulong) time (NULL),
- counter++);
+ res = g_strdup_printf (
+ "tempuid-%lx-%d",
+ (gulong) time (NULL),
+ counter++);
G_UNLOCK (lock);
return res;
if (mp->headers) {
struct _camel_header_raw *h = mp->headers;
gchar *val;
- gssize (*writefn) (CamelStream *stream,
- const gchar *name,
- const gchar *value,
- GCancellable *cancellable,
- GError **error);
+ gssize (*writefn) (
+ CamelStream *stream,
+ const gchar *name,
+ const gchar *value,
+ GCancellable *cancellable,
+ GError **error);
/* fold/write the headers. But dont fold headers that are already formatted
* (e.g. ones with parameter-lists, that we know about, and have created) */
"sql:", nss_configdir, NULL);
#else
gchar *user_nss_dir = g_build_filename (
- g_get_home_dir (), ".pki/nssdb", NULL );
+ g_get_home_dir (), ".pki/nssdb", NULL );
if (g_mkdir_with_parents (user_nss_dir, 0700))
g_warning (
"Failed to create SQL "
CamelMimeMessage *
imap_get_message_cached (CamelFolder *folder,
- const gchar *message_uid,
- GCancellable *cancellable)
+ const gchar *message_uid,
+ GCancellable *cancellable)
{
CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
CamelMimeMessage *msg = NULL;
static void
sendmail_settings_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
switch (property_id) {
case PROP_USE_CUSTOM_BINARY:
static void
sendmail_settings_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
switch (property_id) {
case PROP_USE_CUSTOM_BINARY:
**/
void
camel_sendmail_settings_set_use_custom_binary (CamelSendmailSettings *settings,
- gboolean use_custom_binary)
+ gboolean use_custom_binary)
{
g_return_if_fail (CAMEL_IS_SENDMAIL_SETTINGS (settings));
**/
void
camel_sendmail_settings_set_use_custom_args (CamelSendmailSettings *settings,
- gboolean use_custom_args)
+ gboolean use_custom_args)
{
g_return_if_fail (CAMEL_IS_SENDMAIL_SETTINGS (settings));
**/
void
camel_sendmail_settings_set_custom_binary (CamelSendmailSettings *settings,
- const gchar *custom_binary)
+ const gchar *custom_binary)
{
g_return_if_fail (CAMEL_IS_SENDMAIL_SETTINGS (settings));
**/
void
camel_sendmail_settings_set_custom_args (CamelSendmailSettings *settings,
- const gchar *custom_args)
+ const gchar *custom_args)
{
g_return_if_fail (CAMEL_IS_SENDMAIL_SETTINGS (settings));
static GPtrArray *
parse_sendmail_args (const gchar *binary,
- const gchar *args,
- const gchar *from_addr,
- CamelAddress *recipients)
+ const gchar *args,
+ const gchar *from_addr,
+ CamelAddress *recipients)
{
GPtrArray *args_arr;
gint ii, len, argc = 0;
}
}
- argv_arr = parse_sendmail_args (binary,
- custom_args ? custom_args : "-i -f %F -- %R",
- from_addr,
- recipients);
+ argv_arr = parse_sendmail_args (
+ binary,
+ custom_args ? custom_args : "-i -f %F -- %R",
+ from_addr,
+ recipients);
if (!argv_arr) {
g_set_error (
**/
void
e_source_mail_submission_set_replies_to_origin_folder (ESourceMailSubmission *extension,
- gboolean replies_to_origin_folder)
+ gboolean replies_to_origin_folder)
{
g_return_if_fail (E_IS_SOURCE_MAIL_SUBMISSION (extension));
return NULL;
}
- num_eras = _NL_CURRENT_WORD (LC_TIME,
- _NL_TIME_ERA_NUM_ENTRIES);
+ num_eras = _NL_CURRENT_WORD (LC_TIME, _NL_TIME_ERA_NUM_ENTRIES);
for (era_cnt = 0; era_cnt < (gint) num_eras;
++era_cnt, rp = rp_backup)
{
- era = _nl_select_era_entry (era_cnt
- HELPER_LOCALE_ARG);
+ era = _nl_select_era_entry (era_cnt HELPER_LOCALE_ARG);
if (era != NULL && match_string (era->era_name, rp))
{
*decided = loc;
break;
}
- num_eras = _NL_CURRENT_WORD (LC_TIME,
- _NL_TIME_ERA_NUM_ENTRIES);
+ num_eras = _NL_CURRENT_WORD (LC_TIME, _NL_TIME_ERA_NUM_ENTRIES);
for (era_cnt = 0; era_cnt < (gint) num_eras; ++era_cnt)
{
- era = _nl_select_era_entry (era_cnt
- HELPER_LOCALE_ARG);
+ era = _nl_select_era_entry (era_cnt HELPER_LOCALE_ARG);
if (era != NULL)
{
gint delta = ((tm->tm_year - era->offset)
case 'Y':
if (*decided != raw)
{
- num_eras = _NL_CURRENT_WORD (LC_TIME,
- _NL_TIME_ERA_NUM_ENTRIES);
+ num_eras = _NL_CURRENT_WORD (
+ LC_TIME,
+ _NL_TIME_ERA_NUM_ENTRIES);
for (era_cnt = 0; era_cnt < (gint) num_eras;
++era_cnt, rp = rp_backup)
{
**/
void
e_name_selector_dialog_set_section_visible (ENameSelectorDialog *name_selector_dialog,
- const gchar *name,
- gboolean visible)
+ const gchar *name,
+ gboolean visible)
{
Section *section;
gint index;
**/
gboolean
e_name_selector_dialog_get_section_visible (ENameSelectorDialog *name_selector_dialog,
- const gchar *name)
+ const gchar *name)
{
Section *section;
gint index;
static gboolean
is_source_enabled_with_parents (ESourceRegistry *registry,
- ESource *source)
+ ESource *source)
{
ESource *parent;
const gchar *parent_uid;
static gboolean
is_source_enabled_with_parents (ESourceRegistry *registry,
- ESource *source)
+ ESource *source)
{
ESource *parent;
const gchar *parent_uid;
gchar *value = NULL;
enum_class = g_type_class_ref (CAMEL_TYPE_NETWORK_SECURITY_METHOD);
- enum_value = g_enum_get_value (enum_class,
+ enum_value = g_enum_get_value (
+ enum_class,
CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT);
if (enum_value != NULL) {
value = g_strdup (enum_value->value_nick);