Commit 7fb175cf authored by George Nash's avatar George Nash

Expose new APIs added in latest merge

This includes a fix for the windows build.

Change-Id: If2878c888a93752b36627bc6162c55c8db77be57
Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
parent ca9f6089
......@@ -259,6 +259,7 @@
<ClInclude Include="..\..\..\security\oc_csr.h" />
<ClInclude Include="..\..\..\security\oc_doxm.h" />
<ClInclude Include="..\..\..\security\oc_keypair.h" />
<ClInclude Include="..\..\..\security\oc_obt_internal.h" />
<ClInclude Include="..\..\..\security\oc_pstat.h" />
<ClInclude Include="..\..\..\security\oc_roles.h" />
<ClInclude Include="..\..\..\security\oc_sp.h" />
......@@ -403,6 +404,8 @@
<ClCompile Include="..\..\..\security\oc_doxm.c" />
<ClCompile Include="..\..\..\security\oc_keypair.c" />
<ClCompile Include="..\..\..\security\oc_obt.c" />
<ClCompile Include="..\..\..\security\oc_obt_certs.c" />
<ClCompile Include="..\..\..\security\oc_obt_otm_cert.c" />
<ClCompile Include="..\..\..\security\oc_obt_otm_justworks.c" />
<ClCompile Include="..\..\..\security\oc_obt_otm_randompin.c" />
<ClCompile Include="..\..\..\security\oc_pki.c" />
......
......@@ -403,6 +403,12 @@
<ClCompile Include="..\..\..\api\cloud\rd_client.c">
<Filter>Core\cloud</Filter>
</ClCompile>
<ClCompile Include="..\..\..\security\oc_obt_certs.c">
<Filter>Security</Filter>
</ClCompile>
<ClCompile Include="..\..\..\security\oc_obt_otm_cert.c">
<Filter>Security</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\deps\tinycbor\src\cbor.h">
......@@ -624,6 +630,9 @@
<ClInclude Include="..\..\..\api\oc_session_events_internal.h">
<Filter>Core</Filter>
</ClInclude>
<ClInclude Include="..\..\..\security\oc_obt_internal.h">
<Filter>Security</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="mbedTLS">
......
......@@ -1103,7 +1103,7 @@ bool jni_assert_role(const char *role, const char *authority, oc_endpoint_t *end
#endif /* OC_SECURITY && OC_PKI */
}
%}
%rename(assertAllRoles) oc_assert_all_roles;
%ignore oc_send_ping;
%rename(sendPing) jni_send_ping;
%inline %{
......
......@@ -92,5 +92,6 @@ SWIGEXPORT jobject JNICALL Java_org_iotivity_OCEndpointUtilJNI_toString(JNIEnv *
%rename(ipv6EndpointIsLinkLocal) oc_ipv6_endpoint_is_link_local;
%rename(compare) oc_endpoint_compare;
%rename(compareAddress) oc_endpoint_compare_address;
%rename(setLocalAddress) oc_endpoint_set_local_address;
%include "oc_endpoint.h"
/*******************End oc_endpoint.h***********************/
\ No newline at end of file
......@@ -3,6 +3,7 @@
%include "typemaps.i"
%include "iotivity.swg"
%import "oc_api.i"
%import "oc_uuid.i"
%pragma(java) jniclasscode=%{
......@@ -289,7 +290,6 @@ int jni_obt_request_random_pin(oc_uuid_t *uuid, oc_obt_device_status_cb_t callba
JCALL2(ReleaseStringUTFChars, jenv, $input, $1);
}
%ignore oc_obt_perform_random_pin_otm;
%rename(performRandomPinOtm) jni_obt_perform_random_pin_otm;
%inline %{
......@@ -306,6 +306,24 @@ int jni_obt_perform_random_pin_otm(oc_uuid_t *uuid, const char *pin, size_t pin_
}
%}
%ignore oc_obt_perform_cert_otm;
%rename(performCertOtm) jni_obt_perform_cert_otm;
%inline %{
int jni_obt_perform_cert_otm(oc_uuid_t *uuid, oc_obt_device_status_cb_t callback, jni_callback_data *jcb)
{
OC_DBG("JNI: %s\n", __func__);
OC_DBG("JNI: - lock %s\n", __func__);
jni_mutex_lock(jni_sync_lock);
int return_value = oc_obt_perform_cert_otm(uuid, callback, jcb);
jni_mutex_unlock(jni_sync_lock);
OC_DBG("JNI: - unlock %s\n", __func__);
return return_value;
}
%}
%rename(addRoleId) oc_obt_add_roleid;
%rename(freeRoleId) oc_obt_free_roleid;
%ignore oc_obt_device_hard_reset;
%rename(deviceHardReset) jni_obt_device_hard_reset;
%inline %{
......@@ -379,8 +397,39 @@ int jni_obt_provision_pairwise_credentials(oc_uuid_t *uuid1, oc_uuid_t *uuid2, o
}
%}
%ignore oc_obt_provision_identity_certificate;
%rename(provisionIdentityCertificate) jni_obt_provision_identity_certificate;
%inline %{
int jni_obt_provision_identity_certificate(oc_uuid_t *uuid, oc_obt_status_cb_t callback, jni_callback_data *jcb)
{
OC_DBG("JNI: %s\n", __func__);
OC_DBG("JNI: - lock %s\n", __func__);
jni_mutex_lock(jni_sync_lock);
int return_value = oc_obt_provision_identity_certificate(uuid, callback, jcb);
jni_mutex_unlock(jni_sync_lock);
OC_DBG("JNI: - unlock %s\n", __func__);
return return_value;
}
%}
%ignore oc_obt_provision_role_certificate;
%rename(provisionRoleCertificate) jni_obt_provision_role_certificate;
%inline %{
int jni_obt_provision_role_certificate(oc_role_t *roles, oc_uuid_t *uuid, oc_obt_status_cb_t callback, jni_callback_data *jcb)
{
OC_DBG("JNI: %s\n", __func__);
OC_DBG("JNI: - lock %s\n", __func__);
jni_mutex_lock(jni_sync_lock);
int return_value = oc_obt_provision_role_certificate(roles, uuid, callback, jcb);
jni_mutex_unlock(jni_sync_lock);
OC_DBG("JNI: - unlock %s\n", __func__);
return return_value;
}
%}
%rename(newAceForSubject) oc_obt_new_ace_for_subject;
%rename(newAceForConnection) oc_obt_new_ace_for_connection;
%rename(newAceForRole) oc_obt_new_ace_for_role;
%rename(aceNewResource) oc_obt_ace_new_resource;
%rename(aceResourceSetHref) oc_obt_ace_resource_set_href;
%rename(aceResourceSetNumRt) oc_obt_ace_resource_set_num_rt;
......@@ -404,4 +453,35 @@ int jni_obt_provision_ace(oc_uuid_t *subject, oc_sec_ace_t *ace, oc_obt_device_s
%}
%rename(freeAce) oc_obt_free_ace;
%ignore oc_obt_provision_role_wildcard_ace;
%rename(provisionRoleWildcardAce) jni_obt_provision_role_wildcard_ace;
%inline %{
int jni_obt_provision_role_wildcard_ace(oc_uuid_t *subject, const char *role, const char *authority,
oc_obt_device_status_cb_t callback, jni_callback_data *jcb)
{
OC_DBG("JNI: %s\n", __func__);
OC_DBG("JNI: - lock %s\n", __func__);
jni_mutex_lock(jni_sync_lock);
int return_value = oc_obt_provision_role_wildcard_ace(subject, role, authority, callback, jcb);
jni_mutex_unlock(jni_sync_lock);
OC_DBG("JNI: - unlock %s\n", __func__);
return return_value;
}
%}
%ignore oc_obt_provision_auth_wildcard_ace;
%rename(provisionAuthWildcardAce) jni_obt_provision_auth_wildcard_ace;
%inline %{
int jni_obt_provision_auth_wildcard_ace(oc_uuid_t *subject, oc_obt_device_status_cb_t callback, jni_callback_data *jcb)
{
OC_DBG("JNI: %s\n", __func__);
OC_DBG("JNI: - lock %s\n", __func__);
jni_mutex_lock(jni_sync_lock);
int return_value = oc_obt_provision_auth_wildcard_ace(subject, callback, jcb);
jni_mutex_unlock(jni_sync_lock);
OC_DBG("JNI: - unlock %s\n", __func__);
return return_value;
}
%}
%include "oc_obt.h";
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment