Adding/Approving/Removing Contacts

Dario Freddi drf54321 at gmail.com
Fri Apr 1 11:58:59 CEST 2011


On Thursday 31 March 2011 23:38:30 David Edmundson wrote:
> On Thu, Mar 31, 2011 at 10:23 PM, George Goldberg <
> 
> grundleborg at googlemail.com> wrote:
> > On 31 March 2011 22:18, George Kiagiadakis <kiagiadakis.george at gmail.com>
> > 
> > wrote:
> > > On Fri, Apr 1, 2011 at 12:07 AM, George Goldberg
> > > 
> > > <grundleborg at googlemail.com> wrote:
> > >> However, is the approver actually running all the time? Or is it DBus
> > >> activated when needed?
> > > 
> > > Currently, neither. However, it should be activated when needed. As I
> > > think of it, whatever component sets accounts online/offline (be it
> > > the contact list, the presence plasmoid, or whatever else) should be
> > > responsible for activating and deactivating the approver. This can be
> > > done by calling kded methods over dbus:
> > > 
> > > $ qdbus org.kde.kded /kded loadModule telepathy_kde_approver
> > > $ qdbus org.kde.kded /kded unloadModule telepathy_kde_approver
> > 
> > This worries me a bit. There's going to be all manner of different
> > presence plasmoids and other apps using telepathy in future, and I
> > don't think we can realistically expect them to take care of starting
> > the approver. Perhaps it could be started as part of a KDE session? Or
> > it could be a KDED module?
> > 
> > It is a KDED Module, only one started on demand rather than on startup (I
> 
> believe that's a 1 line change in a .desktop file, though don't know for
> sure.)
> 
> Is there protection for loading twice? and can it unload itself?
> If so the logic gets pretty simple. All code that turns an account online,
> starts the module, and that's it.
> 
> I had thought it ran on startup as opposed to on demand. Are there any
> downsides besides the ever so slight overhead?

KDED supports loading and unloading modules, although it is not designed for 
such an use case, and we should avoid doing that. If it is necessary to have 
the module loaded and unloaded on demand, we should switch to a proper DBus 
activated service (which is the right way to go) like other parts of KDE did 
(notably polkit-kde, even if now it is session-activated).

Bottom line: KDED should be used just when you create a service which should 
be alive throughout a whole KDE session, otherwise it is the wrong place.

> 
> > >> Also, in order to get these invite signals, do we need to have any
> > >> channels open? Or can the daemon which does it just watch the Account
> > >> Manager, and whenever there is a connected account, connect to the
> > >> appropriate signals to be notified when someone adds us?
> > > 
> > > I think it is sufficient to watch the account manager.
> > 
> > Cool. That keeps things simple then.
> > 
> > ContactManager of each account technically, but not much harder.
> > 
> > --
> > George
> > _______________________________________________
> > KDE-Telepathy mailing list
> > KDE-Telepathy at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-telepathy

-- 
-------------------

Dario Freddi
KDE Developer
GPG Key Signature: 511A9A3B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-telepathy/attachments/20110401/2818ddea/attachment.sig 


More information about the KDE-Telepathy mailing list