xref: /btstack/src/btstack_tlv_none.c (revision 454952e5888e78d09bbe223c79034b390221d52d)
1*454952e5SMatthias Ringwald /*
2*454952e5SMatthias Ringwald  * Copyright (C) 2017 BlueKitchen GmbH
3*454952e5SMatthias Ringwald  *
4*454952e5SMatthias Ringwald  * Redistribution and use in source and binary forms, with or without
5*454952e5SMatthias Ringwald  * modification, are permitted provided that the following conditions
6*454952e5SMatthias Ringwald  * are met:
7*454952e5SMatthias Ringwald  *
8*454952e5SMatthias Ringwald  * 1. Redistributions of source code must retain the above copyright
9*454952e5SMatthias Ringwald  *    notice, this list of conditions and the following disclaimer.
10*454952e5SMatthias Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
11*454952e5SMatthias Ringwald  *    notice, this list of conditions and the following disclaimer in the
12*454952e5SMatthias Ringwald  *    documentation and/or other materials provided with the distribution.
13*454952e5SMatthias Ringwald  * 3. Neither the name of the copyright holders nor the names of
14*454952e5SMatthias Ringwald  *    contributors may be used to endorse or promote products derived
15*454952e5SMatthias Ringwald  *    from this software without specific prior written permission.
16*454952e5SMatthias Ringwald  *
17*454952e5SMatthias Ringwald  * THIS SOFTWARE IS PROVIDED BY MATTHIAS RINGWALD AND CONTRIBUTORS
18*454952e5SMatthias Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19*454952e5SMatthias Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20*454952e5SMatthias Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
21*454952e5SMatthias Ringwald  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22*454952e5SMatthias Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23*454952e5SMatthias Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
24*454952e5SMatthias Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25*454952e5SMatthias Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26*454952e5SMatthias Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27*454952e5SMatthias Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28*454952e5SMatthias Ringwald  * SUCH DAMAGE.
29*454952e5SMatthias Ringwald  *
30*454952e5SMatthias Ringwald  */
31*454952e5SMatthias Ringwald 
32*454952e5SMatthias Ringwald #define BTSTACK_FILE__ "btstack_tlv_none.c"
33*454952e5SMatthias Ringwald 
34*454952e5SMatthias Ringwald #include "btstack_tlv.h"
35*454952e5SMatthias Ringwald #include "btstack_tlv_none.h"
36*454952e5SMatthias Ringwald 
37*454952e5SMatthias Ringwald /**
38*454952e5SMatthias Ringwald  * Get Value for Tag
39*454952e5SMatthias Ringwald  * @param tag
40*454952e5SMatthias Ringwald  * @param buffer
41*454952e5SMatthias Ringwald  * @param buffer_size
42*454952e5SMatthias Ringwald  * @returns size of value
43*454952e5SMatthias Ringwald  */
44*454952e5SMatthias Ringwald static int btstack_tlv_none_get_tag(void * context, uint32_t tag, uint8_t * buffer, uint32_t buffer_size){
45*454952e5SMatthias Ringwald 	return 0;
46*454952e5SMatthias Ringwald }
47*454952e5SMatthias Ringwald 
48*454952e5SMatthias Ringwald /**
49*454952e5SMatthias Ringwald  * Store Tag
50*454952e5SMatthias Ringwald  * @param tag
51*454952e5SMatthias Ringwald  * @param data
52*454952e5SMatthias Ringwald  * @param data_size
53*454952e5SMatthias Ringwald  */
54*454952e5SMatthias Ringwald static int btstack_tlv_none_store_tag(void * context, uint32_t tag, const uint8_t * data, uint32_t data_size){
55*454952e5SMatthias Ringwald 	return 0;
56*454952e5SMatthias Ringwald }
57*454952e5SMatthias Ringwald 
58*454952e5SMatthias Ringwald /**
59*454952e5SMatthias Ringwald  * Delete Tag
60*454952e5SMatthias Ringwald  * @param tag
61*454952e5SMatthias Ringwald  */
62*454952e5SMatthias Ringwald static void btstack_tlv_none_delete_tag(void * context, uint32_t tag){
63*454952e5SMatthias Ringwald }
64*454952e5SMatthias Ringwald 
65*454952e5SMatthias Ringwald static const btstack_tlv_t btstack_tlv_none = {
66*454952e5SMatthias Ringwald 	/* int  (*get_tag)(..);     */ &btstack_tlv_none_get_tag,
67*454952e5SMatthias Ringwald 	/* int (*store_tag)(..);    */ &btstack_tlv_none_store_tag,
68*454952e5SMatthias Ringwald 	/* void (*delete_tag)(v..); */ &btstack_tlv_none_delete_tag,
69*454952e5SMatthias Ringwald };
70*454952e5SMatthias Ringwald 
71*454952e5SMatthias Ringwald /**
72*454952e5SMatthias Ringwald  * Init Tag Length Value Store
73*454952e5SMatthias Ringwald  */
74*454952e5SMatthias Ringwald const btstack_tlv_t * btstack_tlv_none_init_instance(void){
75*454952e5SMatthias Ringwald 	return &btstack_tlv_none;
76*454952e5SMatthias Ringwald }
77*454952e5SMatthias Ringwald 
78