- 09 Oct, 2019 1 commit
-
-
George Nash authored
This adds OCEndpointParseException that will be thrown if stringToEndpoint fails to parse the passed in string. Initially I would have liked to use the java.text.ParseException but it expects the errorOffset value which is the position where the parse error occured in the source string. We don't have a mechanism for discovering the errorOffset so a regular exception with a error message has been used instead. Additionally updated the NullPointerException code for setDi to use the C/C++ abstraction macros for Java method calls. Change-Id: I76442508c0b5b6c84d8c5ba303f0d982d550e5b6 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 08 Oct, 2019 3 commits
-
-
George Nash authored
This commit removes the default constructor generation for the OCRole class. At this time the user must use OCObt.addRoleId to create and add roles for the onboarding tool. This also prevents SWIG generating setter functions for role and authority. These should also be assigned using the addRoleId method. Change-Id: I396f5f45724d7f714c035866eece18f079dcd54c Signed-off-by:
George Nash <george.nash@intel.com>
-
Larry Sachs authored
Change-Id: I1e2a868803f68ece5b78655c10c3b5c4784916fa Signed-off-by:
Larry Sachs <larry.j.sachs@intel.com>
-
George Nash authored
If null is passed in for the endpoint or for di when calling the OCEndpointUtil.setDi method it will now throw a NullPointerException that will avoid a segfault from the C code. Change-Id: I3f29486c21e08f3718752efbd108ce0401defa24 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 07 Oct, 2019 2 commits
-
-
George Nash authored
If initPut or initPost methods fail this will release the jni_sync_lock before returning to prevent the code from deadlocking. Change-Id: Ie85c9eee3a4e4649f4af8b960264a8d25955adfe Signed-off-by:
George Nash <george.nash@intel.com>
-
George Nash authored
This exposes most of the data types in the new oc_acl_common.h header to Java. Updated cloud certification app and onboarding tools to match what is found in the C version of the tools. Change-Id: I413abb229749d93a1bfe97673ab51af7b61fb997 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 04 Oct, 2019 2 commits
-
-
George Nash authored
Change-Id: If3f43cace602572a89256904c7dd7296414557fc Signed-off-by:
George Nash <george.nash@intel.com>
-
George Nash authored
Add the code to map oc_resource_set_properties_cbs function to the Java resourceSetPropertiesHandlers method Also add the two callbacks handler classes for OCGetPropertiesHandler and OCSetPropertiesHandler Some cleanup code for - OCCollections - OCCloudContex and others The structs oc_link_params_t and oc_rt_t were ignored in the swig output. No public functions that take or return these structs could be found. Change-Id: Iebb1ca8387ff119623af1765a5c0717a34ecd2bd Signed-off-by:
George Nash <george.nash@intel.com>
-
- 29 Aug, 2019 1 commit
-
-
George Nash authored
This extends the endpoint struct for swig so the generated code will call oc_new_endpoint and oc_free_endpoint when new and finalize are called. Endpoint(s) are set to NULL after calling oc_free_endpoint or oc_free_server_endpoints is called from Java. This will prevent double freeing memory which would result in a segfault. code that returns or accept multiple endpoints in a list now indicate that fact because the variable name is plural 'endpoints' Change-Id: Id11a1c98e724bf44b7ab82e92a529f3859f6e936 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 23 Aug, 2019 1 commit
-
-
George Nash authored
The Java stringToEndpoint method now returns an OCEndpoint In addition a collection of unit tests were added to verify the code. Change-Id: I6040d9b48ca214d83daf49a59f6b2ba8ff2903dd Signed-off-by:
George Nash <george.nash@intel.com>
-
- 19 Aug, 2019 1 commit
-
-
George Nash authored
There was an issue in the generated code. It was supposed to automatically find the length of the pin without the user needing to pass it as a sepparate variable. There was a small typo in the swig typemap which caused the code to ask for the pin length. Change-Id: If3f3df8dd158fdb3b0cee3270bb98cc98f3cec79 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 14 Aug, 2019 1 commit
-
-
George Nash authored
The enum was renamed but the name change was missed in the interface file. Change-Id: I1ae294be4813f8cc38130ab63c4978c51c8f7b15 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 07 Aug, 2019 1 commit
-
-
George Nash authored
This expands the documentation to generate documentation for the OCRep class when swig is run. This also cleans up the some of documentation for the OCMain class as well. Mostly whitespace cleanup. In The process of developing the documentation the clearCborErrno was added since the documentation process exposed the fact that there was no way to clear the CborErrno from Java. The Java function getRepError was removed it was returning the same information as getCborErrno. Change-Id: Iee237168c122f3d851b19c1cf967de304ab26147 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 31 Jul, 2019 1 commit
-
-
George Nash authored
Change-Id: I529e32d4f104e8d6e088d29f8e5da4ce986aeaa5 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 30 Jul, 2019 3 commits
-
-
George Nash authored
This change allows us to have a consistant Java JAR API regardless of the SECURE build options. Change-Id: I70061fa2bf9d06dc59f16c764d652919095f6b91 Signed-off-by:
George Nash <george.nash@intel.com>
-
George Nash authored
Add code to release the global ref after a callback will no longer be called. Change-Id: I1da2c96f0a672d7897473ef7391c99732c6b1e66 Signed-off-by:
George Nash <george.nash@intel.com>
-
George Nash authored
When built with SECURE=0 the following functions implementation is ifdef'ed out and will cause an UnsatisfiedLinkError when the functions are called from a Java progeam. - oc_reset - oc_core_regen_unique_ids - oc_auto_assert_roles - oc_assert_all_roles We call a dummy function that will just call the C function if SECURED=0 it will do nothing and return. When building SECURE=0 all of the methods from oc_obt.h are excluded from the build. To make this possible some more selective logic was added to the swig Makefile to not process oc_obt.i and not copy files from the oc folder that reference generated code from oc_obt.i. Change-Id: I82eddbc894df67a51127929eecf650c98b115b4f Signed-off-by:
George Nash <george.nash@intel.com>
-
- 29 Jul, 2019 2 commits
-
-
George Nash authored
SWIG currently does not have generic way to generate documentation in the output so this use hacks to generate the required documentation. This copies over the documentation from oc_api.h to the Java output. Change-Id: Id80acf08a0035517b57a83ca322645ea98914046 Signed-off-by:
George Nash <george.nash@intel.com>
-
George Nash authored
Two of the wraper functions were not returning their return values. This fixes that failure. Change-Id: I22e97c81f97ffa556a51db7bfa350dda66e472fa Signed-off-by:
George Nash <george.nash@intel.com>
-
- 23 Jul, 2019 1 commit
-
-
George Nash authored
Change-Id: I8edc2a928fbcfd4954b17e2128aaa1c1ed38e442 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 19 Jul, 2019 1 commit
-
-
George Nash authored
Change-Id: Ie4be7e6ae32feac13bf106e89039889f8c9ba28f Signed-off-by:
George Nash <george.nash@intel.com>
-
- 12 Jul, 2019 3 commits
-
-
George Nash authored
This includes a fix for the windows build. Change-Id: If2878c888a93752b36627bc6162c55c8db77be57 Signed-off-by:
George Nash <george.nash@intel.com>
-
George Nash authored
This fixes issues when building without the security build option The introspection caused build issues because variables were not used the security build option was not being exported to the SWIG make file SWIG make file not checks for SECURE build option. If SECURE is not explicity set to zero it defaults to build with security. Change-Id: I626fdaf890e8b0fd953ad452d10ae9ebf3073ac0 Signed-off-by:
George Nash <george.nash@intel.com>
-
George Nash authored
Break oc_iotivity_lite_jni.h into header and code file, this helps solve many build issues that resulted from not doing this. Moved the JNI_onload function from the storage code to this new location. This makes it possible to store pointer to the JavaVM as soon as the library is loaded. This helps remove many of the workarounds that were added to the code to grab the JavaVM pointer. All of the Java jclass varaible are now loaded in the JNI_onload function. This insures that the classes are avalible to the jni code instantly. No need to make sure the OCMain.init function is called before using a Java class in the jni code. Added some functions to manage the jni_callbacks list. Insuring all jni_callback_data is managed and stored in this central location. Change-Id: I426cb39e9a233cbddd754011b3a3939a72df3257 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 10 Jul, 2019 1 commit
-
-
George Nash authored
Found a few locations that still were not outputing camelCase which is what we expect in Java. Change-Id: I8987c806afb9e29f76abdb0cf315d93d5d836155 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 09 Jul, 2019 1 commit
-
-
George Nash authored
The toString function now returns a String instead of having to pass in an array of size 1 which is unusual for Java. Change-Id: I30ddd6796277f1bd0cdb29174072d83c7437b246 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 18 Jun, 2019 1 commit
-
-
George Nash authored
Trying to keep the names of the Java handlers as close to the C source code names. Change-Id: I4125e4a6cb19549139eeac7ef0bc4ff55c8ee500 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 17 Jun, 2019 1 commit
-
-
George Nash authored
This Exposes oc_cloud.h and oc_session_events.h to to the Java language bindings using swig. A lot of ifdefs to handle cases when OC_CLOUD and OC_TCP are not defined when the code is compiled. Change-Id: I42340f6d71159d6d12ce7119bbe01142fc3f2c10 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 11 Jun, 2019 1 commit
-
-
George Nash authored
This adds the following functions to the swig generated java: from oc_api.h: - oc_do_site_local_ipv6_discovery - oc_do_realm_local_ipv6_discovery - oc_do_realm_local_ipv6_multicast - oc_do_site_local_ipv6_multicast from oc_obt.h: - oc_obt_discover_unowned_devices_site_local_ipv6 - oc_obt_discover_unowned_devices_realm_local_ipv6 - oc_obt_discover_owned_devices_site_local_ipv6 - oc_obt_discover_owned_devices_realm_local_ipv6 ignore functions from oc_client_state.h: - oc_ri_free_client_cbs_by_endpoint - oc_ri_fre_client_cbs_by_mid Change-Id: If8ce5c91bca88891c65ed20f997dc05e36a6fdc0 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 23 May, 2019 1 commit
-
-
George Nash authored
- swig/Makefile was using jni.h from Linux not Android. Although the jni.h files are very similar they are not the same resulting in different build warnings/errors. - oc_introspection_wrap was using logging but did not include oc_log.h - Fixed call to AttachCurrentThread when jni.h switched to Android variant. - Add some build flags to reduce the build warnings from swig generated code. Change-Id: Ibb25db39be0056dbea45863bea4c472e157ae423 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 20 May, 2019 1 commit
-
-
George Nash authored
This reworks that oc_ri.i interface to pull in the contents of oc_ri.h from an %include statement. This has the advantage that we don't have copies of large structs that must match between. It also means going through and updating the ignore list since we are not exposing any of the functions from oc_ri.h to Java just structs and enums. Fixed an error in how oc_core_add_new_device was exposed to Java in oc_core_res.i Swig does not understand the OC_LIST_STRUCT macro. Ignore struct members that use that macro. May need to revisit those members in the future for now there are no known instances that the end user will access the member variables. testGetQueryValues disabled till we can find a way to set the query value using the framework not setting directly which causes memory leaks. Change-Id: I873b30fbc4420221c965a35e499dbe1acf5a8716 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 15 May, 2019 1 commit
-
-
George Nash authored
This adds some ifdefs to the that handles situation the IDD build option is not specified so the build will not fail do to a linkter issue. At the same time I moved the code in oc_storage.i so it was inline. This reduces the need to repeate the function name so is is picked up by swig. Change-Id: I5ac7a6f8c476fba441b6b6128d329964c5b2da8c Signed-off-by:
George Nash <george.nash@intel.com>
-
- 02 May, 2019 1 commit
-
-
Javier Guerra Melgares authored
Add new swig interfaces to use C API from Java. Add Makefile to build the swig module. Change-Id: I68fd5f23960c58e550aed934630806c6e5bc2d71 Signed-off-by:
Javier Guerra Melgares <javier.guerra@dekra.com> Reviewed-by:
Larry Sachs <larry.j.sachs@intel.com> Reviewed-by:
Rick Bell <richard.s.bell@intel.com> Reviewed-by:
George Nash <george.nash@intel.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 01 May, 2019 4 commits
-
-
George Nash authored
This exposes most of oc_core_res.h to the Java language. With a few exceptions. Functions oc_store_uri and oc_core_populate_resource are not exposed yet because due to handling of callbacks and oc_string_t pointers. The oc_platform_info_t struct was named not just typedefed The oc_device_infor_t struct was named not just typedefed Structs were given names so the swig scripts could ignore exposing parts of the structs that are can not be used in Java. Change-Id: I29e3461ea925d001df2769b23db5e5ff49a53a5b Signed-off-by:
George Nash <george.nash@intel.com>
-
George Nash authored
This fixes the callback versions of the addDevice and initPlatform functions. I think I inadvertantly removed the version of the functions that exposed the callback in a past cleanup this restors the verson of the functions that calls the handler. Change-Id: Iccab8ef4ca22761df440bae708563fc5aaa1fcd2 Signed-off-by:
George Nash <george.nash@intel.com>
-
George Nash authored
This will update oc_endpoint.i so it no longer generates SWIGTYPEs in its output. Change-Id: I19afcec7e8829b2d128afe047c9ebcd54ec05e9e Signed-off-by:
George Nash <george.nash@intel.com>
-
George Nash authored
Change-Id: I4d01be4bd54790017d0bb8f8d8a891cb794b6723 Signed-off-by:
George Nash <george.nash@intel.com>
-
- 30 Apr, 2019 1 commit
-
-
George Nash authored
Also add it to the java implementation of the obt. Change-Id: I45b92f1cd031981bc243914a96d12a564aafb870 Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/29467Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Larry Sachs <larry.j.sachs@intel.com> Reviewed-by:
Rick Bell <richard.s.bell@intel.com>
-
- 29 Apr, 2019 1 commit
-
-
George Nash authored
This reverts commit 4def6e82. Some how this commit made it into the branch without going through the full review process. As indicated by the lack of Reviewed-by tag. Change-Id: Ibcc970b8882b1874aa82ae7be964169a2f207485 Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/29466Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 25 Apr, 2019 1 commit
-
-
Javier Guerra Melgares authored
Add new swig interfaces to use C API from Java. Add Makefile to build the swig module. Change-Id: I55d8af5ca5ad73e3bb89f21824f74cffa8599ed0 Signed-off-by:
Javier Guerra Melgares <javier.guerra@dekra.com>
-