Rename BundleInfo to RCSBundleInfo and ResourceContainer to RCSResourceContainer
authorcoderhyme <jhyo.kim@samsung.com>
Fri, 24 Jul 2015 16:14:27 +0000 (01:14 +0900)
committerUze Choi <uzchoi@samsung.com>
Sun, 26 Jul 2015 05:19:52 +0000 (05:19 +0000)
Prefixes are added for consistency for exposed headers as a part of API.

Change-Id: Ia968888331f27210e2c8ec00f3859ddadf3e2844
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1892
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
13 files changed:
service/resource-encapsulation/include/RCSBundleInfo.h [moved from service/resource-encapsulation/include/BundleInfo.h with 92% similarity]
service/resource-encapsulation/include/RCSResourceContainer.h [moved from service/resource-encapsulation/include/ResourceContainer.h with 98% similarity]
service/resource-encapsulation/src/resourceContainer/SConscript
service/resource-encapsulation/src/resourceContainer/bundle-api/include/ResourceContainerBundleAPI.h
service/resource-encapsulation/src/resourceContainer/include/BundleInfoInternal.h
service/resource-encapsulation/src/resourceContainer/include/ResourceContainerImpl.h
service/resource-encapsulation/src/resourceContainer/src/BundleActivator.cpp
service/resource-encapsulation/src/resourceContainer/src/BundleInfoInternal.cpp
service/resource-encapsulation/src/resourceContainer/src/ContainerSample.cpp
service/resource-encapsulation/src/resourceContainer/src/RCSBundleInfo.cpp [moved from service/resource-encapsulation/src/resourceContainer/src/BundleInfo.cpp with 87% similarity]
service/resource-encapsulation/src/resourceContainer/src/ResourceContainer.cpp
service/resource-encapsulation/src/resourceContainer/src/ResourceContainerImpl.cpp
service/resource-encapsulation/src/resourceContainer/unittests/ResourceContainerTest.cpp

@@ -21,7 +21,7 @@
 /**
  * @file
  *
- * This file contains BundleInfo class, which provides APIs related to Bundle information.
+ * This file contains RCSBundleInfo class, which provides APIs related to Bundle information.
  */
 
 #ifndef BUNDLEINFO_H_
