Using build() as name to create a new instance of BundleInfo
authorMarkus Jung <markus.jung@samsung.com>
Tue, 7 Jul 2015 09:58:33 +0000 (18:58 +0900)
committerUze Choi <uzchoi@samsung.com>
Wed, 8 Jul 2015 01:22:51 +0000 (01:22 +0000)
Change-Id: Ib3408ff18a3fe872feffad4acc214feaa2a4926a
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1556
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/resource-manipulation/modules/resourceContainer/include/BundleInfo.h
service/resource-manipulation/modules/resourceContainer/src/BundleInfo.cpp
service/resource-manipulation/modules/resourceContainer/src/ResourceContainerImpl.cpp

index 3d975e8..19a0703 100644 (file)
@@ -43,7 +43,7 @@ namespace OIC
             virtual string getPath() = 0;
             virtual void setVersion(string version) = 0;
             virtual string getVersion() = 0;
-            static BundleInfo* createBundleInfo();
+            static BundleInfo* build();
         protected:
             string m_ID, m_path, m_version;
         };
index bcdb88f..12971c7 100644 (file)
@@ -35,7 +35,7 @@ namespace OIC
 
         }
 
-        BundleInfo *BundleInfo::createBundleInfo()
+        BundleInfo *BundleInfo::build()
         {
             BundleInfoInternal *newBundleInfo = new BundleInfoInternal();
             return newBundleInfo;
index 3e016c9..53615db 100644 (file)
 using OC::oc_log_stream;
 using namespace OIC::Service;
 
-auto info_logger = []() -> boost::iostreams::stream<OC::oc_log_stream> &
+auto error_logger = []() -> boost::iostreams::stream<OC::oc_log_stream> &
 {
     static OC::oc_log_stream ols(oc_make_ostream_logger);
     static boost::iostreams::stream<OC::oc_log_stream> os(ols);
-    os->set_level(OC_LOG_INFO);
+    os->set_level(OC_LOG_ERROR);
     os->set_module("ResourceContainerImpl");
     return os;
 };
 
-auto error_logger = []() -> boost::iostreams::stream<OC::oc_log_stream> &
+auto info_logger = []() -> boost::iostreams::stream<OC::oc_log_stream> &
 {
     static OC::oc_log_stream ols(oc_make_ostream_logger);
     static boost::iostreams::stream<OC::oc_log_stream> os(ols);
-    os->set_level(OC_LOG_ERROR);
+    os->set_level(OC_LOG_INFO);
     os->set_module("ResourceContainerImpl");
     return os;
 };
@@ -88,7 +88,7 @@ namespace OIC
 
             for (int i = 0; i < bundles.size(); i++)
             {
-                BundleInfo *bundleInfo = BundleInfo::createBundleInfo();
+                BundleInfo *bundleInfo = BundleInfo::build();
                 bundleInfo->setPath(bundles[i]["path"]);
                 bundleInfo->setVersion(bundles[i]["version"]);
                 bundleInfo->setID(bundles[i]["id"]);
@@ -515,7 +515,7 @@ namespace OIC
         {
             std::list< BundleInfo* > ret;
             for(std::map<std::string, BundleInfoInternal*>::iterator it = m_bundles.begin(); it != m_bundles.end(); ++it){
-                BundleInfo* bundleInfo = BundleInfo::createBundleInfo();
+                BundleInfo* bundleInfo = BundleInfo::build();
                 ((BundleInfoInternal*)bundleInfo)->setBundleInfo((BundleInfo*)it->second);
                 ret.push_back(it->second);
             }