[Bug 71093] finish making parameters fully typed

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jan 31 04:48:29 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=71093

--- Comment #9 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
Created attachment 93133
  --> https://bugs.freedesktop.org/attachment.cgi?id=93133&action=edit
[MC 6/9] _mcd_account_dup_parameters: try to get parameters' types  from
backend

Now that I've deleted ExternalAccountStorage support, we have two
uses for this function:

* get the parameters to be passed to RequestConnection

* get the parameters for our own D-Bus API (PropertiesChanged,
  GetAll, etc.)

For the former, we should know the types already, because we should
already have a concrete CM/protocol in mind by the time we get here.

For the latter, ideally we shouldn't need the CM's types at all: if
the backend is storing parameters with types, it's arguably more
correct for Parameters to contain what the user stored, even if that
isn't an exact match for what the CM wants.

---

This mostly fixes wjt's long-standing "FIXME: this is ridiculous" comment.

> @@ -4975,10 +5045,19 @@ _mcd_account_connection_begin (McdAccount *account,
...
>+    ctx->params = mcd_account_coerce_parameters (account, protocol);

Xavier: just after this point is a good place for you to splice in the account
path suffix for Bug #74030, or anything else that requires injecting extra
parameters. In particular, you'll now have access to the TpProtocol to query
whether it has the parameter. You'd have to either deep-copy the a{sv}, or
change mcd_account_coerce_parameters() so it explicitly documents what
memory-allocation model it uses for the a{sv}'s contents.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list