Add == operator for Capability
authorDaehyeon Jung <darrenh.jung@samsung.com>
Thu, 20 Dec 2018 07:58:57 +0000 (16:58 +0900)
committer장상윤/Tizen Platform Lab(SR)/Engineer/삼성전자 <jeremy.jang@samsung.com>
Thu, 20 Dec 2018 10:10:24 +0000 (19:10 +0900)
Change-Id: I390c1f3a620658f951150b31c3ff6c951a2d2ebf

src/common/capability.h

index b199571763ed77d07b1f063c3d89145fd4f9c892..40b061bd374c0e3599af2c22a65baf725be21f39 100644 (file)
@@ -39,6 +39,15 @@ class Capability {
     }
   }
 
+  bool operator==(const Capability &cap) const {
+    return (this->operation() == cap.operation()) &&
+        (this->uri() ==  cap.uri()) &&
+        (this->mime() == cap.mime()) &&
+        (this->appid() == cap.appid()) &&
+        (this->pkgid() == cap.pkgid()) &&
+        (this->IsValid() == cap.IsValid());
+  }
+
   std::string Serialize() const {
     Json::Value root;
     root["operation"] = this->operation();