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>
# 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')
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);
}
# 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'])
######################################################################
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)
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')
-
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