[Kde-pim] Question on Akonadi data connection
Kevin Krammer
kevin.krammer at gmx.at
Mon Jul 30 20:01:23 BST 2007
Hi Tobias,
On Monday 30 July 2007, Tobias Koenig wrote:
> On Mon, Jul 30, 2007 at 02:48:16AM +0200, Kevin Krammer wrote:
> > Attached is a first, hackish, implementation.
>
> Looks good so far :)
:)
It didn't take too much changes.
> > 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).
>
> Why not inheriting from it? Because of the compile time switch?
> At the time when KLocalSocket will do the abstraction for windows as
> well I don't see a problem from inheriting KlocalSocket.
Doing different inheritance trees just felt wrong. But I think this can be
cleaned up later on as well if necessary.
> > 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
>
> We just have to unlink the unix socket file on a restart of akonadi.
> That's a know issue with unix domain sockets.
The current hardcoded socket path is a problem (besides being hardcoded) if
the file system hosting $HOME is not capable of having sockets.
In a KDE application we would use KStandardDirs to locate a suitable socket
directory, abstract Unix sockets avoid this problem alltogether.
> > 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.
>
> Well, we need the on-instance-per-user approach, so KLocalSocket is the
> way to go. That Windows doesn't support unix sockets is the real
> problem, hopefully Thiago finds a solution for this.
I am not sure how far the D-Bus Windows people have come sofar since they have
the same issue.
I though that maybe using the same address format as D-Bus might give us
better flexibility in the long term.
> If there is no further objection from Volker or Till, please commit.
Ok.
BTW, since this is a Windows vs. Unix patch, do we have any recommended
procedure for getting review/feedback from the Windows guys?
Cheers,
Kevin
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- 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/e4af123a/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