|
1 /* |
|
2 * Copyright (c) 2005-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: Phonebook 2 view state transformer. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPBK2VIEWSTATETRANSFORMER_H |
|
19 #define CPBK2VIEWSTATETRANSFORMER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class CVPbkContactManager; |
|
26 class CPbk2ViewState; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Phonebook 2 view state transformer. |
|
32 * Converts a legacy Phonebook view state to the new format. |
|
33 */ |
|
34 class CPbk2ViewStateTransformer : public CBase |
|
35 { |
|
36 public: // Construction and destruction |
|
37 |
|
38 /** |
|
39 * Creates a new instance of this class. |
|
40 * |
|
41 * @param aContactManager Virtual Phonebook contact manager. |
|
42 * @return A new instance of this class. |
|
43 */ |
|
44 IMPORT_C static CPbk2ViewStateTransformer* NewLC( |
|
45 CVPbkContactManager& aContactManager ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 ~CPbk2ViewStateTransformer(); |
|
51 |
|
52 public: // Interface |
|
53 |
|
54 /** |
|
55 * Converts legacy Phonebook view state to the new v2 format. |
|
56 * |
|
57 * @param aCustomMessage Custom message containing the legacy |
|
58 * view state. |
|
59 * @return Converted view state in Phonebook 2 format. |
|
60 */ |
|
61 IMPORT_C CPbk2ViewState* TransformLegacyViewStateToPbk2ViewStateLC( |
|
62 const TDesC8& aCustomMessage ); |
|
63 |
|
64 private: // Implementation |
|
65 CPbk2ViewStateTransformer( |
|
66 CVPbkContactManager& aContactManager ); |
|
67 |
|
68 private: // Data |
|
69 /// Ref: Virtual Phonebook contact manager |
|
70 CVPbkContactManager& iContactManager; |
|
71 }; |
|
72 |
|
73 #endif // CPBK2VIEWSTATETRANSFORMER_H |
|
74 |
|
75 // End of File |