ivi-shell: rewrite controller API

Graphics / Wayland / Weston - Nobuhiko Tanibata [xddp.denso.co.jp] - 15 December 2014 08:50 UTC

This fixes the breakage caused by "ivi-shell: make ivi-layout.c as a part of ivi-shell.so"

hmi-controller.c: A reference implementation of controller module does not use the layout functions directly. This get function pointers at controller_module_init which called by ivi-shell.

ivi-layout-export.h: Definition of interfaces in a struction: ivi_controller_interface. function pointers are set at ivi-layout.c.

ivi-layout-private.h: Definition of some interfaces are remove bucause it is implemented in ivi-layout.c and set it as function pointer. Several interfaces are kept here because they are implemented in ivi-layout.c/transition.c but used in other files.

ivi-layout-transition.c: remove WL_EXPORT because export is not needed anymore. remove unnesesary unsed method.

ivi-shell.c: call controller_module_init of hmi-controller to init it and set function pointers. If the interface_version is equal or greater than what hmi_controller was built with, things are pass. If the interface_version is smaller than what the controller expects, it has to fail because it cannot work. This is followed the manner,

- never remove a function pointer- never modify an existing function signature- additions are allowed at the end of struct ivi_controller_interface- all function pointers must always be populated and working in ivi-shell.so (ivi-layout.c etc.)

ee8e583 ivi-shell: rewrite controller API
ivi-shell/hmi-controller.c | 174 +++---
ivi-shell/ivi-layout-export.h | 1102 ++++++++++++++++++++-----------------
ivi-shell/ivi-layout-private.h | 180 ++----
ivi-shell/ivi-layout-transition.c | 16 +-
ivi-shell/ivi-layout.c | 271 ++++++---
ivi-shell/ivi-shell.c | 33 +-
6 files changed, 951 insertions(+), 825 deletions(-)

Upstream: cgit.freedesktop.org


  • Share