mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-22 23:35:13 +03:00
Defined two functions that return the library name and version string.
This commit is contained in:
1 parent
ef41ce5d02
commit
122200d3fd
2 files changed
+16
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
/* debug.c -- debug utilities
|
/* debug.c -- debug utilities
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010--2012 Olaf Bergmann <bergmann@tzi.org>
|
* Copyright (C) 2010--2012,2014 Olaf Bergmann <bergmann@tzi.org>
|
||||||
*
|
*
|
||||||
* This file is part of the CoAP library libcoap. Please see
|
* This file is part of the CoAP library libcoap. Please see
|
||||||
* README for terms of use.
|
* README for terms of use.
|
||||||
@@ -37,6 +37,14 @@
|
|||||||
|
|
||||||
static coap_log_t maxlog = LOG_WARNING; /* default maximum log level */
|
static coap_log_t maxlog = LOG_WARNING; /* default maximum log level */
|
||||||
|
|
||||||
|
const char *coap_package_name() {
|
||||||
|
return PACKAGE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *coap_package_version() {
|
||||||
|
return PACKAGE_STRING;
|
||||||
|
}
|
||||||
|
|
||||||
coap_log_t
|
coap_log_t
|
||||||
coap_get_log_level() {
|
coap_get_log_level() {
|
||||||
return maxlog;
|
return maxlog;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* debug.h -- debug utilities
|
/* debug.h -- debug utilities
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010,2011 Olaf Bergmann <bergmann@tzi.org>
|
* Copyright (C) 2010,2011,2014 Olaf Bergmann <bergmann@tzi.org>
|
||||||
*
|
*
|
||||||
* This file is part of the CoAP library libcoap. Please see
|
* This file is part of the CoAP library libcoap. Please see
|
||||||
* README for terms of use.
|
* README for terms of use.
|
||||||
@@ -35,6 +35,12 @@ coap_log_t coap_get_log_level();
|
|||||||
/** Sets the log level to the specified value. */
|
/** Sets the log level to the specified value. */
|
||||||
void coap_set_log_level(coap_log_t level);
|
void coap_set_log_level(coap_log_t level);
|
||||||
|
|
||||||
|
/** Returns a zero-terminated string with the name of this library. */
|
||||||
|
const char *coap_package_name();
|
||||||
|
|
||||||
|
/** Returns a zero-terminated string with the library version. */
|
||||||
|
const char *coap_package_version();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the given text to @c COAP_ERR_FD (for @p level <= @c
|
* Writes the given text to @c COAP_ERR_FD (for @p level <= @c
|
||||||
* LOG_CRIT) or @c COAP_DEBUG_FD (for @p level >= @c LOG_WARNING). The
|
* LOG_CRIT) or @c COAP_DEBUG_FD (for @p level >= @c LOG_WARNING). The
|
||||||
|
|||||||
Reference in new issue
Block a user