|
1 /* |
|
2 * Copyright (c) 2010 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: Platform specific component which manages all the listeners |
|
15 * listening changes in system configuration. Currently only Central |
|
16 * Repository listening is supported. |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef SETTINGSLISTENERIMPL_H |
|
21 #define SETTINGSLISTENERIMPL_H |
|
22 |
|
23 #include <vector> |
|
24 #include <memory> |
|
25 #include <cenrepnotifyhandler.h> |
|
26 |
|
27 #include "javaosheaders.h" |
|
28 #include "settingslistenerinterface.h" |
|
29 |
|
30 namespace java |
|
31 { |
|
32 namespace captain |
|
33 { |
|
34 |
|
35 class CoreInterface; |
|
36 class CenRepListener; |
|
37 |
|
38 OS_NONSHARABLE_CLASS(SettingsListenerImpl) : public SettingsListenerInterface |
|
39 { |
|
40 public: |
|
41 SettingsListenerImpl(CoreInterface* aCore); |
|
42 virtual ~SettingsListenerImpl(); |
|
43 |
|
44 // SystemSettingsChangeListenerInterface |
|
45 virtual void startListening(); |
|
46 virtual void stopListening(); |
|
47 |
|
48 private: |
|
49 void cleanUp(); |
|
50 CenRepListener* createCenRepKeyListener(TUid aRepoId, TUint32 aKeyId, |
|
51 CCenRepNotifyHandler::TCenRepKeyType aKeyType, |
|
52 TInt& aErrorCode); |
|
53 |
|
54 CoreInterface* mCore; // resource not owned |
|
55 typedef std::vector<CenRepListener*> crListeners_t; |
|
56 crListeners_t mCenRepListeners; // listeners are owned resources. |
|
57 |
|
58 }; |
|
59 |
|
60 } // namespace captain |
|
61 } // namespace java |
|
62 |
|
63 #endif // SETTINGSLISTENERIMPL_H |
|
64 |