uri.h: remove coap_hash_path() and add coap_get_uri_path()

The old hashed key is no longer used, so coap_hash_path() is obsolete.

coap_get_uri_path() added to build the resource Uri Path from the pdu.
This commit is contained in:
Jon Shallow committed 2018-03-14 09:32:58 +00:00
1 parent ff6f8e041c
commit 235a11ebe8
1 file changed
+7 -13
+7 -13
View File
@@ -12,7 +12,6 @@
#include <stdint.h>
#include "hashkey.h"
#include "str.h"
struct coap_pdu_t;
@@ -68,18 +67,6 @@ coap_uri_t *coap_new_uri(const unsigned char *uri, unsigned int length);
* be released with coap_free(). */
coap_uri_t *coap_clone_uri(const coap_uri_t *uri);
/**
* Calculates a hash over the given path and stores the result in
* @p key. This function returns @c 0 on error or @c 1 on success.
*
* @param path The URI path to generate hash for.
* @param len The length of @p path.
* @param key The output buffer.
*
* @return @c 1 if @p key was set, @c 0 otherwise.
*/
int coap_hash_path(const unsigned char *path, size_t len, coap_key_t key);
/**
* @defgroup uri_parse URI Parsing Functions
*
@@ -148,6 +135,13 @@ int coap_split_query(const unsigned char *s,
*/
str *coap_get_query(struct coap_pdu_t *request);
/**
* Extract uri_path string from request PDU
* @param request Request PDU.
* @return Reconstructed and escaped uri path string part.
*/
str *coap_get_uri_path(struct coap_pdu_t *request);
/** @} */
#endif /* _COAP_URI_H_ */