Update comments in Things Manager for doxygen
authorJihun Ha <jihun.ha@samsung.com>
Tue, 24 Mar 2015 08:06:40 +0000 (17:06 +0900)
committerUze Choi <uzchoi@samsung.com>
Wed, 25 Mar 2015 00:46:49 +0000 (00:46 +0000)
For generating an API document of Things manager by doxygen,
I have updated the existing comments.

Change-Id: I4d3164d4b145f96f62eac5ecce850005ef7cda8c
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/555
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/things-manager/sdk/inc/ActionSet.h
service/things-manager/sdk/inc/ThingsManager.h [changed mode: 0644->0755]
service/things-manager/sdk/src/ThingsConfiguration.h

index c3e8331..7c95953 100755 (executable)
@@ -41,16 +41,31 @@ enum ACTIONSET_TYPE
 
 typedef tm OCTime;
 
+/**
+ * @class      Time
+ * @brief      This class provides time-related information used for scheduled/recursive group action
+ *          features. Along with time-related variables, it also provides various useful functionality
+ *          including translating time to second unit
+ */
 class Time
 {
 public:
+    /**
+     * Constructor for Time
+     */
+    Time();
+    /**
+     * Virtual destructor for Time
+     */
+    ~Time();
+
+    /** @brief a unit of second.*/
     long int mDelay;
+    /** @brief time information in structure tm.*/
     OCTime mTime;
+    /** @brief flag to indicate group action type(NONE, SCHEDULED, RECURSIVE).*/
     ACTIONSET_TYPE type;
 
-    Time();
-    ~Time();
-
     void setTime(OCTime t);
     void setTime(unsigned int yy, unsigned int mm, unsigned int dd,
             unsigned int h, unsigned int m, unsigned int s,
@@ -69,23 +84,47 @@ public:
     std::string toString() const;
 };
 
+/**
+ * @class      Capability
+ * @brief      This class provides a structure to help developers to easily specify a unit of attribute
+ *          key-value pair which corresponds to action.
+ */
 class Capability
 {
 public:
+    /** @brief This corresponds with attribute key.*/
     std::string capability;
+    /** @brief This corresponds with attribute value.*/
     std::string status;
 };
 
+/**
+ * @class      Action
+ * @brief      This class provides a structure to help developers to easily specify an action which a
+ *          target resource have to do for.
+ */
 class Action
 {
 public:
+    /**
+     * Constructor for Action
+     */
     Action();
+    /**
+     * Virtual destructor for Action
+     */
     ~Action();
 
+    /** @brief This is a target URL of this action. It includes IP address, port, and resource URI.*/
     std::string target;
+    /** @brief This is a list of capabilites.*/
     std::vector<Capability*> listOfCapability;
 };
 
+/**
+ * @class      ActionSet
+ * @brief      This class provides a structure to help developers to easily specify group action.
+ */
 class ActionSet: public Time
 {
 public:
@@ -98,7 +137,9 @@ public:
      */
     ~ActionSet();
 
+    /** @brief a name of group action */
     std::string actionsetName;
+    /** @brief a list of actions composing group action */
     std::vector<Action*> listOfAction;
 };
 }
