![]() |
Home · All Classes · All Functions · | ![]() |
Registration phase is a little different compared to other platforms because of the authenticity of the provider is done during (un)registering phase based on the verification of VID/SID (vendor ID or secure ID). A tiny installer application must be implemented by the service provider. Installer application is responsible for the registering (and the unregistering) of the service. The example code for the installer is shown below. The whole installer project can be found under examples/serviceinstaller_sfw_symbian.
const QString filemanagerxml = "c:\\resource\\apps\\xmldata\\filemanagerservice.xml"; const QString bluetoothxml = "c:\\resource\\apps\\xmldata\\bluetoothtransferservice.xml"; int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); QServiceManager s; if (QFile::exists(filemanagerxml)) { s.addService(filemanagerxml); } else { s.removeService("FileManagerService"); } if (QFile::exists(bluetoothxml)) { s.addService(bluetoothxml); } else { s.removeService("BluetoothTransferService"); } }
If you want to create your own installer take a copy from the installer project (examples/serviceinstaller_sfw_symbian) and modify only the necessary parts e.g a target for your installer and define plugins which are deployed etc.
If the installer defines the VID (non-zero value) then the VID is stored to the database, otherwise SID is used. When unregistering the plugin the VID/SID verification is done to ensure that only the application which actually registered the service is only allowed to remove it. VID/SID is left to the database even the service has been unregistered. This prevents the exactly same way named services to be installed afterwards because the VID/SID information is locked to the service name.
More info about VID and SID can be found from:
There is only one database in S60 because both databases (user and system) are combined to the same database. The database is located behind the server's private folder, (c:\private\E3b48c24). This ensures the database can't be thumbered (e.g. remove, move or replace) without Allfiles capability which isn't user-grantable (More about the capabilities: http://wiki.forum.nokia.com/index.php/Capabilities). That makes it impossible for example to replace the whole database with the new one which might contain malicious services.
Note! It doesn't matter which scope is used on Symbian as QService::UserScope and QService::SystemScope are mapped to the same database.
There are different implementations for the both emulator and device because emulator doesn't support multiple applications to be loaded at the same time, (Known issue: QTBUG-2950). The dll approach must be used in the emulator environment and the exe approach instead of dll in the real device.
Note! The greatest part of the S60 specific code is located under the symbian folder in a directory hierarchy of Service FW. ServiceDatabase class contains also S60 specific code and the DatabaseManager class has been replaced totally with the corresponding class.
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.0 |