static void e_book_backend_webdav_get_backend_property (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *prop_name) { g_return_if_fail (prop_name != NULL); if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) { e_data_book_respond_get_backend_property (book, opid, NULL, "net,do-initial-query,contact-lists"); } else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS)) { e_data_book_respond_get_backend_property (book, opid, NULL, e_contact_field_name (E_CONTACT_FILE_AS)); } else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS)) { gchar *fields_str; GSList *fields = NULL; gint i; /* we support everything */ for (i = 1; i < E_CONTACT_FIELD_LAST; ++i) { fields = g_slist_append (fields, (gpointer) e_contact_field_name (i)); } fields_str = e_data_book_string_slist_to_comma_string (fields); e_data_book_respond_get_backend_property (book, opid, NULL, fields_str); g_slist_free (fields); g_free (fields_str); } else { E_BOOK_BACKEND_CLASS (e_book_backend_webdav_parent_class)->get_backend_property (backend, book, opid, cancellable, prop_name); } }
static void e_book_backend_vcf_class_init (EBookBackendVCFClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); EBookBackendSyncClass *sync_class; EBookBackendClass *backend_class; sync_class = E_BOOK_BACKEND_SYNC_CLASS (klass); backend_class = E_BOOK_BACKEND_CLASS (klass); /* Set the virtual methods. */ backend_class->load_source = e_book_backend_vcf_load_source; backend_class->get_static_capabilities = e_book_backend_vcf_get_static_capabilities; backend_class->start_book_view = e_book_backend_vcf_start_book_view; backend_class->stop_book_view = e_book_backend_vcf_stop_book_view; backend_class->cancel_operation = e_book_backend_vcf_cancel_operation; backend_class->set_mode = e_book_backend_vcf_set_mode; sync_class->create_contact_sync = e_book_backend_vcf_create_contact; sync_class->remove_contacts_sync = e_book_backend_vcf_remove_contacts; sync_class->modify_contact_sync = e_book_backend_vcf_modify_contact; sync_class->get_contact_sync = e_book_backend_vcf_get_contact; sync_class->get_contact_list_sync = e_book_backend_vcf_get_contact_list; sync_class->authenticate_user_sync = e_book_backend_vcf_authenticate_user; sync_class->get_required_fields_sync = e_book_backend_vcf_get_required_fields; sync_class->get_supported_fields_sync = e_book_backend_vcf_get_supported_fields; object_class->dispose = e_book_backend_vcf_dispose; }
static void e_book_backend_scalix_class_init (EBookBackendScalixClass * klass) { GObjectClass *object_class; EBookBackendSyncClass *sync_class; EBookBackendClass *backend_class; e_book_backend_scalix_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (EBookBackendScalixPrivate)); object_class = G_OBJECT_CLASS (klass); backend_class = E_BOOK_BACKEND_CLASS (klass); sync_class = E_BOOK_BACKEND_SYNC_CLASS (klass); /* Set the virtual methods. */ object_class->dispose = e_book_backend_scalix_dispose; backend_class->load_source = e_book_backend_scalix_load_source; backend_class->get_static_capabilities = e_book_backend_scalix_get_static_capabilities; backend_class->start_book_view = e_book_backend_scalix_start_book_view; backend_class->stop_book_view = e_book_backend_scalix_stop_book_view; backend_class->set_mode = e_book_backend_scalix_set_mode; sync_class->remove_sync = e_book_backend_scalix_remove; sync_class->authenticate_user_sync = e_book_backend_scalix_authenticate_user; sync_class->create_contact_sync = e_book_backend_scalix_create_contact; sync_class->get_contact_list_sync = e_book_backend_scalix_get_contact_list; sync_class->get_supported_fields_sync = e_book_backend_scalix_get_supported_fields; sync_class->remove_contacts_sync = e_book_backend_scalix_remove_contacts; sync_class->modify_contact_sync = e_book_backend_scalix_modify_contact; sync_class->get_contact_sync = e_book_backend_scalix_get_contact; sync_class->get_supported_auth_methods_sync = e_book_backend_scalix_get_supported_auth_methods; sync_class->get_required_fields_sync = e_book_backend_scalix_get_required_fields; #if 0 parent_class->get_changes = e_book_backend_scalix_get_changes; #endif }
static void e_book_backend_sync_class_init (EBookBackendSyncClass *klass) { GObjectClass *object_class; EBookBackendClass *backend_class = E_BOOK_BACKEND_CLASS (klass); parent_class = g_type_class_peek_parent (klass); object_class = (GObjectClass *) klass; backend_class->remove = _e_book_backend_remove; backend_class->create_contact = _e_book_backend_create_contact; backend_class->remove_contacts = _e_book_backend_remove_contacts; backend_class->modify_contact = _e_book_backend_modify_contact; backend_class->get_contact = _e_book_backend_get_contact; backend_class->get_contact_list = _e_book_backend_get_contact_list; backend_class->get_changes = _e_book_backend_get_changes; backend_class->authenticate_user = _e_book_backend_authenticate_user; backend_class->get_required_fields = _e_book_backend_get_required_fields; backend_class->get_supported_fields = _e_book_backend_get_supported_fields; backend_class->get_supported_auth_methods = _e_book_backend_get_supported_auth_methods; object_class->dispose = e_book_backend_sync_dispose; }