2017-08-28 17:19:32 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* @brief CoAP implementation for Zephyr.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LINK_FORMAT_H__
|
|
|
|
#define __LINK_FORMAT_H__
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @addtogroup coap COAP Library
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* This resource should be added before all other resources that should be
|
|
|
|
* included in the responses of the .well-known/core resource.
|
|
|
|
*/
|
2017-08-28 17:44:27 +08:00
|
|
|
#define COAP_WELL_KNOWN_CORE_PATH \
|
|
|
|
((const char * const[]) { ".well-known", "core", NULL })
|
|
|
|
|
|
|
|
int coap_well_known_core_get(struct coap_resource *resource,
|
|
|
|
struct coap_packet *request,
|
|
|
|
struct coap_packet *response,
|
|
|
|
struct net_pkt *pkt);
|
2017-08-28 17:19:32 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* In case you want to add attributes to the resources included in the
|
|
|
|
* 'well-known/core' "virtual" resource, the 'user_data' field should point
|
|
|
|
* to a valid coap_core_metadata structure.
|
|
|
|
*/
|
|
|
|
struct coap_core_metadata {
|
|
|
|
const char * const *attributes;
|
|
|
|
void *user_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __LINK_FORMAT_H__ */
|