1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
22 #include <s32file.h> |
22 #include <s32file.h> |
23 #include <babackup.h> |
23 #include <babackup.h> |
24 #include <bautils.h> |
24 #include <bautils.h> |
25 #include <barsc.h> |
25 #include <barsc.h> |
26 #include <logserv.rsg> |
26 #include <logserv.rsg> |
27 #include "TEST.H" |
27 #include "t_logutil2.h" |
28 |
28 |
29 const TUid KTestEventUid = {0x10005393}; |
29 const TUid KTestEventUid = {0x10005393}; |
30 _LIT(KTestEventDesc1, "Event Type Description"); |
30 _LIT(KTestEventDesc1, "Event Type Description"); |
31 _LIT(KTestDirection1, "Direction"); |
31 _LIT(KTestDirection1, "Direction"); |
32 _LIT(KTestStatus1, "Status"); |
32 _LIT(KTestStatus1, "Status"); |
42 |
42 |
43 _LIT(KLogEngPrivatePath, "c:\\private\\101f401d\\"); |
43 _LIT(KLogEngPrivatePath, "c:\\private\\101f401d\\"); |
44 |
44 |
45 _LIT(KLogHiCapHelperPanic, "TLHCHlpr"); |
45 _LIT(KLogHiCapHelperPanic, "TLHCHlpr"); |
46 |
46 |
|
47 RTest TheTest(_L("t_loghicaphelper")); //used in t_logutil.cpp only |
|
48 |
47 RFs theFs; |
49 RFs theFs; |
48 CActiveScheduler *TheTestScheduler = NULL; |
50 CActiveScheduler *TheTestScheduler = NULL; |
49 |
|
50 //=========================================================================================== |
|
51 |
|
52 static TPtrC FileName(const TText* aFile) |
|
53 { |
|
54 TPtrC p(aFile); |
|
55 TInt ix=p.LocateReverse('\\'); |
|
56 if (ix<0) |
|
57 ix=p.LocateReverse('/'); |
|
58 if (ix>=0) |
|
59 p.Set(p.Mid(1+ix)); |
|
60 return p; |
|
61 } |
|
62 |
|
63 void LogLeave(TInt aErr, const TText* aFile, TInt aLine) |
|
64 { |
|
65 TPtrC fname(FileName(aFile)); |
|
66 RDebug::Print(_L("*** LogEng test leave, err=%d, file: %S-%d\r\n"), aErr, &fname, aLine); |
|
67 User::Leave(aErr); |
|
68 } |
|
69 |
|
70 #undef TEST_STRING |
|
71 #define TEST_STRING(s) _S(s) |
|
72 |
|
73 #undef LEAVE |
|
74 #undef LEAVE_IF_ERROR |
|
75 #define LEAVE(err) LogLeave(err, TEST_STRING(__FILE__), __LINE__) |
|
76 #define LEAVE_IF_ERROR(err) (err < KErrNone ? LogLeave(err, TEST_STRING(__FILE__), __LINE__) : void(0)) |
|
77 |
51 |
78 //=========================================================================================== |
52 //=========================================================================================== |
79 |
53 |
80 //Supported remote operaions |
54 //Supported remote operaions |
81 enum THelperOp |
55 enum THelperOp |