BA / Mbed OS BaBoRo1
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers coap_service_api_stub.c Source File

coap_service_api_stub.c

00001 /*
00002  * Copyright (c) 2015-2017, Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #include <string.h>
00019 
00020 #include "ns_types.h"
00021 #include "ns_list.h"
00022 #include "ns_trace.h"
00023 #include "nsdynmemLIB.h"
00024 #include "sn_coap_header.h"
00025 #include "coap_service_api.h"
00026 #include "coap_message_handler.h"
00027 #include "eventOS_event.h"
00028 #include "eventOS_scheduler.h"
00029 #include "eventOS_event_timer.h"
00030 #include "common_functions.h"
00031 #include "net_interface.h"
00032 
00033 coap_msg_handler_t *coap_service_handle = NULL;
00034 
00035 int8_t coap_service_initialize(int8_t interface_id, uint16_t listen_port, uint8_t service_options,
00036                                  coap_service_security_start_cb *start_ptr, coap_service_security_done_cb *coap_security_done_cb)
00037 {
00038     return 0;
00039 }
00040 
00041 void coap_service_delete(int8_t service_id)
00042 {
00043 }
00044 
00045 int16_t coap_service_virtual_socket_recv(int8_t service_id, uint8_t source_addr_ptr[static 16], uint16_t port, uint8_t *data_ptr, uint16_t data_len)
00046 {
00047     return 0;
00048 }
00049 
00050 int16_t coap_service_virtual_socket_set_cb(int8_t service_id, coap_service_virtual_socket_send_cb *send_method_ptr)
00051 {
00052     return 0;
00053 }
00054 
00055 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)
00056 {
00057     return 0;
00058 }
00059 
00060 int8_t coap_service_unregister_uri(int8_t service_id, const char *uri)
00061 {
00062     return 0;
00063 }
00064 
00065 uint16_t coap_service_request_send(int8_t service_id, uint8_t options, const uint8_t destination_addr[static 16], uint16_t destination_port, sn_coap_msg_type_e msg_type, sn_coap_msg_code_e msg_code, const char *uri, sn_coap_content_format_e cont_type, const uint8_t *payload_ptr, uint16_t payload_len, coap_service_response_recv *request_response_cb)
00066 {
00067     return 0;
00068 }
00069 
00070 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, sn_coap_content_format_e content_type, const uint8_t *payload_ptr,uint16_t payload_len)
00071 {
00072     return 0;
00073 }
00074 
00075 uint32_t coap_service_get_internal_timer_ticks(void)
00076 {
00077     return 1;
00078 }
00079 
00080 uint16_t coap_service_id_find_by_socket(int8_t socket_id)
00081 {
00082     return 1;
00083 }