cake
/
libcasio
Archived
1
1
Fork 0
This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
libcasio/include/libcasio/log.h

51 lines
1.8 KiB
C

/* ****************************************************************************
* libcasio/log.h -- libcasio logging.
* Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
*
* This file is part of libcasio.
* libcasio is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 3.0 of the License,
* or (at your option) any later version.
*
* libcasio 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with libcasio; if not, see <http://www.gnu.org/licenses/>.
* ************************************************************************* */
#ifndef LIBCASIO_LOG_H
# define LIBCASIO_LOG_H
# include "cdefs.h"
# include "iter.h"
CASIO_BEGIN_NAMESPACE
CASIO_BEGIN_DECLS
/* Get and set the log level at runtime. */
CASIO_EXTERN void CASIO_EXPORT casio_setlog
OF((const char *casio__level));
CASIO_EXTERN char const* CASIO_EXPORT casio_getlog
OF((void));
/* List log levels (deprecated interface) */
typedef void casio_log_list_t OF((void *casio__cookie,
char const *casio__str));
CASIO_EXTERN CASIO_DEPRECATED void CASIO_EXPORT casio_listlog
OF((casio_log_list_t *casio__callback, void *casio__cookie));
/* List log levels (new interface).
* This iterator yields strings (`const char *`). */
CASIO_EXTERN int CASIO_EXPORT casio_iter_log
OF((casio_iter_t **casio__iter));
# define casio_next_log(ITER, PTRP) (casio_next((ITER), (void **)(PTRP)))
CASIO_END_DECLS
CASIO_END_NAMESPACE
#endif /* LIBCASIO_LOG_H */