This property is not used anywhere.
Remove all references to it from built-in backends.
The following EBook functions now simply return an empty list:
e_book_get_supported_auth_methods
e_book_async_get_supported_auth_methods
e_book_get_supported_auth_methods_async
*prop_value = e_data_book_string_slist_to_comma_string (fields);
g_slist_free (fields);
- } else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS)) {
- *prop_value = NULL;
} else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_REVISION)) {
*prop_value = g_strdup (bf->priv->revision);
} else {
g_slist_free (fields);
g_free (fields_str);
- } else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS)) {
- e_data_book_respond_get_backend_property (book, opid, NULL, "plain/password");
} else {
E_BOOK_BACKEND_CLASS (e_book_backend_google_parent_class)->get_backend_property (backend, book, opid, cancellable, prop_name);
}
attrs[i++] = "supportedControl";
attrs[i++] = "supportedExtension";
attrs[i++] = "supportedFeatures";
- attrs[i++] = "supportedSASLMechanisms";
attrs[i++] = "supportedLDAPVersion";
attrs[i++] = "subschemaSubentry"; /* OpenLDAP's dn for schema information */
attrs[i++] = "schemaNamingContext"; /* Active directory's dn for schema information */
}
g_rec_mutex_lock (&eds_ldap_handler_lock);
- values = ldap_get_values (bl->priv->ldap, resp, "supportedSASLMechanisms");
- g_rec_mutex_unlock (&eds_ldap_handler_lock);
- if (values) {
- gchar *auth_method;
- if (bl->priv->supported_auth_methods) {
- g_slist_foreach (bl->priv->supported_auth_methods, (GFunc) g_free, NULL);
- g_slist_free (bl->priv->supported_auth_methods);
- }
- bl->priv->supported_auth_methods = NULL;
-
- auth_method = g_strdup_printf ("ldap/simple-binddn|%s", _("Using Distinguished Name (DN)"));
- bl->priv->supported_auth_methods = g_slist_append (bl->priv->supported_auth_methods, auth_method);
-
- auth_method = g_strdup_printf ("ldap/simple-email|%s", _("Using Email Address"));
- bl->priv->supported_auth_methods = g_slist_append (bl->priv->supported_auth_methods, auth_method);
-
- for (i = 0; values[i]; i++) {
- auth_method = g_strdup_printf ("sasl/%s|%s", values[i], values[i]);
- bl->priv->supported_auth_methods = g_slist_append (bl->priv->supported_auth_methods, auth_method);
- if (enable_debug)
- g_message ("supported SASL mechanism: %s", values[i]);
- }
- ldap_value_free (values);
- }
-
- g_rec_mutex_lock (&eds_ldap_handler_lock);
values = ldap_get_values (bl->priv->ldap, resp, "subschemaSubentry");
g_rec_mutex_unlock (&eds_ldap_handler_lock);
if (!values || !values[0]) {
e_data_book_respond_get_backend_property (book, opid, NULL, str);
g_free (str);
- } else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS)) {
- EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
- gchar *str;
-
- str = e_data_book_string_slist_to_comma_string (bl->priv->supported_auth_methods);
-
- e_data_book_respond_get_backend_property (book, opid, NULL, str);
-
- g_free (str);
} else {
E_BOOK_BACKEND_CLASS (e_book_backend_ldap_parent_class)->get_backend_property (backend, book, opid, cancellable, prop_name);
}
*prop_value = e_data_book_string_slist_to_comma_string (fields);
g_slist_free (fields);
- } else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS)) {
- *prop_value = NULL;
} else {
processed = FALSE;
}
g_slist_free (fields);
g_free (fields_str);
- } else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS)) {
- e_data_book_respond_get_backend_property (book, opid, NULL, "plain/password");
} else {
E_BOOK_BACKEND_CLASS (e_book_backend_webdav_parent_class)->get_backend_property (backend, book, opid, cancellable, prop_name);
}
* of supported fields by the backend. Use e_client_util_parse_comma_strings()
* to parse returned string value into a #GSList. These fields can be
* stored for contacts.
- * @BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS: Retrieves comma-separated list
- * of supported authentication methods by the backend.
- * Use e_client_util_parse_comma_strings() to parse returned string value
- * into a #GSList.
*
* See also: @CLIENT_BACKEND_PROPERTY_OPENED, @CLIENT_BACKEND_PROPERTY_OPENING,
* @CLIENT_BACKEND_PROPERTY_ONLINE, @CLIENT_BACKEND_PROPERTY_READONLY
#define BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS "supported-fields"
/**
- * BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS:
- *
- * FIXME: Document me.
- *
- * Since: 3.2
- **/
-#define BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS "supported-auth-methods"
-
-/**
* E_BOOK_CLIENT_ERROR:
*
* FIXME: Document me.
GCancellable *cancellable,
GError **error);
+#ifndef EDS_DISABLE_DEPRECATED
+/**
+ * BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS:
+ *
+ * Since: 3.2
+ *
+ * Deprecated: 3.8: The property is no longer supported.
+ **/
+#define BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS "supported-auth-methods"
+#endif /* EDS_DISABLE_DEPRECATED */
+
G_END_DECLS
#endif /* E_BOOK_CLIENT_H */
#define CLIENT_BACKEND_PROPERTY_CAPABILITIES "capabilities"
#define BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS "required-fields"
#define BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS "supported-fields"
-#define BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS "supported-auth-methods"
struct _EBookPrivate {
EBookClient *client;
*
* Returns: %TRUE if successful, %FALSE otherwise
*
- * Deprecated: 3.2: Use e_client_get_backend_property_sync() on
- * an #EBookClient object with #BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS instead.
+ * Deprecated: 3.2: The property is no longer supported.
**/
gboolean
e_book_get_supported_auth_methods (EBook *book,
GList **auth_methods,
GError **error)
{
- gchar *prop_value = NULL;
- gboolean success;
-
g_return_val_if_fail (E_IS_BOOK (book), FALSE);
if (auth_methods != NULL)
*auth_methods = NULL;
- success = e_client_get_backend_property_sync (
- E_CLIENT (book->priv->client),
- BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS,
- &prop_value, NULL, error);
-
- if (success && auth_methods != NULL) {
- GQueue queue = G_QUEUE_INIT;
- gchar **strv;
- gint ii;
-
- strv = g_strsplit (prop_value, ",", -1);
-
- for (ii = 0; strv != NULL && strv[ii] != NULL; ii++)
- g_queue_push_tail (&queue, strv[ii]);
-
- /* The GQueue now owns the strings in the string array,
- * so use g_free() instead of g_strfreev() to free just
- * the array itself. */
- g_free (strv);
-
- /* Transfer ownership of the GQueue content. */
- *auth_methods = g_queue_peek_head_link (&queue);
- }
-
- g_free (prop_value);
-
- return success;
-}
-
-static void
-get_supported_auth_methods_reply (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
-{
- AsyncData *data = user_data;
- EBookEListCallback cb = data->callback;
- EBookEListAsyncCallback excb = data->excallback;
- EList *elist;
- gchar *prop_value = NULL;
- GError *error = NULL;
-
- e_client_get_backend_property_finish (
- E_CLIENT (source_object), result, &prop_value, &error);
-
- /* Sanity check. */
- g_return_if_fail (
- ((prop_value != NULL) && (error == NULL)) ||
- ((prop_value == NULL) && (error != NULL)));
-
- /* In the event of an error, we pass an empty EList. */
- elist = e_list_new (NULL, (EListFreeFunc) g_free, NULL);
-
- if (prop_value != NULL) {
- gchar **strv;
- gint ii;
-
- strv = g_strsplit (prop_value, ",", -1);
- for (ii = 0; strv != NULL && strv[ii] != NULL; ii++) {
- gchar *utf8 = e_util_utf8_make_valid (strv[ii]);
- e_list_append (elist, utf8);
- }
- g_strfreev (strv);
- }
-
- if (cb != NULL && error == NULL)
- cb (data->book, E_BOOK_ERROR_OK, elist, data->closure);
- if (cb != NULL && error != NULL)
- cb (data->book, error->code, elist, data->closure);
- if (excb != NULL)
- excb (data->book, error, elist, data->closure);
-
- g_object_unref (elist);
-
- if (error != NULL)
- g_error_free (error);
-
- g_object_unref (data->book);
- g_slice_free (AsyncData, data);
+ return TRUE;
}
/**
*
* Returns: %TRUE if successful, %FALSE otherwise.
*
- * Deprecated: 3.0: Use e_book_get_supported_auth_methods_async() instead.
+ * Deprecated: 3.0: The property is no longer supported.
**/
gboolean
e_book_async_get_supported_auth_methods (EBook *book,
EBookEListCallback cb,
gpointer closure)
{
- AsyncData *data;
-
g_return_val_if_fail (E_IS_BOOK (book), FALSE);
- data = g_slice_new0 (AsyncData);
- data->book = g_object_ref (book);
- data->callback = cb;
- data->closure = closure;
-
- e_client_get_backend_property (
- E_CLIENT (book->priv->client),
- BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS,
- NULL, get_supported_auth_methods_reply, data);
+ if (cb != NULL) {
+ /* Pass the callback an empty list. */
+ EList *elist = e_list_new (NULL, NULL, NULL);
+ cb (book, E_BOOK_ERROR_OK, elist, closure);
+ g_object_unref (elist);
+ }
return TRUE;
}
*
* Since: 2.32
*
- * Deprecated: 3.2: Use e_client_get_backend_property() and e_client_get_backend_property_finish()
- * on an #EBookClient object with #BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS instead.
+ * Deprecated: 3.2: The property is no longer supported.
**/
gboolean
e_book_get_supported_auth_methods_async (EBook *book,
EBookEListAsyncCallback cb,
gpointer closure)
{
- AsyncData *data;
-
g_return_val_if_fail (E_IS_BOOK (book), FALSE);
- data = g_slice_new0 (AsyncData);
- data->book = g_object_ref (book);
- data->excallback = cb;
- data->closure = closure;
-
- e_client_get_backend_property (
- E_CLIENT (book->priv->client),
- BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS,
- NULL, get_supported_auth_methods_reply, data);
+ if (cb != NULL) {
+ /* Pass the callback an empty list. */
+ EList *elist = e_list_new (NULL, NULL, NULL);
+ cb (book, NULL, elist, closure);
+ g_object_unref (elist);
+ }
return TRUE;
}
#define BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS "supported-fields"
/**
- * BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS:
- *
- * FIXME: Document me.
- *
- * Since: 3.2
- **/
-#define BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS "supported-auth-methods"
-
-/**
* BOOK_BACKEND_PROPERTY_REVISION:
*
* The current overall revision string, this can be used as
GError *error);
#ifndef EDS_DISABLE_DEPRECATED
+/**
+ * BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS:
+ *
+ * Since: 3.2
+ *
+ * Deprecated: 3.8: The property is no longer supported.
+ **/
+#define BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS "supported-auth-methods"
+
void e_book_backend_foreach_view (EBookBackend *backend,
gboolean (*callback) (EDataBookView *view,
gpointer user_data),
<TITLE>EBookClient</TITLE>
BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS
BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS
-BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS
E_BOOK_CLIENT_ERROR
EBookClientError
e_book_client_error_to_string
e_book_client_get_view
e_book_client_get_view_finish
e_book_client_get_view_sync
+BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS
<SUBSECTION Standard>
E_BOOK_CLIENT
E_IS_BOOK_CLIENT
CLIENT_BACKEND_PROPERTY_CAPABILITIES
BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS
BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS
-BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS
BOOK_BACKEND_PROPERTY_REVISION
e_book_backend_get_cache_dir
e_book_backend_set_cache_dir
e_book_backend_sync
e_book_backend_set_is_removed
e_book_backend_respond_opened
+BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS
e_book_backend_foreach_view
<SUBSECTION Standard>
E_BOOK_BACKEND
e_client_get_backend_property (async_data->client, BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS, async_data->cancellable, client_utils_get_backend_property_cb, async_data);
e_client_get_backend_property (async_data->client, BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS, async_data->cancellable, client_utils_get_backend_property_cb, async_data);
- e_client_get_backend_property (async_data->client, BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS, async_data->cancellable, client_utils_get_backend_property_cb, async_data);
} else {
g_warn_if_reached ();
client_utils_get_backend_property_cb (source_object, NULL, async_data);
prop_names = g_slist_append (prop_names, (gpointer) CLIENT_BACKEND_PROPERTY_CAPABILITIES);
prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS);
prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS);
- prop_names = g_slist_append (prop_names, (gpointer) BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS);
return prop_names;
}
if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES) ||
g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS) ||
- g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS) ||
- g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS)) {
+ g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS)) {
GSList *values = e_client_util_parse_comma_strings (prop_value), *v;
for (v = values; v; v = v->next) {