Restructuring of the easy-setup service.
[platform/upstream/iotivity.git] / service / easy-setup / mediator / richsdk / inc / EasySetup.h
@@ -1,78 +1,79 @@
-//******************************************************************\r
-//\r
-// Copyright 2015 Samsung Electronics All Rights Reserved.\r
-//\r
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
-//\r
-// Licensed under the Apache License, Version 2.0 (the "License");\r
-// you may not use this file except in compliance with the License.\r
-// You may obtain a copy of the License at\r
-//\r
-//      http://www.apache.org/licenses/LICENSE-2.0\r
-//\r
-// Unless required by applicable law or agreed to in writing, software\r
-// distributed under the License is distributed on an "AS IS" BASIS,\r
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-// See the License for the specific language governing permissions and\r
-// limitations under the License.\r
-//\r
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
-\r
-#ifndef EASYSETUP_H_\r
-#define EASYSETUP_H_\r
-\r
-#include <memory>\r
-#include <vector>\r
-\r
-#include "escommon.h"\r
-#include "RemoteEnrollee.h"\r
-\r
-namespace OIC\r
-{\r
-    namespace Service\r
-    {\r
-        class RemoteEnrollee;\r
-\r
-        /**\r
-         * This provides methods for Mediator devices to perform EasySetup of Enrollee devices.\r
-         * EasySetup involves\r
-         * 1) Ownership transfer for enabling secured communication between Mediator and Enrollee\r
-         * devices.\r
-         * 2) Provisioning of Enrollee devices using the credentails of target Enroller devices.\r
-         */\r
-        class EasySetup\r
-        {\r
-        public:\r
-            /**\r
-             * API for getting the instance of EasySetup singleton class.\r
-             * @return EasySetup instance.\r
-             */\r
-            static EasySetup* getInstance();\r
-\r
-            /**\r
-             * This API is used for creating a remote Enrollee device instance.\r
-             * @param enrolleeNWProvIndo Provisioning information for configuring the Enrollee.\r
-             *\r
-             * @throws ESBadRequestException If createEnrolleeDevice is invoked with the same\r
-             *         provisioning information.\r
-             *\r
-             * @return Pointer to RemoteEnrollee instance.\r
-             */\r
-            std::shared_ptr<RemoteEnrollee> createEnrolleeDevice (\r
-                                            const EnrolleeNWProvInfo& enrolleeNWProvInfo);\r
-        private:\r
-            EasySetup();\r
-            ~EasySetup();\r
-\r
-            RemoteEnrollee::shared_ptr findDeviceInProvisioningList(\r
-                                const EnrolleeNWProvInfo& enrolleeNWProvInfo);\r
-            bool addDeviceToProvisioningList(const RemoteEnrollee::shared_ptr remoteEnrollee);\r
-            bool deleteDeviceFromProvisioningList (const EnrolleeNWProvInfo& enrolleeNWProvInfo);\r
-\r
-            std::vector< RemoteEnrollee::shared_ptr > m_activeEnrolleeList;\r
-            static EasySetup *s_instance;\r
-        };\r
-    }\r
-}\r
-\r
-#endif /* EASYSETUP_H_ */\r
+//******************************************************************
+//
+// Copyright 2015 Samsung Electronics All Rights Reserved.
+//
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+#ifndef EASYSETUP_H_
+#define EASYSETUP_H_
+
+#include <memory>
+#include <vector>
+
+#include "escommon.h"
+#include "Utility.h"
+#include "RemoteEnrollee.h"
+
+namespace OIC
+{
+    namespace Service
+    {
+        class RemoteEnrollee;
+
+        /**
+         * This provides methods for Mediator devices to perform EasySetup of Enrollee devices.
+         * EasySetup involves
+         * 1) Ownership transfer for enabling secured communication between Mediator and Enrollee
+         * devices.
+         * 2) Provisioning of Enrollee devices using the credentails of target Enroller devices.
+         */
+        class EasySetup
+        {
+        public:
+            /**
+             * API for getting the instance of EasySetup singleton class.
+             * @return EasySetup instance.
+             */
+            static EasySetup* getInstance();
+
+            /**
+             * This API is used for creating a remote Enrollee device instance.
+             * @param enrolleeNWProvIndo Provisioning information for configuring the Enrollee.
+             *
+             * @throws ESBadRequestException If createEnrolleeDevice is invoked with the same
+             *         provisioning information.
+             *
+             * @return Pointer to RemoteEnrollee instance.
+             */
+            std::shared_ptr<RemoteEnrollee> createEnrolleeDevice (
+                                            const EnrolleeNWProvInfo& enrolleeNWProvInfo);
+        private:
+            EasySetup();
+            ~EasySetup();
+
+            RemoteEnrollee::shared_ptr findDeviceInProvisioningList(
+                                const EnrolleeNWProvInfo& enrolleeNWProvInfo);
+            bool addDeviceToProvisioningList(const RemoteEnrollee::shared_ptr remoteEnrollee);
+            bool deleteDeviceFromProvisioningList (const EnrolleeNWProvInfo& enrolleeNWProvInfo);
+
+            std::vector< RemoteEnrollee::shared_ptr > m_activeEnrolleeList;
+            static EasySetup *s_instance;
+        };
+    }
+}
+
+#endif /* EASYSETUP_H_ */