1
echo "Creating $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_client.cpp...";
2
cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_client.cpp
3
#include <kapplication.h>
4
#include <dcopclient.h>
5
#include <qdatastream.h>
8
int main(int argc, char **argv)
10
KApplication app(argc, argv, "${APP_NAME_LC}_client", false);
12
// get our DCOP client and attach so that we may use it
13
DCOPClient *client = app.dcopClient();
16
// do a 'send' for now
18
QDataStream ds(data, IO_WriteOnly);
20
ds << QString(argv[1]);
22
ds << QString("http://www.kde.org");
23
client->send("${APP_NAME_LC}", "${APP_NAME}Iface", "openURL(QString)", data);