Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / resource / csdk / security / provisioning / include / oxm / oxmjustworks.h
1 /* *****************************************************************
2  *
3  * Copyright 2015 Samsung Electronics All Rights Reserved.
4  *
5  *
6  *
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
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  * *****************************************************************/
20
21 #ifndef OXM_JUST_WORKS_H_
22 #define OXM_JUST_WORKS_H_
23
24 #include "ocstack.h"
25 #include "securevirtualresourcetypes.h"
26 #include "ownershiptransfermanager.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif // __cplusplus
31
32 //
33 //Declaration of default callback functions for just works OxM.
34 //
35
36 /**
37  * In case of just works OxM, no need to implement.
38  */
39 OCStackResult LoadSecretJustWorksCallback(OTMContext_t* UNUSED_PARAM);
40
41 /**
42  * To establish a secure channel with anonymous cipher suite
43  *
44  * @param[in] selectedDeviceInfo Selected device infomation
45  * @return OC_STACK_SUCCESS in case of success and other value otherwise.
46  */
47 OCStackResult CreateSecureSessionJustWorksCallback(OTMContext_t* otmCtx);
48
49 /**
50  * Generate payload for select OxM request.
51  *
52  * @param[in] selectedDeviceInfo Selected device infomation
53  * @return DOXM JSON payload including the selected OxM.
54  *         NOTE : Returned memory should be deallocated by caller.
55  */
56 char* CreateJustWorksSelectOxmPayload(OTMContext_t* otmCtx);
57
58 /**
59  * Generate payload for owner transfer request.
60  *
61  * @param[in] selectedDeviceInfo Selected device infomation
62  * @return DOXM JSON payload including the owner information.
63  *         NOTE : Returned memory should be deallocated by caller.
64  */
65 char* CreateJustWorksOwnerTransferPayload(OTMContext_t* otmCtx);
66
67 #ifdef __cplusplus
68 }
69 #endif
70 #endif //OXM_JUST_WORKS_H_