equal
deleted
inserted
replaced
|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // ULogger data watcher |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 @prototype |
|
22 */ |
|
23 |
|
24 |
|
25 #ifndef __ULOGGERWATCHER_H__ |
|
26 #define __ULOGGERWATCHER_H__ |
|
27 |
|
28 #include <e32base.h> |
|
29 |
|
30 namespace Ulogger |
|
31 { |
|
32 |
|
33 |
|
34 /**MDataWatcherObserver class |
|
35 */ |
|
36 class MDataWatcherObserver |
|
37 { |
|
38 public: |
|
39 virtual void DataNotification() = 0; |
|
40 |
|
41 }; |
|
42 |
|
43 |
|
44 |
|
45 /**CULoggerWatcher class |
|
46 */ |
|
47 class CULoggerWatcher : public CActive |
|
48 { |
|
49 public: |
|
50 static CULoggerWatcher* NewL(); |
|
51 static CULoggerWatcher* NewLC(); |
|
52 ~CULoggerWatcher(); |
|
53 |
|
54 //from CActive |
|
55 void RunL(); |
|
56 |
|
57 //own methods |
|
58 inline TRequestStatus& GetStatus(){return iStatus;} |
|
59 void StartWatching(MDataWatcherObserver* aObserver); |
|
60 inline void StopWatching() |
|
61 { |
|
62 Cancel(); |
|
63 } |
|
64 |
|
65 private: |
|
66 CULoggerWatcher(); |
|
67 void ConstructL(); |
|
68 |
|
69 //from CActive |
|
70 void DoCancel(); |
|
71 |
|
72 //data |
|
73 MDataWatcherObserver* iObserver; |
|
74 }; |
|
75 } |
|
76 #endif //__ULOGGERWATCHER_H__ |