Rtos API example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers coap_connection_handler_stub.h Source File

coap_connection_handler_stub.h

00001 /*
00002  * Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
00003  *
00004  * SPDX-License-Identifier: Apache-2.0
00005  *
00006  * Licensed under the Apache License, Version 2.0 (the "License"); you may
00007  * not use this file except in compliance with the License.
00008  * You may obtain a copy of the License at
00009  *
00010  * http://www.apache.org/licenses/LICENSE-2.0
00011  *
00012  * Unless required by applicable law or agreed to in writing, software
00013  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00014  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  * See the License for the specific language governing permissions and
00016  * limitations under the License.
00017  */
00018 #ifndef __COAP_CONNECTION_HANDLER_STUB_H__
00019 #define __COAP_CONNECTION_HANDLER_STUB_H__
00020 
00021 #include <inttypes.h>
00022 #include <stdbool.h>
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 #include "coap_connection_handler.h"
00029 
00030 typedef struct {
00031     int int_value;
00032     bool bool_value;
00033     coap_conn_handler_t *handler_obj;
00034 
00035     int (*send_to_sock_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, const void *, int);
00036     int (*receive_from_sock_cb)(int8_t socket_id, uint8_t src_address[static 16], uint16_t port, const uint8_t dst_address[static 16], unsigned char *data, int len);
00037     int (*get_passwd_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, uint8_t *pw_ptr, uint8_t *pw_len);
00038     void (*sec_done_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, uint8_t keyblock[static 40]);
00039 
00040 } thread_conn_handler_stub_def;
00041 
00042 extern thread_conn_handler_stub_def thread_conn_handler_stub;
00043 
00044 #ifdef __cplusplus
00045 }
00046 #endif
00047 
00048 
00049 #endif