|
1 // Copyright (c) 2000-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 // watcher.h |
|
15 // |
|
16 /** |
|
17 * @file |
|
18 * @publishedPartner |
|
19 * @released |
|
20 */ |
|
21 |
|
22 #ifndef __WATCHER_H__ |
|
23 #define __WATCHER_H__ |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <f32file.h> |
|
27 |
|
28 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
29 #include "cwatcher.h" |
|
30 #endif |
|
31 |
|
32 /** |
|
33 ECom interface UID for non-SMS related critical watchers. |
|
34 @publishedPartner |
|
35 @released |
|
36 */ |
|
37 const TUid KUidMsgCriticalWatchers = { 0x1027433D }; |
|
38 |
|
39 /** |
|
40 ECom interface UID for non-SMS related non-critical watchers. |
|
41 @publishedPartner |
|
42 @released |
|
43 */ |
|
44 const TUid KUidMsgNonCriticalWatchers = { 0x1027433E }; |
|
45 |
|
46 class CWatcherLog; |
|
47 class RFs; |
|
48 |
|
49 /** |
|
50 ECom interface |
|
51 @publishedPartner |
|
52 @released |
|
53 */ |
|
54 struct TWatcherParams |
|
55 { |
|
56 TWatcherParams(RFs& aFs, CWatcherLog& aLog) : iFs(aFs), iLog(aLog) {} |
|
57 // |
|
58 RFs& iFs; |
|
59 CWatcherLog& iLog; |
|
60 }; |
|
61 |
|
62 //********************************** |
|
63 // CWatcherLog |
|
64 //********************************** |
|
65 |
|
66 const TInt KWatcherLogBuffer = 256; |
|
67 _LIT(KWatcherStringFormat, "%S"); |
|
68 |
|
69 class CWatcherLog : public CBase |
|
70 /** |
|
71 @publishedPartner |
|
72 @released |
|
73 */ |
|
74 { |
|
75 public: |
|
76 static CWatcherLog* NewL(RFs& aFs); |
|
77 ~CWatcherLog(); |
|
78 // |
|
79 IMPORT_C void Printf(TRefByValue<const TDesC> aFmt,...); |
|
80 IMPORT_C void Printf(TRefByValue<const TDesC8> aFmt,...); |
|
81 IMPORT_C TBool IsLogging() const; |
|
82 // |
|
83 private: |
|
84 CWatcherLog(RFs& aFs); |
|
85 void ConstructL(); |
|
86 TBool IsConsole() const; |
|
87 |
|
88 // |
|
89 private: |
|
90 CConsoleBase* iConsole; |
|
91 RFs& iFs; |
|
92 }; |
|
93 |
|
94 #endif // __WATCHER_H__ |