xref: /btstack/src/btstack_tlv_none.c (revision 4d0a5c287329a50ea85e022f7f31aac1e0870bdf)
1454952e5SMatthias Ringwald /*
2454952e5SMatthias Ringwald  * Copyright (C) 2017 BlueKitchen GmbH
3454952e5SMatthias Ringwald  *
4454952e5SMatthias Ringwald  * Redistribution and use in source and binary forms, with or without
5454952e5SMatthias Ringwald  * modification, are permitted provided that the following conditions
6454952e5SMatthias Ringwald  * are met:
7454952e5SMatthias Ringwald  *
8454952e5SMatthias Ringwald  * 1. Redistributions of source code must retain the above copyright
9454952e5SMatthias Ringwald  *    notice, this list of conditions and the following disclaimer.
10454952e5SMatthias Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
11454952e5SMatthias Ringwald  *    notice, this list of conditions and the following disclaimer in the
12454952e5SMatthias Ringwald  *    documentation and/or other materials provided with the distribution.
13454952e5SMatthias Ringwald  * 3. Neither the name of the copyright holders nor the names of
14454952e5SMatthias Ringwald  *    contributors may be used to endorse or promote products derived
15454952e5SMatthias Ringwald  *    from this software without specific prior written permission.
16454952e5SMatthias Ringwald  *
172fca4dadSMilanka Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
18454952e5SMatthias Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19454952e5SMatthias Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
202fca4dadSMilanka Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN
212fca4dadSMilanka Ringwald  * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22454952e5SMatthias Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23454952e5SMatthias Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
24454952e5SMatthias Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25454952e5SMatthias Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26454952e5SMatthias Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27454952e5SMatthias Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28454952e5SMatthias Ringwald  * SUCH DAMAGE.
29454952e5SMatthias Ringwald  *
30454952e5SMatthias Ringwald  */
31454952e5SMatthias Ringwald 
32454952e5SMatthias Ringwald #define BTSTACK_FILE__ "btstack_tlv_none.c"
33454952e5SMatthias Ringwald 
34454952e5SMatthias Ringwald #include "btstack_tlv.h"
35454952e5SMatthias Ringwald #include "btstack_tlv_none.h"
36*4d0a5c28SMatthias Ringwald #include "btstack_debug.h"
37454952e5SMatthias Ringwald 
38454952e5SMatthias Ringwald /**
39454952e5SMatthias Ringwald  * Get Value for Tag
40454952e5SMatthias Ringwald  * @param tag
41454952e5SMatthias Ringwald  * @param buffer
42454952e5SMatthias Ringwald  * @param buffer_size
436b65794dSMilanka Ringwald  * @return size of value
44454952e5SMatthias Ringwald  */
btstack_tlv_none_get_tag(void * context,uint32_t tag,uint8_t * buffer,uint32_t buffer_size)45454952e5SMatthias Ringwald static int btstack_tlv_none_get_tag(void * context, uint32_t tag, uint8_t * buffer, uint32_t buffer_size){
46*4d0a5c28SMatthias Ringwald     UNUSED(context);
47*4d0a5c28SMatthias Ringwald     UNUSED(tag);
48*4d0a5c28SMatthias Ringwald     UNUSED(buffer);
49*4d0a5c28SMatthias Ringwald     UNUSED(buffer_size);
50454952e5SMatthias Ringwald 	return 0;
51454952e5SMatthias Ringwald }
52454952e5SMatthias Ringwald 
53454952e5SMatthias Ringwald /**
54454952e5SMatthias Ringwald  * Store Tag
55454952e5SMatthias Ringwald  * @param tag
56454952e5SMatthias Ringwald  * @param data
57454952e5SMatthias Ringwald  * @param data_size
58454952e5SMatthias Ringwald  */
btstack_tlv_none_store_tag(void * context,uint32_t tag,const uint8_t * data,uint32_t data_size)59454952e5SMatthias Ringwald static int btstack_tlv_none_store_tag(void * context, uint32_t tag, const uint8_t * data, uint32_t data_size){
60*4d0a5c28SMatthias Ringwald     UNUSED(context);
61*4d0a5c28SMatthias Ringwald     UNUSED(tag);
62*4d0a5c28SMatthias Ringwald     UNUSED(data);
63*4d0a5c28SMatthias Ringwald     UNUSED(data_size);
64454952e5SMatthias Ringwald     return 0;
65454952e5SMatthias Ringwald }
66454952e5SMatthias Ringwald 
67454952e5SMatthias Ringwald /**
68454952e5SMatthias Ringwald  * Delete Tag
69454952e5SMatthias Ringwald  * @param tag
70454952e5SMatthias Ringwald  */
btstack_tlv_none_delete_tag(void * context,uint32_t tag)71454952e5SMatthias Ringwald static void btstack_tlv_none_delete_tag(void * context, uint32_t tag){
72*4d0a5c28SMatthias Ringwald     UNUSED(context);
73*4d0a5c28SMatthias Ringwald     UNUSED(tag);
74454952e5SMatthias Ringwald }
75454952e5SMatthias Ringwald 
76454952e5SMatthias Ringwald static const btstack_tlv_t btstack_tlv_none = {
77454952e5SMatthias Ringwald 	/* int  (*get_tag)(..);     */ &btstack_tlv_none_get_tag,
78454952e5SMatthias Ringwald 	/* int (*store_tag)(..);    */ &btstack_tlv_none_store_tag,
79454952e5SMatthias Ringwald 	/* void (*delete_tag)(v..); */ &btstack_tlv_none_delete_tag,
80454952e5SMatthias Ringwald };
81454952e5SMatthias Ringwald 
82454952e5SMatthias Ringwald /**
83454952e5SMatthias Ringwald  * Init Tag Length Value Store
84454952e5SMatthias Ringwald  */
btstack_tlv_none_init_instance(void)85454952e5SMatthias Ringwald const btstack_tlv_t * btstack_tlv_none_init_instance(void){
86454952e5SMatthias Ringwald 	return &btstack_tlv_none;
87454952e5SMatthias Ringwald }
88454952e5SMatthias Ringwald 
89