[telepathy-mission-control/master] fd.o #21171: AccountManager: break CreateAccount API to introduce Properties arg
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue May 5 04:33:23 PDT 2009
---
src/mcd-account-manager.c | 12 +++++++-----
xml/Account_Manager.xml | 38 ++++++++++++++++++++++++++++++++------
2 files changed, 39 insertions(+), 11 deletions(-)
diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index 0f40673..c27bc01 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -563,14 +563,16 @@ create_account_cb (McdAccountManager *account_manager, McdAccount *account,
static void
account_manager_create_account (McSvcAccountManager *self,
- const gchar *manager, const gchar *protocol,
- const gchar *display_name,
- GHashTable *parameters,
- DBusGMethodInvocation *context)
+ const gchar *manager,
+ const gchar *protocol,
+ const gchar *display_name,
+ GHashTable *parameters,
+ GHashTable *properties,
+ DBusGMethodInvocation *context)
{
_mcd_account_manager_create_account (MCD_ACCOUNT_MANAGER (self),
manager, protocol, display_name,
- parameters, NULL,
+ parameters, properties,
create_account_cb, context, NULL);
}
diff --git a/xml/Account_Manager.xml b/xml/Account_Manager.xml
index df53a45..f039040 100644
--- a/xml/Account_Manager.xml
+++ b/xml/Account_Manager.xml
@@ -216,8 +216,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
property. The account manager SHOULD modify this to make it unique if
an Account already exists with the same display name, for instance by
appending a number or the 'account' parameter. Account manager
- implementations SHOULD accept an empty string but account editing user
- interfaces should avoid passing an empty string for this parameter.
+ implementations SHOULD accept an empty string, but account editing
+ user interfaces should avoid passing an empty string for this
+ parameter.
<tp:rationale>
<p>The account creation UI may ask the user for a name for the new
@@ -240,6 +241,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace="org.freedesktop.Telepathy.ConnectionManager">RequestConnection</tp:dbus-ref>.</tp:docstring>
</arg>
+ <arg name="Properties" direction="in" type="a{sv}"
+ tp:type="Qualified_Property_Value_Map">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>The values of any other properties to be set immediately on the
+ new Account.</p>
+
+ <p>Only the properties mentioned in
+ <tp:member-ref>SupportedAccountProperties</tp:member-ref> are
+ acceptable here. In particular, the <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy.Account">DisplayName</tp:dbus-ref>
+ and <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy.Account">Parameters</tp:dbus-ref>
+ properties are never allowed here, since they are set using the other
+ arguments to this method.</p>
+
+ <p>Account manager implementations SHOULD support creating accounts
+ with an empty value for this argument.</p>
+ </tp:docstring>
+ </arg>
+
<arg name="Account" direction="out" type="o">
<tp:docstring>The new <tp:dbus-ref
namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>.</tp:docstring>
@@ -247,12 +268,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:possible-errors>
<tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
- <tp:docstring>The connection manager is not installed or does not
- implement that protocol.</tp:docstring>
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>The Connection_Manager is not installed or does not
+ implement the given Protocol, or one of the properties in the
+ Properties argument is unsupported.</p>
+ </tp:docstring>
</tp:error>
<tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>The parameters provided omit a required argument
- or provide unsupported arguments.
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>The Parameters provided omit a required parameter
+ or provide unsupported parameter, or the type of one
+ of the Parameters or Properties is inappropriate.</p>
</tp:docstring>
</tp:error>
</tp:possible-errors>
--
1.5.6.5
More information about the telepathy-commits
mailing list