Commit 089eef59 authored by Jay Sharma's avatar Jay Sharma Committed by Madan Lanka

Restructuring of the easy-setup service.

    - Separated the mediator and enrollee SDKs.
	- Created seperate sconscript for the Enrollee and mediator.
	- created seperate sconscript for c and c++ sdk [Mediator].
	- Created seperate scocscript for Sample apps [mediator & enrollee].
Signed-off-by: default avatarJay Sharma <jay.sharma@samsung.com>
Change-Id: If9638544a63cb9906b3973753fcad1721b74f011
Reviewed-on: https://gerrit.iotivity.org/gerrit/4993Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarMadan Lanka <lanka.madan@samsung.com>
parent bff0ed25
......@@ -104,7 +104,12 @@ help_vars.AddVariables(('DEVICE_NAME', 'Network display name for device (For Ard
help_vars.Add(PathVariable('ANDROID_NDK', 'Android NDK path', None, PathVariable.PathAccept))
help_vars.Add(PathVariable('ANDROID_HOME', 'Android SDK path', None, PathVariable.PathAccept))
help_vars.Add(PathVariable('ANDROID_GRADLE', 'Gradle binary file', None, PathVariable.PathIsFile))
help_vars.Add(EnumVariable('TARGET_ENROLLEE', 'Target Enrollee', 'arduino', allowed_values=('arduino', 'tizen', 'linux')))
#ES_TARGET_ENROLLEE is for specifying what is our target enrollee (Arduino or rest of platforms which support Multicast)
help_vars.Add(EnumVariable('ES_TARGET_ENROLLEE', 'Target Enrollee', 'arduino', allowed_values=('arduino', 'tizen', 'linux')))
#ES_ROLE is for specifying the role (Enrollee or Mediator) for which scons is being executed
help_vars.Add(EnumVariable('ES_ROLE', 'Target build mode', 'mediator', allowed_values=('mediator', 'enrollee')))
#ES_SOFT_MODE is for specifying MODE (Mode 1 : Enrollee with Soft AP or Mode 2 : Mediator with Soft AP)
help_vars.Add(EnumVariable('ES_SOFTAP_MODE', 'Target build mode', 'ENROLLEE_SOFTAP', allowed_values=('ENROLLEE_SOFTAP', 'MEDIATOR_SOFTAP')))
AddOption('--prefix',
dest='prefix',
......
#******************************************************************
#
# Copyright 2015 Samsung Electronics All Rights Reserved.
# Copyright 2016 Samsung Electronics All Rights Reserved.
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#
......@@ -43,19 +43,20 @@ Steps to build and deploy Easysetup Mediator in Android platform
export ANDROID_NDK=<ANDROID_NDK>
a) In the IoTivity root source folder execute
scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP RELEASE=0
scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP ES_ROLE=mediator ES_TARGET_ENROLLEE={Platform} RELEASE=0
Note : {Platform} can be -> arduino , linux, tizen
b) If the project is setup correctly, you should see a BUILD SUCCESSFUL message on the terminal
You should see the .aar files generated inside of '<iotivity>/android/android_api/base/build/outputs/aar' directory. The .aar files contain jni directory and also a .jar file
c) Now navigate to the Easysetup NDK folder
<iotivity-root>/service/easy-setup/sdk/mediator/android
<iotivity-root>/service/easy-setup/mediator/richsdk/android
d) Execute NDK-Build with the following command to cross compiled Easysetup JNI .so files
<iotivity>/extlibs/android/ndk/android-ndk-r10d/ndk-build
e) Step (d) will generate cross compiled Easysetup JNI .so files in the following folder
<iotivity>/service/easy-setup/sdk/mediator/android/libs/armeabi
<iotivity>/service/easy-setup/mediator/richsdk/android/libs/armeabi
2) Compilation using Android Studio
......@@ -63,8 +64,8 @@ Steps to build and deploy Easysetup Mediator in Android platform
Install Android Studio and use the Android SDK manager to update the Android API to 21
a) Import following projects to the Studio using the "File->New->Import Project"
- service\easy-setup\sdk\android\EasySetupCore
- service\easy-setup\sampleapp\android\EasySetup
- service/easy-setup/mediator/richsdk/android/EasySetupCore
- service/easy-setup/sampleapp/android/EasySetup
b) EasySetupCore is dependent on the .aar files generated in 1.b
1) To add an .aar file to the 'EasySetupCore' project,
......@@ -76,11 +77,12 @@ Steps to build and deploy Easysetup Mediator in Android platform
c) Build EasySetupCore project using "Android Studio->Build->Make Module "easySetupCore"
If the project is setup correctly, you should see a BUILD SUCCESSFUL in the Android Studio Gradle Build terminal
You should see the .aar file generated inside of
'iotivity\service\easy-setup\sdk\mediator\android\easySetupCore\build\outputs\aar'
'iotivity/service/easy-setup/mediator/richsdk/android/easySetupCore/build/outputs/aar'
d) EasySetup application is also dependent on the .so files generated in 1.d step
1) Drag and drop the following .so files in to the EasySetup\app\src\main\jniLibs\armeabi folder
- libeasysetup-jni.so [Easy Setup file]
1) Drag and drop the following .so files in to the EasySetup/app/src/main/jniLibs/armeabi folder
- libeasysetup-jni.so [Easy Setup JNI library]
- libESMediatorRich.so [Easy Setup Mediator library]
e) EasySetup is also dependent on the .aar files generated in 1.b and 2.c steps
1) To add an .aar file to the 'EasySetup' project,
......@@ -111,11 +113,11 @@ Steps to build and deploy Easysetup Mediator in Arduino platform
NOTE: 1) BOARD=arduino_due_x_dbg|arduino_due_x. Default is arduino_due_x_dbg.
2) For Mega board, please use the following options. BOARD=mega & TARGET_ARCH=avr
Possible values for <transport> are:
Possible values for <transport> are: [Only ip is currently supported]
-> IP :
$ scons service TARGET_OS=arduino BOARD=arduino_due_x_dbg TARGET_ARCH=arm SHIELD=WIFI RELEASE=0
$ scons service TARGET_OS=arduino BOARD=arduino_due_x_dbg TARGET_ARCH=arm SHIELD=WIFI ES_ROLE=enrollee RELEASE=0
-> BLE :
$ scons service TARGET_OS=arduino BOARD=arduino_due_x_dbg TARGET_ARCH=arm SHIELD=BLE RELEASE=0
$ scons service TARGET_OS=arduino BOARD=arduino_due_x_dbg TARGET_ARCH=arm SHIELD=BLE RELEASE=0 [Currently not supporting]
Note :- Only single transport can be built at a time for Arduino
f) The above command will build sample. The "enrollee.hex" can be found at "out/arduino/arm/release/service/easy-setup/sampleapp/enrollee/arduino"
......@@ -132,22 +134,38 @@ Steps to build and deploy Easysetup Mediator in Arduino platform
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Folder structure:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
iotivity/
└── service
└── easy-setup/
│── SConscript
│── sdk
│── enrollee
│ └── inc
│ └── src
│ └── android
│ └── arduino
│ └──wifi
│ └──inc
│ └──src
│ └── arduino/wifi
│ └── linux/wifi
│ └── tizen/wifi
│ └── SConscript
│── mediator
│ └── csdk
│ └──inc
│ └──src
│ └──SConscript
│ └── richsdk
│ └──android
│ └──inc
│ └──src
│ └──SConscript
│ └── SConscript
│── sampleapp
│ └──mediator/android
│ └──mediator/linux
│ └──enrollee/arduino
│ └──enrollee/linux
│ └──enrollee/tizen
│ └──enrollee/tizen-sdb
└── Build_Instructions_Android_Arduino.txt - You are reading this.
#******************************************************************
#
# Copyright 2015 Samsung Electronics All Rights Reserved.
# Copyright 2016 Samsung Electronics All Rights Reserved.
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#
......@@ -21,172 +21,31 @@
######################################################################
# easy-setup project build script
######################################################################
import os.path
Import('env')
easysetup_path = os.curdir
es_target = env.get ('TARGET_OS')
es_role = env.get('ES_ROLE')
es_target_enrollee = env.get('ES_TARGET_ENROLLEE')
######################################################################
#building Resource client, resourceBroker and resourceCache
######################################################################
if env.get('RELEASE'):
env.AppendUnique(CCFLAGS = ['-Os'])
env.AppendUnique(CPPDEFINES = ['NDEBUG'])
else:
env.AppendUnique(CCFLAGS = ['-g'])
if env.get('LOGGING'):
env.AppendUnique(CPPDEFINES = ['TB_LOG'])
# Easysetup provides reference implemenation of Arduino Enrollee.
# Mediator applications developed on different platforms will be default defining the
# flag 'REMOTE_ARDUINO_ENROLEE'. If the target Enrollee is not Arduino, the below commented
# modifications must be enabled instead (and the existing define must be commented).
#
##### The following lines must be uncommented, if target Enrollee is not Arduino
target_enrollee = env.get('TARGET_ENROLLEE')
if target_enrollee == 'arduino':
print "REMOTE_ARDUINO_ENROLEE flag is defined."
print "The Mediator application will be working only with Arduino Enrollee."
env.AppendUnique(CPPDEFINES = ['REMOTE_ARDUINO_ENROLEE'])
# Add third party libraries
lib_env = env.Clone()
SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
easy_setup_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
######################################################################
# Build flags
######################################################################
easy_setup_env.AppendUnique(CPPPATH = ['sdk/inc', 'sdk/src', 'sdk/common'])
if target_os not in ['windows', 'winrt']:
easy_setup_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x'])
if target_os == 'linux':
easy_setup_env.AppendUnique(LIBS = ['pthread', 'dl'])
if target_os in ['android']:
easy_setup_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
easy_setup_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
easy_setup_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
easy_setup_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'gnustl_shared'])
if not env.get('RELEASE'):
easy_setup_env.AppendUnique(LIBS = ['log'])
if target_os == 'linux':
easy_setup_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
easy_setup_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
easy_setup_env.AppendUnique(CXXFLAGS = ['-pthread'])
easy_setup_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction'])
if env.get('SECURED') == '1':
easy_setup_env.PrependUnique(LIBS = ['ocprovision', 'ocpmapi'])
if target_os == 'tizen':
easy_setup_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
easy_setup_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
easy_setup_env.AppendUnique(CXXFLAGS = ['-pthread'])
easy_setup_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction'])
if target_os == 'arduino':
easy_setup_env.AppendUnique(CPPPATH = [
env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include',
env.get('SRC_DIR') + '/resource/oc_logger/include',
env.get('SRC_DIR') + '/resource/csdk/logger/include',
env.get('SRC_DIR') + '/resource/csdk/stack/include',
env.get('SRC_DIR') + '/extlibs/cjson',
'sdk/enrollee/arduino/wifi',
'sdk/enrollee/api',
'sdk/enrollee/src',
'sdk/enrollee/inc'])
easy_setup_env.AppendUnique(CPPDEFINES = ['ESWIFI'])
if target_os in ['android','linux']:
easy_setup_env.PrependUnique(CPPPATH = [
env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include',
env.get('SRC_DIR') + '/resource/include',
env.get('SRC_DIR') + '/resource/csdk/logger/include',
env.get('SRC_DIR') + '/resource/csdk/stack/include',
env.get('SRC_DIR') + '/resource/csdk/logger/include',
env.get('SRC_DIR') + '/resource/csdk/security/include',
env.get('SRC_DIR') + '/extlibs/cjson',
env.get('SRC_DIR') + '/extlibs/sqlite3',
'/sdk/common',
'sdk/mediator/include',
'sdk/mediator/src'])
if env.get('SECURED') == '1':
easy_setup_env.AppendUnique(CPPPATH = [
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include',
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/internal',
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/oxm'])
if target_os == 'tizen':
easy_setup_env.AppendUnique(CPPPATH = [
env.get('SRC_DIR')+'/resource/oc_logger/include',
env.get('SRC_DIR')+'/resource/csdk/logger/include',
env.get('SRC_DIR')+'/resource/csdk/stack/include',
env.get('SRC_DIR')+'/extlibs/cjson',
'sdk/enrollee/tizen/wifi',
'sdk/enrollee/api',
'sdk/enrollee/src',
'sdk/enrollee/inc'])
easy_setup_env.AppendUnique(CPPDEFINES = ['ESWIFI'])
######################################################################
# Source files and Targets
######################################################################
if target_os == 'arduino':
es_sdk_static = easy_setup_env.StaticLibrary('ESSDKLibrary',
['sdk/enrollee/src/easysetup.cpp',
'sdk/enrollee/src/onboarding.cpp',
'sdk/enrollee/src/resourcehandler.cpp',
'sdk/enrollee/arduino/wifi/networkhandler.cpp'])
easy_setup_env.InstallTarget(es_sdk_static, 'libESSDK')
if target_os == 'android':
es_sdk_shared = easy_setup_env.StaticLibrary('libESSDK',
['sdk/mediator/src/prov_adapter.cpp',
'sdk/mediator/src/wifi_provisioning.cpp',
'sdk/mediator/src/provisioning.cpp'])
easy_setup_env.InstallTarget(es_sdk_shared, 'libESSDK')
if target_os == 'tizen':
es_sdk_shared = easy_setup_env.SharedLibrary('ESSDKLibrary',
['sdk/enrollee/src/easysetup.cpp',
'sdk/enrollee/src/onboarding.cpp',
'sdk/enrollee/src/softap.cpp',
'sdk/enrollee/src/resourcehandler.cpp',
'sdk/enrollee/tizen/wifi/networkhandler.cpp',
'sdk/enrollee/tizen/wifi/softapnative.cpp'])
easy_setup_env.InstallTarget(es_sdk_shared, 'libESSDK')
print"easysetup_path %s" % easysetup_path
es_src = None
if target_os in ['android','linux']:
if env.get('SECURED') == '1':
env.AppendUnique(es_src = [os.path.join(easysetup_path, 'sdk/mediator/src/EnrolleeSecurity.cpp')])
es_common_src = ['sdk/mediator/src/RemoteEnrollee.cpp',
'sdk/mediator/src/RemoteEnrolleeResource.cpp',
'sdk/mediator/src/EasySetup.cpp',
'sdk/mediator/src/prov_adapter.cpp',
'sdk/mediator/src/ESException.cpp',
'sdk/mediator/src/wifi_provisioning.cpp',
'sdk/mediator/src/provisioning.cpp']
env.AppendUnique(es_src = es_common_src)
es_sdk_shared = easy_setup_env.SharedLibrary('ESSDKLibrary', env.get('es_src'))
easy_setup_env.InstallTarget(es_sdk_shared, 'libESSDK')
print "Files path is %s" % env.get('es_src')
print "************************************************************************************"
print " Easysetup device role --> %s " % es_role
print "Target Platform --> %s " % es_target
print "Target Enrollee platform --> %s " % es_target
print "************************************************************************************"
#Go to build sample apps
SConscript('sampleapp/SConscript')
if ('mediator' in es_role) :
print "Building Easysetup mediator SDKs [CSDK & RichSDK]"
if es_target in ['linux','android']:
SConscript('mediator/SConscript')
else :
print "****************************Mediator supports Linux and Android platform****************************"
if ('enrollee' in es_role) :
print "Building Easysetup enrollee SDK"
if es_target in ['linux', 'arduino']: #TODO add tizen platform [also add dependencies in iotivity.spec file]
SConscript('enrollee/SConscript')
else :
print "****************************Enrollee supports linux, tizen and arduino platform****************************"
\ No newline at end of file
#######################################################################
# Copyright 2016 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.
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
######################################################################
# Easy-setup Enrollee SDK build script
######################################################################
Import('env')
enrollee_env = env.Clone()
target_os = enrollee_env.get('TARGET_OS')
if enrollee_env.get('RELEASE'):
enrollee_env.AppendUnique(CCFLAGS = ['-Os'])
enrollee_env.AppendUnique(CPPDEFINES = ['NDEBUG'])
else:
enrollee_env.AppendUnique(CCFLAGS = ['-g'])
if enrollee_env.get('LOGGING'):
enrollee_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
# Enrollees are implemented for IP transport only.
if 'IP' in enrollee_env.get('TARGET_TRANSPORT'):
print "Enrollees are implemented for IP transport only"
enrollee_env.AppendUnique(CPPDEFINES = ['ESWIFI'])
######################################################################
# Build flags
######################################################################
enrollee_env.PrependUnique(CPPPATH = [
enrollee_env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include',
enrollee_env.get('SRC_DIR') + '/resource/include',
enrollee_env.get('SRC_DIR') + '/resource/csdk/logger/include',
enrollee_env.get('SRC_DIR') + '/resource/oc_logger/include',
enrollee_env.get('SRC_DIR') + '/resource/csdk/stack/include',
enrollee_env.get('SRC_DIR') + '/resource/csdk/logger/include',
enrollee_env.get('SRC_DIR') + '/resource/csdk/security/include',
enrollee_env.get('SRC_DIR') + '/extlibs/cjson',
enrollee_env.get('SRC_DIR') + '/extlibs/sqlite3',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/inc',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/linux/wifi',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/inc',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src'])
if enrollee_env.get('SECURED') == '1':
enrollee_env.AppendUnique(CPPPATH = [
enrollee_env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include',
enrollee_env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/internal',
enrollee_env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/oxm'])
if target_os not in ['windows', 'winrt']:
enrollee_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x'])
######################################################################
# Linux Enrollee
######################################################################
if target_os == 'linux':
enrollee_env.PrependUnique(CPPPATH = [
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/linux/wifi'])
enrollee_env.AppendUnique(LIBS = ['pthread', 'dl'])
enrollee_env.AppendUnique(LIBPATH = [enrollee_env.get('BUILD_DIR')])
enrollee_env.AppendUnique(RPATH = [enrollee_env.get('BUILD_DIR')])
enrollee_env.AppendUnique(CXXFLAGS = ['-pthread'])
enrollee_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction'])
if enrollee_env.get('SECURED') == '1':
enrollee_env.PrependUnique(LIBS = ['ocprovision', 'ocpmapi'])
######################################################################
# Tizen Enrollee
######################################################################
if target_os == 'tizen':
enrollee_env.AppendUnique(LIBPATH = [enrollee_env.get('BUILD_DIR')])
enrollee_env.AppendUnique(RPATH = [enrollee_env.get('BUILD_DIR')])
enrollee_env.AppendUnique(CXXFLAGS = ['-pthread'])
enrollee_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction'])
enrollee_env.AppendUnique(CPPPATH = [
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/tizen/wifi'])
######################################################################
# Arduino Enrollee
######################################################################
if target_os == 'arduino':
enrollee_env.AppendUnique(LIBPATH = [enrollee_env.get('BUILD_DIR')])
enrollee_env.AppendUnique(RPATH = [enrollee_env.get('BUILD_DIR')])
enrollee_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction'])
enrollee_env.AppendUnique(CPPPATH = [
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/arduino/wifi'])
######################################################################
# Source files and Targets
######################################################################
es_enrollee_src = None
if target_os == 'linux':
es_enrollee_common_src = [enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/easysetup.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/onboarding.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/resourcehandler.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/softap.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/linux/wifi/softapnative.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/linux/wifi/networkhandler.cpp']
enrollee_env.AppendUnique(es_enrollee_src = es_enrollee_common_src)
enrollee_sdk_shared = enrollee_env.SharedLibrary('ESEnrolleeSDK', enrollee_env.get('es_enrollee_src'))
enrollee_env.InstallTarget(enrollee_sdk_shared, 'libESEnrollee')
if target_os == 'tizen':
enrollee_sdk_shared = enrollee_env.SharedLibrary('ESSDKLibrary',
[enrollee_env.get('SRC_DIR') + '/service/easy-setup/sdk/enrollee/src/easysetup.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/sdk/enrollee/src/onboarding.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/sdk/enrollee/src/softap.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/sdk/enrollee/src/resourcehandler.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/sdk/enrollee/tizen/wifi/networkhandler.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/sdk/enrollee/tizen/wifi/softapnative.cpp'])
enrollee_env.InstallTarget(enrollee_sdk_shared, 'libESSDK')
if target_os == 'arduino':
es_sdk_static = enrollee_env.StaticLibrary('ESEnrolleeSDK', [
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/easysetup.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/onboarding.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src/resourcehandler.cpp',
enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/arduino/wifi/networkhandler.cpp'])
enrollee_env.InstallTarget(es_sdk_static, 'libESEnrolleeSDK')
#Go to build sample apps
if target_os == 'arduino':
SConscript('../sampleapp/enrollee/arduino/SConscript')
if target_os == 'linux':
SConscript('../sampleapp/enrollee/linux/SConscript')
......@@ -36,7 +36,7 @@ bool ESOnboard(const char * ssid, const char* passwd, NetworkEventCallback cb);
/**
* It will return true on-boarding type is soft AP.
*/
bool ESSoftapOnboarding();
bool ESSoftapOnboarding();
/**
* It will return true on-boarding type is BLE.
......
......@@ -53,6 +53,8 @@ typedef struct NETRESOURCE
} NetResource;
OCStackResult CreateProvisioningResource();
OCStackResult DeleteProvisioningResource();
OCStackResult DeleteNetworkResource();
//created only for in case of wifi
#ifdef ESWIFI
......@@ -61,5 +63,6 @@ OCStackResult CreateNetworkResource();
void GetTargetNetworkInfoFromProvResource(char *, char *);
void RegisterResourceEventCallBack(ResourceEventCallback);
void UnRegisterResourceEventCallBack(void);
#endif
......@@ -18,63 +18,57 @@
*
******************************************************************/
/**
* @file jni_string.h
*
* @brief This file contains the declaration of JString class and its members related to JString.
*
*/
#include <unistd.h>
#ifndef __JNI_STRING_H_
#define __JNI_STRING_H_
#include "logger.h"
#include "easysetup.h"
#include "networkhandler.h"
#include <string>
#define LOG_TAG "TIZEN ES"
#include "jni_object.h"
const char *gSsid = "DLNA_LISMORE1";
const char *gPass = "dlna@010203";
char *gIpAddress;
NetworkEventCallback gNetworkEventCb;
static void ESActivateWifi();
/**
* @class JString
* @brief This class inherits JObject class and provides a set of functions for JNI String.
*
*/
class JString: public JObject {
public:
/**
* @brief constructor