uri changes: uint_8_t pointer changed to char *

Change-Id: I8f71a919e410e7b2883d3405da30f0ac60097115
pull/3240/head
Erno Törmikoski 2015-06-04 09:32:41 +03:00
parent 5f8998ce2e
commit 2483d81677
2 changed files with 10 additions and 13 deletions

View File

@ -176,15 +176,14 @@ int16_t coap_service_virtual_socket_set_cb(int8_t service_id, coap_service_virtu
* Register application and informs CoAP services unsecure registery callback function. * Register application and informs CoAP services unsecure registery callback function.
* *
* \param service_id Id number of the current service. * \param service_id Id number of the current service.
* \param *uri_ptr Pointer to uri. * \param *uri Uri address.
* \param uri_len Length of uri.
* \param port port that Application wants to use for communicate with coap server. * \param port port that Application wants to use for communicate with coap server.
* \param allowed_method Informs method that is allowed to use (used defines described above). * \param allowed_method Informs method that is allowed to use (used defines described above).
* \param *request_recv_cb CoAP service request receive callback function pointer. * \param *request_recv_cb CoAP service request receive callback function pointer.
* *
* \return 0 for success / -1 for failure * \return 0 for success / -1 for failure
*/ */
int8_t coap_service_register_uri(int8_t service_id, uint8_t *uri_ptr, uint16_t uri_len, uint8_t allowed_method, coap_service_request_recv_cb *request_recv_cb); int8_t coap_service_register_uri(int8_t service_id, char *uri, uint8_t allowed_method, coap_service_request_recv_cb *request_recv_cb);
/** /**
* \brief Unregister unsecure callback methods to CoAP server * \brief Unregister unsecure callback methods to CoAP server
@ -192,12 +191,11 @@ int8_t coap_service_register_uri(int8_t service_id, uint8_t *uri_ptr, uint16_t u
* Register application and informs CoAP services unsecure registery callback function. * Register application and informs CoAP services unsecure registery callback function.
* *
* \param service_id Id number of the current service. * \param service_id Id number of the current service.
* \param *uri_ptr Pointer to uri. * \param *uri Uri address.
* \param uri_len Length of uri.
* *
* \return 0 for success / -1 for failure * \return 0 for success / -1 for failure
*/ */
int8_t coap_service_unregister_uri(int8_t service_id, uint8_t *uri_ptr, uint16_t uri_len); int8_t coap_service_unregister_uri(int8_t service_id, char *uri);
/** /**
@ -242,8 +240,7 @@ uint16_t coap_service_send(int8_t service_id, uint8_t options, uint8_t addr[stat
* \param destination_port Destination port * \param destination_port Destination port
* \param msg_type Message type can be found from sn_coap_header. * \param msg_type Message type can be found from sn_coap_header.
* \param msg_code Message code can be found from sn_coap_header. * \param msg_code Message code can be found from sn_coap_header.
* \param *uri_ptr Pointer to uri. * \param *uri Uri address.
* \param uri_len Length of uri.
* \param cont_type Content type can be found from sn_coap_header. * \param cont_type Content type can be found from sn_coap_header.
* \param payload_ptr Pointer to message content. * \param payload_ptr Pointer to message content.
* \param payload_len Lenght of the message. * \param payload_len Lenght of the message.
@ -251,7 +248,7 @@ uint16_t coap_service_send(int8_t service_id, uint8_t options, uint8_t addr[stat
* *
* \return msg_id Id number of the current message. * \return msg_id Id number of the current message.
*/ */
uint16_t coap_service_request_send(int8_t service_id, uint8_t options, uint8_t destination_addr[static 16], uint16_t destination_port, uint8_t msg_type, uint8_t msg_code, uint8_t *uri_ptr, uint16_t uri_len, uint16_t coap_service_request_send(int8_t service_id, uint8_t options, uint8_t destination_addr[static 16], uint16_t destination_port, uint8_t msg_type, uint8_t msg_code, char *uri,
uint8_t cont_type, uint8_t *payload_ptr, uint16_t payload_len, coap_service_response_recv *request_response_cb); uint8_t cont_type, uint8_t *payload_ptr, uint16_t payload_len, coap_service_response_recv *request_response_cb);
/** /**

View File

@ -26,12 +26,12 @@ int8_t coap_service_initialize(int8_t interface_id, uint16_t listen_port, uint8_
return retVal; return retVal;
} }
int8_t coap_service_register_uri(int8_t service_id, uint8_t *uri_ptr, uint16_t uri_len, uint8_t allowed_method, coap_service_request_recv_cb *request_recv_cb) int8_t coap_service_register_uri(int8_t service_id, char *uri, uint8_t allowed_method, coap_service_request_recv_cb *request_recv_cb)
{ {
return -1; return -1;
} }
int8_t coap_service_unregister_uri(int8_t service_id, uint8_t *uri_ptr, uint16_t uri_len) int8_t coap_service_unregister_uri(int8_t service_id, char *uri)
{ {
return -1; return -1;
} }
@ -95,7 +95,7 @@ int8_t coap_service_register_uri_secure_cb_set(int8_t service_id, coap_service_s
return -1; return -1;
} }
uint16_t coap_service_request_send(int8_t service_id, uint8_t options, uint8_t destination_addr[static 16], uint16_t destination_port, uint8_t msg_type, uint8_t msg_code, uint8_t *uri_ptr, uint16_t uri_len, uint16_t coap_service_request_send(int8_t service_id, uint8_t options, uint8_t destination_addr[static 16], uint16_t destination_port, uint8_t msg_type, uint8_t msg_code, char *uri,
uint8_t cont_type, uint8_t *payload_ptr, uint16_t payload_len, coap_service_response_recv *request_response_cb) uint8_t cont_type, uint8_t *payload_ptr, uint16_t payload_len, coap_service_response_recv *request_response_cb)
{ {
return 0; return 0;