|
1 /* |
|
2 * Copyright (c) 2002-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: A read-only sim contact buffer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CVPBKSIMCONTACTBUF_H |
|
21 #define CVPBKSIMCONTACTBUF_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CVPbkSimContactBase.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * A read-only sim contact buffer |
|
30 * |
|
31 */ |
|
32 class CVPbkSimContactBuf : public CVPbkSimContactBase |
|
33 { |
|
34 public: // Constructors and destructor |
|
35 |
|
36 /** |
|
37 * Two-phased constructor. |
|
38 * @param aETelContact an ETel contact |
|
39 * @param aSimStore the sim store in which this contact belongs |
|
40 * @return a new instance of this class |
|
41 * @exception KErrBadDescriptor if contact couldn't be initialized |
|
42 */ |
|
43 IMPORT_C static CVPbkSimContactBuf* NewL( const TDesC8& aETelContact, |
|
44 MVPbkSimCntStore& aSimStore ); |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. Creates a new empty sim contact. |
|
48 * @param aSimStore the sim store in which this contact belongs |
|
49 * @return a new instance of this class |
|
50 */ |
|
51 IMPORT_C static CVPbkSimContactBuf* NewL( |
|
52 MVPbkSimCntStore& aSimStore ); |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 * @param aETelContact an ETel contact |
|
57 * @param aSimStore the sim store in which this contact belongs |
|
58 * @return a new instance of this class |
|
59 * @exception KErrBadDescriptor if contact couldn't be initialized |
|
60 */ |
|
61 IMPORT_C static CVPbkSimContactBuf* NewLC( const TDesC8& aETelContact, |
|
62 MVPbkSimCntStore& aSimStore ); |
|
63 |
|
64 /** |
|
65 * Two-phased constructor. Creates a new empty sim contact. |
|
66 * @param aSimStore the sim store in which this contact belongs |
|
67 * @return a new instance of this class |
|
68 */ |
|
69 IMPORT_C static CVPbkSimContactBuf* NewLC( |
|
70 MVPbkSimCntStore& aSimStore ); |
|
71 |
|
72 /** |
|
73 * Destructor. |
|
74 */ |
|
75 virtual ~CVPbkSimContactBuf(); |
|
76 |
|
77 public: // Functions from base classes |
|
78 |
|
79 /** |
|
80 * From MVPbkSimContact |
|
81 */ |
|
82 const CVPbkSimCntField& ConstFieldAt( TInt aIndex ) const; |
|
83 |
|
84 /** |
|
85 * From MVPbkSimContact |
|
86 */ |
|
87 TInt FieldCount() const; |
|
88 |
|
89 /** |
|
90 * From MVPbkSimContact |
|
91 */ |
|
92 TInt SimIndex() const; |
|
93 |
|
94 /** |
|
95 * From MVPbkSimContact |
|
96 */ |
|
97 const TDesC8& ETelContactL() const; |
|
98 |
|
99 /** |
|
100 * From MVPbkSimContact |
|
101 */ |
|
102 void SetL( const TDesC8& aETelContact ); |
|
103 |
|
104 private: |
|
105 |
|
106 /** |
|
107 * C++ constructor. |
|
108 */ |
|
109 CVPbkSimContactBuf( MVPbkSimCntStore& aSimStore ); |
|
110 |
|
111 /** |
|
112 * By default Symbian 2nd phase constructor is private. |
|
113 */ |
|
114 void ConstructL( const TDesC8* aETelContact ); |
|
115 |
|
116 private: // Data |
|
117 /// An ETel format contact buffer |
|
118 HBufC8* iData; |
|
119 /// Own: one and only field instance |
|
120 mutable CVPbkSimCntField* iCurrentField; |
|
121 }; |
|
122 |
|
123 #endif // CVPBKSIMCONTACTBUF_H |
|
124 |
|
125 // End of File |