1 /* *****************************************************************
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
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_RANDOM_PIN_H_
22 #define OXM_RANDOM_PIN_H_
25 #include "securevirtualresourcetypes.h"
26 #include "ownershiptransfermanager.h"
28 #include "pinoxmcommon.h"
35 * Callback implementation to input the PIN code from user.
37 * @otmCtx Context of OTM, It includes current device infomation.
38 * @return OC_STACK_SUCCESS in case of success and other value otherwise.
40 OCStackResult InputPinCodeCallback(OTMContext_t* otmCtx);
43 * Callback implemenration to establish a secure channel with PSK cipher suite
45 * @param[in] selectedDeviceInfo Selected device infomation
46 * @return OC_STACK_SUCCESS in case of success and other value otherwise.
48 OCStackResult CreateSecureSessionRandomPinCallback(OTMContext_t *otmCtx);
51 * Generate payload for select OxM request.
53 * @param[in] selectedDeviceInfo Selected device infomation
54 * @return DOXM JSON payload including the selected OxM.
55 * NOTE : Returned memory should be deallocated by caller.
57 char* CreatePinBasedSelectOxmPayload(OTMContext_t* otmCtx);
60 * Generate payload for owner transfer request.
62 * @param[in] selectedDeviceInfo Selected device infomation
63 * @return DOXM JSON payload including the owner information.
64 * NOTE : Returned memory should be deallocated by caller.
66 char* CreatePinBasedOwnerTransferPayload(OTMContext_t* otmCtx);
71 #endif //OXM_RANDOM_PIN_H_