f31e6aab16a58e1550c052a34463daa3f7402b9f
[apps/osp/Call.git] / src / CallAppEntry.cpp
1 //
2 // This file contains the Tizen application entry point.
3 //
4 #include "CallApp.h"
5
6 using namespace Tizen::Base;
7 using namespace Tizen::Base::Collection;
8
9 #ifdef __cplusplus
10 extern "C"
11 {
12 #endif // __cplusplus
13
14
15 //
16 // The entry function of Tizen application called by the operating system.
17 //
18 _EXPORT_ int
19 OspMain(int argc, char* pArgv[])
20 {
21         AppLog("Application started.");
22         ArrayList args(SingleObjectDeleter);
23         args.Construct();
24         for (int i = 0; i < argc; i++)
25         {
26                 args.Add(new (std::nothrow) String(pArgv[i]));
27         }
28
29         result r = Tizen::App::UiApp::Execute(CallApp::CreateInstance, &args);
30         TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
31         AppLog("Application finished.");
32
33         return static_cast<int>(r);
34 }
35 #ifdef __cplusplus
36 }
37 #endif // __cplusplus