Le Monday 17 May 2010, Martin a écrit : > Hi, > > I was thinking about how I could make kopete notify me when I have unread > emails in my googlemail inbox (I have an account which I only use for > chatting, I don't check my emails very often there - thus it would be cool > if kopete could notify me if there are any new mails). > > Unfortunately it seems that this is not as simple as I thought. > The jabber protocol plugin itself is quite heavy and I don't really want to > add mail support directly to it (as in my opinion it's not the protocol > plugin's task to show me a dialog with a list of new emails). > > Then I thought I could write a plugin for kopete which would do the job. > Unfortunately this is also not that easy, as it would be cool if some of > the code from the jabber-plugin could be reused. > Google has some custom extensions to the jabber protocol (see [0]) which > allow you to get a list of unread emails (see [1]). > Unfortunately it's currently not possible to use a plugin to send XMPP > requests to the server (since then parts of the jabber protocol plugin > would need to be part of the public API - which of course is not > possible.) > > Now I had another thought: we could add a Plasma::DataEngine for the data > which a possible plugin would have to know. > For example we could make JabberClient::send and the signals incomingXML > and outgoingXML part of the DataEngine (probably more is needed, but you > get what I want ;)). > This way our new plugin could send new xmpp requests to the server plus > receive the responses. > > This would also mean we could for example move the jabber "XML Console" to > it's own plugin. > > Any comment, critic or other feedback is welcome :) >
Hi, It's been a long time since the last time I've touched the Kopete code. So take my advise as it, but here is what i'd do: I would add few signals/slot in the JabberAccount class that would provide an interface for what you want (sending and receiving XML (QDomDocument), perhaps even iris stuff, if you can make your plugin link against iris) And then the plugin can use dynamic QObject introspection (signals/slots, invokeMethod, ...) as this is dynamic, your plugin does not need to link against the Jabber protocol. _______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel