[Kde-pim] Question on Akonadi data connection

Kevin Krammer kevin.krammer at gmx.at
Mon Jul 30 01:48:16 BST 2007


Hi Tobias,

On Sunday 29 July 2007, Tobias Koenig wrote:
> On Sat, Jul 28, 2007 at 08:50:20PM +0200, Kevin Krammer wrote:
> > On Saturday 28 July 2007, Christian Schaarschmidt wrote:
>
> Hi Kevin,
>
> > > I think that what you mean has been addressed in Bug 147303
> > > There should be one akonadiserver per user. it's on the Todo list.
> >
> > Ah, I see. Is anyone already working on this? If not I'd like to give it
> > a try, i.e. using KLocalSocket with an #ifdef for QTcpSocket on Windows
>
> That would be great!

Attached is a first, hackish, implementation.

I have a couple of ideas for improvements:

1) class Akonadi should not have different inheritance but just derive from 
QObject and connect to a member's newConnection signal (both QTcpServer and 
KLocalSocketServer have this).

Then use (again on both servers) nextPendingConnection() to retrieve the 
connection object. Since KLocalSocket inherits QTcpSocket, both return 
QTcpSocket, which means AkonadiConnection only needs to be modified to handle 
these.

2) The socket address should rather be an abtract unix socket, e.g. like D-Bus
Currently, if the akonadiserver crashed, it leaves the socket around and 
cannot listen on it anymore

3) depending on (1) it might be an option to make the connection type 
configurable, i.e. getting rid of most of the #ifdef, just using them for 
defaults if the config does not exist yet.

I think Thiago is currently working on switchable data connections for KIO. 
Maybe we can reuse it or "steal" his design :)
CC'ing him since he is also the author of the local socket classes and might 
have to tell me that they are not supposed to used like that.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libakonadi.diff
Type: text/x-diff
Size: 2155 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070730/9460150e/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: server.diff
Type: text/x-diff
Size: 2381 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070730/9460150e/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070730/9460150e/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list