kandy Library API Documentation

kandy_client.cpp

00001 #include <kapplication.h>
00002 #include <dcopclient.h>
00003 #include <qdatastream.h>
00004 #include <qstring.h>
00005 
00006 int main(int argc, char **argv)
00007 {
00008     KApplication app(argc, argv, "kandy_client", false);
00009 
00010     // get our DCOP client and attach so that we may use it
00011     DCOPClient *client = app.dcopClient();
00012     client->attach();
00013 
00014     // do a 'send' for now
00015     QByteArray data;
00016     QDataStream ds(data, IO_WriteOnly);
00017     if (argc > 1)
00018         ds << QString(argv[1]);
00019     else
00020         ds << QString("http://www.kde.org");
00021     client->send("kandy", "KandyIface", "openURL(QString)", data);
00022 
00023     return app.exec();
00024 }
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:06 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001