Skip to content

Commit 2483d81

Browse files
uri changes: uint_8_t pointer changed to char *
Change-Id: I8f71a919e410e7b2883d3405da30f0ac60097115
1 parent 5f8998c commit 2483d81

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

coap-service/coap_service_api.h

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,28 +176,26 @@ int16_t coap_service_virtual_socket_set_cb(int8_t service_id, coap_service_virtu
176176
* Register application and informs CoAP services unsecure registery callback function.
177177
*
178178
* \param service_id Id number of the current service.
179-
* \param *uri_ptr Pointer to uri.
180-
* \param uri_len Length of uri.
179+
* \param *uri Uri address.
181180
* \param port port that Application wants to use for communicate with coap server.
182181
* \param allowed_method Informs method that is allowed to use (used defines described above).
183-
* \param *request_recv_cb CoAP service request receive callback function pointer.
182+
* \param *request_recv_cb CoAP service request receive callback function pointer.
184183
*
185184
* \return 0 for success / -1 for failure
186185
*/
187-
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);
186+
int8_t coap_service_register_uri(int8_t service_id, char *uri, uint8_t allowed_method, coap_service_request_recv_cb *request_recv_cb);
188187

189188
/**
190189
* \brief Unregister unsecure callback methods to CoAP server
191190
*
192191
* Register application and informs CoAP services unsecure registery callback function.
193192
*
194193
* \param service_id Id number of the current service.
195-
* \param *uri_ptr Pointer to uri.
196-
* \param uri_len Length of uri.
194+
* \param *uri Uri address.
197195
*
198196
* \return 0 for success / -1 for failure
199197
*/
200-
int8_t coap_service_unregister_uri(int8_t service_id, uint8_t *uri_ptr, uint16_t uri_len);
198+
int8_t coap_service_unregister_uri(int8_t service_id, char *uri);
201199

202200

203201
/**
@@ -242,16 +240,15 @@ uint16_t coap_service_send(int8_t service_id, uint8_t options, uint8_t addr[stat
242240
* \param destination_port Destination port
243241
* \param msg_type Message type can be found from sn_coap_header.
244242
* \param msg_code Message code can be found from sn_coap_header.
245-
* \param *uri_ptr Pointer to uri.
246-
* \param uri_len Length of uri.
243+
* \param *uri Uri address.
247244
* \param cont_type Content type can be found from sn_coap_header.
248245
* \param payload_ptr Pointer to message content.
249246
* \param payload_len Lenght of the message.
250247
* \param *request_response_cb Callback to inform result of the request.
251248
*
252249
* \return msg_id Id number of the current message.
253250
*/
254-
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,
251+
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,
255252
uint8_t cont_type, uint8_t *payload_ptr, uint16_t payload_len, coap_service_response_recv *request_response_cb);
256253

257254
/**

source/coap_service.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ int8_t coap_service_initialize(int8_t interface_id, uint16_t listen_port, uint8_
2626
return retVal;
2727
}
2828

29-
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)
29+
int8_t coap_service_register_uri(int8_t service_id, char *uri, uint8_t allowed_method, coap_service_request_recv_cb *request_recv_cb)
3030
{
3131
return -1;
3232
}
3333

34-
int8_t coap_service_unregister_uri(int8_t service_id, uint8_t *uri_ptr, uint16_t uri_len)
34+
int8_t coap_service_unregister_uri(int8_t service_id, char *uri)
3535
{
3636
return -1;
3737
}
@@ -95,7 +95,7 @@ int8_t coap_service_register_uri_secure_cb_set(int8_t service_id, coap_service_s
9595
return -1;
9696
}
9797

98-
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,
98+
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,
9999
uint8_t cont_type, uint8_t *payload_ptr, uint16_t payload_len, coap_service_response_recv *request_response_cb)
100100
{
101101
return 0;

0 commit comments

Comments
 (0)