easy-setup: Rename header to EasySetup.hpp 15/110915/1
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Tue, 17 Jan 2017 08:48:05 +0000 (09:48 +0100)
committerPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 18 Jan 2017 13:42:43 +0000 (14:42 +0100)
Prevent potential name clash on case insensitive filesystems:

./service/easy-setup/mediator/richsdk/inc/EasySetup.h
./service/easy-setup/enrollee/inc/easysetup.h

Mediator one is C++ so we rename it to .hpp

Change-Id: I6d784378b5065b162d06abb2338bf70e0147d864
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16479
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 98b92dae54a9244e1947937fcf7432ac38956659)
Origin: https://gerrit.iotivity.org/gerrit/#/c/16481/
pp

service/easy-setup/enrollee/unittests/ESMediatorSimulator.h
service/easy-setup/mediator/richsdk/SConscript
service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/jni/JniEasySetup.h
service/easy-setup/mediator/richsdk/inc/EasySetup.h [deleted file]
service/easy-setup/mediator/richsdk/inc/EasySetup.hpp [new file with mode: 0755]
service/easy-setup/mediator/richsdk/src/EasySetup.cpp
service/easy-setup/mediator/richsdk/unittests/ESMediatorTest.cpp
service/easy-setup/sampleapp/mediator/linux/richsdk_sample/mediator_cpp.cpp

index db1159f40d038dfb11fff11f04a5e3208147c5e3..392cf6c7f9435b15018149243290bc808798d085 100755 (executable)
@@ -27,7 +27,7 @@
 #include "OCApi.h"
 #include "oic_malloc.h"
 
-#include "EasySetup.h"
+#include "EasySetup.hpp"
 #include "ESRichCommon.h"
 
 #include "ocrandom.h"
index fef80d1971a0d3f4917218f70b933fa4d7f446d4..6a39b74a7215e88b353983f5cca5ee426e2c7df7 100755 (executable)
@@ -146,7 +146,7 @@ if target_os in ['android','linux','ios']:
                easy_setup_env.InstallTarget(es_sdk_shared, 'libESMediatorRich')
                easy_setup_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libESMediatorRich.so'])
 
-filenames = [ 'ESRichCommon.h', 'EasySetup.h', 'RemoteEnrollee.h' ]
+filenames = [ 'ESRichCommon.h', 'EasySetup.hpp', 'RemoteEnrollee.h' ]
 for filename in filenames:
        easy_setup_env.UserInstallTargetHeader('inc/' + filename, "service/easy-setup", filename)
 
index d4e6391f83600f853b3840ac966e5c1c288aba14..049ee89cbff41541dcc475baa930ef2a9e891769 100755 (executable)
@@ -28,7 +28,7 @@
 
 #include <jni.h>
 
-#include "EasySetup.h"
+#include "EasySetup.hpp"
 #include "RemoteEnrollee.h"
 #include "ESException.h"
 #include "oic_string.h"
@@ -57,4 +57,4 @@ Java_org_iotivity_service_easysetup_mediator_EasySetup_nativeCreateRemoteEnrolle
 #ifdef __cplusplus
 }
 #endif
