From 0ad76ac6c7fb8735d07b14f4a576d44a9c914710 Mon Sep 17 00:00:00 2001 From: MinHyung Ko Date: Tue, 17 Sep 2013 18:40:45 +0900 Subject: [PATCH] Fix various build warnings [Issue#] N/A [Problem] Various build warning occurred. [Cause] Mostly unused parameter. [Solution] Fixed warning messages in web-provider [SCMRequest] N/A Change-Id: If1e51765bf507349f6a7583d05b7f62069620e3b --- src/API/SqliteDB.cpp | 14 ++-- src/API/web_provider_livebox_info.cpp | 42 +++++----- src/API/web_provider_livebox_info.h | 11 ++- src/API/web_provider_plugin_info.cpp | 19 +++-- src/API/web_provider_plugin_info.h | 8 +- src/Core/Box.cpp | 6 +- src/Core/BoxManager.cpp | 18 +++-- src/Core/BoxSchemeHandler.cpp | 11 ++- src/Core/BoxUpdateTimer.h | 2 +- src/Core/Buffer/BoxRenderBuffer.cpp | 11 ++- src/Core/Buffer/PdRenderBuffer.cpp | 7 +- src/Core/Buffer/RenderBuffer.cpp | 47 ++++++----- src/Core/Buffer/RenderBufferFactory.h | 6 +- src/Core/Service/MessageManager.cpp | 4 + src/Core/Service/PeriodChanger.cpp | 8 +- src/Core/View/PdHelper.cpp | 8 +- src/Core/View/WebView.cpp | 104 +++++++++++++++++++++---- src/Daemon/BoxDaemonImpl.cpp | 49 +++++++----- src/Daemon/main.cpp | 3 + src/Plugin/AppBoxPlugin/AppBoxRenderBuffer.cpp | 7 +- src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp | 29 ++++--- src/Plugin/box_plugin_interface.h | 2 + 22 files changed, 280 insertions(+), 136 deletions(-) diff --git a/src/API/SqliteDB.cpp b/src/API/SqliteDB.cpp index 1c550e7..fcd9132 100644 --- a/src/API/SqliteDB.cpp +++ b/src/API/SqliteDB.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ /** - * @file SqliteDB.cpp + * @file SqliteDB.cpp * @author Yunchan Cho (yunchan.cho@samsung.com) */ #include @@ -72,7 +72,7 @@ bool SqliteDB::setCommand(std::string& query, const char* fmt, ...) return false; } - int ret = + int ret = sqlite3_prepare_v2(m_handle, query.c_str(), -1, &m_stmt, NULL); if (ret != SQLITE_OK) { @@ -82,10 +82,10 @@ bool SqliteDB::setCommand(std::string& query, const char* fmt, ...) // bind values to query int intValue; char* stringValue; - + va_list ap; va_start(ap, fmt); - for (int i = 0; i < strlen(fmt); i++) { + for (unsigned int i = 0; i < strlen(fmt); i++) { switch (fmt[i]) { case 'i': intValue = va_arg(ap, int); @@ -116,7 +116,7 @@ bool SqliteDB::executeCommand() { int ret = sqlite3_step(m_stmt); - + if (ret != SQLITE_ROW) { return false; } @@ -126,10 +126,10 @@ bool SqliteDB::executeCommand() const char* SqliteDB::getText(int col) { - const char* ret = + const char* ret = reinterpret_cast(sqlite3_column_text(m_stmt, col)); - return ret; + return ret; } int SqliteDB::getInt(int col) diff --git a/src/API/web_provider_livebox_info.cpp b/src/API/web_provider_livebox_info.cpp index 77f738a..731a935 100644 --- a/src/API/web_provider_livebox_info.cpp +++ b/src/API/web_provider_livebox_info.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ /** - * @file web_provider_livebox_info.cpp + * @file web_provider_livebox_info.cpp * @author Yunchan Cho (yunchan.cho@samsung.com) */ #include @@ -62,7 +62,7 @@ const char* web_provider_livebox_get_box_type(const char* box_id) handle->closeDB(); return NULL; } - + const char* box_type = handle->getText(InfoTableField::BOX_TYPE); const char* box_type_dup = NULL; @@ -112,23 +112,23 @@ const char* web_provider_livebox_get_app_id(const char* box_id) int web_provider_livebox_get_auto_launch(const char* box_id) { if (!box_id) { - return NULL; + return 0; } std::shared_ptr handle(new WebProviderDB()); if (!handle->openDB()) { - return NULL; + return 0; } std::string query = "select * from " + infoTable + " where box_id = ?"; if (!handle->setCommand(query, "s", box_id)) { handle->closeDB(); - return NULL; + return 0; } if (!handle->executeCommand()) { handle->closeDB(); - return NULL; + return 0; } int autoLaunch = handle->getInt(InfoTableField::AUTO_LAUNCH); @@ -140,23 +140,23 @@ int web_provider_livebox_get_auto_launch(const char* box_id) int web_provider_livebox_get_mouse_event(const char* box_id) { if (!box_id) { - return NULL; + return 0; } std::shared_ptr handle(new WebProviderDB()); if (!handle->openDB()) { - return NULL; + return 0; } std::string query = "select * from " + infoTable + " where box_id = ?"; if (!handle->setCommand(query, "s", box_id)) { handle->closeDB(); - return NULL; + return 0; } if (!handle->executeCommand()) { handle->closeDB(); - return NULL; + return 0; } int mouseEvent = handle->getInt(InfoTableField::MOUSE_EVENT); @@ -168,23 +168,23 @@ int web_provider_livebox_get_mouse_event(const char* box_id) int web_provider_livebox_get_pd_fast_open(const char* box_id) { if (!box_id) { - return NULL; + return 0; } std::shared_ptr handle(new WebProviderDB()); if (!handle->openDB()) { - return NULL; + return 0; } std::string query = "select * from " + infoTable + " where box_id = ?"; if (!handle->setCommand(query, "s", box_id)) { handle->closeDB(); - return NULL; + return 0; } if (!handle->executeCommand()) { handle->closeDB(); - return NULL; + return 0; } int pdFastOpen = handle->getInt(InfoTableField::PD_FAST_OPEN); @@ -194,8 +194,8 @@ int web_provider_livebox_get_pd_fast_open(const char* box_id) } int web_provider_livebox_insert_box_info( - const char* box_id, - const char* app_id, + const char* box_id, + const char* app_id, const char* box_type, int auto_launch, int mouse_event, @@ -210,8 +210,8 @@ int web_provider_livebox_insert_box_info( return -1; } - std::string query = - "insert into " + infoTable + + std::string query = + "insert into " + infoTable + " (box_id, app_id, box_type, auto_launch, mouse_event, pd_fast_open) \ values (?,?,?,?,?,?)"; @@ -242,7 +242,7 @@ int web_provider_livebox_delete_by_box_id(const char* box_id) return -1; } - std::string query = + std::string query = "delete from " + infoTable + " where box_id=?"; if (!handle->setCommand(query, "s", box_id)) { @@ -270,7 +270,7 @@ int web_provider_livebox_delete_by_app_id(const char* app_id) return -1; } - std::string query = + std::string query = "delete from " + infoTable + " where app_id=?"; if (!handle->setCommand(query, "s", app_id)) { @@ -298,7 +298,7 @@ int web_provider_livebox_delete_by_type(const char* type) return -1; } - std::string query = + std::string query = "delete from " + infoTable + " where type=?"; if (!handle->setCommand(query, "s", type)) { diff --git a/src/API/web_provider_livebox_info.h b/src/API/web_provider_livebox_info.h index 4d569bd..3cf1c41 100644 --- a/src/API/web_provider_livebox_info.h +++ b/src/API/web_provider_livebox_info.h @@ -14,17 +14,20 @@ * limitations under the License. */ /** - * @file web_provider_livebox_info.h + * @file web_provider_livebox_info.h * @author Yunchan Cho (yunchan.cho@samsung.com) */ -#ifndef WEB_PROVIDER_LIVEBOX_INFO_H +#ifndef WEB_PROVIDER_LIVEBOX_INFO_H #define WEB_PROVIDER_LIVEBOX_INFO_H #ifdef __cplusplus extern "C" { #endif +#ifndef EXPORT_API #define EXPORT_API __attribute__((visibility("default"))) +#endif + #define DEPRECATED_API __attribute__((visibility("default"))) __attribute__((deprecated)) /* TODO doxygen comments are needed to each exported API */ @@ -39,7 +42,7 @@ EXPORT_API int web_provider_livebox_insert_box_info( const char* box_id, const char* app_id, const char* box_type, - int auto_launch, + int auto_launch, int mouse_event, int pd_fast_open); EXPORT_API int web_provider_livebox_delete_by_box_id(const char* box_id); @@ -49,4 +52,4 @@ EXPORT_API int web_provider_livebox_delete_by_type(const char* type); #ifdef __cplusplus } #endif -#endif //WEB_PROVIDER_LIVEBOX_INFO_H +#endif //WEB_PROVIDER_LIVEBOX_INFO_H diff --git a/src/API/web_provider_plugin_info.cpp b/src/API/web_provider_plugin_info.cpp index 9b691ba..7dea665 100755 --- a/src/API/web_provider_plugin_info.cpp +++ b/src/API/web_provider_plugin_info.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ /** - * @file web_provider_livebox_info.cpp + * @file web_provider_livebox_info.cpp * @author Yunchan Cho (yunchan.cho@samsung.com) */ @@ -76,9 +76,8 @@ web_provider_plugin_info** web_provider_plugin_get_installed_list(int* count) struct dirent* entry; struct stat configStat; std::string configPath; - while (entry = readdir(dir)) { - if (!strcmp(entry->d_name, ".") || - !strcmp(entry->d_name, "..")) { + while ((entry = readdir(dir))) { + if ((!strcmp(entry->d_name, ".")) || (!strcmp(entry->d_name, ".."))) { continue; } @@ -106,7 +105,7 @@ web_provider_plugin_info** web_provider_plugin_get_installed_list(int* count) // parse available each plugin json file std::list pluginList; - for (auto it = configList.begin(); + for (auto it = configList.begin(); it != configList.end(); it++) { web_provider_plugin_info* info = get_parsed_json_data(*it) ; if (!info) { @@ -141,7 +140,7 @@ web_provider_plugin_info** web_provider_plugin_get_installed_list(int* count) } void web_provider_plugin_release_installed_list( - web_provider_plugin_info** info_list, + web_provider_plugin_info** info_list, int count) { if (!info_list) { @@ -193,13 +192,13 @@ static web_provider_plugin_info* get_parsed_json_data(std::string& configPath) JsonNode* root = json_parser_get_root(parser); JsonObject* object = json_node_get_object(root); - + // check if type member exists on this json file - const char* type = + const char* type = static_cast( json_object_get_string_member(object, jsonMemberType.c_str())); - const char* path = + const char* path = static_cast( json_object_get_string_member(object, jsonMemberPath.c_str())); @@ -231,7 +230,7 @@ static web_provider_plugin_info* get_parsed_json_data(std::string& configPath) gboolean hasBoxId = json_object_has_member(object, jsonMemberBoxId.c_str()); if (hasBoxId == TRUE) { - const char* boxId = + const char* boxId = static_cast( json_object_get_string_member(object, jsonMemberBoxId.c_str())); if (boxId) { diff --git a/src/API/web_provider_plugin_info.h b/src/API/web_provider_plugin_info.h index 28ed01b..612497c 100755 --- a/src/API/web_provider_plugin_info.h +++ b/src/API/web_provider_plugin_info.h @@ -17,14 +17,16 @@ * @file web_provider_plugin_info.h * @author Yunchan Cho (yunchan.cho@samsung.com) */ -#ifndef WEB_PROVIDER_PLUGIN_INFO_H +#ifndef WEB_PROVIDER_PLUGIN_INFO_H #define WEB_PROVIDER_PLUGIN_INFO_H #ifdef __cplusplus extern "C" { #endif +#ifndef EXPORT_API #define EXPORT_API __attribute__((visibility("default"))) +#endif struct _web_provider_plugin_info { const char* type; @@ -39,11 +41,11 @@ typedef _web_provider_plugin_info web_provider_plugin_info; EXPORT_API web_provider_plugin_info** web_provider_plugin_get_installed_list( int* count); EXPORT_API void web_provider_plugin_release_installed_list( - web_provider_plugin_info** info_list, + web_provider_plugin_info** info_list, int count); EXPORT_API int web_provider_plugin_get_box_scrollable(const char* plugin_type); EXPORT_API int web_provider_plugin_check_supported_size(const char* plugin_type, char** size, int sizeCount); #ifdef __cplusplus } #endif -#endif //WEB_PROVIDER_PROVIDER_INFO_H +#endif //WEB_PROVIDER_PROVIDER_INFO_H diff --git a/src/Core/Box.cpp b/src/Core/Box.cpp index 371eb7a..526309f 100644 --- a/src/Core/Box.cpp +++ b/src/Core/Box.cpp @@ -24,6 +24,7 @@ #include "Buffer/RenderBuffer.h" #include "Buffer/RenderBufferFactory.h" #include "Util/Log.h" +#include "Util/Util.h" #include "BoxData.h" #include "IBoxState.h" #include "BoxState.h" @@ -143,12 +144,12 @@ bool Box::resize(int width, int height) } SWITCH_BOX_STATE(); - return true; + return true; } bool Box::resume() { - LogD("enter"); + LogD("enter"); CHECK_BOX_STATE(m_state, permitResume); try { @@ -350,6 +351,7 @@ void Box::updateInternal() void Box::setState(IBoxStatePtr state) { + UNUSED_PARAM(state); // assign new state //m_state = state; } diff --git a/src/Core/BoxManager.cpp b/src/Core/BoxManager.cpp index 14af107..a4307b4 100644 --- a/src/Core/BoxManager.cpp +++ b/src/Core/BoxManager.cpp @@ -24,6 +24,7 @@ #include #include #include "Util/Log.h" +#include "Util/Util.h" #include "IBox.h" #include "Box.h" #include "BoxData.h" @@ -103,7 +104,7 @@ bool BoxManager::requestAddBox(BoxInfoPtr boxInfo, EwkContextPtr ewkContext) } ewkContext = m_defaultContext; } - box = Box::create(boxInfo, m_boxFactory, ewkContext); + box = Box::create(boxInfo, m_boxFactory, ewkContext); } catch (...) { LogD("exection occurs during adding box"); return false; @@ -115,7 +116,7 @@ bool BoxManager::requestAddBox(BoxInfoPtr boxInfo, EwkContextPtr ewkContext) return false; } - insertBoxMap(boxInfo->instanceId, box); + insertBoxMap(boxInfo->instanceId, box); return true; } @@ -125,8 +126,8 @@ bool BoxManager::requestRemoveBox(std::string& instanceId) if (!box) { return false; } - - if (!box->hide()) { + + if (!box->hide()) { return false; } @@ -141,7 +142,7 @@ bool BoxManager::requestResizeBox(std::string& instanceId, int width, int height if (!box) { return false; } - + return box->resize(width, height); } @@ -152,7 +153,7 @@ bool BoxManager::requestResumeBox(std::string& instanceId) if (!box) { return false; } - + return box->resume(); } @@ -163,7 +164,7 @@ bool BoxManager::requestPauseBox(std::string& instanceId) if (!box) { return false; } - + // paused by switching other page return box->pause(false); } @@ -202,7 +203,7 @@ bool BoxManager::requestOpenPd( if (!box) { return false; } - + return box->openPd(width, height, x, y); } @@ -251,6 +252,7 @@ bool BoxManager::requestUpdateBox(std::string& boxId, std::string& contentInfo) bool BoxManager::requestChangeLanguage(std::string& instanceId) { LogD("enter"); + UNUSED_PARAM(instanceId); IBoxPtr box; box.reset(); diff --git a/src/Core/BoxSchemeHandler.cpp b/src/Core/BoxSchemeHandler.cpp index cbacb14..f16c612 100755 --- a/src/Core/BoxSchemeHandler.cpp +++ b/src/Core/BoxSchemeHandler.cpp @@ -26,6 +26,7 @@ #include "Service/ScrollHolder.h" #include "Service/MessageManager.h" #include "Util/Log.h" +#include "Util/Util.h" #include "BoxSchemeHandler.h" using namespace Service; @@ -99,7 +100,7 @@ bool BoxSchemeHandler::process(std::string& instanceId, std::string& uri) if (!uri.compare( 0, BOX_SCHEME_CHANGE_PERIOD.size(), - BOX_SCHEME_CHANGE_PERIOD)) + BOX_SCHEME_CHANGE_PERIOD)) { std::string key("period"); std::string period = parse(uri, key); @@ -224,6 +225,8 @@ bool BoxSchemeHandler::handleChangePeriod(std::string& instanceId, float request bool BoxSchemeHandler::handleLaunchBrowser(std::string& instanceId, std::string& url) { LogD("enter"); + UNUSED_PARAM(instanceId); + if (!url.compare(0, HTTP_SCHEME.size(), HTTP_SCHEME) || !url.compare(0, HTTPS_SCHEME.size(), HTTPS_SCHEME)) { @@ -234,8 +237,8 @@ bool BoxSchemeHandler::handleLaunchBrowser(std::string& instanceId, std::string& } bool BoxSchemeHandler::handleSendMessage( - std::string& instanceId, - MessageManager::ReceiverType receiver, + std::string& instanceId, + MessageManager::ReceiverType receiver, std::string& message) { LogD("enter"); @@ -259,7 +262,7 @@ bool BoxSchemeHandler::handleSendMessage( return false; } - return m_messageManager->send(webview, receiver, message); + return m_messageManager->send(webview, receiver, message); } std::string BoxSchemeHandler::parse(std::string& uri, std::string& key) diff --git a/src/Core/BoxUpdateTimer.h b/src/Core/BoxUpdateTimer.h index 655dd51..04bf046 100644 --- a/src/Core/BoxUpdateTimer.h +++ b/src/Core/BoxUpdateTimer.h @@ -40,8 +40,8 @@ class BoxUpdateTimer: public ITimer { private: explicit BoxUpdateTimer(float period, Ecore_Task_Cb callback, void* data); float m_period; - void* m_data; Ecore_Task_Cb m_callback; + void* m_data; Ecore_Timer* m_timer; }; diff --git a/src/Core/Buffer/BoxRenderBuffer.cpp b/src/Core/Buffer/BoxRenderBuffer.cpp index b06ade7..1425138 100644 --- a/src/Core/Buffer/BoxRenderBuffer.cpp +++ b/src/Core/Buffer/BoxRenderBuffer.cpp @@ -22,11 +22,12 @@ #include #include #include +#include #include "RenderBuffer.h" #include "BoxRenderBuffer.h" BoxRenderBuffer::BoxRenderBuffer( - std::string boxId, std::string instanceId, + std::string boxId, std::string instanceId, int width, int height) : m_boxId(boxId) , m_instanceId(instanceId) @@ -43,7 +44,7 @@ BufferInfoPtr BoxRenderBuffer::acquireBuffer() { LogD("enter"); - BufferInfoPtr bufferInfo = + BufferInfoPtr bufferInfo = provider_buffer_acquire( TYPE_LB, m_boxId.c_str(), @@ -52,8 +53,8 @@ BufferInfoPtr BoxRenderBuffer::acquireBuffer() m_height, sizeof(int), handleTouchEventCallback, - this); - return bufferInfo; + this); + return bufferInfo; } void BoxRenderBuffer::updateBuffer() @@ -75,6 +76,8 @@ int BoxRenderBuffer::handleTouchEventCallback( void* data) { LogD("enter"); + UNUSED_PARAM(bufferInfo); + BoxRenderBuffer* This = static_cast(data); TouchType type; switch (event) { diff --git a/src/Core/Buffer/PdRenderBuffer.cpp b/src/Core/Buffer/PdRenderBuffer.cpp index 65b3495..917786d 100644 --- a/src/Core/Buffer/PdRenderBuffer.cpp +++ b/src/Core/Buffer/PdRenderBuffer.cpp @@ -22,11 +22,12 @@ #include #include #include +#include #include "RenderBuffer.h" #include "PdRenderBuffer.h" PdRenderBuffer::PdRenderBuffer( - std::string boxId, std::string instanceId, + std::string boxId, std::string instanceId, int width, int height) : m_boxId(boxId) , m_instanceId(instanceId) @@ -41,7 +42,7 @@ PdRenderBuffer::~PdRenderBuffer() BufferInfoPtr PdRenderBuffer::acquireBuffer() { - BufferInfoPtr bufferInfo = + BufferInfoPtr bufferInfo = provider_buffer_acquire( TYPE_PD, m_boxId.c_str(), @@ -73,6 +74,8 @@ int PdRenderBuffer::handleTouchEventCallback( void* data) { LogD("enter"); + UNUSED_PARAM(bufferInfo); + PdRenderBuffer* This = static_cast(data); TouchType type; switch (event) { diff --git a/src/Core/Buffer/RenderBuffer.cpp b/src/Core/Buffer/RenderBuffer.cpp index 4a7b1d8..1bd70b6 100755 --- a/src/Core/Buffer/RenderBuffer.cpp +++ b/src/Core/Buffer/RenderBuffer.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include "IRenderBuffer.h" #include "RenderBuffer.h" @@ -47,10 +48,10 @@ bool RenderBuffer::allocate() m_bufferAddr = NULL; } - Ecore_Evas* ee = - ecore_evas_buffer_allocfunc_new( - getWidth(), getHeight(), - allocateCallback, freeCallback, + Ecore_Evas* ee = + ecore_evas_buffer_allocfunc_new( + getWidth(), getHeight(), + allocateCallback, freeCallback, this); LogD("Using %s engine!", ecore_evas_engine_name_get(ee)); @@ -61,7 +62,7 @@ bool RenderBuffer::allocate() LogD("evas ecore setting"); - // alpha_set function access the canvas buffer directly, + // alpha_set function access the canvas buffer directly, // without pre/post render callback. provider_buffer_pre_render(m_bufferInfo); ecore_evas_alpha_set(ee, EINA_TRUE); @@ -128,9 +129,9 @@ void RenderBuffer::startCanvasUpdate() EVAS_CALLBACK_RENDER_PRE, preRenderCallback); - evas_event_callback_del( - m_canvas, - EVAS_CALLBACK_RENDER_POST, + evas_event_callback_del( + m_canvas, + EVAS_CALLBACK_RENDER_POST, postRenderCallback); evas_event_callback_add( @@ -138,9 +139,9 @@ void RenderBuffer::startCanvasUpdate() EVAS_CALLBACK_RENDER_PRE, preRenderCallback, this); - evas_event_callback_add( - m_canvas, - EVAS_CALLBACK_RENDER_POST, + evas_event_callback_add( + m_canvas, + EVAS_CALLBACK_RENDER_POST, postRenderCallback, this); } @@ -153,9 +154,9 @@ void RenderBuffer::stopCanvasUpdate() EVAS_CALLBACK_RENDER_PRE, preRenderCallback); - evas_event_callback_del( - m_canvas, - EVAS_CALLBACK_RENDER_POST, + evas_event_callback_del( + m_canvas, + EVAS_CALLBACK_RENDER_POST, postRenderCallback); } @@ -167,6 +168,8 @@ Evas_Object* RenderBuffer::getWindow() void RenderBuffer::preRenderCallback(void* data, Evas* canvas, void *eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); + RenderBuffer *buffer = static_cast(data); if (!provider_buffer_pixmap_is_support_hw(buffer->m_bufferInfo)) { LogD("not hw backend"); @@ -180,6 +183,10 @@ void RenderBuffer::preRenderCallback(void* data, Evas* canvas, void *eventInfo) void RenderBuffer::postRenderCallback(void* data, Evas* canvas, void* eventInfo) { LogD("enter"); + + UNUSED_PARAM(canvas); + UNUSED_PARAM(eventInfo); + RenderBuffer* buffer = static_cast(data); evas_data_argb_unpremul(static_cast(buffer->m_bufferAddr), buffer->getWidth() * buffer->getHeight()); @@ -233,6 +240,8 @@ Evas* RenderBuffer::getCanvas() void* RenderBuffer::allocateCallback(void* data, int size) { LogD("enter"); + UNUSED_PARAM(size); + RenderBuffer* buffer = static_cast(data); if (buffer->m_bufferInfo) { @@ -243,7 +252,7 @@ void* RenderBuffer::allocateCallback(void* data, int size) if (!buffer->m_bufferInfo) { return NULL; } - + // set buffer address if (!provider_buffer_pixmap_is_support_hw(buffer->m_bufferInfo)) { LogD("s/w evas backend"); @@ -264,8 +273,10 @@ void* RenderBuffer::allocateCallback(void* data, int size) void RenderBuffer::freeCallback(void* data, void *pix) { LogD("enter"); + UNUSED_PARAM(pix); + RenderBuffer* buffer = static_cast(data); - + // destroy buffer if (!provider_buffer_pixmap_is_support_hw(buffer->m_bufferInfo)) { provider_buffer_unref(buffer->m_bufferAddr); @@ -295,12 +306,12 @@ Evas_Object *RenderBuffer::getSnapshot(void) evas_object_image_colorspace_set(snapshot, EVAS_COLORSPACE_ARGB8888); evas_object_image_alpha_set(snapshot, EINA_TRUE); evas_object_image_size_set(snapshot, getWidth(), getHeight()); - + tmpBuffer = malloc(getWidth() * getHeight() * sizeof(int)); if (tmpBuffer) { memcpy(tmpBuffer, m_bufferAddr, getWidth() * getHeight() * sizeof(int)); evas_data_argb_premul( - static_cast(tmpBuffer), + static_cast(tmpBuffer), getWidth() * getHeight()); evas_object_image_data_set(snapshot, tmpBuffer); } else { diff --git a/src/Core/Buffer/RenderBufferFactory.h b/src/Core/Buffer/RenderBufferFactory.h index 5d4ef9f..9eff1e3 100644 --- a/src/Core/Buffer/RenderBufferFactory.h +++ b/src/Core/Buffer/RenderBufferFactory.h @@ -22,18 +22,20 @@ #include "IRenderBuffer.h" +#ifndef EXPORT_API #define EXPORT_API __attribute__ ((visibility("default"))) +#endif namespace RenderBufferFactory { -enum RenderBufferType : int +enum RenderBufferType : int { RENDER_BUFFER_TYPE_BOX = 0, RENDER_BUFFER_TYPE_PD, }; EXPORT_API IRenderBufferPtr create( - RenderBufferType type, + RenderBufferType type, std::string boxId, std::string instanceId, int width, diff --git a/src/Core/Service/MessageManager.cpp b/src/Core/Service/MessageManager.cpp index 29344dd..3199d86 100755 --- a/src/Core/Service/MessageManager.cpp +++ b/src/Core/Service/MessageManager.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "MessageManager.h" namespace Service { @@ -82,6 +83,9 @@ void MessageManager::executeScriptCallback( Evas_Object* webview, const char* result, void* data) { LogD("enter"); + UNUSED_PARAM(webview); + UNUSED_PARAM(data); + std::string resultStr(result ? result : "null"); LogD("result: %s", resultStr.c_str()); } diff --git a/src/Core/Service/PeriodChanger.cpp b/src/Core/Service/PeriodChanger.cpp index b58719e..2993d53 100755 --- a/src/Core/Service/PeriodChanger.cpp +++ b/src/Core/Service/PeriodChanger.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "PeriodChanger.h" #define UPDATE_PERIOD_MIN 1800.0f @@ -110,7 +111,7 @@ void PeriodChanger::showPeriodPopup() bindtextdomain(MO_PROJECT_NAME, MO_INSTALL_DIR); setPopupListData(); // TODO Language ID should be used, not static string - for(int i = 0 ; i < sizeof(m_hour) / sizeof(PopupListData); i++) { + for(unsigned int i = 0 ; i < sizeof(m_hour) / sizeof(PopupListData); i++) { m_hour[i].radio = elm_radio_add(periodList); elm_radio_state_value_set(m_hour[i].radio, m_currentPeriod == m_hour[i].newPeriod ? EINA_FALSE : EINA_TRUE); @@ -244,6 +245,9 @@ void PeriodChanger::destroyWindow() void PeriodChanger::selectPeriodCallback(void *data, Evas_Object *obj, void *event_info) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(event_info); + PopupListData* popupData = static_cast(data); LogD("Update period is set to %f", popupData->newPeriod); @@ -254,6 +258,8 @@ void PeriodChanger::selectPeriodCallback(void *data, Evas_Object *obj, void *eve void PeriodChanger::cancelButtonCallback(void *data, Evas_Object *obj, void *event_info) { LogD("enter"); + UNUSED_PARAM(event_info); + PeriodChanger* This = static_cast(data); This->destroyPeriodPopup(obj); } diff --git a/src/Core/View/PdHelper.cpp b/src/Core/View/PdHelper.cpp index 11a250c..ba57c8f 100644 --- a/src/Core/View/PdHelper.cpp +++ b/src/Core/View/PdHelper.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "IRenderView.h" #include "IPdHelper.h" #include "PdHelper.h" @@ -45,7 +46,7 @@ void PdHelper::startOpen() return; } - //make javascript string for pd + //make javascript string for pd std::string script = "var pdWindow = window.open(\""; script += validateUrl(m_startUrl); script += "\", \"_blank\");"; @@ -95,10 +96,10 @@ Evas_Object* PdHelper::getPdWebView() const return m_pdWebView; } -Evas* PdHelper::getPdCanvas() const +Evas* PdHelper::getPdCanvas() const { LogD("enter"); - evas_object_evas_get(m_pdRenderInfo->window); + return evas_object_evas_get(m_pdRenderInfo->window); } bool PdHelper::isPdOpened() const @@ -110,6 +111,7 @@ bool PdHelper::isPdOpened() const void PdHelper::didExecuteScript(Evas_Object* webview, std::string& result) { LogD("enter"); + UNUSED_PARAM(webview); LogD("javascript execution result: %s", result.c_str()); } diff --git a/src/Core/View/WebView.cpp b/src/Core/View/WebView.cpp index f580c6c..0da5b3f 100755 --- a/src/Core/View/WebView.cpp +++ b/src/Core/View/WebView.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "WebView.h" @@ -76,7 +77,7 @@ WebView::WebView(Evas_Object* win, Ewk_Context* ewkContext) { } -WebView::~WebView() +WebView::~WebView() { } @@ -154,13 +155,13 @@ bool WebView::setBasicSetting(Evas_Object* webview) return false; } - for (auto it = m_smartCallbacksMap.begin(); + for (auto it = m_smartCallbacksMap.begin(); it != m_smartCallbacksMap.end(); it++) { evas_object_smart_callback_add( webview, it->first.c_str(), it->second, this); } - // set specific features + // set specific features Ewk_Settings* setting = ewk_view_settings_get(webview); // set user agent like WRT, or Browser? // ewk_view_user_agent_set(webview, "some_ua_string"); @@ -173,12 +174,8 @@ bool WebView::setBasicSetting(Evas_Object* webview) ewk_view_page_visibility_state_set( webview, EWK_PAGE_VISIBILITY_STATE_VISIBLE, EINA_TRUE); - // set orientation - ewk_view_orientation_lock_callback_set( - webview, orientationLockCallback, this); - evas_object_color_set(webview, 0, 0, 0, 1); - + return true; } @@ -190,13 +187,12 @@ bool WebView::unsetBasicSetting(Evas_Object* webview) return false; } - for (auto it = m_smartCallbacksMap.begin(); + for (auto it = m_smartCallbacksMap.begin(); it != m_smartCallbacksMap.end(); it++) { evas_object_smart_callback_del( m_topWebview, it->first.c_str(), it->second); } - ewk_view_orientation_lock_callback_set(m_topWebview, NULL, NULL); return true; } @@ -208,9 +204,9 @@ std::string WebView::validateUrl(std::string& url) return std::string(); } - if((!url.compare(0, 4, "http")) || + if((!url.compare(0, 4, "http")) || (!url.compare(0, 5, "https")) || - (!url.compare(0, 4, "file"))) + (!url.compare(0, 4, "file"))) { return url; } @@ -224,6 +220,7 @@ void WebView::loadStartedCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); @@ -240,6 +237,7 @@ void WebView::loadFinishedCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didLoadFinished(obj); @@ -249,6 +247,7 @@ void WebView::titleChangedCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didTitleChanged(obj, eventInfo); @@ -258,6 +257,7 @@ void WebView::uriChangedCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didUriChanged(obj, eventInfo); @@ -267,6 +267,7 @@ void WebView::loadProgressCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didLoadProgress(obj, eventInfo); @@ -276,6 +277,7 @@ void WebView::loadProgressFinishedCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didLoadProgressFinished(obj); @@ -285,6 +287,7 @@ void WebView::processCrashedCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didProcessCrashed(obj); @@ -294,6 +297,7 @@ void WebView::createWindowCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didCreateWindow(obj, eventInfo); @@ -303,6 +307,7 @@ void WebView::closeWindowCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didCloseWindow(obj); @@ -383,6 +388,7 @@ void WebView::formSubmitCallback( void* data, Evas_Object *obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didFormSubmit(obj); @@ -446,6 +452,7 @@ void WebView::enterFullscreenCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didEnterFullscreen(obj); @@ -455,6 +462,7 @@ void WebView::exitFullscreenCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didExitFullscreen(obj); @@ -473,6 +481,7 @@ void WebView::imeOpenedCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didImeOpened(obj); @@ -482,6 +491,7 @@ void WebView::imeClosedCallback( void* data, Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(eventInfo); WebView* This = static_cast(data); This->didImeClosed(obj); @@ -562,198 +572,255 @@ void WebView::certificateConfirmRequestCallback( void WebView::didLoadStarted(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); + // This Will be implemented by derived class } void WebView::didLoadFinished(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); // This Will be implemented by derived class } void WebView::didTitleChanged(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); + // This Will be implemented by derived class } void WebView::didUriChanged(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didLoadProgress(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didLoadProgressFinished(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); // This Will be implemented by derived class } void WebView::didProcessCrashed(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); // This Will be implemented by derived class } - + void WebView::didCreateWindow(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didCloseWindow(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); // This Will be implemented by derived class } void WebView::didPolicyNavigationDecide(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didPolicyNewWindowDecide(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didPageResponseDecide(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); // This Will be implemented by derived class } - + void WebView::didContextmenuCustomize(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didFormSubmit(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); // This Will be implemented by derived class } void WebView::didGeolocationPermissionRequest(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didNotificationShow(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didNotificationCancel(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didNotificationPermissionRequest(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } - + void WebView::didDatabaseUsagePermissionRequest(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didFilesystemPermissionRequest(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didEnterFullscreen(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); // This Will be implemented by derived class } void WebView::didExitFullscreen(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); // This Will be implemented by derived class } void WebView::didImeChanged(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didImeOpened(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); // This Will be implemented by derived class } void WebView::didImeClosed(Evas_Object* obj) { LogD("enter"); + UNUSED_PARAM(obj); // This Will be implemented by derived class } void WebView::didUsermediaPermissionRequest(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didProtocolHandlerRegistration(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didProtocolHandlerIsRegistered(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didProtocolHandlerUnregistration(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didContentHandlerRegistration(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didContentHandlerIsRegistered(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didContentHandlerUnregistration(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } void WebView::didCertificateConfirmRequest(Evas_Object* obj, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(eventInfo); // This Will be implemented by derived class } @@ -761,6 +828,10 @@ Eina_Bool WebView::orientationLockCallback( Evas_Object* obj, Eina_Bool needLock, int orientation, void* data) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(needLock); + UNUSED_PARAM(orientation); + UNUSED_PARAM(data); return EINA_TRUE; } @@ -768,5 +839,8 @@ void WebView::executeScriptCallback( Evas_Object* obj, const char* result, void* data) { LogD("enter"); + UNUSED_PARAM(obj); + UNUSED_PARAM(result); + UNUSED_PARAM(data); } diff --git a/src/Daemon/BoxDaemonImpl.cpp b/src/Daemon/BoxDaemonImpl.cpp index 012ca2c..88356f6 100755 --- a/src/Daemon/BoxDaemonImpl.cpp +++ b/src/Daemon/BoxDaemonImpl.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -58,7 +59,7 @@ BoxDaemonImpl::BoxDaemonImpl() if (vconf_notify_key_changed("db/setting/accessibility/font_name", requestChangeFontCallback, this) != true) { LogD("vconf_notify_key_changed returned FALSE!"); } - if (vconf_notify_key_changed(VCONFKEY_SYSTEM_TIME_CHANGED, requestChangeTimeCallback, this) != true) { + if (vconf_notify_key_changed(VCONFKEY_SYSTEM_TIME_CHANGED, requestChangeTimeCallback, this) != true) { LogD("vconf_notify_key_changed returned FALSE!"); } } @@ -72,11 +73,11 @@ bool BoxDaemonImpl::start(std::string& name) LogD("enter"); // initialize existing plugins for web livebox - if (!m_pluginConnector->initialize()) { + if (!m_pluginConnector->initialize()) { LogD("failed to initialize plugins"); return false; } - + // set name m_daemonName = name; @@ -104,7 +105,7 @@ bool BoxDaemonImpl::stop() provider_fini(); // deinitialize existing plugins for web livebox - if (!m_pluginConnector->shutdown()) { + if (!m_pluginConnector->shutdown()) { LogD("failed to shutdown plugins"); return false; } @@ -142,10 +143,11 @@ bool BoxDaemonImpl::handleAppService(service_h service) int BoxDaemonImpl::connectedCallback(ProviderEventArgPtr arg, void* data) { LogD("enter"); + UNUSED_PARAM(arg); BoxDaemonImpl* This = static_cast(data); if (!provider_send_hello()) { - This->m_pingTimer = + This->m_pingTimer = ecore_timer_add(MASTER_PROVIDER_PING_TIME, pingToMasterCallback, This); } @@ -155,18 +157,21 @@ int BoxDaemonImpl::connectedCallback(ProviderEventArgPtr arg, void* data) int BoxDaemonImpl::disconnectedCallback(ProviderEventArgPtr arg, void* data) { LogD("enter"); + UNUSED_PARAM(arg); + UNUSED_PARAM(data); - aul_terminate_pid(getpid()); + aul_terminate_pid(getpid()); return 0; } -int BoxDaemonImpl::boxCreateCallback( - ProviderEventArgPtr arg, - int* width, int* height, +int BoxDaemonImpl::boxCreateCallback( + ProviderEventArgPtr arg, + int* width, int* height, double* priority, void* data) { LogD("enter"); + UNUSED_PARAM(priority); BoxDaemonImpl* This = static_cast(data); BoxInfoPtr info = This->initializeBoxInfo(arg); @@ -214,8 +219,8 @@ int BoxDaemonImpl::boxReCreateCallback(ProviderEventArgPtr arg, void* data) return -1; } - int* width; - int* height; + int* width = NULL; + int* height = NULL; if ((arg->info.lb_recreate.width == 0) || (arg->info.lb_recreate.height == 0)) { livebox_service_get_size(LB_SIZE_TYPE_1x1, width, height); @@ -278,6 +283,7 @@ int BoxDaemonImpl::pdCreateCallback(ProviderEventArgPtr arg, void* data) if (arg->info.pd_create.w == 0 || arg->info.pd_create.h == 0) { return -1; } + //Use the screen width to fix the device width ecore_x_window_size_get(0, &info->pdWidth, NULL); info->pdHeight = arg->info.pd_create.h; @@ -416,6 +422,7 @@ int BoxDaemonImpl::boxResumeCallback(ProviderEventArgPtr arg, void* data) int BoxDaemonImpl::pauseCallback(ProviderEventArgPtr arg, void* data) { LogD("enter"); + UNUSED_PARAM(arg); BoxDaemonImpl* This = static_cast(data); @@ -432,6 +439,7 @@ int BoxDaemonImpl::pauseCallback(ProviderEventArgPtr arg, void* data) int BoxDaemonImpl::resumeCallback(ProviderEventArgPtr arg, void* data) { LogD("enter"); + UNUSED_PARAM(arg); BoxDaemonImpl* This = static_cast(data); @@ -517,7 +525,7 @@ std::string BoxDaemonImpl::getBoxType(const char* boxId) if (!boxId) { return std::string(); } - + const char* type = web_provider_livebox_get_box_type(boxId); if (!type) { std::string boxType = m_pluginConnector->getBoxType(boxId); @@ -628,8 +636,6 @@ BoxInfoPtr BoxDaemonImpl::handleOperationUpdate(service_h service) { LogD("enter"); - int ret; - if (!isServiceCallerBoxOwner(service)) { return BoxInfoPtr(); } @@ -654,7 +660,7 @@ BoxInfoPtr BoxDaemonImpl::handleOperationUpdate(service_h service) info->contentInfo = std::string(contentInfo); } - // release string + // release string delete[] contentInfo; return info; @@ -663,6 +669,7 @@ BoxInfoPtr BoxDaemonImpl::handleOperationUpdate(service_h service) Eina_Bool BoxDaemonImpl::pingToMasterCallback(void* data) { LogD("enter"); + UNUSED_PARAM(data); provider_send_ping(); @@ -687,6 +694,7 @@ void BoxDaemonImpl::requestBoxJobCallback(void* data) delete jobInfo; } + int BoxDaemonImpl::requestChangeLanguageCallback(void* data) { LogD("enter"); @@ -695,7 +703,7 @@ int BoxDaemonImpl::requestChangeLanguageCallback(void* data) BoxInfoPtr info = BoxInfoPtr(new BoxInfo()); JobInfo* jobInfo = new JobInfo(REQUEST_CMD_CHANGE_LANGUAGE, info, This); - Ecore_Job* ret = ecore_job_add(requestBoxJobCallback, jobInfo); + ecore_job_add(requestBoxJobCallback, jobInfo); return 0; } @@ -707,12 +715,13 @@ int BoxDaemonImpl::requestChangeRegionCallback(void* data) BoxInfoPtr info = BoxInfoPtr(new BoxInfo()); JobInfo* jobInfo = new JobInfo(REQUEST_CMD_CHANGE_LANGUAGE, info, This); - Ecore_Job* ret = ecore_job_add(requestBoxJobCallback, jobInfo); + ecore_job_add(requestBoxJobCallback, jobInfo); return 0; } int BoxDaemonImpl::requestLowMemoryCallback(void* data) { LogD("enter"); + UNUSED_PARAM(data); // terminate box daemon and revive elm_exit(); @@ -722,6 +731,7 @@ int BoxDaemonImpl::requestLowMemoryCallback(void* data) void BoxDaemonImpl::requestChangeFontCallback(keynode_t* key, void* data) { LogD("enter"); + UNUSED_PARAM(key); char* fontstr = vconf_get_str("db/setting/accessibility/font_name"); @@ -730,12 +740,13 @@ void BoxDaemonImpl::requestChangeFontCallback(keynode_t* key, void* data) JobInfo* jobInfo = new JobInfo(REQUEST_CMD_CHANGE_LANGUAGE, info, This); free(fontstr); - Ecore_Job* ret = ecore_job_add(requestBoxJobCallback, jobInfo); + ecore_job_add(requestBoxJobCallback, jobInfo); } void BoxDaemonImpl::requestChangeTimeCallback(keynode_t* key, void* data) { LogD("enter"); + UNUSED_PARAM(key); char* timestr = vconf_get_str(VCONFKEY_SYSTEM_TIME_CHANGED); @@ -744,5 +755,5 @@ void BoxDaemonImpl::requestChangeTimeCallback(keynode_t* key, void* data) JobInfo* jobInfo = new JobInfo(REQUEST_CMD_CHANGE_LANGUAGE, info, This); free(timestr); - Ecore_Job* ret = ecore_job_add(requestBoxJobCallback, jobInfo); + ecore_job_add(requestBoxJobCallback, jobInfo); } diff --git a/src/Daemon/main.cpp b/src/Daemon/main.cpp index 9c07d3b..1d761f8 100755 --- a/src/Daemon/main.cpp +++ b/src/Daemon/main.cpp @@ -26,11 +26,14 @@ #include #include #include +#include #include "BoxDaemon.h" static bool appCreateCallback(void *data) { LogD("app create"); + UNUSED_PARAM(data); + elm_config_preferred_engine_set("software_x11"); return true; } diff --git a/src/Plugin/AppBoxPlugin/AppBoxRenderBuffer.cpp b/src/Plugin/AppBoxPlugin/AppBoxRenderBuffer.cpp index 715adaa..f0c0ae0 100644 --- a/src/Plugin/AppBoxPlugin/AppBoxRenderBuffer.cpp +++ b/src/Plugin/AppBoxPlugin/AppBoxRenderBuffer.cpp @@ -21,11 +21,12 @@ #include #include #include +#include #include "AppBoxRenderView.h" #include "AppBoxRenderBuffer.h" #include "AppBoxObserver.h" -#define MAX_WAIT_TIME 5.0 +#define MAX_WAIT_TIME 5.0 AppBoxRenderBuffer::AppBoxRenderBuffer( std::string boxId, std::string instanceId, @@ -38,6 +39,8 @@ AppBoxRenderBuffer::AppBoxRenderBuffer( , m_renderView() { LogD("enter"); + UNUSED_PARAM(data); + if (web_provider_livebox_get_mouse_event(m_boxId.c_str())) { m_mouseEventRecievable = true; } @@ -100,7 +103,7 @@ void AppBoxRenderBuffer::deleteTouchTimer() Eina_Bool AppBoxRenderBuffer::fireTouchTimerCallback(void* data) { LogD("enter"); - AppBoxRenderBuffer* This = static_cast(data); + AppBoxRenderBuffer* This = static_cast(data); This->stopCanvasUpdate(); // temp condition diff --git a/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp b/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp index c011563..7239b23 100755 --- a/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp +++ b/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include "AppBoxObserver.h" #include "AppBoxRenderBuffer.h" #include "AppBoxPdHelper.h" @@ -121,7 +122,7 @@ void AppBoxRenderView::showBox(RenderInfoPtr boxRenderInfo) } m_boxWrt = createWrtCore( - URL_TYPE_BOX, boxStartUrl, + URL_TYPE_BOX, boxStartUrl, boxRenderInfo->window, m_ewkContext); m_boxWrt_isSuspended = false; @@ -132,7 +133,7 @@ void AppBoxRenderView::showBox(RenderInfoPtr boxRenderInfo) // resize webview fitted to width, height of Box evas_object_resize( - m_boxWrt->GetCurrentWebview(), + m_boxWrt->GetCurrentWebview(), boxRenderInfo->width, boxRenderInfo->height); @@ -146,11 +147,11 @@ void AppBoxRenderView::showBox(RenderInfoPtr boxRenderInfo) } AppBoxRenderView::WrtCorePtr AppBoxRenderView::createWrtCore( - UrlType type, std::string& startUrl, + UrlType type, std::string& startUrl, Evas_Object* win, EwkContextPtr ewkContext) { LogD("enter"); - + WrtCorePtr wrt; wrt = WRT::CoreModuleSingleton:: Instance().getRunnableWidgetObject(m_appId); @@ -258,7 +259,7 @@ void AppBoxRenderView::showPd(RenderInfoPtr pdRenderInfo, RenderInfoPtr boxRende // resize webview fitted to width, height of pd evas_object_resize( - m_pdWrt->GetCurrentWebview(), + m_pdWrt->GetCurrentWebview(), pdRenderInfo->width, pdRenderInfo->height); // show pd @@ -348,7 +349,7 @@ std::string AppBoxRenderView::getStartUrl(UrlType type, std::string& defaultPara return url; } -Evas_Object* AppBoxRenderView::getCurrentSnapShot() +Evas_Object* AppBoxRenderView::getCurrentSnapShot() { LogD("enter"); clearSnapShot(); @@ -498,6 +499,8 @@ void AppBoxRenderView::executeScriptCallback( Evas_Object* webview, const char* result, void* data) { LogD("enter"); + UNUSED_PARAM(webview); + UNUSED_PARAM(data); std::string resultStr(result ? result : "null"); LogD("result: %s", resultStr.c_str()); @@ -532,7 +535,7 @@ void AppBoxRenderView::finishBoxLoadCallback(Evas_Object* webview) addTimer(&m_fireRenderTimer, RENDER_MAX_TIME, fireRenderTimerCallback); } else { if (!m_pdFastOpen) { - if (!(m_pdHelper->isPdOpened()) && + if (!(m_pdHelper->isPdOpened()) && webview == m_pdHelper->getBoxWebView()) { // open pd @@ -560,7 +563,7 @@ void AppBoxRenderView::createWindowBeforeCallback(Evas** canvas, Evas_Object* pa LogD("enter"); if (m_pdHelper) { - if (!(m_pdHelper->isPdOpened()) && + if (!(m_pdHelper->isPdOpened()) && parent == m_pdHelper->getBoxWebView()) { LogD("pd canvas is used"); @@ -568,7 +571,7 @@ void AppBoxRenderView::createWindowBeforeCallback(Evas** canvas, Evas_Object* pa return; } } - + LogD("canvas of this webview is used"); *canvas = evas_object_evas_get(parent); } @@ -589,7 +592,7 @@ void AppBoxRenderView::createWindowAfterCallback(Evas_Object* parent, Evas_Objec // So plugin should reset this value to true for painting parent webview ewk_view_visibility_set(parent, EINA_TRUE); evas_object_show(parent); - m_pdHelper->finishOpen(child); + m_pdHelper->finishOpen(child); } } @@ -613,6 +616,7 @@ void AppBoxRenderView::unsetBufferCallback(Evas_Object* webview) void AppBoxRenderView::decideNavigationCallback(Evas_Object* webview, std::string& uri) { LogD("enter"); + UNUSED_PARAM(webview); // navigation of box scheme should be ignored if(BoxSchemeHandler::Instance()->isBoxScheme(uri)) { @@ -632,12 +636,17 @@ void AppBoxRenderView::loadNonEmptyLayoutFinishedCallback( void* data, Evas_Object* webview, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(data); + UNUSED_PARAM(webview); + UNUSED_PARAM(eventInfo); } void AppBoxRenderView::frameRenderedCallback( void* data, Evas_Object* webview, void* eventInfo) { LogD("enter"); + UNUSED_PARAM(webview); + UNUSED_PARAM(eventInfo); // start to update render buffer! AppBoxRenderView* This = static_cast(data); diff --git a/src/Plugin/box_plugin_interface.h b/src/Plugin/box_plugin_interface.h index 093814d..9cc8a14 100644 --- a/src/Plugin/box_plugin_interface.h +++ b/src/Plugin/box_plugin_interface.h @@ -23,7 +23,9 @@ #include #include +#ifndef EXPORT_API #define EXPORT_API __attribute__((visibility("default"))) +#endif #define WEB_PROVIDER_PLUGIN_INTERFACE_SYM_INITIALIZE "web_provider_plugin_interface_initialize" #define WEB_PROVIDER_PLUGIN_INTERFACE_SYM_COMMAND "web_provider_plugin_interface_command" -- 2.7.4