Add comments on bundle API headers for doxygen
authorMinji Park <minjii.park@samsung.com>
Wed, 8 Jul 2015 07:59:27 +0000 (16:59 +0900)
committerUze Choi <uzchoi@samsung.com>
Thu, 9 Jul 2015 01:11:58 +0000 (01:11 +0000)
Change-Id: I1bc859e37631a28fac7ce92d87b38c730c8457e6
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1579
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
service/resource-manipulation/modules/resourceContainer/bundle-api/include/BundleActivator.h
service/resource-manipulation/modules/resourceContainer/bundle-api/include/BundleResource.h
service/resource-manipulation/modules/resourceContainer/bundle-api/include/NotificationReceiver.h
service/resource-manipulation/modules/resourceContainer/bundle-api/include/ProtocolBridgeConnector.h
service/resource-manipulation/modules/resourceContainer/bundle-api/include/ProtocolBridgeResource.h
service/resource-manipulation/modules/resourceContainer/bundle-api/include/ResourceContainerBundleAPI.h
service/resource-manipulation/modules/resourceContainer/bundle-api/include/SoftSensorResource.h

index eeae19c..c98b0fd 100644 (file)
@@ -29,15 +29,45 @@ namespace OIC
 {
     namespace Service
     {
+
+        /**
+        * @class    BundleActivator
+        * @brief    This class represents Bundle to be activated by container
+        *
+        */
         class BundleActivator
         {
 
-        public:
-            BundleActivator();
-            virtual ~BundleActivator();
-            virtual void activateBundle(ResourceContainerBundleAPI *resourceContainer,
-                    std::string bundleId);
-            virtual void deactivateBundle();
+            public:
+
+                /**
+                * Constructor for BundleActivator
+                */
+                BundleActivator();
+
+                /**
+                * Virtual destructor for BundleActivator
+                */
+                virtual ~BundleActivator();
+
+                /**
+                * Activate the Bundle to make bundle work and create bundle resources
+                *
+                * @param resourceContainer - resourceContainer which registered the bundle
+                *
+                * @param bundleId - assigned id for the bundle
+                *
+                * @return void
+                */
+                virtual void activateBundle(ResourceContainerBundleAPI *resourceContainer,
+                                            std::string bundleId);
+
+                /**
+                * Deactivate the Bundle to stop working and destroy bundle resources
+                *
+                * @return void
+                */
+                virtual void deactivateBundle();
         };
     }
 }
