|
1 /* |
|
2 * Copyright (c) 2003 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SAEPUBSUBNOTIFIER_H |
|
20 #define SAEPUBSUBNOTIFIER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <e32property.h> |
|
25 #include <DosSvrServices.h> |
|
26 #include "PSVariables.h" |
|
27 |
|
28 // CLASS DECLARATION |
|
29 class CSaeEtelObserver; |
|
30 |
|
31 class CSaeSignalStrengthObserver; |
|
32 |
|
33 /** |
|
34 * This class creates the observers and notifies about state changes to Publish and Subscribe. |
|
35 */ |
|
36 NONSHARABLE_CLASS( CSaePubSubNotifier ) : public CBase |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * C++ default constructor. |
|
42 */ |
|
43 CSaePubSubNotifier(); |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 */ |
|
48 static CSaePubSubNotifier* NewL(); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CSaePubSubNotifier(); |
|
54 |
|
55 /** |
|
56 * Through this method the Publish and Subscribe is notified about the state changes. |
|
57 * @param aVariable The variable uid of the variable to change. |
|
58 * @param aState The new state of the variable |
|
59 * @return Return value of the call to RProperty::Set() |
|
60 */ |
|
61 TInt NotifyPubSub( const TUid aVariable, const TInt aState ); |
|
62 |
|
63 private: |
|
64 |
|
65 /** |
|
66 * By default EPOC constructor is private. |
|
67 */ |
|
68 void ConstructL(); |
|
69 // By default, prohibit copy constructor |
|
70 CSaePubSubNotifier( const CSaePubSubNotifier& ); |
|
71 // Prohibit assigment operator |
|
72 CSaePubSubNotifier& operator= ( const CSaePubSubNotifier& ); |
|
73 // Define Publish and Subscribe properties |
|
74 void DefineProperties(); |
|
75 |
|
76 private: // Data |
|
77 // Etel observer. |
|
78 CSaeEtelObserver* iEtelObserver; |
|
79 // Network signal strength observer |
|
80 CSaeSignalStrengthObserver* iSignalObserver; |
|
81 // This variable indicates whether the calls forwarding information is |
|
82 // initialised. |
|
83 TBool iCfStatusInitialised; |
|
84 //Publish and Subscribe properties |
|
85 RProperty iSAProperty; |
|
86 }; |
|
87 |
|
88 #endif // SAEPUBSUBNOTIFIER_H |
|
89 |
|
90 // End of File |