67
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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: Qt Highway Service Provider for control panel
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
#include <qtranslator.h>
|
|
18 |
#include "dmserviceprovider.h"
|
|
19 |
#include "nsmldmsyncinternalpskeys.h"
|
|
20 |
#include <hbapplication.h>
|
|
21 |
#include <qlocale.h>
|
|
22 |
#include <nsmldmdef.h>
|
|
23 |
#include <e32property.h>
|
|
24 |
#include <qdebug.h>
|
|
25 |
// -----------------------------------------------------------------------------
|
|
26 |
// DMServiceProvider::DMServiceProvider
|
|
27 |
// -----------------------------------------------------------------------------
|
|
28 |
//
|
|
29 |
DMServiceProvider::DMServiceProvider(QObject* parent)
|
|
30 |
: XQServiceProvider("com.nokia.services.MDM.devicemanager",parent)
|
|
31 |
{
|
|
32 |
publishAll();
|
|
33 |
}
|
|
34 |
|
|
35 |
// -----------------------------------------------------------------------------
|
|
36 |
// DMServiceProvider::~DMServiceProvider
|
|
37 |
// -----------------------------------------------------------------------------
|
|
38 |
//
|
|
39 |
DMServiceProvider::~DMServiceProvider()
|
|
40 |
{
|
|
41 |
}
|
|
42 |
|
|
43 |
// -----------------------------------------------------------------------------
|
|
44 |
// DMServiceProvider::complete
|
|
45 |
// -----------------------------------------------------------------------------
|
|
46 |
//
|
|
47 |
void DMServiceProvider::complete()
|
|
48 |
{
|
|
49 |
TInt err = RProperty::Delete(KPSUidNSmlDMSyncApp, KDMLaunched);
|
|
50 |
qDebug()<<"dmsrvice error "<<err;
|
|
51 |
completeRequest(requestId,0);
|
|
52 |
}
|
|
53 |
|
|
54 |
// -----------------------------------------------------------------------------
|
|
55 |
// DMServiceProvider::launchDM
|
|
56 |
// -----------------------------------------------------------------------------
|
|
57 |
//
|
|
58 |
void DMServiceProvider::launchDM()
|
|
59 |
{
|
|
60 |
TInt err = RProperty::Define(KPSUidNSmlDMSyncApp, KDMLaunched, RProperty::EInt);
|
|
61 |
TInt launched=EDMLaunchedFromCP;
|
|
62 |
RProperty::Set(KPSUidNSmlDMSyncApp, KDMLaunched, launched);
|
|
63 |
requestId = setCurrentRequestAsync();
|
|
64 |
}
|