[Kde-bindings] Kopete protocol and Java

Albert Cervera Areny albertca at hotpop.com
Thu Mar 17 00:14:19 UTC 2005


A Dimecres 16 Març 2005 12:33, Richard Dale va escriure:
> On Wednesday 16 March 2005 00:48, Albert Cervera Areny wrote:
> > Hi,
> > 	I want to develop a new protocol for kopete but the protocol _must_ be
> > implemented over a platform which is written in java. I thought I could
> > use dcop for the comunication between the Java and C++ parts but I've
> > read in the archives that dcop is not working correctly with Java ATM.
>
> Is kopete designed so that you can implement new protocols via dcop - I
> don't know anything about it?

Maybe I didn't explain it correctly. I would implement a protocol in C++ but 
which would call the java functions it would need for sending and receiving. 
So the idea would be to have a DCOP service written in java to which the C++ 
Kopete Protocol could ask for the needed functions (login, logout, send 
message, receive message, and so on..)

>
> > 	Does anyone have an idea on how I could do that in a smart way?
>
> It wouldn't be too hard to add dcop support to the java bindings, but I
> personally haven't had time. The QDataStream operator '>>' and '<<' methods
> are included as 'op_read()' and 'op_write()', so it should be possible to
> implement dcop largely in java rather than C++. You need to use the
> QDataStream methods to read and write to an underlying QByteArray - that's
> the main basis of how dcop works. The method calls to send and receive are
> in the bindings already, but the marshalling stuff needs adding.
>

I tried the dcop example in kdejava, and the service started correctly but the 
java function that should be published didn't show in kdcop. The other 
functions (usual Qt and KDE) did work correctly.

I'll try to look to those functions, though I have no idea on how the bindings 
work (how can java call kde libraries?), is there any documentation on 
bindings generation?

As far as I've seen kalyptus should be able to create bindings for libkopete 
too, I might try this tomorrow...

> There is a stand alone dcopjava library in kdebindings - maybe it would be
> possible to use that? Although last time I had a look at it, and it was
> fairly limited, uses a pre-processor and doesn't seem to be actively
> maintained.

Looking at the examples it seems it is only useful for making calls to dcop 
services, not publishing them. Anyone has tried to offer services with it?

>
> -- Richard
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings

-- 
"Video-encoding-junkie? Me? Let me think about it for 25 frames, ehh, one 
second"



More information about the Kde-bindings mailing list