rename to resource-hosting from notification-manager.
authorjyong2.kim <jyong2.kim@samsung.com>
Mon, 28 Sep 2015 09:29:32 +0000 (18:29 +0900)
committerMadan Lanka <lanka.madan@samsung.com>
Tue, 29 Sep 2015 03:00:19 +0000 (03:00 +0000)
notification manager is only provide resource hosting feature.
and resource hosting feature break off notifcation manager.

Change-Id: I96a0a60df60e60c44ecb9935cb73250949993fb6
Signed-off-by: jyong2.kim <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3205
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
82 files changed:
service/SConscript
service/notification-manager/NotificationManager/build/linux/.gitignore [deleted file]
service/notification-manager/SampleApp/linux/SConscript [deleted file]
service/notification-manager/build/linux/release/.gitignore [deleted file]
service/notification-manager/build/tizen/CMakeLists.txt [deleted file]
service/resource-hosting/.gitignore [moved from service/notification-manager/.gitignore with 100% similarity]
service/resource-hosting/SConscript [moved from service/notification-manager/SConscript with 57% similarity]
service/resource-hosting/SampleApp/SConscript [moved from service/notification-manager/SampleApp/SConscript with 100% similarity]
service/resource-hosting/SampleApp/android/SampleConsumer/.classpath [moved from service/notification-manager/SampleApp/android/SampleConsumer/.classpath with 100% similarity]
service/resource-hosting/SampleApp/android/SampleConsumer/.project [moved from service/notification-manager/SampleApp/android/SampleConsumer/.project with 100% similarity]
service/resource-hosting/SampleApp/android/SampleConsumer/AndroidManifest.xml [moved from service/notification-manager/SampleApp/android/SampleConsumer/AndroidManifest.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleConsumer/project.properties [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/project.properties with 100% similarity, mode: 0644]
service/resource-hosting/SampleApp/android/SampleConsumer/res/layout/sampleconsumer_layout.xml [moved from service/notification-manager/SampleApp/android/SampleConsumer/res/layout/sampleconsumer_layout.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleConsumer/res/values/strings.xml [moved from service/notification-manager/SampleApp/android/SampleConsumer/res/values/strings.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleConsumer/src/com/example/sample/consumer/SampleConsumer.java [moved from service/notification-manager/SampleApp/android/SampleConsumer/src/com/example/sample/consumer/SampleConsumer.java with 100% similarity]
service/resource-hosting/SampleApp/android/SampleProviderApp/.classpath [moved from service/notification-manager/SampleApp/android/SampleProviderApp/.classpath with 100% similarity]
service/resource-hosting/SampleApp/android/SampleProviderApp/.project [moved from service/notification-manager/SampleApp/android/SampleProviderApp/.project with 100% similarity]
service/resource-hosting/SampleApp/android/SampleProviderApp/AndroidManifest.xml [moved from service/notification-manager/SampleApp/android/SampleProviderApp/AndroidManifest.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleProviderApp/project.properties [moved from service/notification-manager/SampleApp/android/SampleProviderApp/project.properties with 100% similarity]
service/resource-hosting/SampleApp/android/SampleProviderApp/res/layout/sampleprovider_layout.xml [moved from service/notification-manager/SampleApp/android/SampleProviderApp/res/layout/sampleprovider_layout.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleProviderApp/res/values/strings.xml [moved from service/notification-manager/SampleApp/android/SampleProviderApp/res/values/strings.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleProviderApp/src/com/example/sample/provider/IMessageLogger.java [moved from service/notification-manager/SampleApp/android/SampleProviderApp/src/com/example/sample/provider/IMessageLogger.java with 100% similarity]
service/resource-hosting/SampleApp/android/SampleProviderApp/src/com/example/sample/provider/SampleProvider.java [moved from service/notification-manager/SampleApp/android/SampleProviderApp/src/com/example/sample/provider/SampleProvider.java with 100% similarity]
service/resource-hosting/SampleApp/android/SampleProviderApp/src/com/example/sample/provider/StringConstants.java [moved from service/notification-manager/SampleApp/android/SampleProviderApp/src/com/example/sample/provider/StringConstants.java with 100% similarity]
service/resource-hosting/SampleApp/android/SampleProviderApp/src/com/example/sample/provider/TemperatureResource.java [moved from service/notification-manager/SampleApp/android/SampleProviderApp/src/com/example/sample/provider/TemperatureResource.java with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/AndroidManifest.xml [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/AndroidManifest.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/project.properties [moved from service/notification-manager/SampleApp/android/SampleConsumer/project.properties with 100% similarity, mode: 0755]
service/resource-hosting/SampleApp/android/SampleResourceHosting/res/drawable-hdpi/ic_launcher.png [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/res/drawable-hdpi/ic_launcher.png with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/res/drawable-mdpi/ic_launcher.png [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/res/drawable-mdpi/ic_launcher.png with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/res/drawable-xhdpi/ic_launcher.png [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/res/drawable-xhdpi/ic_launcher.png with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/res/drawable-xxhdpi/ic_launcher.png [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/res/drawable-xxhdpi/ic_launcher.png with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/res/layout/activity_main.xml [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/res/layout/activity_main.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/res/values-v11/styles.xml [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/res/values-v11/styles.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/res/values-v14/styles.xml [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/res/values-v14/styles.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/res/values/strings.xml [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/res/values/strings.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/res/values/styles.xml [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/res/values/styles.xml with 100% similarity]
service/resource-hosting/SampleApp/android/SampleResourceHosting/src/com/example/resourcehostingsampleapp/ResourceHostingSampleApp.java [moved from service/notification-manager/SampleApp/android/SampleResourceHosting/src/com/example/resourcehostingsampleapp/ResourceHostingSampleApp.java with 100% similarity]
service/resource-hosting/SampleApp/linux/SConscript [new file with mode: 0644]
service/resource-hosting/SampleApp/linux/sampleConsumer/SampleConsumer.cpp [moved from service/notification-manager/SampleApp/linux/sampleConsumer/SampleConsumer.cpp with 100% similarity]
service/resource-hosting/SampleApp/linux/sampleProvider/SampleProvider.cpp [moved from service/notification-manager/SampleApp/linux/sampleProvider/SampleProvider.cpp with 100% similarity]
service/resource-hosting/SampleApp/linux/sampleResourceHosting/main.cpp [moved from service/notification-manager/SampleApp/linux/notificationManager/main.cpp with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/.cproject [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/.cproject with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/.exportMap [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/.exportMap with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/.project [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/.project with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/.tproject [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/.tproject with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/edc_resource/hosting_control.edc [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/edc_resource/hosting_control.edc with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/inc/nmsampleapp.h [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/inc/nmsampleapp.h with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/inc/nmutil.h [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/inc/nmutil.h with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/res/ui_controls.edc [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/res/ui_controls.edc with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/shared/res/nmsampleapp.png [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/shared/res/nmsampleapp.png with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/src/main.cpp [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/src/main.cpp with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/src/nmsampleapp.cpp [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/src/nmsampleapp.cpp with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/src/nmutil.cpp [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/src/nmutil.cpp with 100% similarity]
service/resource-hosting/SampleApp/tizen/NMSampleApp/tizen-manifest.xml [moved from service/notification-manager/SampleApp/tizen/NMSampleApp/tizen-manifest.xml with 100% similarity]
service/resource-hosting/SampleApp/tizen/sampleConsumer/src/oicapp-client.cpp [moved from service/notification-manager/SampleApp/tizen/sampleConsumer/src/oicapp-client.cpp with 100% similarity]
service/resource-hosting/SampleApp/tizen/sampleConsumer/src/oicapp-log.h [moved from service/notification-manager/SampleApp/tizen/sampleConsumer/src/oicapp-log.h with 100% similarity]
service/resource-hosting/SampleApp/tizen/sampleConsumer/src/oicapp-sampleConsumer.c [moved from service/notification-manager/SampleApp/tizen/sampleConsumer/src/oicapp-sampleConsumer.c with 100% similarity]
service/resource-hosting/SampleApp/tizen/sampleConsumer/src/oicapp-sampleConsumer.h [moved from service/notification-manager/SampleApp/tizen/sampleConsumer/src/oicapp-sampleConsumer.h with 100% similarity]
service/resource-hosting/SampleApp/tizen/sampleConsumer/src/oicapp-utils.c [moved from service/notification-manager/SampleApp/tizen/sampleConsumer/src/oicapp-utils.c with 100% similarity]
service/resource-hosting/SampleApp/tizen/sampleConsumer/src/oicapp-utils.h [moved from service/notification-manager/SampleApp/tizen/sampleConsumer/src/oicapp-utils.h with 100% similarity]
service/resource-hosting/android/resource_hosting/.classpath [moved from service/notification-manager/NotificationManager/android/resource_hosting/.classpath with 100% similarity]
service/resource-hosting/android/resource_hosting/.project [moved from service/notification-manager/NotificationManager/android/resource_hosting/.project with 100% similarity]
service/resource-hosting/android/resource_hosting/AndroidManifest.xml [moved from service/notification-manager/NotificationManager/android/resource_hosting/AndroidManifest.xml with 100% similarity]
service/resource-hosting/android/resource_hosting/jni/Android.mk [moved from service/notification-manager/NotificationManager/android/resource_hosting/jni/Android.mk with 93% similarity]
service/resource-hosting/android/resource_hosting/jni/Application.mk [moved from service/notification-manager/NotificationManager/android/resource_hosting/jni/Application.mk with 100% similarity]
service/resource-hosting/android/resource_hosting/jni/ResourceHosing_JNI.cpp [moved from service/notification-manager/NotificationManager/android/resource_hosting/jni/ResourceHosing_JNI.cpp with 100% similarity]
service/resource-hosting/android/resource_hosting/jni/ResourceHosing_JNI.h [moved from service/notification-manager/NotificationManager/android/resource_hosting/jni/ResourceHosing_JNI.h with 100% similarity]
service/resource-hosting/android/resource_hosting/project.properties [moved from service/notification-manager/NotificationManager/android/resource_hosting/project.properties with 100% similarity]
service/resource-hosting/android/resource_hosting/src/org/iotivity/ResourceHosting/ResourceHosting.java [moved from service/notification-manager/NotificationManager/android/resource_hosting/src/org/iotivity/ResourceHosting/ResourceHosting.java with 98% similarity]
service/resource-hosting/include/hosting.h [moved from service/notification-manager/NotificationManager/include/hosting.h with 100% similarity]
service/resource-hosting/src/HostingObject.cpp [moved from service/notification-manager/NotificationManager/src/HostingObject.cpp with 100% similarity]
service/resource-hosting/src/HostingObject.h [moved from service/notification-manager/NotificationManager/src/HostingObject.h with 100% similarity]
service/resource-hosting/src/RequestObject.cpp [moved from service/notification-manager/NotificationManager/src/RequestObject.cpp with 100% similarity]
service/resource-hosting/src/RequestObject.h [moved from service/notification-manager/NotificationManager/src/RequestObject.h with 100% similarity]
service/resource-hosting/src/ResourceHosting.cpp [moved from service/notification-manager/NotificationManager/src/ResourceHosting.cpp with 66% similarity]
service/resource-hosting/src/ResourceHosting.h [moved from service/notification-manager/NotificationManager/src/ResourceHosting.h with 88% similarity]
service/resource-hosting/src/hosting.cpp [moved from service/notification-manager/NotificationManager/src/hosting.cpp with 100% similarity]
service/resource-hosting/src/unittest/HostingObjectUnitTest.cpp [moved from service/notification-manager/NotificationManager/src/unittest/HostingObjectUnitTest.cpp with 100% similarity]
service/resource-hosting/src/unittest/RequestObjectUnitTest.cpp [moved from service/notification-manager/NotificationManager/src/unittest/RequestObjectUnitTest.cpp with 100% similarity]
service/resource-hosting/src/unittest/ResourceEncapsulationTestSimulator.h [moved from service/notification-manager/NotificationManager/src/unittest/ResourceEncapsulationTestSimulator.h with 100% similarity]
service/resource-hosting/src/unittest/ResourceHostingUnitTest.cpp [moved from service/notification-manager/NotificationManager/src/unittest/ResourceHostingUnitTest.cpp with 100% similarity]
service/resource-hosting/src/unittest/SConscript [moved from service/notification-manager/NotificationManager/src/unittest/SConscript with 88% similarity]

index 098d0db..54c4acd 100644 (file)
@@ -31,7 +31,7 @@ if target_os not in ['arduino','darwin']:
     SConscript('things-manager/SConscript')
 
     # Build notification manager project
-    SConscript('notification-manager/SConscript')
+    SConscript('resource-hosting/SConscript')
 
     # Build resource-encapsulation project
     SConscript('resource-encapsulation/SConscript')
diff --git a/service/notification-manager/NotificationManager/build/linux/.gitignore b/service/notification-manager/NotificationManager/build/linux/.gitignore
deleted file mode 100644 (file)
index 23a40fb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-LinuxMain.o
-NotificationManager.o
-RegistrationManager.o
-ResourceManager.o
-SampleConsumer.o
-SampleProvider.o
-VirtualRepresentation.o
-NotificationManager
-SampleConsumer
-SampleProvider
-
diff --git a/service/notification-manager/SampleApp/linux/SConscript b/service/notification-manager/SampleApp/linux/SConscript
deleted file mode 100644 (file)
index 99e5260..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-##
-# NotificationManager build script
-##
-
-Import('env')
-
-lib_env = env.Clone()
-SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
-notimgr_env = lib_env.Clone()
-
-######################################################################
-# Build flags
-######################################################################
-notimgr_env.AppendUnique(CPPPATH = ['../../NotificationManager/include'])
-notimgr_env.AppendUnique(CPPPATH = ['../../../../extlibs/cjson'])
-notimgr_env.AppendUnique(CPPPATH = ['../../../../resource/csdk/connectivity/api'])
-notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
-notimgr_sample_env = notimgr_env.Clone()
-notimgr_env.AppendUnique(LIBS = [
-    'NotificationManager',
-    'rcs_client',
-    'rcs_server',
-    'rcs_common',
-    'oc',
-    'octbstack',
-    'oc_logger',
-    'connectivity_abstraction',
-    'coap',
-    'pthread'
-    ])
-notimgr_sample_env.AppendUnique(LIBS = [
-    'oc',
-    'octbstack',
-    'oc_logger',
-    'connectivity_abstraction',
-    'coap',
-    'pthread'
-    ])
-
-if env.get('SECURED') == '1':
-    notimgr_env.AppendUnique(LIBS = ['tinydtls'])
-    notimgr_sample_env.AppendUnique(LIBS = ['tinydtls'])
-if 'rt' in notimgr_env.get('LIBS'):
-    notimgr_env.Append(LIBS = ['rt'])
-if 'rt' in notimgr_sample_env.get('LIBS'):
-    notimgr_sample_env.Append(LIBS = ['rt'])
-
-####################################################################
-# Source files and Targets
-######################################################################
-sampleprovider = notimgr_sample_env.Program('sampleprovider', 'sampleProvider/SampleProvider.cpp')
-sampleconsumer = notimgr_sample_env.Program('sampleconsumer', 'sampleConsumer/SampleConsumer.cpp')
-
-notificationmanager = notimgr_env.Program('notificationmanager', 'notificationManager/main.cpp')
-
-#notimgr_sample_env.InstallTarget(sampleprovider, 'sampleprovider')
-#notimgr_sample_env.InstallTarget(sampleconsumer, 'sampleconsumer')
-#notimgr_env.InstallTarget(notificationmanager, 'notificationmanager')
\ No newline at end of file
diff --git a/service/notification-manager/build/linux/release/.gitignore b/service/notification-manager/build/linux/release/.gitignore
deleted file mode 100644 (file)
index a0eaab4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-NotificationManager
-SampleConsumer
-SampleProvider
-
diff --git a/service/notification-manager/build/tizen/CMakeLists.txt b/service/notification-manager/build/tizen/CMakeLists.txt
deleted file mode 100644 (file)
index 5238429..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-LINK_DIRECTORIES(${LIB_INSTALL_DIR})
-
-SET(NOTI_BASE_DIR "${BASE_SRC_DIR}/notification-manager")
-
-INCLUDE_DIRECTORIES(${INCLUDE_INSTALL_DIR}/oic)
-INCLUDE_DIRECTORIES(${INCLUDE_INSTALL_DIR}/oic/stack)
-INCLUDE_DIRECTORIES(${INCLUDE_INSTALL_DIR}/boost)
-INCLUDE_DIRECTORIES(${NOTI_BASE_DIR}/NotificationManager/include)
-
-SET(NOTIFICATIONMANAGER "NotificationManager")
-SET(EX_NOTIPROVIDER "SampleProvider")
-SET(EX_NOTICONSUMER "SampleConsumer")
-
-SET(EXTRA_CXXFLAGS "-std=c++0x")
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}")
-
-FILE(GLOB MANAGER_SRCS ${NOTI_BASE_DIR}/NotificationManager/src/*.cpp)
-
-ADD_EXECUTABLE(${NOTIFICATIONMANAGER} ${MANAGER_SRCS})
-TARGET_LINK_LIBRARIES(${NOTIFICATIONMANAGER} ${OCLIB} ${OCTBSTACK} pthread)
-INSTALL(TARGETS ${NOTIFICATIONMANAGER} DESTINATION ${BIN_INSTALL_DIR})
-
-ADD_EXECUTABLE(${EX_NOTIPROVIDER} ${NOTI_BASE_DIR}/SampleApp/linux/sampleProvider/SampleProvider.cpp)
-TARGET_LINK_LIBRARIES(${EX_NOTIPROVIDER} ${OCLIB} ${OCTBSTACK} pthread)
-INSTALL(TARGETS ${EX_NOTIPROVIDER} DESTINATION ${BIN_INSTALL_DIR})
-
-ADD_EXECUTABLE(${EX_NOTICONSUMER} ${NOTI_BASE_DIR}/SampleApp/linux/sampleConsumer/SampleConsumer.cpp)
-TARGET_LINK_LIBRARIES(${EX_NOTICONSUMER} ${OCLIB} ${OCTBSTACK} pthread)
-INSTALL(TARGETS ${EX_NOTICONSUMER} DESTINATION ${BIN_INSTALL_DIR})
-
similarity index 57%
rename from service/notification-manager/SConscript
rename to service/resource-hosting/SConscript
index 517405c..6c356c3 100644 (file)
@@ -35,17 +35,17 @@ if env.get('LOGGING'):
 
 lib_env = env.Clone()
 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
-notimgr_env = lib_env.Clone()
+resourcehosting_env = lib_env.Clone()
 
 target_os = env.get('TARGET_OS')
 ######################################################################
 # Build flags
 ######################################################################
-notimgr_env.AppendUnique(CPPPATH = ['NotificationManager/include'])
-notimgr_env.AppendUnique(CPPPATH = ['../resource-encapsulation/include'])
-notimgr_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/common/primitiveResource/include'])
+resourcehosting_env.AppendUnique(CPPPATH = ['include'])
+resourcehosting_env.AppendUnique(CPPPATH = ['../resource-encapsulation/include'])
+resourcehosting_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/common/primitiveResource/include'])
 
-notimgr_env.PrependUnique(LIBS = [
+resourcehosting_env.PrependUnique(LIBS = [
        'rcs_client',
        'rcs_server',
        'rcs_common',
@@ -57,45 +57,45 @@ notimgr_env.PrependUnique(LIBS = [
        ])
 
 if target_os not in ['windows', 'winrt']:
-       notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
+       resourcehosting_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
 
 if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
-       notimgr_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
+       resourcehosting_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
 
 if target_os == 'linux':
-       notimgr_env.AppendUnique(LIBS = ['pthread'])
+       resourcehosting_env.AppendUnique(LIBS = ['pthread'])
 
 if target_os == 'android':
-       notimgr_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
-       notimgr_env.AppendUnique(LIBS = ['gnustl_shared','log'])
+       resourcehosting_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
+       resourcehosting_env.AppendUnique(LIBS = ['gnustl_shared','log'])
 
        if not env.get('RELEASE'):
-               notimgr_env.AppendUnique(LIBS = ['log'])
+               resourcehosting_env.AppendUnique(LIBS = ['log'])
 
 ######################################################################
 # Source files and Targets
 ######################################################################
-NOTI_SRC_DIR = 'NotificationManager/src/'
-notimgr_src = [
-        NOTI_SRC_DIR + 'hosting.cpp',
-        NOTI_SRC_DIR + 'ResourceHosting.cpp',
-        NOTI_SRC_DIR + 'HostingObject.cpp',
-        NOTI_SRC_DIR + 'RequestObject.cpp'
+HOSTING_SRC_DIR = 'src/'
+resourcehosting_src = [
+        HOSTING_SRC_DIR + 'hosting.cpp',
+        HOSTING_SRC_DIR + 'ResourceHosting.cpp',
+        HOSTING_SRC_DIR + 'HostingObject.cpp',
+        HOSTING_SRC_DIR + 'RequestObject.cpp'
         ]
 
 if target_os in ['tizen','android'] :
-    notificationsdk = notimgr_env.SharedLibrary('NotificationManager', notimgr_src)
+    resourcehostingsdk = resourcehosting_env.SharedLibrary('resource_hosting', resourcehosting_src)
 else :
-    notificationsdk = notimgr_env.StaticLibrary('NotificationManager', notimgr_src)
+    resourcehostingsdk = resourcehosting_env.StaticLibrary('resource_hosting', resourcehosting_src)
 
-notimgr_env.InstallTarget(notificationsdk, 'libResouceHosting')
-notimgr_env.UserInstallTargetLib(notificationsdk, 'libResouceHosting')
-notimgr_env.UserInstallTargetHeader('NotificationManager/include/hosting.h',\
-       'service/notification-manager', 'hosting.h')
+resourcehosting_env.InstallTarget(resourcehostingsdk, 'libresource_hosting')
+resourcehosting_env.UserInstallTargetLib(resourcehostingsdk, 'libresource_hosting')
+resourcehosting_env.UserInstallTargetHeader('include/hosting.h',\
+       'service/resource-hosting', 'hosting.h')
 
 # Go to build Unit test
 if target_os == 'linux':
-       SConscript('NotificationManager/src/unittest/SConscript')
+       SConscript('src/unittest/SConscript')
 
 # Go to build sample apps
 SConscript('SampleApp/SConscript')
diff --git a/service/resource-hosting/SampleApp/linux/SConscript b/service/resource-hosting/SampleApp/linux/SConscript
new file mode 100644 (file)
index 0000000..1062275
--- /dev/null
@@ -0,0 +1,58 @@
+##
+# NotificationManager build script
+##
+
+Import('env')
+
+lib_env = env.Clone()
+SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
+resourcehosting_env = lib_env.Clone()
+
+######################################################################
+# Build flags
+######################################################################
+resourcehosting_env.AppendUnique(CPPPATH = ['../../include'])
+resourcehosting_env.AppendUnique(CPPPATH = ['../../../../extlibs/cjson'])
+resourcehosting_env.AppendUnique(CPPPATH = ['../../../../resource/csdk/connectivity/api'])
+resourcehosting_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
+resourcehosting_sample_env = resourcehosting_env.Clone()
+resourcehosting_env.AppendUnique(LIBS = [
+    'resource_hosting',
+    'rcs_client',
+    'rcs_server',
+    'rcs_common',
+    'oc',
+    'octbstack',
+    'oc_logger',
+    'connectivity_abstraction',
+    'coap',
+    'pthread'
+    ])
+resourcehosting_sample_env.AppendUnique(LIBS = [
+    'oc',
+    'octbstack',
+    'oc_logger',
+    'connectivity_abstraction',
+    'coap',
+    'pthread'
+    ])
+
+if env.get('SECURED') == '1':
+    resourcehosting_env.AppendUnique(LIBS = ['tinydtls'])
+    resourcehosting_sample_env.AppendUnique(LIBS = ['tinydtls'])
+if 'rt' in resourcehosting_env.get('LIBS'):
+    resourcehosting_env.Append(LIBS = ['rt'])
+if 'rt' in resourcehosting_sample_env.get('LIBS'):
+    resourcehosting_sample_env.Append(LIBS = ['rt'])
+
+####################################################################
+# Source files and Targets
+######################################################################
+sampleprovider = resourcehosting_sample_env.Program('sampleprovider', 'sampleProvider/SampleProvider.cpp')
+sampleconsumer = resourcehosting_sample_env.Program('sampleconsumer', 'sampleConsumer/SampleConsumer.cpp')
+
+sampleresourcehosting = resourcehosting_env.Program('sampleresourcehosting', 'sampleResourceHosting/main.cpp')
+
+#resourcehosting_sample_env.InstallTarget(sampleprovider, 'sampleprovider')
+#resourcehosting_sample_env.InstallTarget(sampleconsumer, 'sampleconsumer')
+#resourcehosting_env.InstallTarget(sampleresourcehosting, 'sampleresourcehosting')
@@ -62,8 +62,8 @@ include $(PREBUILT_SHARED_LIBRARY)
 
 include $(CLEAR_VARS)
 OIC_LIB_PATH := ../../../../../../out/android/$(TARGET_ARCH_ABI)/release
-LOCAL_MODULE := NotificationManager
-LOCAL_SRC_FILES := $(OIC_LIB_PATH)/libNotificationManager.so
+LOCAL_MODULE := resourceHosting
+LOCAL_SRC_FILES := $(OIC_LIB_PATH)/libresource_hosting.so
 include $(PREBUILT_SHARED_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -80,7 +80,7 @@ LOCAL_STATIC_LIBRARIES += ocstack-jni
 LOCAL_STATIC_LIBRARIES += rcsCommon
 LOCAL_STATIC_LIBRARIES += rcsClient
 LOCAL_STATIC_LIBRARIES += rcsServer
-LOCAL_STATIC_LIBRARIES += NotificationManager
+LOCAL_STATIC_LIBRARIES += resourceHosting
 
 
 OIC_SRC_DIR := ../../../../..
@@ -92,7 +92,7 @@ LOCAL_C_INCLUDES := $(OIC_SRC_DIR)/resource/csdk/stack/include \
                     $(OIC_SRC_DIR)/resource/oc_logger/include \
                     $(OIC_SRC_DIR)/extlibs/boost/boost_1_58_0 \
                     $(OIC_SRC_DIR)/service/resource-encapsulation/include \
-                    $(OIC_SRC_DIR)/service/notification-manager/NotificationManager/include \
+                    $(OIC_SRC_DIR)/service/resource-hosting/include \
 
 LOCAL_SRC_FILES := ResourceHosing_JNI.cpp
 include $(BUILD_SHARED_LIBRARY)
@@ -86,7 +86,7 @@ public class ResourceHosting {
         System.loadLibrary("rcs_common");
         System.loadLibrary("rcs_client");
         System.loadLibrary("rcs_server");
-        System.loadLibrary("NotificationManager");
+        System.loadLibrary("resourceHosting");
         System.loadLibrary("ResourceHosing_JNI");
     }
 }
@@ -43,8 +43,7 @@ std::mutex ResourceHosting::s_mutexForCreation;
 ResourceHosting::ResourceHosting()
 : hostingObjectList(),
   discoveryManager(nullptr),
-  presenceHandle(),
-  pPresenceCB(nullptr), pDiscoveryCB(nullptr)
+  pDiscoveryCB(nullptr)
 {
 }
 
@@ -67,7 +66,6 @@ void ResourceHosting::startHosting()
 {
     try
     {
-        requestMulticastPresence();
         requestMulticastDiscovery();
     }catch(const RCSPlatformException &e)
     {
@@ -89,106 +87,27 @@ void ResourceHosting::startHosting()
 
 void ResourceHosting::stopHosting()
 {
-    // clear list hostingObjectList
-    if(presenceHandle.isSubscribing())
-    {
-        presenceHandle.unsubscribe();
-    }
 
     hostingObjectList.clear();
 }
 
 void ResourceHosting::initializeResourceHosting()
 {
-    pPresenceCB = std::bind(&ResourceHosting::presenceHandler, this,
-            std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
     pDiscoveryCB = std::bind(&ResourceHosting::discoverHandler, this,
             std::placeholders::_1);
 
     discoveryManager = RCSDiscoveryManager::getInstance();
 }
 
-void ResourceHosting::requestMulticastPresence()
-{
-    try
-    {
-        presenceHandle = PresenceSubscriber(MULTICAST_PRESENCE_ADDRESS,
-                OCConnectivityType::CT_DEFAULT, pPresenceCB);
-    }catch(...)
-    {
-        throw;
-    }
-}
-
-void ResourceHosting::presenceHandler(OCStackResult ret, const unsigned int /*seq*/,
-        const std::string & address)
-{
-    switch(ret)
-    {
-    case OC_STACK_OK:
-    case OC_STACK_CONTINUE:
-    case OC_STACK_RESOURCE_CREATED:
-    {
-        // TODO start discovery
-        requestDiscovery(address);
-        break;
-    }
-
-    case OC_STACK_RESOURCE_DELETED:
-    case OC_STACK_COMM_ERROR:
-    case OC_STACK_TIMEOUT:
-    case OC_STACK_PRESENCE_STOPPED:
-    case OC_STACK_PRESENCE_TIMEOUT:
-    case OC_STACK_PRESENCE_DO_NOT_HANDLE:
-    case OC_STACK_ERROR:
-        // TODO presence error
-        break;
-
-    case OC_STACK_INVALID_URI:
-    case OC_STACK_INVALID_QUERY:
-    case OC_STACK_INVALID_IP:
-    case OC_STACK_INVALID_PORT:
-    case OC_STACK_INVALID_CALLBACK:
-    case OC_STACK_INVALID_METHOD:
-    case OC_STACK_INVALID_PARAM:
-    case OC_STACK_INVALID_OBSERVE_PARAM:
-    case OC_STACK_NO_MEMORY:
-    case OC_STACK_ADAPTER_NOT_ENABLED:
-    case OC_STACK_NOTIMPL:
-    case OC_STACK_NO_RESOURCE:
-    case OC_STACK_RESOURCE_ERROR:
-    case OC_STACK_SLOW_RESOURCE:
-    case OC_STACK_DUPLICATE_REQUEST:
-    case OC_STACK_NO_OBSERVERS:
-    case OC_STACK_OBSERVER_NOT_FOUND:
-    case OC_STACK_INVALID_OPTION:
-    case OC_STACK_VIRTUAL_DO_NOT_HANDLE:
-    case OC_STACK_MALFORMED_RESPONSE:
-    case OC_STACK_PERSISTENT_BUFFER_REQUIRED:
-    case OC_STACK_INVALID_REQUEST_HANDLE:
-    case OC_STACK_INVALID_DEVICE_INFO:
-    case OC_STACK_INVALID_JSON:
-        break;
-    default:
-        // TODO unknown presence result
-        break;
-    }
-}
-
 void ResourceHosting::requestMulticastDiscovery()
 {
-    requestDiscovery();
-}
-void ResourceHosting::requestDiscovery(std::string address)
-{
-    std::string host = address;
-    RCSAddress rcsAddress = RCSAddress::unicast(host);
     discoveryTask = discoveryManager->discoverResourceByType(
-        rcsAddress, OC_RSRVD_WELL_KNOWN_URI, HOSTING_RESOURSE_TYPE, pDiscoveryCB);
+            RCSAddress::multicast(), OC_RSRVD_WELL_KNOWN_URI, HOSTING_RESOURSE_TYPE, pDiscoveryCB);
 }
 
 void ResourceHosting::discoverHandler(RemoteObjectPtr remoteResource)
 {
+    std::cout << "Discovered Resource uri : " << remoteResource->getUri() << std::endl;
     std::string discoverdUri = remoteResource->getUri();
     if(discoverdUri.compare(
             discoverdUri.size()-HOSTING_TAG_SIZE, HOSTING_TAG_SIZE, HOSTING_TAG) != 0)
@@ -52,8 +52,6 @@ private:
     typedef std::shared_ptr<PrimitiveResource> PrimiteveResourcePtr;
 
     typedef std::function<
-            void(OCStackResult, const unsigned int, const std::string&)> SubscribeCallback;
-    typedef std::function<
             void(std::shared_ptr<RCSRemoteResourceObject>)> DiscoveryCallback;
     typedef std::function<void()> DestroyedCallback;
 
@@ -79,19 +77,14 @@ private:
     std::list<HostingObjectPtr> hostingObjectList;
 
     RCSDiscoveryManager * discoveryManager;
-    PresenceSubscriber presenceHandle;
     std::unique_ptr<RCSDiscoveryManager::DiscoveryTask> discoveryTask;
 
-    SubscribeCallback pPresenceCB;
     DiscoveryCallback pDiscoveryCB;
 
     void initializeResourceHosting();
 
-    void requestMulticastPresence();
     void requestMulticastDiscovery();
-    void requestDiscovery(std::string address = std::string());
 
-    void presenceHandler(OCStackResult ret, const unsigned int seq, const std::string & address);
     void discoverHandler(RemoteObjectPtr remoteResource);
 
     HostingObjectPtr findRemoteResource(RemoteObjectPtr remoteResource);
@@ -54,7 +54,7 @@ GTest_Main = File(gtest_dir + '/lib/.libs/libgtest_main.a')
 #hosting_test_env.AppendUnique(LIBPATH = [gtest_dir + '/lib/.libs'])
 hosting_test_env.AppendUnique(LIBPATH = [lib_env.get('BUILD_DIR')])
 hosting_test_env.AppendUnique(LIBS = [
-       'NotificationManager', 'rcs_server', 'rcs_client','rcs_common',
+       'resource_hosting', 'rcs_server', 'rcs_client','rcs_common',
        'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'coap',
        GTest_Main, GTest])
 
@@ -68,9 +68,9 @@ if target_os == 'linux':
 hosting_test_env.PrependUnique(CPPPATH = [ src_dir + '/extlibs/hippomocks-master',
                              gtest_dir + '/include'])
 hosting_test_env.AppendUnique(CPPPATH = ['../'])
-hosting_test_env.AppendUnique(CPPPATH = ['../../../../resource-encapsulation/include'])
-hosting_test_env.AppendUnique(CPPPATH = ['../../../../resource-encapsulation/src/common/primitiveResource/include'])
-hosting_test_env.AppendUnique(CPPPATH = ['../../../../resource-encapsulation/src/common/utils/include'])
+hosting_test_env.AppendUnique(CPPPATH = ['../../../resource-encapsulation/include'])
+hosting_test_env.AppendUnique(CPPPATH = ['../../../resource-encapsulation/src/common/primitiveResource/include'])
+hosting_test_env.AppendUnique(CPPPATH = ['../../../resource-encapsulation/src/common/utils/include'])
 ######################################################################
 # Build Test
 ######################################################################