|
1 /* |
|
2 * Copyright (c) 2002-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: Publish and Subscribe implementation of notify services |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CCANOTIFIERIMPL_H |
|
21 #define CCANOTIFIERIMPL_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "MCANotifierInterface.h" |
|
25 #include "MCAPropertyNotificationObserver.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MCANotifierKeyObserver; |
|
29 class CCAPropertyObserver; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * Class for notifying key changes, reading and changing the values of |
|
34 * Pub&Sub keys. |
|
35 * |
|
36 * @since Series 60 Platform 3.0 |
|
37 */ |
|
38 class CCANotifierImpl : public CBase, |
|
39 public MCANotifierInterface, |
|
40 public MCAPropertyNotificationObserver |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 static CCANotifierImpl* NewL( MCANotifierKeyObserver* aObserver, |
|
48 const TUid aUid ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CCANotifierImpl(); |
|
54 |
|
55 public: // Functions from base classes |
|
56 |
|
57 TInt SetInt( TNotifyKey aKey, TInt aValue ); |
|
58 TInt GetInt( TNotifyKey aKey, TInt& aValue ); |
|
59 TInt ListenKeyChanges( TNotifyKey aKey ); |
|
60 |
|
61 private: // From MCAPropertyNotificationObserver |
|
62 |
|
63 /** |
|
64 * @see MCAPropertyNotificationObserver |
|
65 */ |
|
66 void HandlePropertyNotificationEventL( TUid aCategory, TUint aKey ); |
|
67 |
|
68 private: |
|
69 |
|
70 /** |
|
71 * C++ default constructor. |
|
72 */ |
|
73 CCANotifierImpl( MCANotifierKeyObserver* aObserver, const TUid aUid ); |
|
74 |
|
75 |
|
76 private: // Data |
|
77 |
|
78 MCANotifierKeyObserver* iObserver; |
|
79 TUid iCatUID; |
|
80 CCAPropertyObserver* iPropWatcher; |
|
81 }; |
|
82 |
|
83 #endif // CCANOTIFIERIMPL_H |
|
84 |
|
85 // End of File |