Fix build error of notification manager.
authorjyong2.kim <jyong2.kim@samsung.com>
Thu, 16 Jul 2015 11:12:39 +0000 (20:12 +0900)
committerUze Choi <uzchoi@samsung.com>
Fri, 17 Jul 2015 05:52:45 +0000 (05:52 +0000)
update sconscript of notification manager and sample.

Change-Id: I07bf40097361dfb4eae960bc04d3ba551626a39c
Signed-off-by: jyong2.kim <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1694
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/SConscript
service/notification-manager/NotificationManager/src/ResourceHosting.cpp
service/notification-manager/SConscript
service/notification-manager/SampleApp/linux/SConscript

index 40f9c7d..00d855e 100644 (file)
@@ -35,11 +35,12 @@ if target_os not in ['arduino','darwin','ios']:
 
        # Build protocol plugin project
        # protocol-plugin use 'inotify', this feature isn't support by MAC OSX
-       if target_os not in ['darwin', 'ios']:
+       if target_os not in ['darwin', 'ios', 'android']:
                SConscript('protocol-plugin/SConscript')
 
        # Build notification manager project
-       #SConscript('notification-manager/SConscript')
+       #if target_os not in ['android']:
+       #       SConscript('notification-manager/SConscript')
 
        # Build resource-manipulation project
        #SConscript('resource-manipulation/SConscript')
index 61a318c..a6f2846 100755 (executable)
@@ -161,7 +161,7 @@ void ResourceHosting::requestMulticastDiscovery()
 void ResourceHosting::requestDiscovery(std::string address)
 {
     std::string host = address;
-    std::string uri = OC_MULTICAST_DISCOVERY_URI + std::string("?rt=Resource.Hosting");
+    std::string uri = OC_RSRVD_WELL_KNOWN_URI + std::string("?rt=Resource.Hosting");
     OCConnectivityType type = OCConnectivityType::CT_DEFAULT;
     discoveryManager->discoverResource(host, uri, type, pDiscoveryCB);
 }
index 583c3c1..3255bfa 100644 (file)
@@ -42,9 +42,28 @@ target_os = env.get('TARGET_OS')
 # Build flags
 ######################################################################
 notimgr_env.AppendUnique(CPPPATH = ['NotificationManager/include'])
-notimgr_env.AppendUnique(CPPPATH = ['../../extlibs/cjson'])
-notimgr_env.AppendUnique(CPPPATH = ['../../resource/csdk/logger/include'])
-notimgr_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'libcoap'])
+notimgr_env.AppendUnique(CPPPATH = ['../resource-manipulation/include'])
+notimgr_env.AppendUnique(CPPPATH = ['../resource-manipulation/src/common/primitiveResource/include'])
+notimgr_env.AppendUnique(CPPPATH = ['../resource-manipulation/src/serverBuilder/include'])
+notimgr_env.AppendUnique(CPPPATH = ['../resource-manipulation/src/resourceBroker/include'])
+notimgr_env.AppendUnique(CPPPATH = ['../resource-manipulation/src/resourceCache/include'])
+notimgr_env.AppendUnique(CPPPATH = ['../resource-manipulation/src/common/expiryTimer/include'])
+notimgr_env.AppendUnique(CPPPATH = ['../resource-manipulation/src/common/expiryTimer/src'])
+#notimgr_env.AppendUnique(CPPPATH = ['../../extlibs/cjson'])
+#notimgr_env.AppendUnique(CPPPATH = ['../../resource/csdk/logger/include'])
+notimgr_env.PrependUnique(LIBS = [
+       'ResourceClient',
+       'ResourceCache',
+       'ResourceBroker',
+       'ExpiryTimer',
+       'server_builder',
+       'service_common',
+       'oc',
+       'octbstack',
+       'oc_logger',
+       'connectivity_abstraction',
+       'libcoap'
+       ])
 
 if target_os not in ['windows', 'winrt']:
        notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
@@ -64,9 +83,11 @@ if target_os == 'android':
 ######################################################################
 NOTI_SRC_DIR = 'NotificationManager/src/'
 notimgr_src = [
-        NOTI_SRC_DIR + 'hosting.c',
-        NOTI_SRC_DIR + 'requestHandler.c',
-        NOTI_SRC_DIR + 'virtualResource.c']
+        NOTI_SRC_DIR + 'hosting.cpp',
+        NOTI_SRC_DIR + 'ResourceHosting.cpp',
+        NOTI_SRC_DIR + 'HostingObject.cpp',
+        NOTI_SRC_DIR + 'RequestObject.cpp'
+        ]
 
 if target_os in ['tizen','android'] :
     notificationsdk = notimgr_env.SharedLibrary('NotificationManager', notimgr_src)
@@ -74,8 +95,6 @@ else :
     notificationsdk = notimgr_env.StaticLibrary('NotificationManager', notimgr_src)
 
 notimgr_env.InstallTarget(notificationsdk, 'libResouceHosting')
-notimgr_env.UserInstallTargetLib(notificationsdk, 'libResouceHosting')
 
 # Go to build sample apps
 SConscript('SampleApp/SConscript')
-
index 0a436f6..573ccb3 100644 (file)
@@ -15,26 +15,47 @@ 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_c_env = notimgr_env.Clone()
-notimgr_env.AppendUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'coap', 'pthread'])
-notimgr_c_env.AppendUnique(LIBS = ['octbstack', 'oc_logger', 'connectivity_abstraction', 'coap', 'pthread','NotificationManager'])
+notimgr_sample_env = notimgr_env.Clone()
+notimgr_env.AppendUnique(LIBS = [
+    'NotificationManager',
+    'ResourceClient',
+    'ResourceCache',
+    'ResourceBroker',
+    'ExpiryTimer',
+    'server_builder',
+    'service_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_c_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_c_env.get('LIBS'):
-    notimgr_c_env.Append(LIBS = ['rt'])
+if 'rt' in notimgr_sample_env.get('LIBS'):
+    notimgr_sample_env.Append(LIBS = ['rt'])
 
 ####################################################################
 # Source files and Targets
 ######################################################################
-sampleprovider = notimgr_env.Program('sampleprovider', 'sampleProvider/SampleProvider.cpp')
-sampleconsumer = notimgr_env.Program('sampleconsumer', 'sampleConsumer/SampleConsumer.cpp')
+sampleprovider = notimgr_sample_env.Program('sampleprovider', 'sampleProvider/SampleProvider.cpp')
+sampleconsumer = notimgr_sample_env.Program('sampleconsumer', 'sampleConsumer/SampleConsumer.cpp')
 
-notificationmanager = notimgr_c_env.Program('notificationmanager', 'notificationManager/main.c')
+notificationmanager = notimgr_env.Program('notificationmanager', 'notificationManager/main.cpp')
 
-#notimgr_env.InstallTarget(sampleprovider, 'sampleprovider')
-#notimgr_env.InstallTarget(sampleconsumer, 'sampleconsumer')
-#notimgr_env.InstallTarget(notificationmanager, 'notificationmanager')
+notimgr_sample_env.InstallTarget(sampleprovider, 'sampleprovider')
+notimgr_sample_env.InstallTarget(sampleconsumer, 'sampleconsumer')
+notimgr_env.InstallTarget(notificationmanager, 'notificationmanager')
\ No newline at end of file