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