Bug 20229

Summary: Connection: turn more info into properties
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: tp-specAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: low CC: xclaesse
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 23148    
Attachments: Connection: drop Protocol property

Description Simon McVittie 2009-02-20 04:36:36 UTC
Connection should have more D-Bus properties, accessible via GetAll:

* Status : u, Connection_Status
* Protocol : s, Protocol
* ConnectionManager : s, Connection_Manager_Name
* Interfaces : as, DBus_Interface_Name[]
* etc.

(but not StatusReason, because by the time it's non-obvious, the connection has already gone away)
Comment 1 Jonny Lamb 2012-04-06 15:11:48 UTC
(In reply to comment #0)
> * Status : u, Connection_Status
> * Protocol : s, Protocol
> * Interfaces : as, DBus_Interface_Name[]

I'd already done these on 'next' with my first push branch.

> * ConnectionManager : s, Connection_Manager_Name

What's the point of this one? I can't think of a time when given the connection I needed to know the CM name. The account triple can be useful but we have a function in tp-glib to split that up already?
Comment 2 Jonny Lamb 2012-06-07 06:43:56 UTC
(In reply to comment #1)
> What's the point of this one? I can't think of a time when given the connection
> I needed to know the CM name. The account triple can be useful but we have a
> function in tp-glib to split that up already?

I never got a reply to this. I still don't think there's a big rush for this and it can be added easily later without breaking API if it really needs to be.

Closing.
Comment 3 Xavier Claessens 2012-06-07 07:00:14 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > * Status : u, Connection_Status
> > * Protocol : s, Protocol
> > * Interfaces : as, DBus_Interface_Name[]
> 
> I'd already done these on 'next' with my first push branch.
> 
> > * ConnectionManager : s, Connection_Manager_Name
> 
> What's the point of this one? I can't think of a time when given the connection
> I needed to know the CM name. The account triple can be useful but we have a
> function in tp-glib to split that up already?

It is used to build avatar cache path, and logger stuff. But this can be found by parsing the object-path. That's how tp_account_get_connection_manager() and tp_connection_get_connection_manager_name() works. So a property would be useless redundant information IMO.

(side not: tp_account_get_connection_manager() should be renamed to tp_account_get_connection_manager_name() since it returns the name and not a TpConnectionManager object).
Comment 4 Xavier Claessens 2012-06-10 00:32:34 UTC
actually we have a "protocol" property but not "connection-manager", this is somewhat inconsistent. I would suggest droping the "protocol" since it can be found in object-path.
Comment 5 Xavier Claessens 2012-06-20 05:28:01 UTC
Created attachment 63263 [details] [review]
Connection: drop Protocol property

The protocol can found by parsing the connection's object-path,
just like the Connection Manager name.
Comment 6 Xavier Claessens 2012-06-20 05:51:08 UTC
Merged.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.