dnl ******************************
ADDRESS_BOOK_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.AddressBook4"
CALENDAR_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Calendar3"
-SOURCES_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Sources0"
+SOURCES_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Sources1"
AC_DEFINE_UNQUOTED(
ADDRESS_BOOK_DBUS_SERVICE_NAME,
<FILE>e-dbus-source-manager</FILE>
<TITLE>EDBusSourceManager</TITLE>
EDBusSourceManager
+e_dbus_source_manager_call_allow_auth_prompt_all_sync
+e_dbus_source_manager_call_allow_auth_prompt_all
+e_dbus_source_manager_call_allow_auth_prompt_all_finish
+e_dbus_source_manager_complete_allow_auth_prompt_all
e_dbus_source_manager_call_authenticate_sync
e_dbus_source_manager_call_authenticate
e_dbus_source_manager_call_authenticate_finish
}
static gboolean
+source_registry_server_allow_auth_prompt_all_cb (EDBusSourceManager *interface,
+ GDBusMethodInvocation *invocation,
+ ESourceRegistryServer *server)
+{
+ GList *list, *link;
+
+ list = e_source_registry_server_list_sources (server, NULL);
+
+ for (link = list; link != NULL; link = g_list_next (link))
+ e_server_side_source_set_allow_auth_prompt (
+ E_SERVER_SIDE_SOURCE (link->data), TRUE);
+
+ g_list_free_full (list, (GDestroyNotify) g_object_unref);
+
+ e_dbus_source_manager_complete_allow_auth_prompt_all (
+ interface, invocation);
+
+ return TRUE;
+}
+
+static gboolean
source_registry_server_authenticate_cb (EDBusSourceManager *interface,
GDBusMethodInvocation *invocation,
const gchar *source_uid,
server->priv->running_auths = running_auths;
g_signal_connect (
+ source_manager, "handle-allow-auth-prompt-all",
+ G_CALLBACK (source_registry_server_allow_auth_prompt_all_cb),
+ server);
+
+ g_signal_connect (
source_manager, "handle-authenticate",
G_CALLBACK (source_registry_server_authenticate_cb),
server);
if (registry->priv->dbus_source_manager == NULL)
return FALSE;
+ /* Allow authentication prompts for all exported data sources
+ * when a new EDBusSourceManagerProxy is created. The thought
+ * being, if you cancel an authentication prompt you will not
+ * be bothered again until you start (or restart) a new E-D-S
+ * client app. Failure here is non-fatal, ignore errors. */
+ e_dbus_source_manager_call_allow_auth_prompt_all_sync (
+ registry->priv->dbus_source_manager, cancellable, NULL);
+
return TRUE;
}
dbus_source = e_dbus_object_get_source (dbus_object);
g_return_val_if_fail (E_DBUS_IS_SOURCE (dbus_source), FALSE);
- /* Allow authentication prompts for a data source
- * when a new client-side proxy object is created.
- * The thought being if you cancel an authentication
- * prompt you won't be bothered again until you start
- * (or restart) a new E-D-S client app.
- *
- * Failure here is non-fatal, ignore errors.
- *
- * XXX Only GDBusProxy objects may call this. Sources
- * created server-side can't invoke remote methods.
- */
- if (G_IS_DBUS_PROXY (dbus_source))
- e_dbus_source_call_allow_auth_prompt_sync (
- dbus_source, cancellable, NULL);
-
/* The UID never changes, so we can cache a copy.
*
* XXX Note, EServerSideSource may have already set this
-->
<interface name="org.gnome.evolution.dataserver.SourceManager">
<!--
+ AllowAuthPromptAll:
+ @since: 3.8
+
+ This method is equivalent to calling AllowAuthPrompt() on each
+ managed object, but does so in a single method invocation.
+ -->
+ <method name="AllowAuthPromptAll"/>
+
+ <!--
Authenticate:
@uid: Unique identifier for the authenticating source
@prompt_title: The title of the prompt