89
|
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 "activityserviceplugin.h"
|
|
19 |
|
|
20 |
#include <qserviceinterfacedescriptor.h>
|
|
21 |
#include <qabstractsecuritysession.h>
|
|
22 |
#include <qservicecontext.h>
|
|
23 |
|
|
24 |
#include "activityclient.h"
|
|
25 |
#include "activitymanager.h"
|
|
26 |
|
|
27 |
QObject* ActivityServicePlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session)
|
|
28 |
{
|
|
29 |
Q_UNUSED(context);
|
|
30 |
Q_UNUSED(session);
|
|
31 |
|
|
32 |
if (descriptor.interfaceName() == "com.nokia.qt.activities.ActivityClient") {
|
|
33 |
return new ActivityClient();
|
|
34 |
} else if (descriptor.interfaceName() == "com.nokia.qt.activities.ActivityManager") {
|
|
35 |
return new ActivityManager();
|
|
36 |
} else {
|
|
37 |
return NULL;
|
|
38 |
}
|
|
39 |
}
|
|
40 |
|
|
41 |
Q_EXPORT_PLUGIN2(activityserviceplugin, ActivityServicePlugin)
|