@@ -183,7 +183,7 @@ int16_t coap_service_virtual_socket_set_cb(int8_t service_id, coap_service_virtu
183
183
*
184
184
* \return 0 for success / -1 for failure
185
185
*/
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 );
186
+ int8_t coap_service_register_uri (int8_t service_id , const char * uri , uint8_t allowed_method , coap_service_request_recv_cb * request_recv_cb );
187
187
188
188
/**
189
189
* \brief Unregister unsecure callback methods to CoAP server
@@ -195,7 +195,7 @@ int8_t coap_service_register_uri(int8_t service_id, char *uri, uint8_t allowed_m
195
195
*
196
196
* \return 0 for success / -1 for failure
197
197
*/
198
- int8_t coap_service_unregister_uri (int8_t service_id , char * uri );
198
+ int8_t coap_service_unregister_uri (int8_t service_id , const char * uri );
199
199
200
200
201
201
/**
@@ -227,7 +227,7 @@ int8_t coap_service_register_uri_secure_cb_set(int8_t service_id, coap_service_s
227
227
*
228
228
* \return msg_id Id number of the current message.
229
229
*/
230
- uint16_t coap_service_send (int8_t service_id , uint8_t options , uint8_t addr [static 16 ], uint16_t destination_port , sn_coap_hdr_s * request_ptr , coap_service_response_recv * request_response_cb );
230
+ uint16_t coap_service_send (int8_t service_id , uint8_t options , const uint8_t addr [static 16 ], uint16_t destination_port , sn_coap_hdr_s * request_ptr , coap_service_response_recv * request_response_cb );
231
231
232
232
/**
233
233
* \brief Sends CoAP service request
@@ -248,8 +248,8 @@ uint16_t coap_service_send(int8_t service_id, uint8_t options, uint8_t addr[stat
248
248
*
249
249
* \return msg_id Id number of the current message.
250
250
*/
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 ,
252
- uint8_t cont_type , uint8_t * payload_ptr , uint16_t payload_len , coap_service_response_recv * request_response_cb );
251
+ uint16_t coap_service_request_send (int8_t service_id , uint8_t options , const uint8_t destination_addr [static 16 ], uint16_t destination_port , uint8_t msg_type , uint8_t msg_code , const char * uri ,
252
+ uint8_t cont_type , const uint8_t * payload_ptr , uint16_t payload_len , coap_service_response_recv * request_response_cb );
253
253
254
254
/**
255
255
* \brief Sends CoAP service response
@@ -264,7 +264,7 @@ uint16_t coap_service_request_send(int8_t service_id, uint8_t options, uint8_t d
264
264
* \return -1 For failure
265
265
*- 0 For success
266
266
*/
267
- int8_t coap_service_response_send (int8_t service_id , uint8_t options , sn_coap_hdr_s * request_ptr , sn_coap_msg_code_e message_code , int32_t content_type ,uint8_t * payload_ptr ,uint16_t payload_len );
267
+ int8_t coap_service_response_send (int8_t service_id , uint8_t options , sn_coap_hdr_s * request_ptr , sn_coap_msg_code_e message_code , int32_t content_type , const uint8_t * payload_ptr ,uint16_t payload_len );
268
268
269
269
#ifdef __cplusplus
270
270
}
0 commit comments