Mistake on this page? Email us
pt_userdata_api.h
Go to the documentation of this file.
1 /*
2  * ----------------------------------------------------------------------------
3  * Copyright 2018 ARM Ltd.
4  *
5  * SPDX-License-Identifier: Apache-2.0
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 PT_API_VERSION
22 #define PT_API_VERSION 2
23 #endif
24 #if PT_API_VERSION != 2
25 #error "Including mixed versions of Protocol API"
26 #endif
27 
28 #ifndef PT_USERDATA_API_H
29 #define PT_USERDATA_API_H
30 
44 struct pt_userdata_s;
45 
51 typedef void (*pt_userdata_free_cb_t)(void *data);
52 
62 typedef struct pt_userdata_s {
63  void *data;
66 
80 
86 #endif
void * data
Definition: pt_userdata_api.h:63
void(* pt_userdata_free_cb_t)(void *data)
The user-supplied memory deallocation function for userdata.
Definition: pt_userdata_api.h:51
pt_userdata_t * pt_api_create_userdata(void *data, pt_userdata_free_cb_t free_userdata_cb)
Used to create the pt_userdata_s structure.
pt_userdata_free_cb_t pt_free_userdata
Definition: pt_userdata_api.h:64
struct pt_userdata_s pt_userdata_t
Contains fields for client user data.
Contains fields for client user data.
Definition: pt_userdata_api.h:62