[Bug 20774] ConnectionManager: replace ListProtocols and GetParameters with a property

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Nov 4 18:37:54 CET 2009


http://bugs.freedesktop.org/show_bug.cgi?id=20774


Simon McVittie <simon.mcvittie at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://git.collabora.co.uk/?
                   |                            |p=user/smcv/telepathy-spec-
                   |                            |smcv.git;a=shortlog;h=refs/h
                   |                            |eads/wip-cm
           Keywords|                            |patch
  Status Whiteboard|                            |specmeet?




--- Comment #3 from Simon McVittie <simon.mcvittie at collabora.co.uk>  2009-11-04 09:37:54 PST ---
I renamed the branch to wip-cm, sorry.

However, here's a better proposal, based on Comment #2:

ConnectionManager
=================

mapping Protocol_Properties_Map
    A map from protocol names to the immutable properties of the
    corresponding Protocol objects. The immutable properties appear
    in fully-qualified form, to allow Protocol to be extended.

    Protocol : s (Protocol)
        The name of a protocol. Its object path may be found by replacing
        hyphen/minus characters with underscores and prepending the
        ConnectionManager object path plus '/', as explained in the Protocol
        interface.

    Properties : a{sv} (Qualified_Property_Value_Map)
        The immutable properties of the corresponding Protocol object

readable property Protocols : a{sa{sv}} (Protocol_Properties_Map)
    A list of the protocols supported by this connection manager, together
    with the immutable properties of the corresponding Protocol objects.

    | Providing the immutable properties here means that in practice, most
    | clients will only need one D-Bus round trip to interrogate the
    | ConnectionManager about all its protocols.

deprecate ListProtocols in favour of Protocols
deprecate GetParameters in favour of Protocols

Protocol
========

An object representing a protocol for which this #ConnectionManager can
create #Connections.

Each Protocol object has the same well-known bus name as its parent
#ConnectionManager. Its object path is formed by taking the
#ConnectionManager's object path and appending '/', followed by the
protocol name with any hyphen/minus '-' converted to underscores '_'.

| This is the same as the representation of protocol names in Account object
| paths, and in Connection object paths and bus names. For instance,
| telepathy-gabble and telepathy-salut would implement objects at
| /org/freedesktop/Telepathy/ConnectionManager/gabble/jabber and
| /org/freedesktop/Telepathy/ConnectionManager/salut/local_xmpp,
| respectively.

readable property Interfaces : as (DBus_Interface[])
    A list of interfaces supported by this Protocol object.

    This property is immutable, and should not be confused with
    @GuaranteedInterfaces and @PossibleInterfaces, which refer to the
    interfaces of *connections* to this protocol.

    | For future expansion.

readable property Parameters : a(susv) (Param_Spec[])
    The parameters which must or may be provided to the @RequestConnection
    method when connecting to the given protocol. This property is immutable.

readable property GuaranteedInterfaces : as (DBus_Interface[])
    A list of interface names which will definitely be in the @Interfaces
    property of any Connection to this protocol.

    This property is immutable, and should not be confused with @Interfaces.

readable property PossibleInterfaces : as (DBus_Interface[])
    A list of interface names which might be in the @Interfaces
    property of a Connection to this protocol, or not, depending on server
    capabilities.

    This property is immutable, and should not be confused with @Interfaces.

readable property GuaranteedChannelClassses : a(a{sv}as)
    A list of channel classes which will be requestable from any Connection
    to this protocol (i.e. they are guaranteed to appear in the Connection's
    @RequestableChannelClasses property). This property is immutable.

readable property PossibleChannelClassses : a(a{sv}as)
    A list of channel classes which might be in the @RequestableChannelClasses
    property of a Connection to this protocol, or not, depending on capability
    discovery. This property is immutable.

method IdentifyAccount (a{sv}: Parameters -> s: Account_ID)
    Return a string which uniquely identifies the account to which the given
    parameters would connect.

    | For many protocols, this would return the well-known 'account'
    | parameter. However, for IRC the returned string would be composed from
    | the 'account' (i.e. nickname) and 'server' parameters. AccountManager
    | implementations can use this to form the account-specific part of an
    | #Account's object path.

    in Parameters : a{sv} (String_Variant_Map)
       A set of parameters as would be provided to RequestConnection

    out Account_ID : s
       An opaque string suitable for use as the account-specific part of
       an #Account's object path. This is not necessarily globally unique,
       but should represent a "best-effort" identification of the account.

       | For a pathological case, consider a user signing in as
       | 'me at example.com' with 'server' set to either jabber1.example.com
       | or jabber2.example.com. Both of these should result in me at example.com
       | being returned from this method, even if the user can actually be
       | signed in to those two servers simultaneously.

method NormalizeContacts (s: Contact_ID) -> s: Normalized_Contact_ID
    Attempt to normalize the given contact ID. Where possible, this SHOULD
    return the same thing that would be returned by
    InspectHandles(RequestHandles(CONTACT, [Contact_ID])) on a connected
    #Connection.

    If full normalization requires network activity or is otherwise impossible
    to do without a #Connection, this method SHOULD perform a best-effort
    normalization.

    [Bikeshedding: should this be plural, signature as -> a{ss}?]

    in Contact_ID : s
        The identifier of a contact in this protocol

    out Normalized_Contact_ID : s
        The identifier of a contact in this protocol, normalized as much
        as possible

[Bikeshedding: perhaps the following should be on a Protocol.Avatars interface]

readable property MinimumAvatarWidth : u
readable property MinimumAvatarHeight : u
readable property RecommendedAvatarWidth : u
readable property RecommendedAvatarHeight : u
readable property MaximumAvatarWidth : u
readable property MaximumAvatarHeight : u
readable property MaximumAvatarBytes : u
    If the @Avatars interface might be supported on connections to this
    protocol, the expected value of the corresponding property in that
    interface; otherwise, 0. This property is immutable.

readable property SupportedAvatarMIMETypes : as
    If the @Avatars interface might be supported on connections to this
    protocol, the expected value of the corresponding property in that
    interface; otherwise, an empty list. This property is immutable.

[Bikeshedding: perhaps the following should be on a Protocol.SimplePresence
interface]

readable property GuaranteedStatuses : a{s(ubb)} (Simple_Status_Spec_Map)
    If a #Connection to this protocol implements SimplePresence, a list of
    statuses which will be available from it (i.e. they are guaranteed to
    appear in the @Statuses property of any connection that supports
    SimplePresence). This property is immutable.

    | In XMPP, 'available' and 'away' would be among these statuses.

readable property PossibleStatuses : a{s(ubb)} (Simple_Status_Spec_Map)
    If a #Connection to this protocol implements SimplePresence, a list of
    statuses which may be available from it, or not (i.e. appear in the
    @Statuses property, or not), depending on capability discovery.
    This property is immutable.

    | In XMPP, 'invisible' would be among these statuses.


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



More information about the telepathy-bugs mailing list