blob: c8d59820ff4ad950680be28910f89c7ea4963f32 [file] [log] [blame]
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +09001/*
2 * Copyright (C) 2013 DENSO CORPORATION
3 *
Bryce Harringtonaf637c22015-06-11 12:55:55 -07004 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090011 *
Bryce Harringtonaf637c22015-06-11 12:55:55 -070012 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial
14 * portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090024 */
25
26/*
27 * ivi-shell supports a type of shell for In-Vehicle Infotainment system.
28 * In-Vehicle Infotainment system traditionally manages surfaces with global
29 * identification. A protocol, ivi_application, supports such a feature
30 * by implementing a request, ivi_application::surface_creation defined in
31 * ivi_application.xml.
32 *
33 * The ivi-shell explicitly loads a module to add business logic like how to
34 * layout surfaces by using internal ivi-layout APIs.
35 */
36#include "config.h"
37
Jussi Kukkonen649bbce2016-07-19 14:16:27 +030038#include <stdint.h>
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090039#include <string.h>
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090040#include <dlfcn.h>
41#include <limits.h>
42#include <assert.h>
Pekka Paalanen6c7a1c72015-02-19 17:12:19 +020043#include <linux/input.h>
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090044
45#include "ivi-shell.h"
46#include "ivi-application-server-protocol.h"
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +090047#include "ivi-layout-export.h"
Pekka Paalanen32ca7912016-03-15 17:21:00 +020048#include "ivi-layout-shell.h"
Jon Cruz35b2eaa2015-06-15 15:37:08 -070049#include "shared/helpers.h"
Pekka Paalanen58f98c92016-06-03 16:45:21 +030050#include "compositor/weston.h"
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090051
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090052/* Representation of ivi_surface protocol object. */
53struct ivi_shell_surface
54{
55 struct wl_resource* resource;
56 struct ivi_shell *shell;
57 struct ivi_layout_surface *layout_surface;
58
59 struct weston_surface *surface;
60 struct wl_listener surface_destroy_listener;
61
62 uint32_t id_surface;
63
64 int32_t width;
65 int32_t height;
66
67 struct wl_list link;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090068};
69
70struct ivi_shell_setting
71{
72 char *ivi_module;
Pekka Paalanene35b2232015-02-19 17:08:44 +020073 int developermode;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090074};
75
76/*
77 * Implementation of ivi_surface
78 */
79
80static void
Quentin Glidic2edc3d52016-08-12 10:41:33 +020081ivi_shell_surface_committed(struct weston_surface *, int32_t, int32_t);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090082
83static struct ivi_shell_surface *
84get_ivi_shell_surface(struct weston_surface *surface)
85{
Pekka Paalanen94cb06a2016-03-16 14:54:12 +020086 struct ivi_shell_surface *shsurf;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090087
Quentin Glidic2edc3d52016-08-12 10:41:33 +020088 if (surface->committed != ivi_shell_surface_committed)
Pekka Paalanen94cb06a2016-03-16 14:54:12 +020089 return NULL;
90
Quentin Glidic2edc3d52016-08-12 10:41:33 +020091 shsurf = surface->committed_private;
Pekka Paalanen94cb06a2016-03-16 14:54:12 +020092 assert(shsurf);
93 assert(shsurf->surface == surface);
94
95 return shsurf;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090096}
97
Pekka Paalaneneaa43fc2016-04-12 16:06:58 +030098struct ivi_layout_surface *
99shell_get_ivi_layout_surface(struct weston_surface *surface)
100{
101 struct ivi_shell_surface *shsurf;
102
103 shsurf = get_ivi_shell_surface(surface);
104 if (!shsurf)
105 return NULL;
106
107 return shsurf->layout_surface;
108}
109
Pekka Paalanen1f821932016-03-15 16:57:51 +0200110void
111shell_surface_send_configure(struct weston_surface *surface,
112 int32_t width, int32_t height)
113{
114 struct ivi_shell_surface *shsurf;
115
116 shsurf = get_ivi_shell_surface(surface);
117 assert(shsurf);
118 if (!shsurf)
119 return;
120
121 if (shsurf->resource)
122 ivi_surface_send_configure(shsurf->resource, width, height);
123}
124
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900125static void
Quentin Glidic2edc3d52016-08-12 10:41:33 +0200126ivi_shell_surface_committed(struct weston_surface *surface,
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900127 int32_t sx, int32_t sy)
128{
129 struct ivi_shell_surface *ivisurf = get_ivi_shell_surface(surface);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900130
Pekka Paalanenfd45f602016-03-16 15:05:03 +0200131 assert(ivisurf);
132 if (!ivisurf)
133 return;
134
135 if (surface->width == 0 || surface->height == 0)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900136 return;
137
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900138 if (ivisurf->width != surface->width ||
139 ivisurf->height != surface->height) {
140 ivisurf->width = surface->width;
141 ivisurf->height = surface->height;
142
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900143 ivi_layout_surface_configure(ivisurf->layout_surface,
144 surface->width, surface->height);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900145 }
146}
147
Pekka Paalanen13281f62016-03-07 16:19:37 +0200148static int
149ivi_shell_surface_get_label(struct weston_surface *surface,
150 char *buf,
151 size_t len)
152{
153 struct ivi_shell_surface *shell_surf = get_ivi_shell_surface(surface);
154
155 if (!shell_surf)
156 return snprintf(buf, len, "unidentified window in ivi-shell");
157
158 return snprintf(buf, len, "ivi-surface %#x", shell_surf->id_surface);
159}
160
Nobuhiko Tanibata6f6c9382015-06-22 15:30:53 +0900161static void
162layout_surface_cleanup(struct ivi_shell_surface *ivisurf)
163{
164 assert(ivisurf->layout_surface != NULL);
165
166 ivi_layout_surface_destroy(ivisurf->layout_surface);
167 ivisurf->layout_surface = NULL;
168
Quentin Glidic2edc3d52016-08-12 10:41:33 +0200169 ivisurf->surface->committed = NULL;
170 ivisurf->surface->committed_private = NULL;
Pekka Paalanen13281f62016-03-07 16:19:37 +0200171 weston_surface_set_label_func(ivisurf->surface, NULL);
Nobuhiko Tanibata6f6c9382015-06-22 15:30:53 +0900172 ivisurf->surface = NULL;
173
174 // destroy weston_surface destroy signal.
175 wl_list_remove(&ivisurf->surface_destroy_listener.link);
176}
177
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900178/*
179 * The ivi_surface wl_resource destructor.
180 *
181 * Gets called via ivi_surface.destroy request or automatic wl_client clean-up.
182 */
183static void
184shell_destroy_shell_surface(struct wl_resource *resource)
185{
186 struct ivi_shell_surface *ivisurf = wl_resource_get_user_data(resource);
Nobuhiko Tanibata68098422015-06-22 15:31:08 +0900187
188 if (ivisurf == NULL)
189 return;
190
191 assert(ivisurf->resource == resource);
192
193 if (ivisurf->layout_surface != NULL)
194 layout_surface_cleanup(ivisurf);
195
196 wl_list_remove(&ivisurf->link);
197
198 free(ivisurf);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900199}
200
201/* Gets called through the weston_surface destroy signal. */
202static void
203shell_handle_surface_destroy(struct wl_listener *listener, void *data)
204{
205 struct ivi_shell_surface *ivisurf =
206 container_of(listener, struct ivi_shell_surface,
207 surface_destroy_listener);
208
209 assert(ivisurf != NULL);
210
Nobuhiko Tanibata6f6c9382015-06-22 15:30:53 +0900211 if (ivisurf->layout_surface != NULL)
212 layout_surface_cleanup(ivisurf);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900213}
214
215/* Gets called, when a client sends ivi_surface.destroy request. */
216static void
217surface_destroy(struct wl_client *client, struct wl_resource *resource)
218{
219 /*
220 * Fires the wl_resource destroy signal, and then calls
221 * ivi_surface wl_resource destructor: shell_destroy_shell_surface()
222 */
223 wl_resource_destroy(resource);
224}
225
226static const struct ivi_surface_interface surface_implementation = {
227 surface_destroy,
228};
229
230/**
231 * Request handler for ivi_application.surface_create.
232 *
233 * Creates an ivi_surface protocol object associated with the given wl_surface.
234 * ivi_surface protocol object is represented by struct ivi_shell_surface.
235 *
236 * \param client The client.
237 * \param resource The ivi_application protocol object.
238 * \param id_surface The IVI surface ID.
239 * \param surface_resource The wl_surface protocol object.
240 * \param id The protocol object id for the new ivi_surface protocol object.
241 *
242 * The wl_surface is given the ivi_surface role and associated with a unique
243 * IVI ID which is used to identify the surface in a controller
244 * (window manager).
245 */
246static void
247application_surface_create(struct wl_client *client,
248 struct wl_resource *resource,
249 uint32_t id_surface,
250 struct wl_resource *surface_resource,
251 uint32_t id)
252{
253 struct ivi_shell *shell = wl_resource_get_user_data(resource);
254 struct ivi_shell_surface *ivisurf;
255 struct ivi_layout_surface *layout_surface;
256 struct weston_surface *weston_surface =
257 wl_resource_get_user_data(surface_resource);
258 struct wl_resource *res;
259
260 if (weston_surface_set_role(weston_surface, "ivi_surface",
261 resource, IVI_APPLICATION_ERROR_ROLE) < 0)
262 return;
263
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900264 layout_surface = ivi_layout_surface_create(weston_surface, id_surface);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900265
266 /* check if id_ivi is already used for wl_surface*/
Dawid Gajownik74a635b2015-08-06 17:12:19 -0300267 if (layout_surface == NULL) {
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900268 wl_resource_post_error(resource,
269 IVI_APPLICATION_ERROR_IVI_ID,
270 "surface_id is already assigned "
271 "by another app");
272 return;
273 }
274
275 ivisurf = zalloc(sizeof *ivisurf);
276 if (ivisurf == NULL) {
277 wl_resource_post_no_memory(resource);
278 return;
279 }
280
281 wl_list_init(&ivisurf->link);
282 wl_list_insert(&shell->ivi_surface_list, &ivisurf->link);
283
284 ivisurf->shell = shell;
285 ivisurf->id_surface = id_surface;
286
287 ivisurf->width = 0;
288 ivisurf->height = 0;
289 ivisurf->layout_surface = layout_surface;
Pekka Paalanen1f821932016-03-15 16:57:51 +0200290
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900291 /*
292 * The following code relies on wl_surface destruction triggering
293 * immediateweston_surface destruction
294 */
295 ivisurf->surface_destroy_listener.notify = shell_handle_surface_destroy;
296 wl_signal_add(&weston_surface->destroy_signal,
297 &ivisurf->surface_destroy_listener);
298
299 ivisurf->surface = weston_surface;
300
Quentin Glidic2edc3d52016-08-12 10:41:33 +0200301 weston_surface->committed = ivi_shell_surface_committed;
302 weston_surface->committed_private = ivisurf;
Pekka Paalanen13281f62016-03-07 16:19:37 +0200303 weston_surface_set_label_func(weston_surface,
304 ivi_shell_surface_get_label);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900305
306 res = wl_resource_create(client, &ivi_surface_interface, 1, id);
307 if (res == NULL) {
308 wl_client_post_no_memory(client);
309 return;
310 }
311
312 ivisurf->resource = res;
313
314 wl_resource_set_implementation(res, &surface_implementation,
315 ivisurf, shell_destroy_shell_surface);
316}
317
318static const struct ivi_application_interface application_implementation = {
319 application_surface_create
320};
321
322/*
323 * Handle wl_registry.bind of ivi_application global singleton.
324 */
325static void
326bind_ivi_application(struct wl_client *client,
327 void *data, uint32_t version, uint32_t id)
328{
329 struct ivi_shell *shell = data;
330 struct wl_resource *resource;
331
332 resource = wl_resource_create(client, &ivi_application_interface,
333 1, id);
334
335 wl_resource_set_implementation(resource,
336 &application_implementation,
337 shell, NULL);
338}
339
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +0900340struct weston_view *
341get_default_view(struct weston_surface *surface)
342{
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +0900343 struct weston_view *view;
344
345 if (!surface || wl_list_empty(&surface->views))
346 return NULL;
347
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +0900348 wl_list_for_each(view, &surface->views, surface_link) {
349 if (weston_view_is_mapped(view))
350 return view;
351 }
352
353 return container_of(surface->views.next,
354 struct weston_view, surface_link);
355}
356
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900357/*
358 * Called through the compositor's destroy signal.
359 */
360static void
361shell_destroy(struct wl_listener *listener, void *data)
362{
363 struct ivi_shell *shell =
364 container_of(listener, struct ivi_shell, destroy_listener);
365 struct ivi_shell_surface *ivisurf, *next;
366
Pekka Paalanenaa9536a2015-06-24 16:09:17 +0300367 text_backend_destroy(shell->text_backend);
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +0900368 input_panel_destroy(shell);
369
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900370 wl_list_for_each_safe(ivisurf, next, &shell->ivi_surface_list, link) {
371 wl_list_remove(&ivisurf->link);
372 free(ivisurf);
373 }
374
375 free(shell);
376}
377
378static void
Derek Foreman8ae2db52015-07-15 13:00:36 -0500379terminate_binding(struct weston_keyboard *keyboard, uint32_t time,
380 uint32_t key, void *data)
Pekka Paalanen6c7a1c72015-02-19 17:12:19 +0200381{
382 struct weston_compositor *compositor = data;
383
384 wl_display_terminate(compositor->wl_display);
385}
386
387static void
Pekka Paalanene35b2232015-02-19 17:08:44 +0200388init_ivi_shell(struct weston_compositor *compositor, struct ivi_shell *shell,
389 const struct ivi_shell_setting *setting)
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900390{
391 shell->compositor = compositor;
392
393 wl_list_init(&shell->ivi_surface_list);
394
Quentin Glidic82681572016-12-17 13:40:51 +0100395 weston_layer_init(&shell->input_panel_layer, compositor);
Pekka Paalanene35b2232015-02-19 17:08:44 +0200396
Pekka Paalanen6c7a1c72015-02-19 17:12:19 +0200397 if (setting->developermode) {
Pekka Paalanene35b2232015-02-19 17:08:44 +0200398 weston_install_debug_key_binding(compositor, MODIFIER_SUPER);
Pekka Paalanen6c7a1c72015-02-19 17:12:19 +0200399
400 weston_compositor_add_key_binding(compositor, KEY_BACKSPACE,
401 MODIFIER_CTRL | MODIFIER_ALT,
402 terminate_binding,
403 compositor);
404 }
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900405}
406
407static int
408ivi_shell_setting_create(struct ivi_shell_setting *dest,
Pekka Paalanen8a005252015-03-20 15:53:53 +0200409 struct weston_compositor *compositor,
410 int *argc, char *argv[])
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900411{
412 int result = 0;
Giulio Camuffod52f3b72016-06-02 21:48:11 +0300413 struct weston_config *config = wet_get_config(compositor);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900414 struct weston_config_section *section;
415
Pekka Paalanen8a005252015-03-20 15:53:53 +0200416 const struct weston_option ivi_shell_options[] = {
417 { WESTON_OPTION_STRING, "ivi-module", 0, &dest->ivi_module },
418 };
419
420 parse_options(ivi_shell_options, ARRAY_LENGTH(ivi_shell_options),
421 argc, argv);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900422
423 section = weston_config_get_section(config, "ivi-shell", NULL, NULL);
424
Pekka Paalanen8a005252015-03-20 15:53:53 +0200425 if (!dest->ivi_module &&
426 weston_config_section_get_string(section, "ivi-module",
427 &dest->ivi_module, NULL) < 0) {
428 weston_log("Error: ivi-shell: No ivi-module set\n");
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900429 result = -1;
430 }
431
Pekka Paalanene35b2232015-02-19 17:08:44 +0200432 weston_config_section_get_bool(section, "developermode",
433 &dest->developermode, 0);
434
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900435 return result;
436}
437
Nobuhiko Tanibata0627b4a2015-12-09 15:03:47 +0900438static void
439activate_binding(struct weston_seat *seat,
440 struct weston_view *focus_view)
441{
442 struct weston_surface *focus = focus_view->surface;
443 struct weston_surface *main_surface =
444 weston_surface_get_main_surface(focus);
445
446 if (get_ivi_shell_surface(main_surface) == NULL)
447 return;
448
Bryce Harrington260c2ff2016-06-29 19:04:06 -0700449 weston_seat_set_keyboard_focus(seat, focus);
Nobuhiko Tanibata0627b4a2015-12-09 15:03:47 +0900450}
451
452static void
453click_to_activate_binding(struct weston_pointer *pointer, uint32_t time,
454 uint32_t button, void *data)
455{
456 if (pointer->grab != &pointer->default_grab)
457 return;
458 if (pointer->focus == NULL)
459 return;
460
461 activate_binding(pointer->seat, pointer->focus);
462}
463
464static void
465touch_to_activate_binding(struct weston_touch *touch, uint32_t time,
466 void *data)
467{
468 if (touch->grab != &touch->default_grab)
469 return;
470 if (touch->focus == NULL)
471 return;
472
473 activate_binding(touch->seat, touch->focus);
474}
475
476static void
477shell_add_bindings(struct weston_compositor *compositor,
478 struct ivi_shell *shell)
479{
480 weston_compositor_add_button_binding(compositor, BTN_LEFT, 0,
481 click_to_activate_binding,
482 shell);
483 weston_compositor_add_button_binding(compositor, BTN_RIGHT, 0,
484 click_to_activate_binding,
485 shell);
486 weston_compositor_add_touch_binding(compositor, 0,
487 touch_to_activate_binding,
488 shell);
489}
490
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900491/*
492 * Initialization of ivi-shell.
493 */
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900494WL_EXPORT int
495module_init(struct weston_compositor *compositor,
496 int *argc, char *argv[])
497{
498 struct ivi_shell *shell;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900499 struct ivi_shell_setting setting = { };
Pekka Paalanene35b2232015-02-19 17:08:44 +0200500 int retval = -1;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900501
502 shell = zalloc(sizeof *shell);
503 if (shell == NULL)
504 return -1;
505
Pekka Paalanen8a005252015-03-20 15:53:53 +0200506 if (ivi_shell_setting_create(&setting, compositor, argc, argv) != 0)
Pekka Paalanene35b2232015-02-19 17:08:44 +0200507 return -1;
508
509 init_ivi_shell(compositor, shell, &setting);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900510
511 shell->destroy_listener.notify = shell_destroy;
512 wl_signal_add(&compositor->destroy_signal, &shell->destroy_listener);
513
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +0900514 if (input_panel_setup(shell) < 0)
Pekka Paalanene35b2232015-02-19 17:08:44 +0200515 goto out_settings;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900516
Pekka Paalanenaa9536a2015-06-24 16:09:17 +0300517 shell->text_backend = text_backend_init(compositor);
518 if (!shell->text_backend)
Murray Calavera9a51cd72015-06-10 21:16:02 +0000519 goto out_settings;
520
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900521 if (wl_global_create(compositor->wl_display,
522 &ivi_application_interface, 1,
523 shell, bind_ivi_application) == NULL)
Pekka Paalanene35b2232015-02-19 17:08:44 +0200524 goto out_settings;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900525
Nobuhiko Tanibata28dc18c2014-12-15 13:22:31 +0900526 ivi_layout_init_with_compositor(compositor);
Nobuhiko Tanibata0627b4a2015-12-09 15:03:47 +0900527 shell_add_bindings(compositor, shell);
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900528
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900529 /* Call module_init of ivi-modules which are defined in weston.ini */
Pekka Paalanene35b2232015-02-19 17:08:44 +0200530 if (load_controller_modules(compositor, setting.ivi_module,
531 argc, argv) < 0)
532 goto out_settings;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900533
Pekka Paalanene35b2232015-02-19 17:08:44 +0200534 retval = 0;
535
536out_settings:
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900537 free(setting.ivi_module);
Pekka Paalanene35b2232015-02-19 17:08:44 +0200538
539 return retval;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +0900540}