[PATCH 2/2] ivi-shell: rewrite controller API

Pekka Paalanen ppaalanen at gmail.com
Mon Dec 15 06:58:29 PST 2014


On Mon, 15 Dec 2014 13:25:39 +0900
Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp> wrote:

> 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.)
> 
> Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp>
> ---
>  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(-)

Now we are rid of the extra ivi-layout.so, whee. :-)

Both patches pushed, thanks,
pq


More information about the wayland-devel mailing list