@@ -35,15 +35,15 @@ namespace OIC
     {
 
         /**
-        * @class  BundleInfo
+        * @class  RCSBundleInfo
         * @brief   This class provides APIs for creating, getting and setting the Bundle Information
         *
         */
-        class BundleInfo
+        class RCSBundleInfo
         {
             public:
-                BundleInfo();
-                virtual ~BundleInfo();
+                RCSBundleInfo();
+                virtual ~RCSBundleInfo();
 
                 /**
                 * API for setting the Id of the bundle
@@ -128,10 +128,10 @@ namespace OIC
                 /**
                  * API for creating new bundle information
                  *
-                 * @return  BundleInfo - BundleInfo pointer.
+                 * @return  RCSBundleInfo - RCSBundleInfo pointer.
                  *
                  */
-                static BundleInfo *build();
+                static RCSBundleInfo *build();
             protected:
                 std::string m_ID, m_path, m_version;
         };
@@ -33,7 +33,7 @@
 #include <map>
 #include <list>
 
-#include "BundleInfo.h"
+#include "RCSBundleInfo.h"
 
 namespace OIC
 {
@@ -79,7 +79,7 @@ namespace OIC
                 * @return  list<BundleInfo*> -List of BundleInfo pointer each associated with a bundle
                 *
                 */
-                virtual std::list<BundleInfo *> listBundles() = 0;
+                virtual std::list<RCSBundleInfo *> listBundles() = 0;
                 /**
                  * API for starting the bundle.
                  *
index 241af81..cb2061c 100644 (file)
@@ -114,7 +114,7 @@ if int(containerJavaSupport):
 ######################################################################
 # Source files and Targets
 ######################################################################
-res_container_src = ['src/BaseActivator.cpp','src/BundleActivator.cpp','src/BundleInfo.cpp', 
+res_container_src = ['src/BaseActivator.cpp','src/BundleActivator.cpp','src/RCSBundleInfo.cpp', 
        'src/BundleInfoInternal.cpp', 'src/BundleResource.cpp', 'src/Configuration.cpp', 'src/JavaBundleResource.cpp', 'src/ProtocolBridgeResource.cpp',
        'src/ProtocolBridgeConnector.cpp', 'src/ResourceContainer.cpp', 'src/ResourceContainerBundleAPI.cpp', 'src/ResourceContainerImpl.cpp', 
        'src/SoftSensorResource.cpp']
index 95b6203..e34c2e3 100644 (file)
@@ -22,7 +22,7 @@
 #define BUNDLEINFOINTERNAL_H_
 
 #include <string>
-#include "BundleInfo.h"
+#include "RCSBundleInfo.h"
 #include "ResourceContainerBundleAPI.h"
 
 #if (JAVA_SUPPORT)
@@ -41,11 +41,11 @@ namespace OIC
         typedef void resourceCreator_t(resourceInfo resourceInfo);
         typedef void resourceDestroyer_t(BundleResource *pBundleResource);
 
-        class BundleInfoInternal: public BundleInfo
+        class BundleInfoInternal: public RCSBundleInfo
         {
             public:
                 BundleInfoInternal();
-                BundleInfoInternal(BundleInfo *info);
+                BundleInfoInternal(RCSBundleInfo *info);
                 virtual ~BundleInfoInternal();
                 void setID(const std::string &id);
                 const std::string &getID();
@@ -77,7 +77,7 @@ namespace OIC
                 void setResourceDestroyer(resourceDestroyer_t *);
                 resourceDestroyer_t *getResourceDestroyer();
 
-                void setBundleInfo(BundleInfo *bundleInfo);
+                void setBundleInfo(RCSBundleInfo *bundleInfo);
 
                 void setBundleHandle(void *);
                 void *getBundleHandle();
index a7166c2..ffdae24 100644 (file)
@@ -23,7 +23,7 @@
 
 
 
-#include "ResourceContainer.h"
+#include "RCSResourceContainer.h"
 #include "ResourceContainerBundleAPI.h"
 #include "BundleInfoInternal.h"
 
@@ -53,12 +53,12 @@ namespace OIC
                 // methods from ResourceContainer
                 void startContainer(const std::string &configFile);
                 void stopContainer();
-                void activateBundle(BundleInfo *bundleInfo);
-                void deactivateBundle(BundleInfo *bundleInfo);
+                void activateBundle(RCSBundleInfo *bundleInfo);
+                void deactivateBundle(RCSBundleInfo *bundleInfo);
                 void activateBundle(const std::string &bundleId);
                 void deactivateBundle(const std::string &bundleId);
-                void registerBundle(BundleInfo *bundleinfo);
-                void unregisterBundle(BundleInfo *bundleinfo);
+                void registerBundle(RCSBundleInfo *bundleinfo);
+                void unregisterBundle(RCSBundleInfo *bundleinfo);
                 void unregisterBundleSo(const std::string &id);
 
 
@@ -87,7 +87,7 @@ namespace OIC
                                std::map<string, string> params);
                 void removeBundle(const std::string &bundleId);
 
-                std::list<BundleInfo *> listBundles();
+                std::list<RCSBundleInfo *> listBundles();
 
                 void addResourceConfig(const std::string &bundleId, const std::string &resourceUri, std::map<string, string> params);
                 void removeResourceConfig(const std::string &bundleId, const std::string &resourceUri);
@@ -113,12 +113,12 @@ namespace OIC
                 void deactivateSoBundle(const std::string &bundleId);
                 void addSoBundleResource(const std::string &bundleId, resourceInfo newResourceInfo);
                 void removeSoBundleResource(const std::string &bundleId, const std::string &resourceUri);
-                void registerSoBundle(BundleInfo *bundleInfo);
+                void registerSoBundle(RCSBundleInfo *bundleInfo);
 
 #if(JAVA_SUPPORT)
                 map<string, JavaVM *> m_bundleVM;
 
-                void registerJavaBundle(BundleInfo *bundleInfo);
+                void registerJavaBundle(RCSBundleInfo *bundleInfo);
                 void activateJavaBundle(string bundleId);
                 void deactivateJavaBundle(string bundleId);
 
index fc39ed9..9d0134a 100644 (file)
@@ -19,7 +19,7 @@
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
 #include "BundleActivator.h"
-#include "ResourceContainer.h"
+#include "RCSResourceContainer.h"
 
 using namespace OIC::Service;
 
index 79c993a..6b026d9 100644 (file)
@@ -203,7 +203,7 @@ namespace OIC
         }
 #endif
 
-        void BundleInfoInternal::setBundleInfo(BundleInfo *bundleInfo)
+        void BundleInfoInternal::setBundleInfo(RCSBundleInfo *bundleInfo)
         {
             m_ID = bundleInfo->getID();
             m_path = bundleInfo->getPath();
index 49c61f8..a363dab 100644 (file)
@@ -18,8 +18,8 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "ResourceContainer.h"
-#include "BundleInfo.h"
+#include "RCSResourceContainer.h"
+#include "RCSBundleInfo.h"
 #include "oc_logger.hpp"
 #include <iostream>
 
@@ -55,8 +55,8 @@ int main()
     std::map<string, string> bundleParams;
     container->addBundle("oic.bundle.hueSample", "", "libHueBundle.so", bundleParams);
 
-    std::list<BundleInfo *> bundles = container->listBundles();
-    std::list<BundleInfo *>::iterator bundleIt;
+    std::list<RCSBundleInfo *> bundles = container->listBundles();
+    std::list<RCSBundleInfo *>::iterator bundleIt;
 
     cout << "\t>>> bundle list size : " << bundles.size() << endl;
     for (bundleIt = bundles.begin(); bundleIt != bundles.end(); bundleIt++)
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "BundleInfo.h"
+#include "RCSBundleInfo.h"
 #include "BundleInfoInternal.h"
 
 namespace OIC
 {
     namespace Service
     {
-        BundleInfo::BundleInfo()
+        RCSBundleInfo::RCSBundleInfo()
         {
 
         }
 
-        BundleInfo::~BundleInfo()
+        RCSBundleInfo::~RCSBundleInfo()
         {
 
         }
 
-        BundleInfo *BundleInfo::build()
+        RCSBundleInfo *RCSBundleInfo::build()
         {
             BundleInfoInternal *newBundleInfo = new BundleInfoInternal();
             return newBundleInfo;
index ff28c4c..10110bf 100644 (file)
@@ -18,7 +18,7 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "ResourceContainer.h"
+#include "RCSResourceContainer.h"
 #include "ResourceContainerImpl.h"
 
 namespace OIC{
index 48d97fb..6e185ee 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "ResourceContainerImpl.h"
 #include "BundleActivator.h"
-#include "ResourceContainer.h"
+#include "RCSResourceContainer.h"
 #include "BundleInfoInternal.h"
 #include "logger.h"
 #include "oc_logger.hpp"
@@ -97,7 +97,7 @@ namespace OIC
 
                 for (unsigned int i = 0; i < bundles.size(); i++)
                 {
-                    BundleInfo *bundleInfo = BundleInfo::build();
+                    RCSBundleInfo *bundleInfo = RCSBundleInfo::build();
                     bundleInfo->setPath(bundles[i]["path"]);
                     bundleInfo->setVersion(bundles[i]["version"]);
                     bundleInfo->setID(bundles[i]["id"]);
@@ -149,7 +149,7 @@ namespace OIC
             delete m_config;
         }
 
-        void ResourceContainerImpl::activateBundle(BundleInfo *bundleInfo)
+        void ResourceContainerImpl::activateBundle(RCSBundleInfo *bundleInfo)
         {
             BundleInfoInternal *bundleInfoInternal = (BundleInfoInternal *) bundleInfo;
 
@@ -159,7 +159,7 @@ namespace OIC
             }
         }
 
-        void ResourceContainerImpl::deactivateBundle(BundleInfo *bundleInfo)
+        void ResourceContainerImpl::deactivateBundle(RCSBundleInfo *bundleInfo)
         {
             if (((BundleInfoInternal *) bundleInfo)->isActivated())
             {
@@ -203,7 +203,7 @@ namespace OIC
         }
 
         // loads the bundle
-        void ResourceContainerImpl::registerBundle(BundleInfo *bundleInfo)
+        void ResourceContainerImpl::registerBundle(RCSBundleInfo *bundleInfo)
         {
             info_logger() << "Registering bundle: " << bundleInfo->getPath() << endl;
 
@@ -221,7 +221,7 @@ namespace OIC
             }
         }
 
-        void ResourceContainerImpl::unregisterBundle(BundleInfo *bundleInfo)
+        void ResourceContainerImpl::unregisterBundle(RCSBundleInfo *bundleInfo)
         {
             BundleInfoInternal *bundleInfoInternal = (BundleInfoInternal *) bundleInfo;
             if (bundleInfoInternal->isLoaded() && !bundleInfoInternal->isActivated())
@@ -431,7 +431,7 @@ namespace OIC
 
             else
             {
-                BundleInfo *bundleInfo = BundleInfo::build();
+                RCSBundleInfo *bundleInfo = RCSBundleInfo::build();
                 bundleInfo->setID(bundleId);
                 bundleInfo->setPath(bundlePath);
                 if (params.find("activator") != params.end())
@@ -467,15 +467,15 @@ namespace OIC
             }
         }
 
-        std::list< BundleInfo * > ResourceContainerImpl::listBundles()
+        std::list< RCSBundleInfo * > ResourceContainerImpl::listBundles()
         {
-            std::list< BundleInfo * > ret;
+            std::list< RCSBundleInfo * > ret;
             for (std::map< std::string, BundleInfoInternal * >::iterator it = m_bundles.begin();
                  it != m_bundles.end(); ++it)
             {
                 {
-                    BundleInfo *bundleInfo = BundleInfo::build();
-                    ((BundleInfoInternal *) bundleInfo)->setBundleInfo((BundleInfo *) it->second);
+                    RCSBundleInfo *bundleInfo = RCSBundleInfo::build();
+                    ((BundleInfoInternal *) bundleInfo)->setBundleInfo((RCSBundleInfo *) it->second);
                     ret.push_back(it->second);
                 }
             }
@@ -538,7 +538,7 @@ namespace OIC
 
         }
 
-        void ResourceContainerImpl::registerSoBundle(BundleInfo *bundleInfo)
+        void ResourceContainerImpl::registerSoBundle(RCSBundleInfo *bundleInfo)
         {
             char *error;
 
@@ -664,7 +664,7 @@ namespace OIC
             return m_bundleVM[bundleId];
         }
 
-        void ResourceContainerImpl::registerJavaBundle(BundleInfo *bundleInfo)
+        void ResourceContainerImpl::registerJavaBundle(RCSBundleInfo *bundleInfo)
         {
             info_logger() << "Registering Java bundle " << bundleInfo->getID() << endl;
             JavaVM *jvm;
index 741c744..f3d277b 100644 (file)
@@ -30,7 +30,7 @@
 #include "Configuration.h"
 #include "BundleActivator.h"
 #include "BundleResource.h"
-#include "ResourceContainer.h"
+#include "RCSResourceContainer.h"
 #include "ResourceContainerBundleAPI.h"
 #include "ResourceContainerImpl.h"
 
@@ -164,7 +164,7 @@ TEST_F(ResourceContainerTest, BundleStartedWithStartBundleAPI)
 TEST_F(ResourceContainerTest, AddNewSoBundleToContainer)
 {
     std::map<string, string> bundleParams;
-    std::list<BundleInfo *> bundles;
+    std::list<RCSBundleInfo *> bundles;
 
     bundles = m_pResourceContainer->listBundles();
     m_pResourceContainer->addBundle("oic.bundle.test", "", "libTestBundle.so", bundleParams);
@@ -176,7 +176,7 @@ TEST_F(ResourceContainerTest, AddNewSoBundleToContainer)
 TEST_F(ResourceContainerTest, RemoveSoBundleFromContainer)
 {
     std::map<string, string> bundleParams;
-    std::list<BundleInfo *> bundles;
+    std::list<RCSBundleInfo *> bundles;
 
     bundles = m_pResourceContainer->listBundles();
     m_pResourceContainer->removeBundle("oic.bundle.test");
@@ -187,7 +187,7 @@ TEST_F(ResourceContainerTest, RemoveSoBundleFromContainer)
 TEST_F(ResourceContainerTest, AddBundleAlreadyRegistered)
 {
     std::map<string, string> bundleParams;
-    std::list<BundleInfo *> bundles;
+    std::list<RCSBundleInfo *> bundles;
 
     m_pResourceContainer->addBundle("oic.bundle.test", "", "libTestBundle.so", bundleParams);
     bundles = m_pResourceContainer->listBundles();
@@ -363,14 +363,14 @@ class ResourceContainerImplTest: public TestWithMock
     public:
         MockRepository mocks;
         ResourceContainerImpl *m_pResourceContainer;
-        BundleInfo *m_pBundleInfo;
+        RCSBundleInfo *m_pBundleInfo;
 
     protected:
         void SetUp()
         {
             TestWithMock::SetUp();
             m_pResourceContainer = ResourceContainerImpl::getImplInstance();
-            m_pBundleInfo = BundleInfo::build();
+            m_pBundleInfo = RCSBundleInfo::build();
         }
 };