index da0e793..f45682a 100644 (file)
@@ -34,18 +34,70 @@ namespace OIC
 {
     namespace Service
     {
+
+        /**
+        * @class    BundleResource
+        * @brief    This class represents Basic bundle resource template
+        *               to be registered in the container and make resource server
+        *
+        */
         class BundleResource
         {
             public:
+
+                /**
+                * Constructor for BundleResource
+                */
                 BundleResource();
+
+                /**
+                * Virtual destructor for BundleResource
+                */
                 virtual ~BundleResource();
 
-                // TODO use type variant mechanism
+                /**
+                * Execute the logic of bundle to get the value of attribute
+                *
+                * @param attributeName - name of attribute to get
+                *
+                * @return string - return value of the attribute
+                *
+                * @todo use type variant mechanism
+                */
                 virtual string getAttribute(string attributeName);
+
+                /**
+                * Execute the logic of bundle to set the value of attribute
+                *
+                * @param attributeName - name of attribute to set
+                *
+                * @param value - value of attribute to set
+                *
+                * @return void
+                */
                 virtual void setAttribute(string attributeName, string value);
+
+                /**
+                * Return the list of attribute names of the resource
+                *
+                * @return std::list - return list of the attribute names
+                */
                 std::list<string> getAttributeNames();
+
+                /**
+                * Initialize attributes of the resource
+                *
+                * @return void
+                */
                 virtual void initAttributes() = 0;
 
+                /**
+                * Register notification receiver(resource container) to notify for the changes of attributes
+                *
+                * @param pNotiReceiver - Notification Receiver to get notification from bundle resource
+                *
+                * @return void
+                */
                 void registerObserver(NotificationReceiver *pNotiReceiver);
 
             public:
index 2fe264f..cc9ea7c 100644 (file)
@@ -27,12 +27,32 @@ namespace OIC
 {
     namespace Service
     {
+
+        /**
+        * @class    NotificationReceiver
+        * @brief    This class represents Notification Receiver to get notification
+        *               from bundle resources if there's any changes of attribute state
+        *
+        */
         class NotificationReceiver
         {
             public:
+
+                /**
+                * Constructor for NotificationReceiver
+                */
                 NotificationReceiver() {};
+
+                /**
+                * destructor for NotificationReceiver
+                */
                 ~NotificationReceiver() {};
 
+                /**
+                * Callback method for getting notification from bundle resources
+                *
+                * @return void
+                */
                 virtual void onNotificationReceived(std::string strResourceUri) = 0;
         };
     }
index 88d033b..a0b3196 100644 (file)
@@ -29,13 +29,40 @@ namespace OIC
 {
     namespace Service
     {
+
+        /**
+        * @class    ProtocolBridgeConnector
+        * @brief    This class represents connector for Protocol Bridge
+        *               to
+        *
+        */
         class ProtocolBridgeConnector
         {
-        public:
-            ProtocolBridgeConnector();
-            virtual ~ProtocolBridgeConnector();
-            virtual void connect() = 0;
-            virtual void disconnect() = 0;
+            public:
+
+                /**
+                * Constructor for ProtocolBridgeConnector
+                */
+                ProtocolBridgeConnector();
+
+                /**
+                * Virtual destructor for ProtocolBridgeConnector
+                */
+                virtual ~ProtocolBridgeConnector();
+
+                /**
+                * Execute the logic needed for connection with diffrent protocol from IoTivity
+                *
+                * @return void
+                */
+                virtual void connect() = 0;
+
+                /**
+                * Execute the logic needed for disconnection with diffrent protocol from IoTivity
+                *
+                * @return void
+                */
+                virtual void disconnect() = 0;
         };
     }
 }
index 10e96b1..98ef4e1 100644 (file)
@@ -29,13 +29,48 @@ namespace OIC
 {
     namespace Service
     {
+
+        /**
+        * @class    ProtocolBridgeResource
+        * @brief    This class represents bundle resource template for Protocol Bridge
+        *               to be registered in the container and make resource server
+        *
+        */
         class ProtocolBridgeResource: public BundleResource
         {
-        public:
-            ProtocolBridgeResource();
-            virtual ~ProtocolBridgeResource();
-            virtual string getAttribute(string attributeName) = 0;
-            virtual void setAttribute(string attributeName, string value) = 0;
+            public:
+
+                /**
+                * Constructor for ProtocolBridgeResource
+                */
+                ProtocolBridgeResource();
+
+                /**
+                * Virtual destructor for ProtocolBridgeResource
+                */
+                virtual ~ProtocolBridgeResource();
+
+                /**
+                * Execute the logic of bundle to get the value of attribute
+                *
+                * @param attributeName - name of attribute to get
+                *
+                * @return string - return value of the attribute
+                *
+                * @todo use type variant mechanism
+                */
+                virtual string getAttribute(string attributeName) = 0;
+
+                /**
+                * Execute the logic of bundle to set the value of attribute
+                *
+                * @param attributeName - name of attribute to set
+                *
+                * @param value - value of attribute to set
+                *
+                * @return void
+                */
+                virtual void setAttribute(string attributeName, string value) = 0;
         };
     }
 }
index 7b15010..a66d1b1 100644 (file)
@@ -40,14 +40,65 @@ namespace OIC
         class ResourceContainerBundleAPI: public NotificationReceiver
         {
             public:
+
+                /**
+                * Constructor for ResourceContainerBundleAPI
+                */
                 ResourceContainerBundleAPI();
+
+                /**
+                * Virtual destructor for ResourceContainerBundleAPI
+                */
                 virtual ~ResourceContainerBundleAPI();
+
+                /**
+                * Register bundle resource in the container
+                *   and register resource server for bundle resource
+                *
+                * @param resource - bundle resource to register
+                *
+                * @return void
+                */
                 virtual void registerResource(BundleResource *resource) = 0;
+
+                /**
+                * Unregister bundle resource from the container
+                *   and unregister resource server
+                *
+                * @param resource - bundle resource to unregister
+                *
+                * @return void
+                */
                 virtual void unregisterResource(BundleResource *resource) = 0;
+
+                /**
+                * Get Configuration data of certain bundle
+                *
+                * @param [in] bundleId - bundle id to get configuration data
+                *
+                * @param [out] configOutput - returned configuration data
+                *
+                * @return void
+                */
                 virtual void getBundleConfiguration(std::string bundleId, configInfo *configOutput) = 0;
+
+                /**
+                * Get the list of Configuration data of resources that certain bundle has
+                *
+                * @param [in] bundleId - bundle id to get configuration data
+                *
+                * @param [out] configOutput - returned resource configuration data vector
+                *
+                * @return void
+                */
                 virtual void getResourceConfiguration(std::string bundleId,
                                                       std::vector< resourceInfo > *configOutput) = 0;
 
+                /**
+                * API for getting an instance of ResourceContainerBundleAPI
+                *
+                * @return ResourceContainerBundleAPI * - return the object pointer of ResourceContainerBundleAPI
+                */
                 static ResourceContainerBundleAPI *getInstance();
         };
     }
index 277529e..4a812c6 100644 (file)
@@ -27,6 +27,13 @@ namespace OIC
 {
     namespace Service
     {
+
+        /**
+        * @class    SoftSensorResource
+        * @brief    This class represents bundle resource for Soft Sensor
+        *               to be registered in the container and make resource server
+        *
+        */
         class SoftSensorResource: public BundleResource
         {
             public:
@@ -36,14 +43,48 @@ namespace OIC
                     vector< map< string, string > > data;
                 };
 
+                /**
+                * Constructor for SoftSensorResource
+                */
                 SoftSensorResource();
+
+                /**
+                * Virtual destructor for SoftSensorResource
+                */
                 virtual ~SoftSensorResource();
 
+                /**
+                * Execute the logic of bundle to get the value of attribute
+                *
+                * @param attributeName - name of attribute to get
+                *
+                * @return string - return value of the attribute
+                *
+                * @todo use type variant mechanism
+                */
                 virtual string getAttribute(string attributeName) = 0;
+
+                /**
+                * Execute the logic of bundle to set the value of attribute
+                *
+                * @param attributeName - name of attribute to set
+                *
+                * @param value - value of attribute to set
+                *
+                * @return void
+                */
                 virtual void setAttribute(string attributeName, string value) = 0;
 
+                /**
+                * Set Input data to update output value of the soft sensor
+                *
+                * @param inputs - input data which soft sensor needed
+                *
+                * @return void
+                */
                 virtual void setInputAttribute(SensorData inputs) = 0;
 
+
                 int inputCount;
                 vector<string> m_vecInputAttributes;
                 map< string, SensorData > m_mapStoredInputData;