88
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include <cadefs.h>
|
|
19 |
#include <qserviceinterfacedescriptor.h>
|
|
20 |
#include <qabstractsecuritysession.h>
|
|
21 |
#include <qservicecontext.h>
|
|
22 |
#include "cahandlerloader.h"
|
|
23 |
|
|
24 |
#include "caurlhandlerplugin.h"
|
92
|
25 |
#include "cas60urlhandleradapter.h"
|
88
|
26 |
#include "caurlhandler.h"
|
|
27 |
|
|
28 |
/*!
|
|
29 |
\class CaUrlHandlerPlugin
|
|
30 |
\ingroup
|
|
31 |
\brief Implementation of Qt SF plugin for url command handler.
|
|
32 |
*/
|
|
33 |
|
|
34 |
/*!
|
|
35 |
\param descriptor Service descriptor.
|
|
36 |
\param context Ignored.
|
|
37 |
\param session Ignored.
|
92
|
38 |
\return An instance of the CaS60UrlHandlerAdapter<CCaUrlHandler> when descriptor interface name
|
88
|
39 |
is "com.nokia.homescreen.ICommandHandler", NULL otherwise.
|
|
40 |
*/
|
|
41 |
QObject *CaUrlHandlerPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
|
|
42 |
QServiceContext *context,
|
|
43 |
QAbstractSecuritySession *session)
|
|
44 |
{
|
|
45 |
Q_UNUSED(context);
|
|
46 |
Q_UNUSED(session);
|
|
47 |
|
|
48 |
if (descriptor.interfaceName() ==
|
|
49 |
"com.nokia.homescreen.ICommandHandler") {
|
92
|
50 |
return new CaS60UrlHandlerAdapter();
|
88
|
51 |
} else {
|
|
52 |
return 0;
|
|
53 |
}
|
|
54 |
}
|
92
|
55 |
Q_EXPORT_PLUGIN2(caurlhandlerplugin, CaUrlHandlerPlugin)
|