equal
deleted
inserted
replaced
|
1 // Copyright (c) 2006-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 // |
|
15 |
|
16 #include <e32base.h> |
|
17 |
|
18 const TUid KNotifier1Uid = { 0x102826DC }; |
|
19 |
|
20 void DisplayNotifierL() |
|
21 { |
|
22 RNotifier notifierSession; |
|
23 User::LeaveIfError(notifierSession.Connect()); |
|
24 CleanupClosePushL(notifierSession); |
|
25 |
|
26 TInt err = notifierSession.StartNotifier(KNotifier1Uid, KNullDesC8); |
|
27 User::LeaveIfError(err); |
|
28 User::After(5000000); |
|
29 TBuf8<1> dummy; |
|
30 notifierSession.UpdateNotifier(KNotifier1Uid, KNullDesC8, dummy); |
|
31 User::After(5000000); |
|
32 notifierSession.CancelNotifier(KNotifier1Uid); |
|
33 |
|
34 CleanupStack::PopAndDestroy(¬ifierSession); |
|
35 } |
|
36 |
|
37 GLDEF_C TInt E32Main() |
|
38 { |
|
39 CTrapCleanup* cleanup = CTrapCleanup::New(); |
|
40 if (cleanup == NULL) |
|
41 { |
|
42 return KErrNoMemory; |
|
43 } |
|
44 TRAPD(err, DisplayNotifierL()); |
|
45 delete cleanup; |
|
46 return err; |
|
47 } |