1. 29 Jan, 2020 3 commits
  2. 28 Jan, 2020 3 commits
    • George Nash's avatar
      Document random PIN and reset functions in oc_api.h · 86d25d49
      George Nash authored
      This adds doxygen documentation for:
       - oc_random_pin_cb_t - callback function
       - oc_set_random_pin_callback
       - oc_reset
       - oc_reset_device
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      Documentation for oc_set_factory_presets_cb · d0884c70
      George Nash authored
      Doxygen documentation added for
       - oc_set_factory_presets_cb
       - oc_factory_presets_cb_t
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      Add oc_endpoint_string_parse_path function · 752a8cfc
      George Nash authored
      This enables getting just the uri portion of an endpoint from
      an endpoint string.
      This is useful for a few reasons.
      - The introspection contains an endpoint string to
        the introspection data. Since we typically already have the
        endpoint there is no need to used the oc_string_to_endpoint
        function and allocate another copy of the endpoint when we are
        only interested in the path part of the string.
      - Language bindings with Java. Functions that return multiple
        values through variables require unusual workarounds to get
        a clean Java API.  By making this availible in a separate
        function we can make two functions with only one
        responability. Making the Java APIs cleaner.
      While testing the oc_endpoint_string_parse_path function
      multiple failures showed up in the StringToEndpoint unit test.
      Once I figured out the failures were due to the fact that my
      build did not have IPV4=1 I updated the StringToEndpoint test so
      it will not test IPV4 strings if OC_IPV4 is not defined.
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
  3. 25 Jan, 2020 1 commit
    • George Nash's avatar
      Add OC_STORAGE define that is set in oc_config.h · b0e9dac7
      George Nash authored
      Persistant storage is currently only enabled if OC_SECURITY
      is defined.  This has lead implementation problems when
      implementing features like introspection, cloud, or
      software-update which also require persistant storage.
      This commit replaces the `#ifdef OC_SECURITY` with
      `#ifdef OC_STORAGE` in oc_storage.c.
      Inside config.h OC_STORAGE is defined if OC_SECURITY, OC_IDD_API
      OC_SOFTWARE_UPDATE, or OC_SECURITY is defined.
      Also updated samples that call oc_storage_config so they call it
      if OC_STORAGE is defined instead of OC_SECURITY.
      Removed the dummy storage implmentation from the
      oc_cloud_storage.c since OC_STORAGE is now defined by default
      when OC_CLOUD is defined.
      Some preprocessor check were added to check it one of the
      features that require OC_STORAGE is set but OC_STORAGE is not
      set. This will cause a build error and inform developers to
      check oc_config.h to make sure OC_STORAGE is set there.
      Change-Id: I9a9242349e939393f190cab373fe7d0252ae656c
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
  4. 24 Jan, 2020 2 commits
    • George Nash's avatar
      update swig interfaces for fargo · 8a659eef
      George Nash authored
      adds new swig interface file oc_enums.i exposes enums and
      functions from oc_enums.h file
       - oc_resource_tag_pos_desc as OCMain.resourceTagPositionDescription
       - oc_resource_tag_pos_rel as OCMain.resourceTagPositionRelative
       - oc_resource_tag_func_desc as OCMain.resourceTagFunctionDescription
      expose new tag_pos_* properties from oc_resource_t and
      Updated windows build and swig makefile to handle new oc_enums.i
      Change-Id: Ib91bfbf9c5176b6268e7d55c418b9e4cff4326c0
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
    • Kishen Maloor's avatar
      oc_collection: add NULL check · 75cc3553
      Kishen Maloor authored
      Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
  5. 23 Jan, 2020 6 commits
  6. 22 Jan, 2020 4 commits
  7. 21 Jan, 2020 3 commits
  8. 16 Jan, 2020 1 commit
  9. 15 Jan, 2020 3 commits
  10. 14 Jan, 2020 2 commits
  11. 10 Jan, 2020 6 commits
  12. 08 Jan, 2020 4 commits
  13. 07 Jan, 2020 2 commits
    • George Nash's avatar
      Windows, build swig interfac oc_connectivity.i on debug · 9cee3c5e
      George Nash authored
      Due to a configuration issue the build was only building
      oc_connectivity.i when the release build option was selected
      This change will cause oc_connectivity.i to be built for both
      release and debug build.
      Additionally oc_connectivity_wrap.c was also added to the build
      of the iotivity-lite-jni project with out adding that none of
      the OCConnectivity functions can be called from Java without
      causing a library link error.
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
    • George Nash's avatar
      String to endpoint fix parse error if uri is NULL · 9d101d12
      George Nash authored
      The start of the uri path must still be calculated even if uri is
      NULL (i.e. user is not interested in parsing the path component of
      the endpoint). This must be calculated since this value is used
      in later calculations for finding the port number.
      See lines 421-425 the `u` variable must be calculated for the code
      to properly calculate `p`. Variable `p` must be accurate or the
      address_len will be incorrect resulting in an incorrect string
      being sent for DNS lookup. Resulting in an error even for valid
      endpoint strings.
      With out this fix:
      `coap://openconnectivity.org/alpha` and
      `coaps+tcp://` would both return errors
      when the uri param was NULL.
      With this fix those endpoint strings are properly parsed.
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>