|
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: Header declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef SEN_MULTIUSER_IDENTITY_MANAGER_H |
|
26 #define SEN_MULTIUSER_IDENTITY_MANAGER_H |
|
27 |
|
28 // INCLUDES |
|
29 #include <e32std.h> |
|
30 #include <ecom.h> |
|
31 #include <flogger.h> // RFileLogger |
|
32 #include <badesca.h> // CDesC8Array |
|
33 |
|
34 #include <SenIdentityProvider.h> |
|
35 #include <SenBaseFragment.h> |
|
36 |
|
37 #include "senbaseidentitymanager.h" |
|
38 #include "msenidentitymanager.h" |
|
39 #include "senuser.h" |
|
40 #include "senpointermap.h" |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 // FORWARD DECLARATIONS |
|
47 class MSenCoreServiceManager; |
|
48 |
|
49 // CLASS DECLARATION |
|
50 class CSenMultiUserIdentityManager : public CSenBaseIdentityManager |
|
51 { |
|
52 public: // Constructors and destructor |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 */ |
|
57 IMPORT_C static CSenMultiUserIdentityManager* NewL( |
|
58 MSenCoreServiceManager& aManager); |
|
59 IMPORT_C static CSenMultiUserIdentityManager* NewLC( |
|
60 MSenCoreServiceManager& aManager); |
|
61 |
|
62 IMPORT_C virtual ~CSenMultiUserIdentityManager(); |
|
63 |
|
64 |
|
65 |
|
66 /** |
|
67 * Creates the element. Overrides CSenBaseFragment |
|
68 * StartElementL-function |
|
69 * @param aNsUri name space URI |
|
70 * @param aLocalName local name |
|
71 * @param aQName cue name |
|
72 * @param apAttrs XML attributes |
|
73 */ |
|
74 virtual void StartElementL( const TDesC8& aNsUri, |
|
75 const TDesC8& aLocalName, |
|
76 const TDesC8& aQName, |
|
77 const RAttributeArray& aAttributes); |
|
78 |
|
79 virtual void EndElementL(const TDesC8& aNsUri, |
|
80 const TDesC8& aLocalName, |
|
81 const TDesC8& aQName); |
|
82 |
|
83 /** |
|
84 * Implements MSenIdentityManager |
|
85 * @return the currently active default identity. |
|
86 */ |
|
87 virtual MSenIdentity& IdentityL(); |
|
88 |
|
89 /** |
|
90 * Implements MSenIdentityManager |
|
91 * @param On the return, contains the (System) userName of the |
|
92 * currently active user. |
|
93 * @return KErrNone if no error, or some of the system wide error codes |
|
94 */ |
|
95 virtual TInt UserNameL(HBufC8*& aUserName); |
|
96 |
|
97 |
|
98 private: |
|
99 |
|
100 /** |
|
101 * C++ default constructor. |
|
102 */ |
|
103 CSenMultiUserIdentityManager(MSenCoreServiceManager& aManager); |
|
104 |
|
105 /** |
|
106 * By default Symbian 2nd phase constructor is private. |
|
107 */ |
|
108 void ConstructL(); |
|
109 |
|
110 // New functions |
|
111 |
|
112 /** |
|
113 * Save the current state of the SenMultiUserIdentityManager as an XML |
|
114 * document into a file. |
|
115 * Status codes: |
|
116 * KErrNone Ok |
|
117 * Other codes are system error codes. |
|
118 * @return status code. |
|
119 */ |
|
120 TInt WriteConfigurationToL( const TDesC& aFile ); |
|
121 |
|
122 |
|
123 CSenBaseIdentity* iActiveIdentity; |
|
124 CSenUser* iParsedUser;//used only while parsing |
|
125 CSenUser* iActiveUser; |
|
126 RPointerArray<CSenUser> iUsers; |
|
127 }; |
|
128 |
|
129 #endif // SEN_BASE_IDENTITY_MANAGER_H |
|
130 |
|
131 // End of File |