From 05118ddb94800403bab3771932a04eab81f77769 Mon Sep 17 00:00:00 2001 From: Kyungwook Tak Date: Tue, 21 Jun 2016 10:50:22 +0900 Subject: [PATCH] [CAPI Changed] Add ec for getting user response failed Change-Id: I5b9b66a0a07a54469ba77631f59553a28760ade6 Signed-off-by: Kyungwook Tak --- src/framework/service/cs-logic.cpp | 8 +++++++- src/include/csr/csr-error.h | 7 ++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/framework/service/cs-logic.cpp b/src/framework/service/cs-logic.cpp index 0004f61..26c6f76 100644 --- a/src/framework/service/cs-logic.cpp +++ b/src/framework/service/cs-logic.cpp @@ -728,7 +728,13 @@ RawBuffer CsLogic::handleAskUser(const CsContext &c, CsDetected &d, FilePtr &&fi } Ui::AskUser askUser; - d.response = askUser.cs(cid, c.popupMessage, d); + auto r = askUser.cs(cid, c.popupMessage, d); + if (r == -1) { + ERROR("Failed to get user response by popup service for target: " << d.targetName); + return BinaryQueue::Serialize(CSR_ERROR_USER_RESPONSE_FAILED, d).pop(); + } + + d.response = r; if (d.response == CSR_CS_USER_RESPONSE_REMOVE && !d.targetName.empty()) { try { diff --git a/src/include/csr/csr-error.h b/src/include/csr/csr-error.h index 01fb1f3..798c4b9 100644 --- a/src/include/csr/csr-error.h +++ b/src/include/csr/csr-error.h @@ -58,9 +58,10 @@ typedef enum { CSR_ERROR_NO_TASK = TIZEN_ERROR_CSR | 0x04, /**< No Task exists*/ CSR_ERROR_DB = TIZEN_ERROR_CSR | 0x05, /**< DB transaction error */ CSR_ERROR_REMOVE_FAILED = TIZEN_ERROR_CSR | 0x06, /**< Removing file or application is failed */ - CSR_ERROR_FILE_DO_NOT_EXIST = TIZEN_ERROR_CSR | 0x07, /**< File not exist */ - CSR_ERROR_FILE_CHANGED = TIZEN_ERROR_CSR | 0x08, /**< File changed after detection */ - CSR_ERROR_FILE_SYSTEM = TIZEN_ERROR_CSR | 0x09, /**< File type is invalid */ + CSR_ERROR_USER_RESPONSE_FAILED = TIZEN_ERROR_CSR | 0x07, /**< Getting user response is failed */ + CSR_ERROR_FILE_DO_NOT_EXIST = TIZEN_ERROR_CSR | 0x08, /**< File not exist */ + CSR_ERROR_FILE_CHANGED = TIZEN_ERROR_CSR | 0x09, /**< File changed after detection */ + CSR_ERROR_FILE_SYSTEM = TIZEN_ERROR_CSR | 0x10, /**< File type is invalid */ CSR_ERROR_ENGINE_PERMISSION = TIZEN_ERROR_CSR | 0x11, /**< Insufficient permission of engine */ CSR_ERROR_ENGINE_NOT_EXIST = TIZEN_ERROR_CSR | 0x12, /**< No engine exists*/ CSR_ERROR_ENGINE_DISABLED = TIZEN_ERROR_CSR | 0x13, /**< Engine is in disabled state*/ -- 2.7.4