author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 24 Nov 2009 08:56:33 +0200 | |
changeset 33 | 50974a8b132e |
parent 19 | 989d2f495d90 |
child 37 | 5d0ec8b709be |
permissions | -rw-r--r-- |
19 | 1 |
/* |
2 |
* Copyright (c) 2009 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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#include <e32svr.h> |
|
19 |
#include <e32std.h> |
|
20 |
#include <StifParser.h> |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
21 |
#include <StifTestInterface.h> |
19 | 22 |
#include <logcli.h> |
23 |
#include <logwrap.h> |
|
24 |
||
25 |
#include "loggingasyncservice.h" |
|
26 |
#include "loggingservice.h" |
|
27 |
#include "loggingevent.h" |
|
28 |
||
29 |
#include "tlogging.h" |
|
30 |
#include "tlogcallback.h" |
|
31 |
||
32 |
||
33 |
_LIT(KOwnEventRemoteParty, "OwnContact"); |
|
34 |
||
35 |
TInt AddEventasync4(void) |
|
36 |
{ |
|
37 |
||
38 |
||
39 |
CLoggingService *LogService = CLoggingService :: NewL() ; |
|
40 |
CLogsEvent* event = CLogsEvent::NewL(); |
|
41 |
MLogCallback MyCb ; |
|
42 |
||
43 |
// Sets the duration of the event in seconds. |
|
44 |
// Randomize something between 0-299 |
|
45 |
||
46 |
event->SetDuration(300); |
|
47 |
||
48 |
TBuf<KLogMaxDirectionLength> direction; |
|
49 |
||
50 |
// Direction of the event is randomized |
|
51 |
||
52 |
TInt dirID = R_LOG_DIR_IN; |
|
53 |
TUid eventTypeID = KLogCallEventTypeUid; |
|
54 |
event->SetEventType(eventTypeID); |
|
55 |
TTime time; // creation time from the device clock |
|
56 |
time.HomeTime(); |
|
57 |
event->SetTime(time); |
|
58 |
||
59 |
TBuf<KLogMaxNumberLength> number; // Randomize number |
|
60 |
number.AppendNum(7000000); |
|
61 |
event->SetNumber(number); |
|
62 |
event->SetRemoteParty(KOwnEventRemoteParty); |
|
63 |
||
64 |
LogService->AddEventL(1 , event , &MyCb) ; |
|
65 |
||
66 |
MyCb.Start() ; |
|
67 |
||
68 |
||
69 |
||
70 |
delete event ; |
|
71 |
delete LogService ; |
|
72 |
||
73 |
||
74 |
||
75 |
return KErrNone ; |
|
76 |
} |
|
77 |