|
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 "mobcntbrowseraction.h" |
|
19 |
|
20 #include <qcontacturl.h> |
|
21 #include <qcontactfilters.h> |
|
22 |
|
23 //Action class |
|
24 MobCntBrowserAction::MobCntBrowserAction() : |
|
25 MobCntAction("url") |
|
26 { |
|
27 } |
|
28 |
|
29 MobCntBrowserAction::~MobCntBrowserAction() |
|
30 { |
|
31 } |
|
32 |
|
33 QContactFilter MobCntBrowserAction::contactFilter(const QVariant& value) const |
|
34 { |
|
35 Q_UNUSED(value); |
|
36 |
|
37 QContactDetailFilter urlFilter; |
|
38 urlFilter.setDetailDefinitionName(QContactUrl::DefinitionName); |
|
39 |
|
40 return urlFilter; |
|
41 } |
|
42 |
|
43 bool MobCntBrowserAction::isDetailSupported(const QContactDetail &detail, const QContact &/*contact*/) const |
|
44 { |
|
45 return (detail.definitionName() == QContactUrl::DefinitionName); |
|
46 } |
|
47 |
|
48 QList<QContactDetail> MobCntBrowserAction::supportedDetails(const QContact& contact) const |
|
49 { |
|
50 return contact.details(QContactUrl::DefinitionName); |
|
51 } |
|
52 |
|
53 MobCntBrowserAction* MobCntBrowserAction::clone() const |
|
54 { |
|
55 return new MobCntBrowserAction(); |
|
56 } |
|
57 |
|
58 void MobCntBrowserAction::performAction() |
|
59 { |
|
60 QVariant retValue; |
|
61 emitResult(GeneralError, retValue); |
|
62 |
|
63 /* |
|
64 QString service("com.nokia.services.telephony"); |
|
65 QString type("dial(QString,int)"); |
|
66 |
|
67 performNumberAction(service, type); |
|
68 */ |
|
69 } |