Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bada/Sloynik/src/SloynikEntry.cpp')
-rw-r--r--bada/Sloynik/src/SloynikEntry.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/bada/Sloynik/src/SloynikEntry.cpp b/bada/Sloynik/src/SloynikEntry.cpp
new file mode 100644
index 0000000000..f100f5c01c
--- /dev/null
+++ b/bada/Sloynik/src/SloynikEntry.cpp
@@ -0,0 +1,45 @@
+/**
+ * This file contains the bada application entry point.
+ */
+#include "Sloynik.h"
+
+using namespace Osp::Base;
+using namespace Osp::Base::Collection;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+_EXPORT_ int OspMain(int argc, char *pArgv[]);
+
+/**
+ * The entry function of bada application called by the operating system.
+ */
+int
+OspMain(int argc, char *pArgv[])
+{
+ result r = E_SUCCESS;
+
+ AppLog("Application started.");
+ ArrayList* pArgs = new ArrayList();
+ pArgs->Construct();
+ for (int i = 0; i < argc; i++)
+ pArgs->Add(*(new String(pArgv[i])));
+
+ r = Osp::App::Application::Execute(Sloynik::CreateInstance, pArgs);
+ if (IsFailed(r))
+ {
+ AppLogException("Application execution failed-[%s].", GetErrorMessage(r));
+ r &= 0x0000FFFF;
+ }
+
+ pArgs->RemoveAll(true);
+ delete pArgs;
+ AppLog("Application finished.");
+
+ return static_cast<int>(r);
+}
+#ifdef __cplusplus
+}
+#endif // __cplusplus