1. 09 Oct, 2019 1 commit
    • George Nash's avatar
      Add OCEndpointParseException · 66a2d087
      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's avatarGeorge Nash <george.nash@intel.com>
  2. 08 Oct, 2019 3 commits
  3. 07 Oct, 2019 2 commits
  4. 04 Oct, 2019 2 commits
    • George Nash's avatar
      Fix build failures introduced in last merged · d4aaeebc
      George Nash authored
      Change-Id: If3f43cace602572a89256904c7dd7296414557fc
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      Cleanup swig output after merges · cd6026f2
      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's avatarGeorge Nash <george.nash@intel.com>
  5. 29 Aug, 2019 1 commit
    • George Nash's avatar
      Connect new/finalize to new/free for endpoints · 1ead4d2a
      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
      Change-Id: Id11a1c98e724bf44b7ab82e92a529f3859f6e936
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
  6. 23 Aug, 2019 1 commit
  7. 19 Aug, 2019 1 commit
    • George Nash's avatar
      performRandomPinOtm no need to pass pin length · 5d669dc8
      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's avatarGeorge Nash <george.nash@intel.com>
  8. 14 Aug, 2019 1 commit
  9. 07 Aug, 2019 1 commit
    • George Nash's avatar
      Expand and improve documentation · 9e2b7673
      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's avatarGeorge Nash <george.nash@intel.com>
  10. 31 Jul, 2019 1 commit
  11. 30 Jul, 2019 3 commits
    • George Nash's avatar
      Add security stubs for OCObt jni code · b498eb0b
      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's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      Update the lifetime of callbacks · 8e61e012
      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's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      Fix UnsatisfiedLinkError when SECURE=0 · f892c882
      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's avatarGeorge Nash <george.nash@intel.com>
  12. 29 Jul, 2019 2 commits
  13. 23 Jul, 2019 1 commit
  14. 19 Jul, 2019 1 commit
  15. 12 Jul, 2019 3 commits
    • George Nash's avatar
      Expose new APIs added in latest merge · 7fb175cf
      George Nash authored
      This includes a fix for the windows build.
      Change-Id: If2878c888a93752b36627bc6162c55c8db77be57
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      Fixed SECURE=0 build for Java · e7d7c369
      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's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      Work on oc_iotivity_lite_jni.h · 6fd7cc99
      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's avatarGeorge Nash <george.nash@intel.com>
  16. 10 Jul, 2019 1 commit
  17. 09 Jul, 2019 1 commit
  18. 18 Jun, 2019 1 commit
  19. 17 Jun, 2019 1 commit
    • George Nash's avatar
      Expose oc_cloud.h to Java · 612893ed
      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's avatarGeorge Nash <george.nash@intel.com>
  20. 11 Jun, 2019 1 commit
    • George Nash's avatar
      Add new callback functions to swig · 19a2819e
      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's avatarGeorge Nash <george.nash@intel.com>
  21. 23 May, 2019 1 commit
    • George Nash's avatar
      Fixes while verifying Android Build · c0463c18
      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's avatarGeorge Nash <george.nash@intel.com>
  22. 20 May, 2019 1 commit
    • George Nash's avatar
      Rework and Cleanup interfaces · 949bdcf8
      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's avatarGeorge Nash <george.nash@intel.com>
  23. 15 May, 2019 1 commit
    • George Nash's avatar
      Update introspection.i to avoid linker errors · cb8b9982
      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's avatarGeorge Nash <george.nash@intel.com>
  24. 02 May, 2019 1 commit
  25. 01 May, 2019 4 commits
    • George Nash's avatar
      Expose oc_core_res.h to Java · 90124d93
      George Nash authored
      This exposes most of oc_core_res.h to the Java language. With a few
      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's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      Fixed callbacks · bbc83e1d
      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's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      Update oc_endpoint.i · 44023f9e
      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's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      Expose oc_buffer_settings.h to Java · 0a0c9b91
      George Nash authored
      Change-Id: I4d01be4bd54790017d0bb8f8d8a891cb794b6723
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
  26. 30 Apr, 2019 1 commit
  27. 29 Apr, 2019 1 commit
  28. 25 Apr, 2019 1 commit