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: telephony service |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <xqserviceutil.h> |
|
19 #include "telephonyservice.h" |
|
20 #include "phoneuiqtviewadapter.h" |
|
21 #include "tphonecmdparaminteger.h" |
|
22 #include "qtphonelog.h" |
|
23 |
|
24 TelephonyService::TelephonyService( PhoneUIQtViewAdapter *viewAdapter, QObject* parent) : |
|
25 XQServiceProvider(QLatin1String("com.nokia.services.telephony.uistarter"), parent), |
|
26 m_viewAdapter (viewAdapter) |
|
27 { |
|
28 PHONE_DEBUG("TelephonyService::TelephonyService"); |
|
29 publishAll(); |
|
30 } |
|
31 |
|
32 TelephonyService::~TelephonyService() |
|
33 { |
|
34 PHONE_DEBUG("TelephonyService::~TelephonyService"); |
|
35 } |
|
36 |
|
37 void TelephonyService::start(const int serviceId) |
|
38 { |
|
39 PHONE_DEBUG2("TelephonyService::start:", serviceId); |
|
40 switch (serviceId) { |
|
41 case 0: { |
|
42 TPhoneCmdParamInteger uidParam; |
|
43 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
44 m_viewAdapter->ExecuteCommandL(EPhoneViewBringAppToForeground, &uidParam); |
|
45 break; |
|
46 } |
|
47 case 1: { |
|
48 m_viewAdapter->ExecuteCommandL( EPhoneViewOpenDialer ); |
|
49 |
|
50 /*TODO: remove this as soon as QT Highway brings in call dialer to foreground*/ |
|
51 TPhoneCmdParamInteger uidParam; |
|
52 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
53 m_viewAdapter->ExecuteCommandL(EPhoneViewBringAppToForeground, &uidParam); |
|
54 break; |
|
55 } |
|
56 default: { |
|
57 // do nothing |
|
58 break; |
|
59 } |
|
60 } |
|
61 } |
|