1 /*
2  * Copyright (C) 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CHPP_NONHANDLE_H_
18 #define CHPP_NONHANDLE_H_
19 
20 #include <stddef.h>
21 #include <stdint.h>
22 
23 #include "chpp/app.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 /************************************************
30  *  Public Definitions
31  ***********************************************/
32 
33 /************************************************
34  *  Public functions
35  ***********************************************/
36 
37 /*
38  * Dispatches an Rx Datagram from the transport layer for systems that are using
39  * the optional handleless CHPP communication service. Does not need to be
40  * implemented on systems that are not using handleless communication.
41  *
42  * @param context Maintains status for each app layer instance.
43  * @param buf Input data. Cannot be null.
44  * @param len Length of input data in bytes.
45  */
46 void chppDispatchNonHandle(struct ChppAppState *context, uint8_t *buf,
47                            size_t len);
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 #endif  // CHPP_NONHANDLE_H_
54