|
1 /* |
|
2 * Copyright (c) 2005 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_STUBDATAHOLDER_H |
|
20 #define C_STUBDATAHOLDER_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <mprofilename.h> |
|
25 #include <nwhandlingengine.h> |
|
26 #include <rsssettings.h> |
|
27 #include <msssettingsobserver.h> |
|
28 |
|
29 |
|
30 class MProfileChangeObserver; |
|
31 |
|
32 class CProfileName : public CBase, public MProfileName |
|
33 { |
|
34 public: |
|
35 |
|
36 ~CProfileName(); |
|
37 TInt Id() const; |
|
38 const TDesC& Name() const; |
|
39 const TDesC& NaviName() const; |
|
40 void SetL( const TDesC& aName, TInt aId ); |
|
41 const TDesC& ShortName() const; |
|
42 const TDesC& TitleName() const; |
|
43 |
|
44 private: |
|
45 |
|
46 HBufC* iName; |
|
47 HBufC* iNaviName; |
|
48 HBufC* iTitleName; |
|
49 TInt iId; |
|
50 }; |
|
51 |
|
52 |
|
53 |
|
54 class TSSSettingsValue |
|
55 { |
|
56 public: |
|
57 TSSSettingsSetting iSetting; |
|
58 TInt iValue; |
|
59 }; |
|
60 |
|
61 |
|
62 class TProfileObserver |
|
63 { |
|
64 public: |
|
65 CBase* iOwner; |
|
66 MProfileChangeObserver* iObserver; |
|
67 }; |
|
68 |
|
69 /** |
|
70 * ?one_line_short_description |
|
71 * |
|
72 * ?more_complete_description |
|
73 * |
|
74 * @lib ?library |
|
75 * @since S60 ?S60_version *** for example, S60 v3.0 |
|
76 */ |
|
77 class CStubDataHolder : public CBase |
|
78 { |
|
79 public: |
|
80 |
|
81 IMPORT_C static CStubDataHolder* InstanceL(); |
|
82 IMPORT_C static CStubDataHolder* Instance(); |
|
83 IMPORT_C static void Release(); |
|
84 virtual ~CStubDataHolder(); |
|
85 |
|
86 |
|
87 |
|
88 IMPORT_C void AddProfileChangeObserverL( MProfileChangeObserver& aObserver, CBase* aOwner ); |
|
89 IMPORT_C void RemoveProfileChangeObserver( CBase* aOwner ); |
|
90 IMPORT_C RArray<TProfileObserver>& ProfileChangeObservers(); |
|
91 |
|
92 IMPORT_C void SetCurrentProfileL( const TDesC& aName, TInt aId ); |
|
93 IMPORT_C MProfileName* CurrentProfile(); |
|
94 |
|
95 IMPORT_C void SetNWMessageObserver( MNWMessageObserver& aObserver, TNWInfo& aInfo ); |
|
96 IMPORT_C MNWMessageObserver* NWMessageObserver(); |
|
97 IMPORT_C TNWInfo* NWInfo(); |
|
98 |
|
99 |
|
100 void AddSSSettingsObserverL( MSSSettingsObserver& aObserver ); |
|
101 void RemoveSSSettingsObserver( MSSSettingsObserver& aObserver ); |
|
102 TInt GetSSSettingsValueL( TSSSettingsSetting aSetting ); |
|
103 IMPORT_C RArray<MSSSettingsObserver*>& SSSettingsObservers(); |
|
104 IMPORT_C void SetSSSettingsValueL( TSSSettingsSetting aSetting, TInt aValue ); |
|
105 IMPORT_C void RemoveSSSetting( TSSSettingsSetting aSetting ); |
|
106 |
|
107 |
|
108 protected: |
|
109 |
|
110 private: |
|
111 |
|
112 CStubDataHolder(); |
|
113 |
|
114 void ConstructL(); |
|
115 |
|
116 private: // data |
|
117 |
|
118 RArray<TProfileObserver> iProfileChangeObservers; |
|
119 CProfileName* iProfile; |
|
120 MNWMessageObserver* iNWObserver; |
|
121 TNWInfo* iNWInfo; |
|
122 RArray<TSSSettingsValue> iSSSettingValues; |
|
123 RArray<MSSSettingsObserver*> iSSSettingsObservers; |
|
124 }; |
|
125 |
|
126 |
|
127 #endif // C_STUBDATAHOLDER_H |