Files
libcoap/include/coap/coap.h.in
T
Carsten Schoenert d01e1cad2e expand i/c/coap.h to include additional information
The header coap.h should be the only header file a user has to include
to get functions from the libcoap available. Bu we have to provide not
only the header interface to the user, the user needs also some extra
information like the libcoap version or upstream related infos.

To get these automated in to a shipped coap.h header file we simple can
use some autotool magic and expand some macros while configure is
running and pasing i/c/coap.h.in. By this we can currently add the
following macro variables:

 LIBCOAP_PACKAGE_BUGREPORT -> upstream email contact
 LIBCOAP_PACKAGE_NAME      -> the used package name (libcoap)
 LIBCOAP_PACKAGE_STRING    -> package name + version
 LIBCOAP_PACKAGE_URL       -> upstream homepage
 LIBCOAP_PACKAGE_VERSION   -> the current used version

All these macros variables are expanded from the respective macro names
from the configure run. The variables are prefixed because this with
LIBCOAP_ to not get name clashing on the user side while running the
autotools of the users project.

There are probably more predefined macros needed, but they can be easily
added later into include/coap/coap.h.in.
2015-06-02 20:41:37 +02:00

60 lines
1.3 KiB
C

/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 * -*- */
/* coap.h -- main header file for CoAP stack
*
* Copyright (C) 2010-2012,2015 Olaf Bergmann <bergmann@tzi.org>
* 2015 Carsten Schoenert <c.schoenert@t-online.de>
*
* This file is part of the CoAP library libcoap. Please see README for
* terms of use.
*/
#ifndef _COAP_H_
#define _COAP_H_
/* Define the address where bug reports for libcoap should be sent. */
#define LIBCOAP_PACKAGE_BUGREPORT @PACKAGE_BUGREPORT@
/* Define the full name of libcoap. */
#define LIBCOAP_PACKAGE_NAME @PACKAGE_NAME@
/* Define the full name and version of libcoap. */
#define LIBCOAP_PACKAGE_STRING @PACKAGE_STRING@
/* Define the home page for libcoap. */
#define LIBCOAP_PACKAGE_URL @PACKAGE_URL@
/* Define the version of libcoap this file belongs to. */
#define LIBCOAP_PACKAGE_VERSION @PACKAGE_VERSION@
#ifdef __cplusplus
extern "C" {
#endif
#include "address.h"
#include "async.h"
#include "bits.h"
#include "block.h"
#include "coap_io.h"
#include "coap_time.h"
#include "debug.h"
#include "encode.h"
#include "mem.h"
#include "net.h"
#include "option.h"
#include "pdu.h"
#include "prng.h"
#include "resource.h"
#include "str.h"
#include "subscribe.h"
#include "t_list.h"
#include "uri.h"
#include "uthash.h"
#include "utlist.h"
#ifdef __cplusplus
}
#endif
#endif /* _COAP_H_ */