|
1 /* |
|
2 * Copyright (c) 2004 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 * CMsgCenRepObserver declaration file |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CMSGCENREPOBSERVER_H |
|
22 #define CMSGCENREPOBSERVER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 |
|
27 // CONSTANTS |
|
28 // MACROS |
|
29 // DATA TYPES |
|
30 // FUNCTION PROTOTYPES |
|
31 // FORWARD DECLARATIONS |
|
32 class CRepository; |
|
33 // CLASS DECLARATION |
|
34 |
|
35 |
|
36 |
|
37 /** |
|
38 * Class for observing CenRep if MMS Access Point in use changes |
|
39 */ |
|
40 class CMsgCenRepObserver : public CActive |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * @param aRConnection opened RConnection |
|
47 */ |
|
48 static CMsgCenRepObserver* NewL(CMsgErrorWatcher* aWatcher); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CMsgCenRepObserver(); |
|
54 |
|
55 public: // New functions |
|
56 |
|
57 /** |
|
58 * Subscribe to a notification from CenRep |
|
59 */ |
|
60 void SubscribeNotification(); |
|
61 |
|
62 public: // Functions from base classes |
|
63 |
|
64 protected: // New functions |
|
65 |
|
66 protected: // Functions from base classes |
|
67 |
|
68 /** |
|
69 * Active object cancellation |
|
70 */ |
|
71 void DoCancel(); |
|
72 |
|
73 /** |
|
74 * If RunL leaves |
|
75 */ |
|
76 TInt RunError( TInt aError ); |
|
77 |
|
78 private: |
|
79 |
|
80 /** |
|
81 * C++ default constructor. |
|
82 */ |
|
83 CMsgCenRepObserver( CMsgErrorWatcher* aWatcher ); |
|
84 |
|
85 /** |
|
86 * By default Symbian OS constructor is private. |
|
87 * @param aRConnection opened RConnection |
|
88 */ |
|
89 void ConstructL(); |
|
90 |
|
91 /** |
|
92 * Completion |
|
93 */ |
|
94 void RunL(); |
|
95 |
|
96 // By default, prohibit copy constructor |
|
97 CMsgCenRepObserver( const CMsgCenRepObserver& ); |
|
98 |
|
99 // Prohibit assignment operator |
|
100 CMsgCenRepObserver& operator= ( const CMsgCenRepObserver& ); |
|
101 |
|
102 private: // Data |
|
103 |
|
104 CMsgErrorWatcher* iWatcher; |
|
105 CRepository* iRepository; |
|
106 TUid iRepositoryUid; |
|
107 TInt32 iKey; |
|
108 |
|
109 }; |
|
110 |
|
111 #endif // CMSGCENREPOBSERVER_H |
|
112 |
|
113 // End of File |