Fixed prevent issue
[apps/osp/Gallery.git] / src / GlGalleryEntry.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file                GlGalleryEntry.cpp
19  * @brief               This is the implementation file for GalleryEntry class.
20  */
21
22 #include "GlGalleryApp.h"
23
24 using namespace Tizen::Base;
25 using namespace Tizen::Base::Collection;
26
27 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif // __cplusplus
31
32 //
33 // The entry function of Tizen application called by the operating system.
34 //
35 _EXPORT_ int
36 OspMain(int argc, char *pArgv[])
37 {
38         AppLogDebug("ENTER");
39         AppLogDebug("Application started.");
40         ArrayList args(SingleObjectDeleter);
41         args.Construct();
42         for (int i = 0; i < argc; i++)
43         {
44                 args.Add(new (std::nothrow) String(pArgv[i]));
45         }
46
47         result r = Tizen::App::UiApp::Execute(GalleryApp::CreateInstance, &args);
48         TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
49         AppLogDebug("Application finished.");
50         AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
51
52         return static_cast<int>(r);
53 }
54 #ifdef __cplusplus
55 }
56 #endif // __cplusplus