[Bug 24908] Communication policy (blocking policy) API

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jul 13 01:12:14 CEST 2010


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

--- Comment #7 from Eitan Isaacson <eitan.isaacson at collabora.co.uk> 2010-07-12 16:12:14 PDT ---
Since communication policy is not presence related, maybe the prefix of 
Rich_Presence_Access_Control will be misleading?

I am thinking that maybe Connection.Interface.AccessControl needs to be the new
home for these types (the enum and struct). And that
Connection.Interface.Location/Avatars and future rich presence ifaces reference
those types.

AccessControl itself would have properties for communication policy, like
- ChatAccessControl (uv) (Access_Policy) R/W
- ChatAccessControlTypes (au) (Access_Policy_Type_List) RO
- CallAccessControl (uv) (Access_Policy) R/W
- CallAccessControlTypes (au) (Access_Policy_Type_List) RO
- FileTransferAccessConrol (uv) (Access_Policy) R/W
- FileTransferAccessConrolType (au) (Access_Policy_Type_List) RO
- TubeAccessControl (uv) (Access_Policy) R/W
- TubeAccessControlType  (au) (Access_Policy_Type_List) RO

As Will says, some protocols will not let you set these things individually, so
maybe setting one of these properties will change the other properties that are
grouped with it. There would be a change notification signal, so if you set one
property, you will get a signal from other properties that have been affected:

- ChatAccessControlChanged (uv) (Access_Policy)
- CallAccessControlChanged (uv) (Access_Policy)
- FileTransferAccessControlChanged (uv) (Access_Policy)
- TubeAccessControlChanged (uv) (Access_Policy)

A not very well thought out alternative
=======================================

This might be slightly less straightforward, but seems more extendable.

- AccessControlTypes (a{sau})
Property. A mapping of channel interfaces and a list of Access_Policy types
they could have.

- AccessControl (a{s(uv)})
Property. A mapping of channel interfaces and Access_Policy values. For example
{'org.freedesktop.Telepathy.Channel.Interface.Text' : (Publish_List, None),
'org.freedesktop.Telepathy.Channel.Interface.Call' : (Whitelist, [])}

- SetAccessControl (s, uv)
A method for creating/modifying a policy.

- AccessControlChanged (a{sv})
A signal emitted when the AccessControl property has changed. The mapping
provided by the signal would be a subset of the properties that changed.

Another suggestion
==================

Maybe the Access_Policy_Type could be a bitfield-friendly enum? That way the
supported access control types could be expressed in a single u as opposed to
an au.

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



More information about the telepathy-bugs mailing list