X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fsecurity%2Fprovisioning%2Finclude%2Foxm%2Foxmjustworks.h;h=0b9f81e8531264584b653fbecd4949db712c64e7;hb=390866079e285d2c74918432c0d597d5da52f8a0;hp=4f2b1123245e1e5ed445246385381ee4a4c8bc42;hpb=3e9402ad71cb3e93266a77796f44d17bab9853fd;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/security/provisioning/include/oxm/oxmjustworks.h b/resource/csdk/security/provisioning/include/oxm/oxmjustworks.h index 4f2b112..0b9f81e 100644 --- a/resource/csdk/security/provisioning/include/oxm/oxmjustworks.h +++ b/resource/csdk/security/provisioning/include/oxm/oxmjustworks.h @@ -1,22 +1,22 @@ -/* ***************************************************************** - * - * Copyright 2015 Samsung Electronics 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. - * - * *****************************************************************/ +//****************************************************************** +// +// Copyright 2015 Samsung Electronics 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. +// +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #ifndef OXM_JUST_WORKS_H_ #define OXM_JUST_WORKS_H_ @@ -35,36 +35,46 @@ extern "C" { /** * In case of just works OxM, no need to implement. + * + * @return ::OC_STACK_SUCCESS in case of success and other value otherwise. */ OCStackResult LoadSecretJustWorksCallback(OTMContext_t* UNUSED_PARAM); /** * To establish a secure channel with anonymous cipher suite * - * @param[in] selectedDeviceInfo Selected device infomation - * @return OC_STACK_SUCCESS in case of success and other value otherwise. + * @param otmCtx Context of OTM, It includes current device information. + * + * @return ::OC_STACK_SUCCESS in case of success and other value otherwise. */ OCStackResult CreateSecureSessionJustWorksCallback(OTMContext_t* otmCtx); /** * Generate payload for select OxM request. * - * @param[in] selectedDeviceInfo Selected device infomation - * @return DOXM JSON payload including the selected OxM. - * NOTE : Returned memory should be deallocated by caller. + * @param otmCtx Context of OTM, It includes current device information. + * @param cborPayload is the DOXM CBOR payload including the selected OxM. + * @note Returned memory should be deallocated by caller. + * @param cborSize is the size of the cborPayload. + * + * @return ::OC_STACK_SUCCESS in case of success and other value otherwise. */ -char* CreateJustWorksSelectOxmPayload(OTMContext_t* otmCtx); +OCStackResult CreateJustWorksSelectOxmPayload(OTMContext_t *otmCtx, uint8_t **cborPayload, + size_t *cborSize); /** * Generate payload for owner transfer request. * - * @param[in] selectedDeviceInfo Selected device infomation - * @return DOXM JSON payload including the owner information. - * NOTE : Returned memory should be deallocated by caller. + * @param otmCtx Context of OTM, It includes current device information. + * @param cborPayload is the DOXM CBOR payload including the owner information. + * @note Returned memory should be deallocated by caller. + * @param cborSize is the size of the cborPayload. + * + * @return ::OC_STACK_SUCCESS in case of success and other value otherwise. */ -char* CreateJustWorksOwnerTransferPayload(OTMContext_t* otmCtx); - +OCStackResult CreateJustWorksOwnerTransferPayload(OTMContext_t *otmCtx, uint8_t **cborPayload, + size_t *cborSize); #ifdef __cplusplus } #endif -#endif //OXM_JUST_WORKS_H_ \ No newline at end of file +#endif //OXM_JUST_WORKS_H_