[Bug 43598] Add high-level API for Proto.I.Addressing interface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Dec 15 03:31:37 CET 2011


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

--- Comment #5 from Andre Moreira Magalhaes <andrunko at gmail.com> 2011-12-14 18:31:37 PST ---
(In reply to comment #4)
> > > + * An example would be a vCard TEL field with a formatted number in the form
> > > of
> > > + * +1 (206) 555 1234, this would be normalized to +12065551234.
> > > 
> > > -> For example, a vCard TEL field formatted as +1 (206)... could be normalized
> > > to +1206...
> > Done
> 
> Still says "a formatted number in the form of". If you want it to say "number",
> then "a number in a vCard TEL field formatted as +1 (234) 567 could be
> normalized to +1234567" would be better.
Done

> > Done. Actually refactored this code for all Protocol interfaces at once, it was
> > easier. Now if all the info needed is in the immutable properties no
> > introspection will be made.
> 
> Great, that you did this for all the ifaces! Could you test all three of these
> cases:
> 
> 1) all info in .manager file
> 2) no .manager file, but some immutable properties present, though not all
> 3) all immutable props present
Tried hard to implement this but always got into some issue. 

I tried adding some members to ExampleEcho2Protocol holding the counters of how
many times the introspection methods were called. The problem is that we
inherit TpBaseProtocol that only expose some methods for introspection, and
some of these methods are called in the constructor of TpBaseProtocol among
others. So I can't reliably check the counters.

With that I cannot test that all the info is in the .manager file and no
introspection was made, as the introspection methods are always called when
creating a TpBaseProtocol.

As for checking immutable props, what happens now is that we are testing (3)
always, cause TpBaseProtocol also automatically fill the immutable properties
by calling the introspection callbacks when appropriate.

I also thought about adding a .manager file containing all the info we need for
Protocol* and create a ContactManager instance with the name of the file (the
CM name) and check if all the info was retrieved. The issue is that this does
not mean that even returning the valid data, no extra D-Bus roundtrip was made. 

Ideas, suggestions?

> +    bool loadImmutableProperties();
> +    bool loadMainProperties(const QVariantMap &props);
> +    bool loadAvatarsProperties(const QVariantMap &props);
> +    bool loadPresenceProperties(const QVariantMap &props);
> +    bool loadAddressingProperties(const QVariantMap &props);
> 
> To be consistent with the rest of tp-qt, we should call these kinds of
> functions extract<iface short name>Properties(). See e.g. Channel and its
> subclasses. Also usually they don't have a bool return value - and except for
> loadImmutableProperties, I don't think you're using them either. So you could
> take the return values out, except maybe for loadImmutableProperties.
Done

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list