diff options
13 files changed, 110 insertions, 166 deletions
diff --git a/ivi-layermanagement-api/ilmControl/include/ilm_control.h b/ivi-layermanagement-api/ilmControl/include/ilm_control.h index c731959..6cbc8f7 100644 --- a/ivi-layermanagement-api/ilmControl/include/ilm_control.h +++ b/ivi-layermanagement-api/ilmControl/include/ilm_control.h @@ -465,23 +465,22 @@ ilmErrorTypes ilm_surfaceAddNotification(t_ilm_surface surface, surfaceNotificat ilmErrorTypes ilm_surfaceRemoveNotification(t_ilm_surface surface); /** - * \brief register for notification on property creation/deletion events for surfaces/layers + * \brief register notification callback for creation/deletion of ilm surfaces/layers * \ingroup ilmControl - * \param[in] surface id of surface to register for notification * \param[in] callback pointer to function to be called for notification + callback function is defined as: + void cb(ilmObjectType o, t_ilm_uint id, t_ilm_bool created, void *user_data) + * \param[in] user_data pointer to data which will be passed to a notification callback * \return ILM_SUCCESS if the method call was successful * \return ILM_FAILED if the client can not call the method on the service. - * \return ILM_ERROR_INVALID_ARGUMENT if the given surface already has notification callback registered */ ilmErrorTypes ilm_registerNotification(notificationFunc callback, void *user_data); /** - * \brief remove notification on property changes of surface - * \ingroup ilmClient - * \param[in] surface id of surface to remove notification + * \brief unregister notification for creation/deletion events of ilm surfaces/layers + * \ingroup ilmControl * \return ILM_SUCCESS if the method call was successful * \return ILM_FAILED if the client can not call the method on the service. - * \return ILM_ERROR_INVALID_ARGUMENT if the given surface has no notification callback registered */ ilmErrorTypes ilm_unregisterNotification(); #ifdef __cplusplus diff --git a/ivi-layermanagement-examples/EGLWLInputEventExample/CMakeLists.txt b/ivi-layermanagement-examples/EGLWLInputEventExample/CMakeLists.txt index 811a779..03dcb21 100644 --- a/ivi-layermanagement-examples/EGLWLInputEventExample/CMakeLists.txt +++ b/ivi-layermanagement-examples/EGLWLInputEventExample/CMakeLists.txt @@ -71,7 +71,7 @@ add_executable(EGLWLInputEventExample add_dependencies(EGLWLInputEventExample wayland-client wayland-egl - ilmClient + ivi-application ${LIBS} ) @@ -82,7 +82,7 @@ set(LIBS ${WAYLAND_EGL_LIBRARIES} ${FFI_LIBRARIES} ${EGL_LIBRARIES} - ilmClient + ivi-application ) add_definitions(${EGL_CFLAGS}) diff --git a/ivi-layermanagement-examples/EGLWLInputEventExample/include/WLContext.h b/ivi-layermanagement-examples/EGLWLInputEventExample/include/WLContext.h index 891d93f..9edfc1a 100644 --- a/ivi-layermanagement-examples/EGLWLInputEventExample/include/WLContext.h +++ b/ivi-layermanagement-examples/EGLWLInputEventExample/include/WLContext.h @@ -22,8 +22,7 @@ #include <wayland-client.h> #include <wayland-client-protocol.h> - -struct serverinfo; +#include <ivi-application-client-protocol.h> class WLContext { @@ -39,8 +38,7 @@ private: struct wl_display* m_wlDisplay; struct wl_registry* m_wlRegistry; struct wl_compositor* m_wlCompositor; - struct serverinfo* m_wlServerInfo; - uint32_t m_connectionId; + struct ivi_application* m_iviApp; struct wl_pointer_listener* m_wlPointerListener; struct wl_keyboard_listener* m_wlKeyboardListener; @@ -61,13 +59,12 @@ public: struct wl_pointer_listener* GetWLPointerListener() const; struct wl_keyboard_listener* GetWLKeyboardListener() const; struct wl_touch_listener* GetWLTouchListener() const; - uint32_t GetConnectionId() const; + struct ivi_application* GetIviApp() const; void SetEventMask(uint32_t mask); void SetWLCompositor(struct wl_compositor* wlCompositor); - void SetWLServerInfo(struct serverinfo* wlServerInfo); + void SetIviApp(struct ivi_application* iviApp); void SetWLSeat(struct wl_seat* wlSeat); - void SetConnectionId(uint32_t connectionId); void SetWLPointer(struct wl_pointer* wlPointer); void SetWLKeyboard(struct wl_keyboard* wlKeyboard); void SetWLTouch(struct wl_touch* wlTouch); @@ -77,9 +74,6 @@ public: uint32_t name, const char* interface, uint32_t version); - static void ServerInfoListener(void* data, - struct serverinfo* serverInfo, - uint32_t clientHandle); static void SeatHandleCapabilities(void* data, struct wl_seat* seat, uint32_t caps); @@ -98,12 +92,10 @@ inline struct wl_keyboard_listener* WLContext::GetWLKeyboardListener() const { return m_wlKeyboardListener; } inline struct wl_touch_listener* WLContext::GetWLTouchListener() const { return m_wlTouchListener; } -inline uint32_t WLContext::GetConnectionId() const { return m_connectionId; } +inline struct ivi_application* WLContext::GetIviApp() const { return m_iviApp; } inline void WLContext::SetWLCompositor(struct wl_compositor* wlCompositor) { m_wlCompositor = wlCompositor; } -inline void WLContext::SetWLServerInfo(struct serverinfo* wlServerInfo) - { m_wlServerInfo = wlServerInfo; } -inline void WLContext::SetConnectionId(uint32_t connectionId) - { m_connectionId = connectionId; } +inline void WLContext::SetIviApp(struct ivi_application* iviApp) + { m_iviApp = iviApp; } #endif /* _WLCONTEXT_H_ */ diff --git a/ivi-layermanagement-examples/EGLWLInputEventExample/include/WLSurface.h b/ivi-layermanagement-examples/EGLWLInputEventExample/include/WLSurface.h index d659eac..52d9949 100644 --- a/ivi-layermanagement-examples/EGLWLInputEventExample/include/WLSurface.h +++ b/ivi-layermanagement-examples/EGLWLInputEventExample/include/WLSurface.h @@ -20,7 +20,6 @@ #ifndef _WLSURFACE_H_ #define _WLSURFACE_H_ -#include "ilm_client.h" #include "WLContext.h" class WLSurface @@ -29,10 +28,10 @@ class WLSurface protected: WLContext* m_wlContext; struct wl_surface* m_wlSurface; + struct ivi_surface* m_iviSurface; int m_width; int m_height; - t_ilm_layer m_ilmLayerId; - t_ilm_surface m_ilmSurfaceId; + unsigned int m_surfaceId; // methods public: @@ -42,11 +41,7 @@ public: struct wl_display* GetWLDisplay() const; struct wl_surface* GetWLSurface() const; - virtual bool CreateSurface(const int width, const int height); - virtual bool CreateIlmSurface(t_ilm_surface* surfaceId, - t_ilm_int width, - t_ilm_int height); - virtual void DestroyIlmSurface(); + virtual bool CreateSurface(const int width, const int height, const int surfaceId); protected: virtual bool CreatePlatformSurface(); diff --git a/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLContext.cpp b/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLContext.cpp index 32dbe88..a392ee2 100644 --- a/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLContext.cpp +++ b/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLContext.cpp @@ -43,8 +43,7 @@ WLContext::WLContext() : m_wlDisplay(NULL) , m_wlRegistry(NULL) , m_wlCompositor(NULL) -, m_wlServerInfo(NULL) -, m_connectionId(0) +, m_iviApp(NULL) , m_wlPointerListener(NULL) , m_wlKeyboardListener(NULL) , m_wlTouchListener(NULL) @@ -80,6 +79,14 @@ WLContext::RegistryHandleGlobal(void* data, break; } + if (!strcmp(interface, "ivi_application")){ + surface->SetIviApp( + (struct ivi_application*)wl_registry_bind(registry, + name, + &ivi_application_interface, + 1)); + } + if (!strcmp(interface, "wl_seat")){ struct WLContext::seat_data *seat_data = (struct WLContext::seat_data *)calloc(1, sizeof *seat_data); seat_data->ctx = surface; @@ -156,6 +163,13 @@ WLContext::InitWLContext(const struct wl_pointer_listener* wlPointerListener, void WLContext::DestroyWLContext() { + if (m_iviApp) + ivi_application_destroy(m_iviApp); + if (m_wlCompositor) wl_compositor_destroy(m_wlCompositor); + + wl_registry_destroy(m_wlRegistry); + wl_display_flush(m_wlDisplay); + wl_display_disconnect(m_wlDisplay); } diff --git a/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLSurface.cpp b/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLSurface.cpp index 5e627aa..f98a28b 100644 --- a/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLSurface.cpp +++ b/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLSurface.cpp @@ -26,27 +26,29 @@ WLSurface::WLSurface(WLContext* wlContext) : m_wlContext(wlContext) , m_wlSurface(NULL) +, m_iviSurface(NULL) , m_width(0) , m_height(0) -, m_ilmSurfaceId(0) +, m_surfaceId(0) { assert(wlContext); } WLSurface::~WLSurface() { - if (m_ilmSurfaceId > 0) - ilm_surfaceRemove(m_ilmSurfaceId); + if (m_surfaceId > 0) + ivi_surface_destroy(m_iviSurface); if (m_wlSurface) wl_surface_destroy(m_wlSurface); } bool -WLSurface::CreateSurface(const int width, const int height) +WLSurface::CreateSurface(const int width, const int height, const int surfaceId) { m_width = width; m_height = height; + m_surfaceId = surfaceId; m_wlSurface = (struct wl_surface*) wl_compositor_create_surface(m_wlContext->GetWLCompositor()); @@ -54,6 +56,13 @@ WLSurface::CreateSurface(const int width, const int height) return false; } + m_iviSurface = (struct ivi_surface*) ivi_application_surface_create(m_wlContext->GetIviApp(), + m_surfaceId, + m_wlSurface); + if (!m_iviSurface){ + return false; + } + return CreatePlatformSurface(); } @@ -62,31 +71,3 @@ WLSurface::CreatePlatformSurface() { return true; } - -bool -WLSurface::CreateIlmSurface(t_ilm_surface* surfaceId, - t_ilm_int width, - t_ilm_int height) -{ - ilmErrorTypes rtnv; - - // Creates surfce - rtnv = ilm_surfaceCreate((t_ilm_nativehandle)m_wlSurface, - width, height, - ILM_PIXELFORMAT_RGBA_8888, surfaceId); - if (rtnv != ILM_SUCCESS){ - return false; - } - - m_ilmSurfaceId = *surfaceId; - - return true; -} - -void -WLSurface::DestroyIlmSurface() -{ - if (m_ilmSurfaceId > 0){ - ilm_surfaceRemove(m_ilmSurfaceId); - } -} diff --git a/ivi-layermanagement-examples/EGLWLInputEventExample/src/main.cpp b/ivi-layermanagement-examples/EGLWLInputEventExample/src/main.cpp index 20c611f..fa59e8f 100644 --- a/ivi-layermanagement-examples/EGLWLInputEventExample/src/main.cpp +++ b/ivi-layermanagement-examples/EGLWLInputEventExample/src/main.cpp @@ -45,7 +45,7 @@ int main(int argc, char **argv) WLContext* wlContext; WLEGLSurface* eglSurface; WLEyes* eyes; - t_ilm_surface surfaceId = 5100; + int surfaceId = 5100; argc = argc; // avoid warning argv = argv; @@ -81,11 +81,8 @@ int main(int argc, char **argv) int const fd = wl_display_get_fd(wlContext->GetWLDisplay()); - ilmClient_init((t_ilm_nativedisplay)wlContext->GetWLDisplay()); - eglSurface = new WLEGLSurface(wlContext); - eglSurface->CreateSurface(400, 240); - eglSurface->CreateIlmSurface(&surfaceId, 400, 240); + eglSurface->CreateSurface(400, 240, surfaceId); eyes = new WLEyes(400, 240); @@ -110,11 +107,7 @@ int main(int argc, char **argv) } TerminateRenderer(); - ilm_surfaceRemove(surfaceId); - - eglSurface->DestroyIlmSurface(); - ilmClient_destroy(); delete eyes; delete eglSurface; delete wlContext; diff --git a/ivi-layermanagement-examples/EGLWLMockNavigation/CMakeLists.txt b/ivi-layermanagement-examples/EGLWLMockNavigation/CMakeLists.txt index cf61ef0..80b922e 100644 --- a/ivi-layermanagement-examples/EGLWLMockNavigation/CMakeLists.txt +++ b/ivi-layermanagement-examples/EGLWLMockNavigation/CMakeLists.txt @@ -86,7 +86,7 @@ set(LIBS ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_EGL_LIBRARIES} ${EGL_LIBRARIES} - ilmClient + ivi-application ) add_dependencies(${PROJECT_NAME} diff --git a/ivi-layermanagement-examples/EGLWLMockNavigation/include/OpenGLES2App.h b/ivi-layermanagement-examples/EGLWLMockNavigation/include/OpenGLES2App.h index 7e3b073..783d413 100644 --- a/ivi-layermanagement-examples/EGLWLMockNavigation/include/OpenGLES2App.h +++ b/ivi-layermanagement-examples/EGLWLMockNavigation/include/OpenGLES2App.h @@ -24,7 +24,7 @@ #include "wayland-egl.h" #include <GLES2/gl2.h> -#include "ilm_client.h" +#include <ivi-application-client-protocol.h> #include <EGL/egl.h> struct SurfaceConfiguration @@ -58,8 +58,6 @@ private: bool createEGLContext(); void destroyEglContext(); - ilmErrorTypes setupLayerMangement(SurfaceConfiguration* config); - unsigned int GetTickCount(); protected: @@ -89,6 +87,8 @@ public: struct wl_surface* wlSurface; struct wl_shell* wlShell; struct wl_shell_surface* wlShellSurface; + struct ivi_application* iviApp; + struct ivi_surface* iviSurface; int width; int height; @@ -99,7 +99,7 @@ public: protected: WLContextStruct m_wlContextStruct; - t_ilm_surface m_surfaceId; + unsigned int m_surfaceId; }; #endif /* _OPENGLES2APP_H */ diff --git a/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp b/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp index 2e65864..2abe7b5 100644 --- a/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp +++ b/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp @@ -19,8 +19,6 @@ ****************************************************************************/ #include "OpenGLES2App.h" #include "LayerScene.h" -#include <ilm_common.h> -#include <ilm_client.h> #include <iostream> using std::cout; @@ -105,6 +103,13 @@ extern "C" break; } + ans_strcmp = strcmp(interface, "ivi_application"); + if (0 == ans_strcmp) + { + p_wlCtx->iviApp = (struct ivi_application*)wl_registry_bind(registry, id, &ivi_application_interface, 1); + break; + } + } while(0); } @@ -126,9 +131,6 @@ OpenGLES2App::OpenGLES2App(float fps, float animationSpeed, SurfaceConfiguration createWLContext(config); createEGLContext(); - ilmClient_init((t_ilm_nativedisplay)m_wlContextStruct.wlDisplay); - setupLayerMangement(config); - if (config->nosky) { glClearColor(0.0f, 0.0f, 0.0f, 0.0f); @@ -149,9 +151,6 @@ OpenGLES2App::~OpenGLES2App() { destroyEglContext(); destroyWLContext(); - - ilm_surfaceRemove(m_surfaceId); - ilmClient_destroy(); } void OpenGLES2App::mainloop() @@ -184,7 +183,7 @@ void OpenGLES2App::mainloop() bool OpenGLES2App::createWLContext(SurfaceConfiguration* config) { - t_ilm_bool result = ILM_TRUE; + bool result = true; int width = config->surfaceWidth; int height = config->surfaceHeight; @@ -210,6 +209,13 @@ bool OpenGLES2App::createWLContext(SurfaceConfiguration* config) destroyWLContext(); } + if (m_wlContextStruct.iviApp) { + m_surfaceId = config->surfaceId; + m_wlContextStruct.iviSurface = ivi_application_surface_create(m_wlContextStruct.iviApp, + m_surfaceId, + m_wlContextStruct.wlSurface); + } + if (m_wlContextStruct.wlShell) { m_wlContextStruct.wlShellSurface = wl_shell_get_shell_surface(m_wlContextStruct.wlShell, m_wlContextStruct.wlSurface); @@ -238,7 +244,7 @@ bool OpenGLES2App::createWLContext(SurfaceConfiguration* config) bool OpenGLES2App::createEGLContext() { - t_ilm_bool result = ILM_TRUE; + bool result = true; EGLint eglstatus = EGL_SUCCESS; m_eglContextStruct.eglDisplay = NULL; m_eglContextStruct.eglSurface = NULL; @@ -317,32 +323,6 @@ bool OpenGLES2App::createEGLContext() return result; } -ilmErrorTypes OpenGLES2App::setupLayerMangement(SurfaceConfiguration* config) -{ - ilmErrorTypes error = ILM_FAILED; - - // register surfaces to layermanager - t_ilm_surface surfaceid = (t_ilm_surface)config->surfaceId;//SURFACE_EXAMPLE_EGLX11_APPLICATION; - int width = config->surfaceWidth; - int height = config->surfaceHeight; - - if (config->nosky) - { - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - } - else - { - glClearColor(0.2f, 0.2f, 0.5f, 1.0f); - } - - ilm_surfaceCreate((t_ilm_nativehandle)m_wlContextStruct.wlSurface, width, height, - ILM_PIXELFORMAT_RGBA_8888, &surfaceid); - - m_surfaceId = surfaceid; - - return error; -} - void OpenGLES2App::destroyEglContext() { if (m_eglContextStruct.eglDisplay != NULL) @@ -358,6 +338,10 @@ void OpenGLES2App::destroyWLContext() { wl_egl_window_destroy(m_wlContextStruct.wlNativeWindow); } + if (m_wlContextStruct.iviSurface) + { + ivi_surface_destroy(m_wlContextStruct.iviSurface); + } if (m_wlContextStruct.wlShellSurface) { wl_shell_surface_destroy(reinterpret_cast<struct wl_shell_surface*>(m_wlContextStruct.wlShellSurface)); @@ -370,6 +354,10 @@ void OpenGLES2App::destroyWLContext() { wl_shell_destroy(m_wlContextStruct.wlShell); } + if (m_wlContextStruct.iviApp) + { + ivi_application_destroy(m_wlContextStruct.iviApp); + } if (m_wlContextStruct.wlCompositor) { wl_compositor_destroy(m_wlContextStruct.wlCompositor); @@ -380,7 +368,7 @@ unsigned int OpenGLES2App::GetTickCount() { struct timeval ts; gettimeofday(&ts, 0); - return (t_ilm_uint) (ts.tv_sec * 1000 + (ts.tv_usec / 1000)); + return (unsigned int) (ts.tv_sec * 1000 + (ts.tv_usec / 1000)); } extern "C" void diff --git a/ivi-layermanagement-examples/EGLWLMockNavigation/src/ShaderBase.cpp b/ivi-layermanagement-examples/EGLWLMockNavigation/src/ShaderBase.cpp index 7bcfcbb..cf5a1a1 100644 --- a/ivi-layermanagement-examples/EGLWLMockNavigation/src/ShaderBase.cpp +++ b/ivi-layermanagement-examples/EGLWLMockNavigation/src/ShaderBase.cpp @@ -17,7 +17,6 @@ * ****************************************************************************/ #include "ShaderBase.h" -#include <ilm_client.h> #include <GLES2/gl2.h> #include <stdlib.h> #include <iostream> @@ -56,7 +55,7 @@ bool ShaderBase::initShader() if (glResult == GL_FALSE) { - t_ilm_int infoLength, numberChars; + int infoLength, numberChars; glGetShaderiv(fragmentShaderId, GL_INFO_LOG_LENGTH, &infoLength); // Allocate Log Space @@ -66,7 +65,7 @@ bool ShaderBase::initShader() // Print the error cout << "Failed to compile fragment shader: " << info << "\n"; free(info); - return ILM_FALSE; + return false; } // Create the fragment shader object @@ -83,7 +82,7 @@ bool ShaderBase::initShader() if (glResult == GL_FALSE) { - t_ilm_int infoLength, numberChars; + int infoLength, numberChars; glGetShaderiv(vertexShaderId, GL_INFO_LOG_LENGTH, &infoLength); // Allocate Log Space @@ -93,7 +92,7 @@ bool ShaderBase::initShader() // Print the error cout << "Failed to compile vertex shader: " << info << "\n"; free(info); - return ILM_FALSE; + return false; } shaderProgramId = glCreateProgram(); @@ -109,7 +108,7 @@ bool ShaderBase::initShader() if (glResult == GL_FALSE) { - t_ilm_int infoLength, numberChars; + int infoLength, numberChars; glGetShaderiv(shaderProgramId, GL_INFO_LOG_LENGTH, &infoLength); // Allocate Log Space @@ -120,7 +119,7 @@ bool ShaderBase::initShader() // Print the error cout << "Failed to link program: " << info << "\n"; free(info); - return ILM_FALSE; + return false; } #if 1 /* ADIT */ @@ -130,7 +129,7 @@ bool ShaderBase::initShader() if (glResult == GL_FALSE) { - t_ilm_int infoLength, numberChars; + int infoLength, numberChars; glGetShaderiv(shaderProgramId, GL_INFO_LOG_LENGTH, &infoLength); // Allocate Log Space @@ -141,7 +140,7 @@ bool ShaderBase::initShader() // Print the error cout << "Failed to validate program: " << info << "\n"; free(info); - return ILM_FALSE; + return false; } #endif /* ADIT */ @@ -152,12 +151,12 @@ bool ShaderBase::initShader() cout << "Shader setup complete.\n"; - return ILM_TRUE; + return true; } bool ShaderBase::destroyShader() { - t_ilm_bool result = ILM_TRUE; + bool result = true; glDeleteProgram(shaderProgramId); glDeleteShader(fragmentShaderId); glDeleteShader(vertexShaderId); diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp index 53f15df..d7cee04 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp +++ b/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp @@ -621,52 +621,18 @@ COMMAND("create layer <layerid> <width> <height>") } //============================================================================= -COMMAND("create surface <surfaceid> <nativehandle> <width> <height> <pixelformat>") +COMMAND("destroy layer <id>") //============================================================================= { - unsigned int surfaceid = input->getUint("surfaceid"); - unsigned int nativeHandle = input->getUint("nativehandle"); - unsigned int width = input->getUint("width"); - unsigned int height = input->getUint("height"); - e_ilmPixelFormat pixelformat = (e_ilmPixelFormat)input->getUint("pixelformat"); + unsigned int layerid = input->getUint("id"); - ilmErrorTypes callResult = ilm_surfaceCreate(nativeHandle, width, height, pixelformat, &surfaceid); + ilmErrorTypes callResult = ilm_layerRemove(layerid); if (ILM_SUCCESS != callResult) { cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n"; - cout << "Failed to create surface with ID " << surfaceid << "\n"; + cout << "Failed to remove layer with ID " << layerid << "\n"; return; } -} - -//============================================================================= -COMMAND("destroy layer|surface <id>") -//============================================================================= -{ - if (input->contains("layer")) - { - unsigned int layerid = input->getUint("id"); - - ilmErrorTypes callResult = ilm_layerRemove(layerid); - if (ILM_SUCCESS != callResult) - { - cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n"; - cout << "Failed to remove layer with ID " << layerid << "\n"; - return; - } - } - else if (input->contains("surface")) - { - unsigned int surfaceid = input->getUint("id"); - - ilmErrorTypes callResult = ilm_surfaceRemove(surfaceid); - if (ILM_SUCCESS != callResult) - { - cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n"; - cout << "Failed to remove surface with ID " << surfaceid << "\n"; - return; - } - } ilm_commitChanges(); } diff --git a/protocol/CMakeLists.txt b/protocol/CMakeLists.txt index cef7cc4..613a1a6 100644 --- a/protocol/CMakeLists.txt +++ b/protocol/CMakeLists.txt @@ -153,6 +153,23 @@ set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC") +project (ivi-application) + +add_library(${PROJECT_NAME} SHARED + ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-client-protocol.h + ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-protocol.c +) + +install( + TARGETS ${PROJECT_NAME} + LIBRARY DESTINATION lib${LIB_SUFFIX} +) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-client-protocol.h + DESTINATION include/ilm +) + #============================================================================================= # generate documentation for ivi-application API #============================================================================================= |