old mode 100644 (file)
new mode 100755 (executable)
index 6bc0f92..1aa9465
@@ -74,7 +74,7 @@ namespace OIC
          */
         OCStackResult findCandidateResources(std::vector< std::string > resourceTypes,
                 std::function< void(std::vector< std::shared_ptr< OCResource > >) > callback,
-                int waitsec = -1);
+                int waitsec);
 
         /**
          * API for subscribing child's state.
@@ -91,10 +91,10 @@ namespace OIC
                 std::function< void(std::string, OCStackResult) > callback);
 
         /**
-         * API for register and bind resource to group.
+         * API for registering and binding resource to group.
          *
          * @param childHandle - child resource handle. It will be filled from resource param.
-         * @param resource - resource for register and bind to group. It has all data.
+         * @param resource - resource for registering and binding to group. It has all data.
          * @param collectionHandle - collection resource handle. It will be added child resource.
          *
          * @return OCStackResult - return value of this API.
@@ -119,8 +119,8 @@ namespace OIC
          * @return OCStackResult - return value of this API.
          *                         It returns OC_STACK_OK if success.
          *
-         * NOTE: It return OC_STACK ERROR when It was finding a group.
-         *       You should call this api when the group finding process has stopped.
+         * NOTE: It return OC_STACK ERROR when it is already finding a group.
+         *       You should call this api after the group finding process has stopped.
          *       OCStackResult is defined in ocstack.h.
          */
         OCStackResult findGroup(std::vector< std::string > collectionResourceTypes,
@@ -219,12 +219,10 @@ namespace OIC
         /**
          * API for getting a list of joined groups.
          *
-         * @param void
-         *
          * @return std::map - return value of this API.
          *                  It returns group resource type and group resource handle as a map type.
          */
-        std::map< std::string, OCResourceHandle > getGroupList(void);
+        std::map< std::string, OCResourceHandle > getGroupList();
 
         // Things Configuration
 
@@ -244,8 +242,8 @@ namespace OIC
          * function, which provides the list in JSON format.
          *
          * @param resource - resource pointer representing the target group or the single thing.
-         * @param configurations - ConfigurationUnit: a nickname of attribute of target resource
-         *                         (e.g., installedlocation, currency, (IP)address)
+         * @param configurations - ConfigurationUnit: an attribute key of target resource.
+         *                         (e.g., loc, st, c, r)
          *                         Value : a value to be updated
          * @param callback - callback for updateConfigurations.
          *
@@ -266,7 +264,7 @@ namespace OIC
          * Callback is called when a response arrives.
          *
          * @param resource - resource pointer representing the target group or the single thing.
-         * @param configurations - ConfigurationUnit: a nickname of attribute of target resource.
+         * @param configurations - ConfigurationUnit: an attribute key of target resource.
          * @param callback - callback for getConfigurations.
          *
          * @return OCStackResult - return value of this API.
@@ -281,7 +279,7 @@ namespace OIC
                                 const int eCode) > callback);
 
         /**
-         * API for showing the list of supported configuration units (configurable parameters)
+         * API for showing the list of supported configuration units (attribute keys)
          * Callback is called when a response arrives.
          *
          * @param void
@@ -292,7 +290,7 @@ namespace OIC
 
         /**
          * API for boostrapping system configuration parameters from a bootstrap server.
-         * Callback call when a response from the bootstrap server arrives.
+         * Callback is called when a response from the bootstrap server arrives.
          *
          * @param callback - callback for doBootstrap.
          *
@@ -347,21 +345,21 @@ namespace OIC
         // Group Action.
 
         /**
-         * API for extracting Action Set string from the Action Set class instance
+         * API for extracting an action set string from the ActionSet class instance
          *
-         * @param newActionSet - pointer of Action Set
+         * @param newActionSet - pointer of ActionSet class instance
          *
          * @return std::string - return value of this API.
-         *                                          It returns Action Set String.
+         *                                          It returns an action set String.
          *
          * NOTE: OCStackResult is defined in ocstack.h.
          */
         std::string getStringFromActionSet(const ActionSet *newActionSet);
 
         /**
-         * API for extrracting Action Set class instance from Action Set String.
+         * API for extrracting ActionSet class instance from an action set string.
          *
-         * @param desc - description of Action set
+         * @param desc - description of an action set string
          *
          * @return ActionSet* - return value of this API.
          *                      It returns pointer of ActionSet.
@@ -369,11 +367,11 @@ namespace OIC
         ActionSet* getActionSetfromString(std::string desc);
 
         /**
-         * API for adding an Action Set.
+         * API for adding an action set.
          * Callback is called when the response of PUT operation arrives.
          *
          * @param resource - resource pointer of the group resource
-         * @param newActionSet - pointer of Action Set
+         * @param newActionSet - pointer of ActionSet class instance
          * @param callback - callback for PUT operation.
          *
          * @return OCStackResult - return value of this API.
@@ -385,11 +383,11 @@ namespace OIC
                 const ActionSet* newActionSet, PutCallback cb);
 
         /**
-         * API for executing the Action Set.
+         * API for executing an existing action set.
          * Callback is called when the response of  POST operation arrives.
          *
          * @param resource - resource pointer of the group resource
-         * @param actionsetName - Action Set name for executing the Action set
+         * @param actionsetName - the action set name for executing the action set
          * @param callback - callback for POST operation.
          *
          * @return OCStackResult - return value of this API.
@@ -401,12 +399,12 @@ namespace OIC
                 std::string actionsetName, PostCallback cb);
 
         /**
-         * API for executing the Action Set.
+         * API for executing an existing action set.
          * Callback is called when the response of  POST operation arrives.
          *
          * @param resource - resource pointer of the group resource
-         * @param actionsetName - Action Set name for executing the Action set
-         * @param delay - waiting time for until action set run.
+         * @param actionsetName - the action set name for executing the action set
+         * @param delay - waiting time for until the action set run.
          * @param callback - callback for POST operation.
          *
          * @return OCStackResult - return value of this API.
@@ -418,11 +416,11 @@ namespace OIC
                 std::string actionsetName, long int delay, PostCallback cb);
 
         /**
-         * API for canceling the Action Set.
+         * API for canceling an existing action set.
          * Callback is called when the response of POST operation arrives.
          *
          * @param resource - resource pointer of the group resource
-         * @param actionsetName - Action Set name for executing the Action set
+         * @param actionsetName - the action set name for executing the action set
          * @param callback - callback for POST operation.
          *
          * @return OCStackResult - return value of this API.
@@ -433,11 +431,11 @@ namespace OIC
         OCStackResult cancelActionSet(std::shared_ptr< OCResource > resource,
                 std::string actionsetName, PostCallback cb);
         /**
-         * API for reading the Action Set.
-         * Callback is called when the response of  GET operation arrives.
+         * API for reading an existing action set.
+         * Callback is called when the response of GET operation arrives.
          *
          * @param resource - resource pointer of the group resource
-         * @param actionsetName - Action Set name for reading the Action set
+         * @param actionsetName - the action set name for reading the action set
          * @param callback - callback for GET operation.
          *
          * @return OCStackResult - return value of this API.
@@ -449,11 +447,11 @@ namespace OIC
                 std::string actionsetName, GetCallback cb);
 
         /**
-         * API for removing the Action Set.
+         * API for removing an existing action set.
          * Callback is called when the response of  POST operation arrives.
          *
          * @param resource - resource pointer of the group resource
-         * @param actionsetName - Action Set name for removing the Action set
+         * @param actionsetName - the action set name for removing the action set
          * @param callback - callback for POST operation.
          *
          * @return OCStackResult - return value of this API.
index a753440..ccf90d4 100755 (executable)
@@ -141,8 +141,8 @@ namespace OIC
          * updateConfiguration()->...(CoAP msg. is transmitted)->OnPut()->callback function in APP.
          *
          * @param resource - resource pointer representing the target group or the single thing.
-         * @param configurations - ConfigurationUnit: a nickname of attribute of target resource
-         *                         (e.g., installedlocation, currency, (IP)address)
+         * @param configurations - ConfigurationUnit: an attribute key of target resource
+         *                         (e.g., loc, st, c, r)
          *                         Value : a value to be updated
          * @param callback - callback.
          *
@@ -166,7 +166,7 @@ namespace OIC
          * getConfigurations()->...(CoAP msg. is transmitted)->onGet()->callback function in APP.
          *
          * @param resource - resource pointer representing the target group or the single thing.
-         * @param configurations - ConfigurationUnit: a nickname of attribute of target resource.
+         * @param configurations - ConfigurationUnit: an attribute key of target resource.
          * @param callback - callback.
          *
          * @return OCStackResult return value of this API. Returns OC_STACK_OK if success.