2015-05-01 12:48:16 +02:00
|
|
|
/*
|
|
|
|
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/>.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2015-04-29 19:28:06 +02:00
|
|
|
#ifndef __CW_ITEM_H
|
|
|
|
#define __CW_ITEM_H
|
|
|
|
|
|
|
|
#include "mbag.h"
|
|
|
|
|
2015-05-01 12:48:16 +02:00
|
|
|
extern const char CW_ITEM_NONE[];
|
2015-05-04 07:37:19 +02:00
|
|
|
extern const char CW_ITEM_ANY[];
|
|
|
|
|
2015-05-01 12:48:16 +02:00
|
|
|
|
2015-04-29 19:28:06 +02:00
|
|
|
/* Definitions for CAPWAP Items */
|
|
|
|
|
2015-05-01 12:48:16 +02:00
|
|
|
struct cw_itemdef {
|
2015-04-29 19:28:06 +02:00
|
|
|
/** ID */
|
2015-05-01 00:16:54 +02:00
|
|
|
const char *id;
|
2015-05-01 12:48:16 +02:00
|
|
|
/** Sub-ID */
|
|
|
|
const char *sub_id;
|
2015-04-29 19:28:06 +02:00
|
|
|
/** Type */
|
|
|
|
mbagtype_t type;
|
2016-04-02 09:11:19 +02:00
|
|
|
/**
|
|
|
|
* A category this item belongs to.
|
|
|
|
*/
|
|
|
|
const char *cat;
|
2016-04-02 09:05:07 +02:00
|
|
|
|
2015-04-29 19:28:06 +02:00
|
|
|
};
|
2015-05-01 12:48:16 +02:00
|
|
|
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);
|
|
|
|
|
|
|
|
|
2015-04-29 19:28:06 +02:00
|
|
|
|
|
|
|
|
2015-05-01 12:48:16 +02:00
|
|
|
struct cw_itemdef *cw_item_get_by_name(const char *name, struct cw_itemdef *table);
|
2015-04-29 19:28:06 +02:00
|
|
|
|
2015-05-04 07:37:19 +02:00
|
|
|
typedef const char *cw_item_id_t;
|
|
|
|
//
|
2015-04-29 19:28:06 +02:00
|
|
|
#endif
|