New kdelibs policy starting monday

Thiago Macieira thiago at kde.org
Sun Jul 16 18:58:29 BST 2006


Reinhold Kainhofer wrote:
>Harry told me that there was a way to introduce custom marshalling for
> our K* types. He just didn't explain it too me how exactly that would
> work (i.e. with an example).

You can introduce overloading for any type. But you can't overload a 
simple D-BUS type, like "String". You'd have to make it a structure that 
contains a string on the bus, which in turn makes it more difficult for 
the other side if they are not using QtDBus. There's also a performance 
penalty because you have to open a recursive iterator (libdbus internally 
isn't very optimised in that area yet).

Just use .url() and it'll make your life much easier:

	call("MyMethod", url.url()); // sends 's'

instead of:

	call("MyMethod", qVariantFromValue(url)); // sends '(s)'
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060716/fc470766/attachment.sig>


More information about the kde-core-devel mailing list