2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Flora License, Version 1.0 (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
8 * http://floralicense.org/license/
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.
18 * @author Yunchan Cho (yunchan.cho@samsung.com)
22 #include <appcore-efl.h>
23 #include <Elementary.h>
24 #include <Core/Util/Log.h>
25 #include "BoxDaemon.h"
27 static int app_create(void *data)
30 elm_config_preferred_engine_set("opengl_x11");
34 static int app_reset(bundle *b, void *data)
41 name = bundle_get_val(b, "name");
43 LogD("slave name is NULL");
47 BoxDaemon *daemon = static_cast<BoxDaemon*>(data);
48 std::string daemonName(name);
49 ret = daemon->start(daemonName);
51 LogD("livebox daemon failed to start");
52 aul_terminate_pid(getpid());
55 return static_cast<int>(ret);
58 static int app_pause(void *data)
63 static int app_resume(void *data)
68 static int app_terminate(void *data)
70 BoxDaemon *daemon = static_cast<BoxDaemon *>(data);
76 int main (int argc, char *argv[])
80 struct appcore_ops ops;
83 ops.create = app_create;
84 ops.terminate = app_terminate;
85 ops.pause = app_pause;
86 ops.resume = app_resume;
87 ops.reset = app_reset;
90 #if !defined(TIZEN_PUBLIC)
91 setenv("COREGL_FASTPATH", "1", 1);
93 setenv("CAIRO_GL_COMPOSITOR", "msaa", 1);
94 setenv("CAIRO_GL_LAZY_FLUSHING", "yes", 1);
95 setenv("ELM_IMAGE_CACHE", "0", 1);
97 ret = appcore_efl_main("web-provider", &argc, &argv, &ops);