ndn-lite
callback-funcs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Xinyu Ma
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v3.0. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 #ifndef FORWARDER_CALLBACK_FUNCS_H
9 #define FORWARDER_CALLBACK_FUNCS_H
10 
11 #include <stdint.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
24 typedef int (*ndn_on_interest_func)(const uint8_t* interest,
25  uint32_t interest_size,
26  void* userdata);
27 
34 typedef void (*ndn_on_data_func)(const uint8_t* data, uint32_t data_size, void* userdata);
35 
40 typedef void (*ndn_on_timeout_func)(void* userdata);
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif // FORWARDER_CALLBACK_FUNCS_H
void(* ndn_on_data_func)(const uint8_t *data, uint32_t data_size, void *userdata)
The onData callback function.
Definition: callback-funcs.h:34
void(* ndn_on_timeout_func)(void *userdata)
The onTimeout callback function.
Definition: callback-funcs.h:40
int(* ndn_on_interest_func)(const uint8_t *interest, uint32_t interest_size, void *userdata)
The onInterest callback function.
Definition: callback-funcs.h:24