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 <QDebug> |
|
19 #include "qcontact.h" |
|
20 |
|
21 // ============================ MEMBER FUNCTIONS =============================== |
|
22 |
|
23 // ----------------------------------------------------------------------------- |
|
24 // QContact::QContact |
|
25 // ----------------------------------------------------------------------------- |
|
26 // |
|
27 QContact::QContact( ) |
|
28 { |
|
29 } |
|
30 |
|
31 // ----------------------------------------------------------------------------- |
|
32 // QContact::QContact |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 QContact::QContact( |
|
36 const QContact & contact ) |
|
37 { |
|
38 mDetails = contact.details(""); |
|
39 } |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // QContact::QContact |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 QContact& QContact::operator=(const QContact& other) |
|
46 { |
|
47 mDetails = other.details(); |
|
48 return *this; |
|
49 } |
|
50 // ----------------------------------------------------------------------------- |
|
51 // QContact::~QContact |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 QContact::~QContact( ) |
|
55 { |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // QContact::uid |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 /*QContactId QContact::id( ) const |
|
63 { |
|
64 QContactId temp; |
|
65 return temp; |
|
66 }*/ |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // QContact::localId |
|
70 // ----------------------------------------------------------------------------- |
|
71 // |
|
72 QContactLocalId QContact::localId( ) const |
|
73 { |
|
74 return 3; |
|
75 } |
|
76 |
|
77 // ----------------------------------------------------------------------------- |
|
78 // QContact::details |
|
79 // ----------------------------------------------------------------------------- |
|
80 // |
|
81 QList<QContactDetail> QContact::details(const QString& definitionId) const |
|
82 { |
|
83 Q_UNUSED(definitionId) |
|
84 return mDetails; |
|
85 |
|
86 } |
|
87 // ----------------------------------------------------------------------------- |
|
88 // QContact::setDetails |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 void QContact::setDetails(const QList<QContactDetail>& details) |
|
92 { |
|
93 mDetails.clear(); |
|
94 QContactDetail detail; |
|
95 qDebug() << "QContact::setDetails, list count is: " << details.count(); |
|
96 foreach (detail, details) |
|
97 { |
|
98 mDetails.append(detail); |
|
99 qDebug() << "QContact::setDetails, mDetails count is: " << mDetails.count(); |
|
100 qDebug() << "QContact::setDetails, mDetails[0].value is: " << mDetails[0].value(""); |
|
101 } |
|
102 |
|
103 } |
|