-#endif // __JNI_ES_EASYSETUP_H
\ No newline at end of file
+#endif // __JNI_ES_EASYSETUP_H
diff --git a/service/easy-setup/mediator/richsdk/inc/EasySetup.h b/service/easy-setup/mediator/richsdk/inc/EasySetup.h
deleted file mode 100755 (executable)
index 531971d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-//******************************************************************
-//
-// 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 "ESRichCommon.h"
-#include "RemoteEnrollee.h"
-
-using namespace OC;
-namespace OIC
-{
-    namespace Service
-    {
-        class RemoteEnrollee;
-
-        /**
-         * This provides an API to instanciate a new RemoteEnrollee object correspondent to Enrollee
-         * Device to be setup.
-         */
-        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 instance.
-             *
-             * @param enrolleeResource an OCResource object corresponding to enrollee resource
-             *        discovered in a network. The OCResource object can be obtained by calling
-             *        OCPlatform.findResource() API. What resource you have to discover with
-             *        the OCPlatform.findResource() API is a "provisioning" resource with a certain
-             *        resource type, i.e. oic.wk.prov
-             *
-             * @throws ESBadRequestException If createEnrolleeDevice is invoked with the same
-             *         provisioning information.
-             *
-             * @return Pointer to RemoteEnrollee instance.
-             */
-            std::shared_ptr<RemoteEnrollee> createRemoteEnrollee(
-                                        std::shared_ptr< OC::OCResource > enrolleeResource);
-
-        private:
-            EasySetup();
-            ~EasySetup();
-
-        private:
-            std::shared_ptr< OC::OCResource > m_ocResource;
-            static EasySetup *s_instance;
-        };
-    }
-}
-
-#endif /* EASYSETUP_H_ */
diff --git a/service/easy-setup/mediator/richsdk/inc/EasySetup.hpp b/service/easy-setup/mediator/richsdk/inc/EasySetup.hpp
new file mode 100755 (executable)
index 0000000..5cfe9f5
--- /dev/null
@@ -0,0 +1,78 @@
+//******************************************************************
+//
+// 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_HPP_
+#define EASYSETUP_HPP_
+
+#include <memory>
+#include <vector>
+
+#include "ESRichCommon.h"
+#include "RemoteEnrollee.h"
+
+using namespace OC;
+namespace OIC
+{
+    namespace Service
+    {
+        class RemoteEnrollee;
+
+        /**
+         * This provides an API to instanciate a new RemoteEnrollee object correspondent to Enrollee
+         * Device to be setup.
+         */
+        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 instance.
+             *
+             * @param enrolleeResource an OCResource object corresponding to enrollee resource
+             *        discovered in a network. The OCResource object can be obtained by calling
+             *        OCPlatform.findResource() API. What resource you have to discover with
+             *        the OCPlatform.findResource() API is a "provisioning" resource with a certain
+             *        resource type, i.e. oic.wk.prov
+             *
+             * @throws ESBadRequestException If createEnrolleeDevice is invoked with the same
+             *         provisioning information.
+             *
+             * @return Pointer to RemoteEnrollee instance.
+             */
+            std::shared_ptr<RemoteEnrollee> createRemoteEnrollee(
+                                        std::shared_ptr< OC::OCResource > enrolleeResource);
+
+        private:
+            EasySetup();
+            ~EasySetup();
+
+        private:
+            std::shared_ptr< OC::OCResource > m_ocResource;
+            static EasySetup *s_instance;
+        };
+    }
+}
+
+#endif /* EASYSETUP_HPP_ */
index 73eab320c838ce7fc41b82aa38188f9df8368f1b..a579a0f257f1d9bd3aeb640d0e9499dd0601863b 100755 (executable)
@@ -18,7 +18,7 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "EasySetup.h"
+#include "EasySetup.hpp"
 
 #include "OCPlatform.h"
 #include "logger.h"
index cb1d8eeb7c687438168e25452fa05625747e4a5b..f0931f09e6d7914aed98af3e181321f61ef44c04 100755 (executable)
@@ -29,7 +29,7 @@
 #include "ESEnrolleeSimulator.h"
 #include "escommon.h"
 #include "ESRichCommon.h"
-#include "EasySetup.h"
+#include "EasySetup.hpp"
 #include "RemoteEnrollee.h"
 
 #include "ESEnrolleeCommon.h"
index 9452a3e810804ae29b6e6a213e325f8ec933d0f2..dbd85ef240c0f83aeb5c81019717dea853ae585b 100755 (executable)
@@ -25,7 +25,7 @@
 #include "OCApi.h"
 #include "OCProvisioningManager.hpp"
 
-#include "EasySetup.h"
+#include "EasySetup.hpp"
 #include "ESRichCommon.h"
 
 #define ES_SAMPLE_APP_TAG "ES_SAMPLE_APP_TAG"