63
|
1 |
/*
|
|
2 |
* Copyright (c) 2006-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: Identifies a pool element
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef __CPCS_POOL_ELEMENT_H__
|
|
19 |
#define __CPCS_POOL_ELEMENT_H__
|
|
20 |
|
|
21 |
// INCLUDES
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <e32math.h>
|
|
24 |
|
|
25 |
// FORWARD DECLARATION
|
|
26 |
class CPsData;
|
|
27 |
|
|
28 |
// CLASS DECLARATION
|
|
29 |
class CPcsPoolElement : public CBase
|
|
30 |
{
|
|
31 |
|
|
32 |
public:
|
|
33 |
|
|
34 |
/**
|
|
35 |
* Two phase construction
|
|
36 |
*/
|
|
37 |
static CPcsPoolElement* NewL(CPsData& aPsData);
|
|
38 |
|
|
39 |
/**
|
|
40 |
* Destructor
|
|
41 |
*/
|
|
42 |
virtual ~CPcsPoolElement();
|
|
43 |
|
|
44 |
/**
|
|
45 |
* Clears the data match element attribute
|
|
46 |
*/
|
|
47 |
void ClearDataMatchAttribute();
|
|
48 |
|
|
49 |
/**
|
|
50 |
* Checks if data matched
|
|
51 |
*/
|
|
52 |
TBool IsDataMatch(TInt aIndex);
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Set data match
|
|
56 |
*/
|
|
57 |
void SetDataMatch(TInt aIndex);
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Return the CPsData object of this pool element
|
|
61 |
*/
|
|
62 |
CPsData* GetPsData();
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Compares the two Pool Elements and returms the comparison value.
|
|
66 |
* It takes care of language variance too.
|
|
67 |
*/
|
|
68 |
static TInt CompareByData ( const CPcsPoolElement& aObject1,
|
|
69 |
const CPcsPoolElement& aObject2 );
|
|
70 |
|
|
71 |
private:
|
|
72 |
|
|
73 |
/*
|
|
74 |
* Constructor
|
|
75 |
*/
|
|
76 |
CPcsPoolElement();
|
|
77 |
|
|
78 |
/*
|
|
79 |
* 2nd phase constructor
|
|
80 |
*/
|
|
81 |
void ConstructL(CPsData& aPsData);
|
|
82 |
|
|
83 |
private:
|
|
84 |
|
|
85 |
/*
|
|
86 |
* Pointer to contact data
|
|
87 |
* Not owned.
|
|
88 |
*/
|
|
89 |
CPsData* iPsData;
|
|
90 |
|
|
91 |
/*
|
|
92 |
* This attribute indicates due to which
|
|
93 |
* the data element this item entered the pool
|
|
94 |
*
|
|
95 |
* Bit 0 = Data1 matched
|
|
96 |
* Bit 1 = Data2 matched
|
|
97 |
* Bit 2 = Data3 matched
|
|
98 |
* Bit 3 = Not used
|
|
99 |
* Bit 4 = Not used
|
|
100 |
* Bit 5 = Not used
|
|
101 |
* Bit 6 = Not used
|
|
102 |
* Bit 7 = Not used
|
|
103 |
*/
|
|
104 |
TUint8 iDataMatchAttribute;
|
|
105 |
};
|
|
106 |
|
|
107 |
#endif // __CPCS_POOL_ELEMENT_H__
|
|
108 |
|
|
109 |
// End of file
|