125
|
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 |
#include "applicationlauncher_p.h"
|
|
18 |
#include <QCoreApplication>
|
|
19 |
|
|
20 |
ApplicationLauncherPrivate *ApplicationLauncherPrivate::instance = NULL;
|
|
21 |
bool ApplicationLauncherPrivate::isRunningReturnValue = false;
|
|
22 |
|
|
23 |
ApplicationLauncherPrivate::ApplicationLauncherPrivate()
|
|
24 |
{
|
|
25 |
if (instance) {
|
|
26 |
delete instance;
|
|
27 |
}
|
|
28 |
instance = this;
|
|
29 |
}
|
|
30 |
|
|
31 |
ApplicationLauncherPrivate::~ApplicationLauncherPrivate()
|
|
32 |
{
|
|
33 |
// create copy so we can check output even when original object is deleted
|
|
34 |
instance = new ApplicationLauncherPrivate(*this);
|
|
35 |
}
|
|
36 |
|
|
37 |
bool ApplicationLauncherPrivate::isRunning(int applicationId)
|
|
38 |
{
|
|
39 |
QVariantHash call;
|
|
40 |
call.insert("applicationId", applicationId);
|
|
41 |
isRunningCalls.append(call);
|
|
42 |
|
|
43 |
return isRunningReturnValue;
|
|
44 |
}
|
|
45 |
|
|
46 |
void ApplicationLauncherPrivate::startApplication(int applicationId, const QUrl &uri)
|
|
47 |
{
|
|
48 |
QVariantHash call;
|
|
49 |
call.insert("applicationId", applicationId);
|
|
50 |
call.insert("uri", uri);
|
|
51 |
startApplicationCalls.append(call);
|
|
52 |
}
|
|
53 |
|
|
54 |
void ApplicationLauncherPrivate::bringToForeground(int applicationId)
|
|
55 |
{
|
|
56 |
QVariantHash call;
|
|
57 |
call.insert("applicationId", applicationId);
|
|
58 |
bringToForegroundCalls.append(call);
|
|
59 |
}
|