1 /*
2  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /*
18  * DOC: contains CoAP north bound interface declarations
19  */
20 
21 #ifndef _WLAN_COAP_UCFG_API_H_
22 #define _WLAN_COAP_UCFG_API_H_
23 
24 #include "qdf_status.h"
25 #include <wlan_objmgr_vdev_obj.h>
26 #include "wlan_coap_public_structs.h"
27 
28 #ifdef WLAN_FEATURE_COAP
29 /**
30  * ucfg_coap_offload_reply_enable() - API to enable CoAP offload reply
31  * @vdev: pointer to vdev object
32  * @param: parameters of CoAP offload reply
33  *
34  * Return: status of operation
35  */
36 QDF_STATUS
37 ucfg_coap_offload_reply_enable(struct wlan_objmgr_vdev *vdev,
38 			       struct coap_offload_reply_param *param);
39 
40 /**
41  * ucfg_coap_offload_reply_disable() - API to disable CoAP offload reply
42  * @vdev: pointer to vdev object
43  * @req_id: request id
44  * @cbk: callback function to invoke with cached data
45  * @context: caller-supplied context
46  *
47  * Return: status of operation
48  */
49 QDF_STATUS
50 ucfg_coap_offload_reply_disable(struct wlan_objmgr_vdev *vdev, uint32_t req_id,
51 				coap_cache_get_callback cbk, void *context);
52 
53 /**
54  * ucfg_coap_offload_periodic_tx_enable() - API to enable CoAP offload
55  * periodic transmit
56  * @vdev: pointer to vdev object
57  * @param: parameters of CoAP periodic transmit
58  *
59  * Return: status of operation
60  */
61 QDF_STATUS
62 ucfg_coap_offload_periodic_tx_enable(struct wlan_objmgr_vdev *vdev,
63 			struct coap_offload_periodic_tx_param *param);
64 
65 /**
66  * ucfg_coap_offload_periodic_tx_disable() - API to disable CoAP offload
67  * periodic transmit
68  * @vdev: pointer to vdev object
69  * @req_id: request id
70  *
71  * Return: status of operation
72  */
73 QDF_STATUS
74 ucfg_coap_offload_periodic_tx_disable(struct wlan_objmgr_vdev *vdev,
75 				      uint32_t req_id);
76 
77 /**
78  * ucfg_coap_offload_cache_get() - API to get CoAP offload cache
79  * @vdev: pointer to vdev object
80  * @req_id: request id
81  * @cbk: callback function to be called with the cache get result
82  * @context: context to be used by the caller to associate the get
83  * cache request with the response
84  *
85  * Return: status of operation
86  */
87 QDF_STATUS
88 ucfg_coap_offload_cache_get(struct wlan_objmgr_vdev *vdev, uint32_t req_id,
89 			    coap_cache_get_callback cbk, void *context);
90 #endif
91 #endif
92