|
1 /* |
|
2 * Copyright (c) 2002 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 * Log configuration setter / getter |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __Logs_Engine_CLogsConfig_H__ |
|
21 #define __Logs_Engine_CLogsConfig_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 #include "MLogsConfig.h" |
|
32 #include "MLogsStateHolder.h" |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CLogClient; |
|
36 class MLogsObserver; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 /** |
|
41 * Log configuration setter / getter |
|
42 */ |
|
43 class CLogsConfig : public CActive, public MLogsConfig, |
|
44 public MLogsStateHolder |
|
45 { |
|
46 public: |
|
47 /** |
|
48 * Standard creation function. |
|
49 * |
|
50 * @param aFsSession ref. to file server session |
|
51 * @param aObserver pointer to observer. Default NULL |
|
52 * @return New instance of this class |
|
53 */ |
|
54 static CLogsConfig* NewL( RFs& aFsSession, MLogsObserver* aObserver = NULL ); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CLogsConfig(); |
|
60 |
|
61 private: |
|
62 /** |
|
63 * Default constructor. |
|
64 */ |
|
65 CLogsConfig(); |
|
66 |
|
67 /** |
|
68 * Constructor, second phase |
|
69 */ |
|
70 void ConstructL(); |
|
71 |
|
72 /** |
|
73 * Constructor |
|
74 * |
|
75 * @param aFsSession ref. to file server session |
|
76 * @param aObserver pointer to observer |
|
77 */ |
|
78 CLogsConfig( RFs& aFsSession, MLogsObserver* aObserver ); |
|
79 |
|
80 |
|
81 protected: // from CActive |
|
82 |
|
83 void RunL(); |
|
84 TInt RunError(TInt aError); |
|
85 void DoCancel(); |
|
86 |
|
87 public: // from MLogsConfig |
|
88 |
|
89 void SetConfig( const TLogConfig& aConfig ); |
|
90 void GetConfig( TLogConfig& aConfig ); |
|
91 void SetObserver( MLogsObserver* aObserver ); |
|
92 |
|
93 public: // from MLogsStateHolder |
|
94 |
|
95 TLogsState State() const; |
|
96 |
|
97 private: // data |
|
98 |
|
99 /// Ref: File server session |
|
100 RFs& iFsSession; |
|
101 |
|
102 /// Own: Log client |
|
103 CLogClient* iLogClient; |
|
104 |
|
105 /// Ref: Observer |
|
106 MLogsObserver* iObserver; |
|
107 |
|
108 /// Own: state |
|
109 TLogsState iState; |
|
110 }; |
|
111 |
|
112 #endif // __Logs_Engine_CLogsConfig_H__ |
|
113 |
|
114 // End of File |