1 //******************************************************************
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 #ifndef OXM_JUST_WORKS_H_
22 #define OXM_JUST_WORKS_H_
25 #include "securevirtualresourcetypes.h"
26 #include "ownershiptransfermanager.h"
33 //Declaration of default callback functions for just works OxM.
37 * In case of just works OxM, no need to implement.
39 * @return ::OC_STACK_SUCCESS in case of success and other value otherwise.
41 OCStackResult LoadSecretJustWorksCallback(OTMContext_t* UNUSED_PARAM);
44 * To establish a secure channel with anonymous cipher suite
46 * @param otmCtx Context of OTM, It includes current device information.
48 * @return ::OC_STACK_SUCCESS in case of success and other value otherwise.
50 OCStackResult CreateSecureSessionJustWorksCallback(OTMContext_t* otmCtx);
53 * Generate payload for select OxM request.
55 * @param otmCtx Context of OTM, It includes current device information.
56 * @param cborPayload is the DOXM CBOR payload including the selected OxM.
57 * @note Returned memory should be deallocated by caller.
58 * @param cborSize is the size of the cborPayload.
60 * @return ::OC_STACK_SUCCESS in case of success and other value otherwise.
62 OCStackResult CreateJustWorksSelectOxmPayload(OTMContext_t *otmCtx, uint8_t **cborPayload,
66 * Generate payload for owner transfer request.
68 * @param otmCtx Context of OTM, It includes current device information.
69 * @param cborPayload is the DOXM CBOR payload including the owner information.
70 * @note Returned memory should be deallocated by caller.
71 * @param cborSize is the size of the cborPayload.
73 * @return ::OC_STACK_SUCCESS in case of success and other value otherwise.
75 OCStackResult CreateJustWorksOwnerTransferPayload(OTMContext_t *otmCtx, uint8_t **cborPayload,
80 #endif //OXM_JUST_WORKS_H_