31
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 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: CS Server Conversation Contact class.
|
|
15 |
* This shall hold all the contact data associated with a
|
|
16 |
* conversation like name, numbers and contact link
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
#ifndef __C_CS_CONVERSATIONCONTACT_H
|
|
21 |
#define __C_CS_CONVERSATIONCONTACT_H
|
|
22 |
|
|
23 |
// SYSTEM INCLUDE FILES
|
|
24 |
#include <ccsdefs.h>
|
|
25 |
|
|
26 |
// FORWARD DECLARATIONS
|
|
27 |
|
|
28 |
// CLASS DECLARATION
|
|
29 |
/**
|
|
30 |
* CS Server Conversation Contact Details class
|
|
31 |
* This shall hold all the details of contact associated with a
|
|
32 |
* conversation like name, numbers and contact id
|
|
33 |
*/
|
|
34 |
class CCsConversationContact : public CBase
|
|
35 |
{
|
|
36 |
public:
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Two phase construction
|
|
40 |
*/
|
|
41 |
static CCsConversationContact* NewL();
|
|
42 |
|
|
43 |
/**
|
|
44 |
* Destructor
|
|
45 |
*/
|
|
46 |
~CCsConversationContact();
|
|
47 |
|
|
48 |
/**
|
|
49 |
* GetDisplayName
|
|
50 |
* Get the first name of contact
|
|
51 |
*
|
|
52 |
* @return returns the First name
|
|
53 |
*/
|
|
54 |
HBufC* GetDisplayName() const;
|
|
55 |
|
|
56 |
/**
|
|
57 |
* SetDisplayNameL
|
|
58 |
* Set the first name of contact
|
|
59 |
*
|
|
60 |
* @param aDisplayName first name
|
|
61 |
*/
|
|
62 |
void SetDisplayNameL(const TDesC& aDisplayName);
|
|
63 |
|
|
64 |
/**
|
|
65 |
* GetContactId
|
|
66 |
* Get the Contact Id of conversation
|
|
67 |
*
|
|
68 |
* @return returns the integer contact Id
|
|
69 |
*/
|
|
70 |
TInt32 GetContactId() const;
|
|
71 |
|
|
72 |
/**
|
|
73 |
* SetContactId
|
|
74 |
* Set the Contact Id of conversation
|
|
75 |
*
|
|
76 |
* @param aContactId the phone book contact link Id
|
|
77 |
*/
|
|
78 |
void SetContactId(TInt32 aContactId);
|
|
79 |
|
|
80 |
/**
|
|
81 |
* AddPhoneNumberL
|
|
82 |
* Adds the contact number inside phone number list
|
|
83 |
*
|
|
84 |
* @param aPhoneNumber phone number
|
|
85 |
*/
|
|
86 |
void AddPhoneNumberL(TDesC& aPhoneNumber);
|
|
87 |
|
|
88 |
/**
|
|
89 |
* GetPhoneNumberList
|
|
90 |
* Returns a list of associated phone numbers in this contact
|
|
91 |
*
|
|
92 |
* @param aPhoneNumbers array of phone numbers
|
|
93 |
*/
|
|
94 |
void GetPhoneNumberList(RPointerArray<TDesC>& aPhoneNumbers);
|
|
95 |
|
|
96 |
/**
|
|
97 |
* MatchPhoneNumber
|
|
98 |
* Check if the input phone number (aPhoneNumber) is
|
|
99 |
* associated with this contact. Compares for aNumDigits
|
|
100 |
*
|
|
101 |
* @param aPhoneNumber phone number
|
|
102 |
* @param aNumDigits number of digits to be compared
|
|
103 |
* @return TBool - ETrue if match is found, else EFalse
|
|
104 |
*/
|
|
105 |
TBool MatchPhoneNumber(TDesC& aPhoneNumber, TInt aNumDigits) const;
|
|
106 |
|
|
107 |
private:
|
|
108 |
|
|
109 |
/**
|
|
110 |
* Constructor
|
|
111 |
*/
|
|
112 |
CCsConversationContact();
|
|
113 |
|
|
114 |
/**
|
|
115 |
* Second phase constructor
|
|
116 |
*/
|
|
117 |
void ConstructL();
|
|
118 |
|
|
119 |
private:
|
|
120 |
|
|
121 |
/**
|
|
122 |
* iFirstName
|
|
123 |
* Conversation first name
|
|
124 |
* Own.
|
|
125 |
*/
|
|
126 |
HBufC* iDisplayName;
|
|
127 |
|
|
128 |
/**
|
|
129 |
* iContactId
|
|
130 |
* Conversation phonebook contact Id
|
|
131 |
*/
|
|
132 |
TInt32 iContactId;
|
|
133 |
|
|
134 |
/**
|
|
135 |
* iPhoneNumberList
|
|
136 |
* Used to store all associated phone numbers for a conversation
|
|
137 |
* Own
|
|
138 |
*/
|
|
139 |
RPointerArray<HBufC>* iPhoneNumberList;
|
|
140 |
};
|
|
141 |
|
|
142 |
#endif // __C_CS_CONVERSATIONCONTACT_H
|