author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 31 Aug 2010 16:06:03 +0300 | |
branch | RCL_3 |
changeset 44 | 0b68a1b0c15e |
parent 16 | 44bb89c96acb |
permissions | -rw-r--r-- |
5 | 1 |
/* |
2 |
* Copyright (c) 2007 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 the License "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: Implements sapievent class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#include <e32base.h> |
|
16
44bb89c96acb
Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
20 |
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
5 | 21 |
#include <logwrap.h> |
16
44bb89c96acb
Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
22 |
#else |
44bb89c96acb
Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
23 |
#include <logwrap.h> |
44bb89c96acb
Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
24 |
#include <logwraplimits.h> |
44bb89c96acb
Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
25 |
#endif |
5 | 26 |
#include <logcli.h> |
27 |
||
28 |
#include "loggingevent.h" |
|
29 |
||
30 |
/** |
|
31 |
* Default Constructor Method |
|
32 |
*/ |
|
33 |
||
34 |
CLogsEvent :: CLogsEvent() |
|
35 |
{ |
|
36 |
} |
|
37 |
||
38 |
/** |
|
39 |
* Default Destructor |
|
40 |
*/ |
|
41 |
||
42 |
CLogsEvent :: ~CLogsEvent() |
|
43 |
{ |
|
44 |
delete iLogEvent; |
|
45 |
delete iLogClient ; |
|
46 |
iFs.Close() ; |
|
47 |
} |
|
48 |
||
49 |
/** |
|
50 |
*Two phased constructor implementation |
|
51 |
*/ |
|
52 |
||
53 |
EXPORT_C CLogsEvent* CLogsEvent :: NewL() |
|
54 |
{ |
|
55 |
CLogsEvent* self = CLogsEvent::NewLC(); |
|
56 |
CleanupStack::Pop(self); |
|
57 |
return self; |
|
58 |
} |
|
59 |
||
60 |
/** |
|
61 |
* Two phased constructor implementation |
|
62 |
*/ |
|
63 |
||
64 |
CLogsEvent* CLogsEvent :: NewLC() |
|
65 |
{ |
|
66 |
CLogsEvent* self = new (ELeave) CLogsEvent(); |
|
67 |
CleanupStack::PushL(self); |
|
68 |
self->ConstructL(); |
|
69 |
return self; |
|
70 |
} |
|
71 |
||
72 |
/** |
|
73 |
* This function constructs the member elements of CLogsEvent Class |
|
74 |
*/ |
|
75 |
void CLogsEvent :: ConstructL() |
|
76 |
{ |
|
77 |
User::LeaveIfError(iFs.Connect()); |
|
78 |
iLogClient = CLogClient::NewL(iFs); |
|
79 |
iLogEvent = CLogEvent::NewL(); |
|
80 |
} |
|
81 |
||
82 |
/** |
|
83 |
* This function sets the direction of the event |
|
84 |
*/ |
|
85 |
EXPORT_C void CLogsEvent :: SetDirection(TInt aDirection) |
|
86 |
{ |
|
87 |
TBuf<KLogMaxDirectionLength> direction; |
|
88 |
iLogClient->GetString(direction, aDirection); |
|
89 |
iLogEvent->SetDirection(direction) ; |
|
90 |
} |
|
91 |
||
92 |
||
93 |
/** |
|
94 |
* This function sets the status of the event |
|
95 |
* |
|
96 |
* @param aStatus , status of the event(pending, delivered etc.,) |
|
97 |
*/ |
|
98 |
EXPORT_C void CLogsEvent :: SetStatus(TInt aStatus) |
|
99 |
{ |
|
100 |
TBuf<KLogMaxDirectionLength> status ; |
|
101 |
iLogClient->GetString(status , aStatus) ; |
|
102 |
iLogEvent->SetStatus(status) ; |
|
103 |
} |
|
104 |
||
105 |
||
106 |
||
107 |