[IOT-1089] Merge remote-tracking branch 'origin/master' into generic-java 93/15293/5
authorGeorge Nash <george.nash@intel.com>
Fri, 9 Dec 2016 00:07:49 +0000 (16:07 -0800)
committerGeorge Nash <george.nash@intel.com>
Fri, 9 Dec 2016 15:35:36 +0000 (07:35 -0800)
Change-Id: Ic21559c8bb95f93ab82d8b2d8f443e14ae470654
Signed-off-by: George Nash <george.nash@intel.com>
30 files changed:
1  2 
build_common/SConscript
java/common/src/main/java/org/iotivity/base/MVJustWorksOptionMask.java
java/common/src/main/java/org/iotivity/base/OcAccountManager.java
java/common/src/main/java/org/iotivity/base/OcCloudProvisioning.java
java/common/src/main/java/org/iotivity/base/OcDirectPairDevice.java
java/common/src/main/java/org/iotivity/base/OcPlatformInfo.java
java/common/src/main/java/org/iotivity/base/OcProvisioning.java
java/common/src/main/java/org/iotivity/base/OcResource.java
java/common/src/main/java/org/iotivity/base/OcSecureResource.java
java/common/src/main/java/org/iotivity/base/ResourceProperty.java
java/examples-android/provisioningclient/src/main/AndroidManifest.xml
java/examples-android/provisioningclient/src/main/assets/oic_svr_db_client.dat
java/examples-android/provisioningclient/src/main/java/org/iotivity/base/examples/provisioningclient/ProvisioningClient.java
java/examples-android/provisioningclient/src/main/res/menu/menu_secure_provision_client.xml
java/iotivity-android/src/main/java/org/iotivity/base/OcPlatform.java
java/iotivity-android/src/main/java/org/iotivity/ca/CaInterface.java
java/jni/JniConfirmNumListener.cpp
java/jni/JniConfirmNumListener.h
java/jni/JniDisplayPinListener.h
java/jni/JniDisplayVerifyNumListener.cpp
java/jni/JniDisplayVerifyNumListener.h
java/jni/JniOcCloudProvisioning.h
java/jni/JniOcProvisioning.cpp
java/jni/JniOcProvisioning.h
java/jni/JniOcSecureResource.h
java/jni/JniPinCheckListener.h
java/jni/JniProvisionResultListner.h
java/jni/JniSecureUtils.h
java/jni/SConscript
resource/docs/javadocGen.sh

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index f1845b7,0000000..ec263bf
mode 100644,000000..100644
--- /dev/null
@@@ -1,163 -1,0 +1,165 @@@
-                               'JniDisplayPinListener.cpp'
 +#******************************************************************
 +#
 +# Copyright 2014 Intel Mobile Communications GmbH 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.
 +#
 +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 +
 +##
 +# Examples build script
 +##
 +Import('env')
 +# Add third party libraries
 +lib_env = env.Clone()
 +SConscript(env.get('SRC_DIR') + '/resource/third_party_libs.scons', 'lib_env')
 +
 +jni_env = lib_env.Clone()
 +
 +######################################################################
 +# Build flags
 +######################################################################
 +jni_env.AppendUnique(CPPPATH = [
 +              env.get('SRC_DIR') + '/resource/csdk/connectivity/api',
 +              env.get('SRC_DIR') + '/resource/include',
 +              env.get('SRC_DIR') + '/resource/c_common',
 +              env.get('SRC_DIR') + '/resource/c_common/oic_string/include',
 +              env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include',
 +              env.get('SRC_DIR') + '/resource/csdk/stack/include',
 +              env.get('SRC_DIR') + '/resource/csdk/ocsocket/include',
 +              env.get('SRC_DIR') + '/resource/csdk/resource-directory/include',
 +              env.get('SRC_DIR') + '/resource/oc_logger/include',
 +              env.get('SRC_DIR') + '/resource/csdk/logger/include',
 +              env.get('SRC_DIR') + '/resource/../extlibs/boost/boost_1_58_0',
 +              env.get('SRC_DIR') + '/resource/../build_common/android/compatibility',
 +              env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include',
 +              env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/oxm',
 +              env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/internal',
 +              env.get('SRC_DIR') + '/resource/csdk/security/include',
 +              env.get('SRC_DIR') + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include'
 +              ])
 +
 +target_os = env.get('TARGET_OS')
 +jni_env.AppendUnique(CCFLAGS = ['-Wno-error', '-Wno-comment', '-Wno-unused-function', '-Wno-unused-parameter'])
 +if target_os not in ['windows', 'winrt']:
 +      jni_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread'])
 +
 +      # Note: 'pthread' is in libc for android. On other platform, if use
 +      # new gcc(>4.9?) it isn't required, otherwise, it's required
 +      if target_os != 'android':
 +              jni_env.AppendUnique(LIBS = ['-lpthread'])
 +
 +jni_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
 +jni_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
 +jni_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction'])
 +if env.get('SECURED') == '1':
 +#    jni_env.AppendUnique(CPPDEFINES= ['__WITH_TLS__'])
 +    jni_env.PrependUnique(LIBS = ['tinydtls', 'ocprovision', 'ocpmapi'])
 +    jni_env.AppendUnique(CPPPATH = ['#resource/csdk/security/include/internal',
 +                                    '#extlibs/cjson',
 +                                    '#resource/csdk/security/provisioning/include/cloud'])
 +
 +if target_os == 'android':
 +      jni_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
 +      jni_env.AppendUnique(LIBS = ['gnustl_shared'])
 +
 +      if not env.get('RELEASE'):
 +              jni_env.AppendUnique(LIBS = ['log'])
 +
 +if target_os in ['darwin', 'ios']:
 +      jni_env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
 +
 +if env.get('WITH_CLOUD'):
 +      jni_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD'])
 +
 +if env.get('WITH_TCP'):
 +      jni_env.AppendUnique(CPPDEFINES = ['WITH_TCP', '__WITH_TLS__'])
 +
 +with_mq = env.get('WITH_MQ')
 +if 'SUB' in with_mq:
 +      jni_env.AppendUnique(CPPDEFINES = ['MQ_SUBSCRIBER', 'WITH_MQ'])
 +if 'PUB' in with_mq:
 +      jni_env.AppendUnique(CPPDEFINES = ['MQ_PUBLISHER', 'WITH_MQ'])
 +if 'BROKER' in with_mq:
 +      jni_env.AppendUnique(CPPDEFINES = ['MQ_BROKER', 'WITH_MQ'])
 +######################################################################
 +# Source files and Targets
 +######################################################################
 +
 +ca_interface = jni_env.SharedLibrary('ca-interface', ['JniCaInterface.c'])
 +
 +ocstack_files = [
 +                      'JniOcStack.cpp',
 +                      'JniUtils.cpp',
 +                      'JniEntityHandler.cpp',
 +                      'JniOnResourceFoundListener.cpp',
 +                      'JniOnDeviceInfoListener.cpp',
 +                      'JniOnPlatformInfoListener.cpp',
 +                      'JniOnPresenceListener.cpp',
 +                      'JniOnGetListener.cpp',
 +                      'JniOnPutListener.cpp',
 +                      'JniOnPostListener.cpp',
 +                      'JniOnDeleteListener.cpp',
 +                      'JniOnObserveListener.cpp',
 +                      'JniOcRepresentation.cpp',
 +                      'JniOcResourceHandle.cpp',
 +                      'JniOcPresenceHandle.cpp',
 +                      'JniOcRequestHandle.cpp',
 +                      'JniOcResourceRequest.cpp',
 +                      'JniOcResourceResponse.cpp',
 +                      'JniOcPlatform.cpp',
 +                      'JniOcResource.cpp',
 +                      'JniOcResourceIdentifier.cpp',
 +                      'JniOcSecurity.cpp',
 +                      'JniOnDPDevicesFoundListener.cpp',
 +                      'JniOnDirectPairingListener.cpp',
 +                      'JniOcDirectPairDevice.cpp',
 +                      'JniOnPublishResourceListener.cpp',
 +                      'JniOnDeleteResourceListener.cpp',
 +                      'JniOcRDClient.cpp',
 +              ]
 +if ['SUB', 'PUB', 'BROKER'] in with_mq:
 +      ocstack_files += [
 +                              'JniOnMQTopicFoundListener.cpp',
 +                              'JniOnMQSubscribeListener.cpp'
 +                      ]
 +if env.get('SECURED') == '1':
 +      ocstack_files += [
 +                              'JniOcSecureResource.cpp',
 +                              'JniOcProvisioning.cpp',
 +                              'JniSecureUtils.cpp',
 +                              'JniProvisionResultListner.cpp',
 +                              'JniPinCheckListener.cpp',
++                              'JniDisplayPinListener.cpp',
++                              'JniDisplayVerifyNumListener.cpp',
++                              'JniConfirmNumListener.cpp'
 +                      ]
 +if env.get('WITH_CLOUD'):
 +      ocstack_files += [
 +                              'JniOcAccountManager.cpp'
 +                      ]
 +if env.get('WITH_TCP') or env.get('SECURED') == '1':
 +      ocstack_files += [
 +                              'JniOcCloudResultListener.cpp',
 +                              'JniGetAclIdByDeviceListener.cpp'
 +                      ]
 +if env.get('WITH_TCP'):
 +    ocstack_files += ['JniOcCloudProvisioning.cpp']
 +ocstack_jni = jni_env.SharedLibrary('ocstack-jni', ocstack_files)
 +
 +jni_env.InstallTarget(ocstack_jni, 'ocstack-jni')
 +jni_env.InstallTarget(ca_interface, 'ca-interface')
 +
 +env.AppendTarget('ocstack-jni')
  
  #!/bin/bash
  
BASE_PATH="../../java/common/src/main/java/"
TOPDIR="../.."
 -BASE_PATH="${TOPDIR}/android/android_api/base/src/main/java/"
++BASE_PATH="${TOPDIR}/java/common/src/main/java/"
  BASE_PKG="org.iotivity.base"
 -CA_SRCS="$(find ${TOPDIR}/android/android_api/base/src/ -name 'Ca*Interface.java')"
++CA_SRCS="$(find ${TOPDIR}/java/iotivity-android/src/ -name 'Ca*Interface.java')"
  
- CA_SRCS="../../android/android_api/base/src/main/java/org/iotivity/ca/CaBtPairingInterface.java \
-          ../../android/android_api/base/src/main/java/org/iotivity/ca/CaInterface.java"
- RE_PATH="../../service/resource-encapsulation/android/service/src/main/java/"
+ RE_PATH="${TOPDIR}/service/resource-encapsulation/android/service/src/main/java/"
  RE_COMMON_PKG=org.iotivity.service
  RE_CLINET_PKG=org.iotivity.service.client
  RE_SERVER_PKG=org.iotivity.service.server