|
1 /* |
|
2 * Copyright (c) 2008 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: Provides access to Agenda Model todo adapter |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPIMTODOADAPTERACCESS_H |
|
20 #define CPIMTODOADAPTERACCESS_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "mpimadapteraccess.h" |
|
24 #include "functionserver.h" |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 const TInt KPIMNumberOfToDoLists = 1; // Only one ToDo list |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class MPIMLocalizationManager; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 /** |
|
35 * Provides the elementary access the PIM Contact list provided by this |
|
36 * Contacts Model adapter module |
|
37 * Access to the adapter is through the static NewL( ) method. |
|
38 */ |
|
39 NONSHARABLE_CLASS(CPIMToDoAdapterAccess): public CBase, |
|
40 public MPIMAdapterAccess |
|
41 { |
|
42 public: // Constructors and a destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * |
|
47 * @param aLocalizationManager Localization Manager. |
|
48 */ |
|
49 static CPIMToDoAdapterAccess* NewL( |
|
50 MPIMLocalizationManager* aLocalizationManager, |
|
51 java::util::FunctionServer* aFuncServer); |
|
52 |
|
53 /** |
|
54 * destructor |
|
55 */ |
|
56 ~CPIMToDoAdapterAccess(); |
|
57 |
|
58 public: // MPIMAdapterAccess |
|
59 |
|
60 const CDesCArray& ListNamesL( |
|
61 const TPIMListType aListType); |
|
62 |
|
63 TBool OpenContactListL( |
|
64 const TDesC* aListName, |
|
65 MPIMContactAdapterManager** aRetAdapterManager, |
|
66 MPIMContactListAdapter** aRetListAdapter, |
|
67 MPIMLocalizationData** aRetLocalizationData); |
|
68 |
|
69 TBool OpenEventListL( |
|
70 const TDesC* aListName, |
|
71 MPIMEventAdapterManager** aRetAdapterManager, |
|
72 MPIMEventListAdapter** aRetListAdapter, |
|
73 MPIMLocalizationData** aRetLocalizationData); |
|
74 |
|
75 TBool OpenToDoListL( |
|
76 const TDesC* aListName, |
|
77 MPIMToDoAdapterManager** aRetAdapterManager, |
|
78 MPIMToDoListAdapter** aRetListAdapter, |
|
79 MPIMLocalizationData** aRetLocalizationData); |
|
80 |
|
81 private: // Constructor |
|
82 |
|
83 /** |
|
84 * C++ default constructor. |
|
85 */ |
|
86 CPIMToDoAdapterAccess( |
|
87 MPIMLocalizationManager* aLocalizationManager, |
|
88 java::util::FunctionServer* aFuncServer); |
|
89 |
|
90 /** |
|
91 * 2nd phase constructor. |
|
92 */ |
|
93 void ConstructL(); |
|
94 |
|
95 protected: // Data |
|
96 |
|
97 /** Owned. */ |
|
98 CDesCArray* iToDoListNames; |
|
99 |
|
100 /** |
|
101 * An empty array of list names (Event and ToDo List names). |
|
102 * Owned. |
|
103 */ |
|
104 CDesCArray* iNoListNames; |
|
105 |
|
106 /** Not owned. */ |
|
107 MPIMLocalizationManager* iLocalizationManager; |
|
108 |
|
109 /** Owned. */ |
|
110 MPIMLocalizationData* iToDoLocalizationData; |
|
111 |
|
112 java::util::FunctionServer* iFuncServer; |
|
113 |
|
114 }; |
|
115 |
|
116 #endif // CPIMTODOADAPTERACCESS_H |
|
117 // End of File |