Debian Codegraph @

Xpjproject/pjsip-apps/src/symsndtest/main_symbian.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <[email protected]>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20 #include <e32std.h>
21 #include <e32base.h>
22 #include <e32std.h>
23 #include <e32cons.h>
24 #include <stdlib.h>
25
26
27 // Global Variables
28 CConsoleBase* console;
29
30 // Needed by APS
31 TPtrC APP_UID = _L("A000000E");
32
33 int app_main();
34
35
36 ////////////////////////////////////////////////////////////////////////////
37
38 LOCAL_C void DoStartL()
39 {
40 CActiveScheduler *scheduler = new (ELeave) CActiveScheduler;
41 CleanupStack::PushL(scheduler);
42 CActiveScheduler::Install(scheduler);
43
44 app_main();
45
46 CActiveScheduler::Install(NULL);
47 CleanupStack::Pop(scheduler);
48 delete scheduler;
49 }
50
51
52 ////////////////////////////////////////////////////////////////////////////
53
54 // E32Main()
55 GLDEF_C TInt E32Main()
56 {
57 // Mark heap usage
58 __UHEAP_MARK;
59
60 // Create cleanup stack
61 CTrapCleanup* cleanup = CTrapCleanup::New();
62
63 // Create output console
64 TRAPD(createError, console = Console::NewL(_L("Console"), TSize(KConsFullScreen,KConsFullScreen)));
65 if (createError)
66 return createError;
67
68 TRAPD(startError, DoStartL());
69
70 //console->Printf(_L("[press any key to close]\n"));
71 //console->Getch();
72
73 delete console;
74 delete cleanup;
75
76 CloseSTDLIB();
77
78 // Mark end of heap usage, detect memory leaks
79 __UHEAP_MARKEND;
80 return KErrNone;
81 }
82