mikroSDK Reference Manual
coap_server_request.h
Go to the documentation of this file.
1
31#ifndef _COAP_SERVER_REQUEST_H
32#define _COAP_SERVER_REQUEST_H
33
34//Dependencies
35#include "core/net.h"
36#include "coap/coap_server.h"
37#include "coap/coap_option.h"
38
39//C++ guard
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44error_t coapServerGetMethodCode(CoapServerContext *context, CoapCode *code);
45
46error_t coapServerGetUriPath(CoapServerContext *context, char_t *path,
47 size_t maxLen);
48
49error_t coapServerGetUriQuery(CoapServerContext *context, char_t *queryString,
50 size_t maxLen);
51
52error_t coapServerGetOpaqueOption(CoapServerContext *context, uint16_t optionNum,
53 uint_t optionIndex, const uint8_t **optionValue, size_t *optionLen);
54
55error_t coapServerGetStringOption(CoapServerContext *context, uint16_t optionNum,
56 uint_t optionIndex, const char_t **optionValue, size_t *optionLen);
57
58error_t coapServerGetUintOption(CoapServerContext *context, uint16_t optionNum,
59 uint_t optionIndex, uint32_t *optionValue);
60
61error_t coapServerGetPayload(CoapServerContext *context, const uint8_t **payload,
62 size_t *payloadLen);
63
64error_t coapServerReadPayload(CoapServerContext *context, void *data, size_t size,
65 size_t *length);
66
67error_t coapServerSetResponseCode(CoapServerContext *context, CoapCode code);
68
69error_t coapServerSetLocationPath(CoapServerContext *context,
70 const char_t *path);
71
72error_t coapServerSetLocationQuery(CoapServerContext *context,
73 const char_t *queryString);
74
75error_t coapServerSetOpaqueOption(CoapServerContext *context, uint16_t optionNum,
76 uint_t optionIndex, const uint8_t *optionValue, size_t optionLen);
77
78error_t coapServerSetStringOption(CoapServerContext *context, uint16_t optionNum,
79 uint_t optionIndex, const char_t *optionValue);
80
81error_t coapServerSetUintOption(CoapServerContext *context, uint16_t optionNum,
82 uint_t optionIndex, uint32_t optionValue);
83
84error_t coapServerDeleteOption(CoapServerContext *context, uint16_t optionNum,
85 uint_t optionIndex);
86
87error_t coapServerSetPayload(CoapServerContext *context, const void *payload,
88 size_t payloadLen);
89
90error_t coapServerWritePayload(CoapServerContext *context, const void *data,
91 size_t length);
92
93//C++ guard
94#ifdef __cplusplus
95}
96#endif
97
98#endif
CoapCode
CoAP method and response codes.
Definition coap_common.h:113
CoAP option formatting and parsing.
CoAP server.
error_t
Error codes.
Definition error.h:43
TCP/IP stack core.