[Bug 38142] New: proxy factories
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jun 10 11:10:48 CEST 2011
https://bugs.freedesktop.org/show_bug.cgi?id=38142
Summary: proxy factories
Product: Telepathy
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: tp-glib
AssignedTo: telepathy-bugs at lists.freedesktop.org
ReportedBy: xclaesse at gmail.com
QAContact: telepathy-bugs at lists.freedesktop.org
We have various bugs depending on factories, so here is a single bug to discuss
it.
Strict minimum for 'simple' factory:
1) Guarantee uniqueness of all TpProxy subclasses (TpChannel, TpConnection,
etc...) instances per-factory instance. But still let user create its own
factory, and 2 different factories would return different TpProxy for the same
object-path.
2) For a given proxy, tell which features needs to be prepared on it. That
would be at least TP_*_FEATURE_CORE.
3) Let subclasses of the base factory define specialized subclasses
(TpTextChannel) and additional features to be prepared.
4) Factory would be a singleton most of the time, but still let possibility to
create new instances.
5) Need to be able to create at least: TpChannel, TpConnection and TpAccount.
Maybe TpContact as well (not technically a proxy, but same concept, and could
open the door for EmpathyContact being subclass of TpContact). Not sure
TpAccountManager should be created from a factory or being considered the
top-level object that will hand its factory to its childs.
A more useful 'automatic' factory needs:
1) Create specialized subclasses for well-known types. atm that would mostly be
for TpTextChannel and TpStreamTubeChannel. Fallback to base factory for unknown
types.
2) Give more features to be prepared than just CORE, for example there is no
point giving a specialized TpTextChannel if it is not to prepare
TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES...
An even more useful 'custom' factory needs:
1) Take a list of extra features given by the user (at factory construct-time)
that will be added to the list of features given by the 'automatic' factory.
2) Do we want it to be able to upgrade all its existing proxies with more
features when the user provide them? tpqt4 only let user add features to be
prepared on new proxies, but existing ones would need to be upgraded manually
if user need it.
--
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