Add ASKUSER_NONE response to libaskuser-notification 12/123112/1
authorZofia Abramowska <z.abramowska@samsung.com>
Tue, 4 Apr 2017 11:57:15 +0000 (13:57 +0200)
committerZofia Abramowska <z.abramowska@samsung.com>
Tue, 4 Apr 2017 12:02:25 +0000 (14:02 +0200)
H/W key pressed will generate ASKUSER_NONE response
instead of ASKUSER_DENY_ONCE

Change-Id: I268f7b1573dad56279f733e5f562762df2a769d1

src/agent/notification-daemon/Logic.cpp
src/common/protocol/askuser-notification/ask-user-types.h

index 272201e80f7bea7a03b0b725f0523293249570ed..e55730ee5b820915cde772f805fcc368ea836448 100644 (file)
@@ -207,19 +207,19 @@ void Logic::popupResponse(int popupId, NResponseType response) {
     // TODO translate ui response to policy result
     switch (response) {
     case NResponseType::Deny:
-        clientResponse = 0;
+        clientResponse = ASKUSER_DENY_ONCE;
         break;
     case NResponseType::DenyAlways:
-        clientResponse = 1;
+        clientResponse = ASKUSER_DENY_FOREVER;
         break;
     case NResponseType::Allow:
-        clientResponse = 2;
+        clientResponse = ASKUSER_ALLOW_ONCE;
         break;
     case NResponseType::AllowAlways:
-        clientResponse = 3;
+        clientResponse = ASKUSER_ALLOW_FOREVER;
         break;
     case NResponseType::None:
-        clientResponse = 0;
+        clientResponse = ASKUSER_NONE;
         break;
     case NResponseType::Error:
         clientResponse = -255;
index 642667c5654c2ce70379d290512b4f834efb04c3..8641df3f0458d5dcd4c6616af89f7bad2f460c7d 100644 (file)
  */
 #pragma once
 
-#define ASKUSER_DENY_ONCE 0
-#define ASKUSER_DENY_FOREVER 1
-#define ASKUSER_ALLOW_ONCE 2
-#define ASKUSER_ALLOW_FOREVER 3
+#define ASKUSER_NONE 0
+#define ASKUSER_DENY_ONCE 1
+#define ASKUSER_DENY_FOREVER 2
+#define ASKUSER_ALLOW_ONCE 3
+#define ASKUSER_ALLOW_FOREVER 4
 #define ASKUSER_UNKNOWN_ERROR -255
 
 namespace AskUser {