level_list.h 870 Bytes
Newer Older
Hardy Simpson's avatar
Hardy Simpson committed
1
/*
Hardy Simpson's avatar
Hardy Simpson committed
2
 * This file is part of the zlog Library.
Hardy Simpson's avatar
Hardy Simpson committed
3
 *
Hardy Simpson's avatar
Hardy Simpson committed
4
 * Copyright (C) 2011 by Hardy Simpson <HardySimpson1984@gmail.com>
Hardy Simpson's avatar
Hardy Simpson committed
5
 *
6
 * Licensed under the LGPL v2.1, see the file COPYING in base directory.
Hardy Simpson's avatar
Hardy Simpson committed
7 8
 */

Hardy Simpson's avatar
Hardy Simpson committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#ifndef __zlog_level_list_h
#define __zlog_level_list_h

#include "zc_defs.h"
#include "level.h"

zc_arraylist_t *zlog_level_list_new(void);
void zlog_level_list_del(zc_arraylist_t *levels);
void zlog_level_list_profile(zc_arraylist_t *levels, int flag);

/* conf init use, slow */
/* if l is wrong or str=="", return -1 */
int zlog_level_list_set(zc_arraylist_t *levels, char *line);

/* spec ouput use, fast */
/* rule output use, fast */
/* if not found, return levels[254] */
zlog_level_t *zlog_level_list_get(zc_arraylist_t *levels, int l);

/* rule init use, slow */
/* if not found, return -1 */
int zlog_level_list_atoi(zc_arraylist_t *levels, char *str);
Hardy Simpson's avatar
Hardy Simpson committed
31

Hardy Simpson's avatar
Hardy Simpson committed
32 33

#endif