Permalink
Browse files

Enable MojoNewWhereMatcher to compare array value

:Release Notes:
Replace MojoWhereMatcher with MojoNewWhereMatcher to compare array value

:Detailed Notes:

:Testing Performed:

:QA Notes:
Tested with following luna-send. If it succeeds, the toast msg will show
up.
luna-send -f -i luna://com.palm.activitymanager/create '
{
    "activity" : {
        "name" : "com.webos.service.dmrsvc.toast9",
        "description" : "Connection Manager Test",
        "trigger" : {
            "method" : "luna://com.webos.service.pdm/getAttachedNonStorageDeviceList",
            "params" : {"subscribe":true},
            "where":
                  {
                    "or" : {
                        "prop": ["nonStorageDeviceList" , "deviceNum"],
                        "op":"=",
                        "val":1
                    }
                  }
         },
        "callback" : {
            "method" : "palm://com.webos.notification/createToast",
            "params" : {
                            "sourceId":"com.palm.activitymanager",
                            "message" : "HID Device",
                            "noaction" : true
                        }
        },
        "type" : {
            "foreground" : true,
        }
    },
    "replace" : true,
    "start" : true,
    "subscribe" : true
}'

:Issues Addressed:
[GF-44448] [Activity Manager] How to query to match one of array has
           expected key:value.

Open-webOS-DCO-1.0-Signed-off-by: DongHeon Jang <dongheon.jang@lge.com>

Change-Id: I1bf55c743da92c21ea258ebe6c0e0418370f567f
Reviewed-on: https://g2g.palm.com/3764
Reviewed-by: Build Verification
Reviewed-by: DongHeon Jang <dongheon.jang@lge.com>
Tested-by: DongHeon Jang <dongheon.jang@lge.com>
Reviewed-by: Maksym Sditanov <maxim.sditanov@lge.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Reviewed-by: Alan Levi <alan.levi@lge.com>
  • Loading branch information...
dhjang authored and lgAlan committed Nov 1, 2013
1 parent 440fdb3 commit 9a5f47adf76b3bc5eea923564d3aa441804be3cb
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/MojoTriggerManager.cpp
@@ -19,7 +19,7 @@
#include "MojoTriggerManager.h"
#include "MojoTrigger.h"
#include "MojoTriggerSubscription.h"
-#include "MojoMatcher.h"
+#include "MojoWhereMatcher.h"
MojoTriggerManager::MojoTriggerManager(MojService *service)
: m_service(service)
@@ -65,7 +65,7 @@ boost::shared_ptr<Trigger> MojoTriggerManager::CreateWhereTrigger(
const MojObject& params, const MojObject& where)
{
boost::shared_ptr<MojoMatcher> matcher =
- boost::make_shared<MojoWhereMatcher>(where);
+ boost::make_shared<MojoNewWhereMatcher>(where);
return CreateTrigger(activity, url, params, matcher);
}

0 comments on commit 9a5f47a

Please sign in to comment.