Itroduced sub_id and itemheap.
FossilOrigin-Name: 9349db4a4787b23ff49d2cf1538457b6a7bbcbff880a06a517c278197e451d64
This commit is contained in:
parent
56954892d8
commit
34389a53db
@ -1,21 +1,54 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __CW_ITEM_H
|
||||
#define __CW_ITEM_H
|
||||
|
||||
#include "mbag.h"
|
||||
|
||||
extern const char CW_ITEM_NONE[];
|
||||
|
||||
/* Definitions for CAPWAP Items */
|
||||
|
||||
struct cw_item {
|
||||
struct cw_itemdef {
|
||||
/** ID */
|
||||
const char *id;
|
||||
/** Sub-ID */
|
||||
const char *sub_id;
|
||||
/** Type */
|
||||
mbagtype_t type;
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct cw_item * cw_item_get_by_name(const char *name,struct cw_item *table);
|
||||
struct cw_item * cw_item_get_by_id(int id,struct cw_item *table);
|
||||
typedef struct cw_itemdef cw_itemdef_t;
|
||||
|
||||
|
||||
typedef mavl_t cw_itemdefheap_t;
|
||||
extern cw_itemdefheap_t cw_itemdefheap_create();
|
||||
extern int cw_itemdefheap_register(cw_itemdefheap_t t, cw_itemdef_t * defs);
|
||||
extern const cw_itemdef_t * cw_itemdef_get(cw_itemdefheap_t t, const char *id,
|
||||
const char *sub_id);
|
||||
|
||||
|
||||
|
||||
|
||||
struct cw_itemdef *cw_item_get_by_name(const char *name, struct cw_itemdef *table);
|
||||
|
||||
typedef const char *cw_item_t;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user