# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271418841 -10800 # Node ID cdae8c6c3876d27efdb3132e1a2f9f9a8f28e0a9 # Parent f9ce957a272c03cdea71697c386a5dcc1950b4c5 Revision: 201011 Kit: 201015 diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/common.pri --- a/homescreenapp/common.pri Fri Mar 19 09:27:44 2010 +0200 +++ b/homescreenapp/common.pri Fri Apr 16 14:54:01 2010 +0300 @@ -103,7 +103,7 @@ message(Remove "contains(MOBILITY, serviceframework)" after the QtSF refactorig is done!) !contains(MOBILITY, serviceframework):qtplugins.sources += resource/$${TARGET}.manifest - contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.s60xml z:$$qtplugins.path/$${TARGET}.xml" + contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.xml z:$$qtplugins.path/$${TARGET}.xml" for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin z:$$qtplugins.path/$$basename(qtplugin)" } diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/contentpublishclient/contentpublishclient.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/contentpublishclient/contentpublishclient.pro Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,41 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Example of home screen content publishing client +# + +TEMPLATE = app + +CONFIG += mobility console debug + +MOBILITY = serviceframework + +HEADERS += ./inc/*.h +SOURCES += ./src/*.cpp + +INCLUDEPATH += ./inc + +QT += xml + +symbian: { + SYMBIAN_PLATFORMS = WINSCW ARMV5 + # this should remove localization for test application + load(hb.prf) + CONFIG -= symbian_i18n + TARGET.UID3 = 0x20022F74 + TARGET.CAPABILITY = CAP_APPLICATION AllFiles TrustedUI + TARGET.EPOCHEAPSIZE = 0x20000 0x1000000 // 128kB - 16MB + LIBS += -lefsrv +} else { + error("Only Symbian supported!") +} \ No newline at end of file diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/contentpublishclient/inc/contentpublishclient.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/contentpublishclient/inc/contentpublishclient.h Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,39 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Example of home screen content publishing client +* +*/ + +#include + +#include + +QTM_USE_NAMESPACE + +class ContentPublishClient: public QObject +{ + Q_OBJECT + +public: + ContentPublishClient(QServiceManager &manager, QObject *parent=0 ); + ~ContentPublishClient(); + bool load(); + +public slots: + void addWidget(); + +private: + QObject* mService; + QServiceManager* mManager; +}; \ No newline at end of file diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/contentpublishclient/sis/contentpublishclient.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/contentpublishclient/sis/contentpublishclient.pkg Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,38 @@ +; +; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; + +; Language +&EN + +; SIS header: name, uid, version +#{"contentpublishclient"},(0x20022F74),1,0,0 + +; Localised Vendor name +%{"Vendor"} + +; Unique Vendor name +:"Vendor" + +; Manual PKG pre-rules from PRO files +; Default HW/platform dependencies +[0x101F7961],0,0,0,{"S60ProductID"} +[0x102032BE],0,0,0,{"S60ProductID"} +[0x102752AE],0,0,0,{"S60ProductID"} +[0x1028315F],0,0,0,{"S60ProductID"} + +"/epoc32/release/armv5/urel/contentpublishclient.exe" - "c:/sys/bin/contentpublishclient.exe" +"/epoc32/data/z/private/10003a3f/import/apps/contentpublishclient_reg.rsc" - "c:/private/10003a3f/import/apps/contentpublishclient_reg.rsc" +"/epoc32/data/z/resource/apps/contentpublishclient.rsc" - "c:/resource/apps/contentpublishclient.rsc" diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/contentpublishclient/src/contentpublishclient.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/contentpublishclient/src/contentpublishclient.cpp Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,97 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Example of home screen content publishing client +* +*/ + +#include +#include + +#include +#include + +#include "contentpublishclient.h" + +/*! + \ingroup group_content_publish_client + \class ContentPublishClient + \brief Example implementation for home screen content publish client. + + ContentPublishClient is derived from QObject and implements + needed functions for the home screen content publish client. +*/ + +/*! + Constructor. +*/ +ContentPublishClient::ContentPublishClient(QServiceManager &manager, QObject *parent) + : QObject(parent), + mManager(&manager) +{ +} + +/*! + Destructor +*/ +ContentPublishClient::~ContentPublishClient() +{ +} + +/*! + Loads service interface +*/ +bool ContentPublishClient::load() +{ + QServiceFilter filter("com.nokia.symbian.IHomeScreenClient"); + filter.setServiceName("hshomescreenclientplugin"); + QList interfaces = mManager->findInterfaces(filter); + + if(interfaces.isEmpty()) { + QServiceManager::Error error = mManager->error(); + return false; + } + qDebug() << interfaces.first().interfaceName() + << interfaces.first().serviceName() + << interfaces.first().isValid(); + + mService = mManager->loadInterface(interfaces.first()); + + return (mService); +} + +/*! + Adds widget utilizing service interface and invoke call +*/ +void ContentPublishClient::addWidget() +{ + QByteArray signature = QMetaObject::normalizedSignature("addWidget(QString,QVariantHash)"); + int methodIndex = mService->metaObject()->indexOfMethod(signature); + QMetaMethod method = mService->metaObject()->method(methodIndex); + bool retVal(false); + + QString widget = "hsclockwidgetplugin"; + + bool ret = method.invoke( mService, + Qt::DirectConnection, + Q_RETURN_ARG(bool, retVal), + Q_ARG(QString,widget), + Q_ARG(QVariantHash,QVariantHash())); + + if(!ret){ + qDebug()<< "method invoke failed!"; + } + if(!retVal){ + qDebug() << "addWidget() failed!!"; + } +} diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/contentpublishclient/src/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/contentpublishclient/src/main.cpp Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Example of home screen content publishing client +* +*/ + +#include +#include +#include +#include + +#include + +#include "contentpublishclient.h" + +int main(int argc, char *argv[]) +{ + // Initialization + HbApplication app(argc, argv); + + QString path = QDir::toNativeSeparators(QDir("z:\\hsresources\\plugins\\homescreenclientplugin\\").absolutePath()); + QString fullFileName = path + "\\hshomescreenclientplugin.xml"; + + QServiceManager manager; + + if(QFile::exists(fullFileName)) { + QCoreApplication::addLibraryPath(path); + manager.addService(fullFileName); + } + + // Create main window. + HbMainWindow* mainWindow = new HbMainWindow(); + + // Create content publisher client + ContentPublishClient contentPublishClient(manager); + + QString buttonString = "Create widget"; + if(!contentPublishClient.load()) { + buttonString = "Open failed"; + } + + HbPushButton* button = new HbPushButton(buttonString); + + // Add view + mainWindow->addView(button); + + contentPublishClient.connect(button, SIGNAL(pressed()), SLOT(addWidget())); + + // Show main window + mainWindow->show(); + + return app.exec(); +} diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/helloworldwidgetplugin.pro --- a/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/helloworldwidgetplugin.pro Fri Mar 19 09:27:44 2010 +0200 +++ b/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/helloworldwidgetplugin.pro Fri Apr 16 14:54:01 2010 +0300 @@ -21,14 +21,11 @@ HEADERS += ./inc/*.h SOURCES += ./src/*.cpp -DESTDIR = $${EPOCROOT}epoc32/data/c/private/20022F35/import/widgetregistry/20022F7E -win32: PLUGIN_SUBDIR = /hsresources/import/widgetregistry/20022F7E -symbian: PLUGIN_SUBDIR = /private/20022F35/import/widgetregistry/20022F7E -include(../../../common.pri) - INCLUDEPATH += ./inc symbian: { + + DESTDIR = /private/20022F35/import/widgetregistry/20022F7E INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE TARGET.UID3 = 0x20022F7E @@ -36,18 +33,32 @@ TARGET.CAPABILITY = ALL -TCB plugins.path = $${DESTDIR} - plugins.sources = $${TARGET}.dll + plugins.sources = $${TARGET}.dll widgetResources.path = $${DESTDIR} widgetResources.sources += resource/$${TARGET}.xml widgetResources.sources += resource/$${TARGET}.manifest widgetResources.sources += resource/$${TARGET}.png - + DEPLOYMENT += plugins \ widgetResources } +win32: { -exportResources(./resource/*.manifest, $$PLUGIN_SUBDIR) -exportResources(./resource/*.png, $$PLUGIN_SUBDIR) -exportResources(./resource/*.xml, $$PLUGIN_SUBDIR) + CONFIG(debug, debug|release) { + SUBDIRPART = debug + } else { + SUBDIRPART = release + } + + PLUGIN_SUBDIR = /hsresources/import/widgetregistry/20022F7E + + DESTDIR = $$PWD/../../../../../bin/$${SUBDIRPART}/$${PLUGIN_SUBDIR} + + manifest.path = $${DESTDIR} + manifest.files = ./resource/*.manifest ./resource/*.xml ./resource/*.png + + INSTALLS += manifest + +} diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/resource/helloworldwidgetplugin.s60xml --- a/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/resource/helloworldwidgetplugin.s60xml Fri Mar 19 09:27:44 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - helloworldwidgetplugin - c:/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.qtplugin - Example widget - - com.nokia.IHomeScreenWidget - 1.0 - Example of home screen widget - - helloworldwidgetplugin.png - HelloWorld - - diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/resource/helloworldwidgetplugin.xml --- a/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/resource/helloworldwidgetplugin.xml Fri Mar 19 09:27:44 2010 +0200 +++ b/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/resource/helloworldwidgetplugin.xml Fri Apr 16 14:54:01 2010 +0300 @@ -4,7 +4,7 @@ helloworldwidgetplugin Example widget - com.nokia.IHomeScreenWidget + com.nokia.symbian.IHomeScreenWidget 1.0 Example of home screen widget diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/resource/helloworldwidgetplugin.xml_for_sisx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/resource/helloworldwidgetplugin.xml_for_sisx Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,14 @@ + + + helloworldwidgetplugin + c:/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.qtplugin + Example widget + + com.nokia.symbian.IHomeScreenWidget + 1.0 + Example of home screen widget + + helloworldwidgetplugin.png + HelloWorld + + diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/src/helloworldwidgetplugin.cpp --- a/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/src/helloworldwidgetplugin.cpp Fri Mar 19 09:27:44 2010 +0200 +++ b/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/src/helloworldwidgetplugin.cpp Fri Apr 16 14:54:01 2010 +0300 @@ -62,7 +62,7 @@ helloworldwidgetplugin Example widget - com.nokia.IHomeScreenWidget + com.nokia.symbian.IHomeScreenWidget 1.0 Example of home screen widget @@ -88,9 +88,9 @@ CONFIG += plugin mobility hb MOBILITY = serviceframework - HEADERS += ./inc/*.h - SOURCES += ./src/*.cpp - + HEADERS += ./inc/ .h + SOURCES += ./src/ .cpp + DESTDIR = $${EPOCROOT}epoc32/data/c/private/20022F35/import/widgetregistry/20022F7E INCLUDEPATH += ./inc @@ -136,7 +136,7 @@ Q_UNUSED(context); Q_UNUSED(session); - if (descriptor.interfaceName() == QLatin1String("com.nokia.IHomeScreenWidget")) { + if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget")) { return new HelloWorldWidget(); } else { return 0; diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/helloworldwidgetplugin/sis/helloworldwidgetplugin.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/helloworldwidgetplugin/sis/helloworldwidgetplugin.bat Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,30 @@ +@rem +@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +@rem All rights reserved. +@rem This component and the accompanying materials are made available +@rem under the terms of "Eclipse Public License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.eclipse.org/legal/epl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@echo off + +if exist helloworldwidgetplugin.sisx del helloworldwidgetplugin.sisx + +makesis helloworldwidgetplugin.pkg +signsis helloworldwidgetplugin.sis helloworldwidgetplugin.sisx ../../../sis/rd.cer ../../../sis/rd-key.pem + +if exist helloworldwidgetplugin.sisx ( +echo helloworldwidgetplugin.sisx creation SUCCEEDED +del helloworldwidgetplugin.sis +) + +if not exist helloworldwidgetplugin.sisx ( +echo helloworldwidgetplugin.sisx creation FAILED +) \ No newline at end of file diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/examples/helloworldwidgetplugin/sis/helloworldwidgetplugin.pkg --- a/homescreenapp/examples/helloworldwidgetplugin/sis/helloworldwidgetplugin.pkg Fri Mar 19 09:27:44 2010 +0200 +++ b/homescreenapp/examples/helloworldwidgetplugin/sis/helloworldwidgetplugin.pkg Fri Apr 16 14:54:01 2010 +0300 @@ -34,9 +34,9 @@ [0x1028315F],0,0,0,{"S60ProductID"} "/epoc32/release/armv5/urel/helloworldwidgetplugin.dll" - "c:/sys/bin/helloworldwidgetplugin.dll" -"/epoc32/data/c/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.qtplugin" - "c:/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.qtplugin" -"/epoc32/data/c/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.manifest" - "c:/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.manifest" -"/epoc32/data/c/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.xml" - "c:/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.xml" -"/epoc32/data/c/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.png" - "c:/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.png" +"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.qtplugin" - "c:/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.qtplugin" +"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.manifest" - "c:/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.manifest" +"../helloworldwidgetplugin/resource/helloworldwidgetplugin.xml_for_sisx" - "c:/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.xml" +"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.png" - "c:/private/20022F35/import/widgetregistry/20022F7E/helloworldwidgetplugin.png" "/epoc32/release/armv5/urel/helloworldwidgetplugininstaller.exe" - "c:/sys/bin/helloworldwidgetplugininstaller.exe", FR, RB, RW diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/homescreenapp.pro --- a/homescreenapp/homescreenapp.pro Fri Mar 19 09:27:44 2010 +0200 +++ b/homescreenapp/homescreenapp.pro Fri Apr 16 14:54:01 2010 +0300 @@ -23,8 +23,11 @@ stateplugins \ widgetplugins \ hsapplication \ - hscontentpublishplugin \ - ./../tsrc + hsmenucontentpublish + +symbian:SUBDIRS += hshomescreenclientplugin + +SUBDIRS += ./../tsrc CONFIG += ordered diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/hsapplication/conf/base/confml/data.confml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/conf/base/confml/data.confml Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,21 @@ + + + + + + + 8 + + 1hsclockwidgetplugin1 + 2hsdialerwidgetplugin1 + 10 + 21 + 32 + portrait15801501500.0 + landscape15801501500.0 + portrait13627681810.0 + landscape13617681810.0 + clockTypeAnalog1 + + + \ No newline at end of file diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/hsapplication/conf/base/confml/homescreen_view.confml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/conf/base/confml/homescreen_view.confml Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,25 @@ + + + + + HomeScreen specific customisation + + scene specific settings + + + + + + + Sample Description + + + + HomeScreen specific widgets + + + + + + + \ No newline at end of file diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/hsapplication/conf/base/confml/homescreendb.confml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/conf/base/confml/homescreendb.confml Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r f9ce957a272c -r cdae8c6c3876 homescreenapp/hsapplication/conf/base/implml/homescreendb.implml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/conf/base/implml/homescreendb.implml Fri Apr 16 14:54:01 2010 +0300 @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + +