Knight KE / Mbed OS Game_Master
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 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 #ifndef __COAP_CONNECTION_HANDLER_STUB_H__
00018 #define __COAP_CONNECTION_HANDLER_STUB_H__
00019 
00020 #include <inttypes.h>
00021 #include <stdbool.h>
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00027 #include "coap_connection_handler.h"
00028 
00029 typedef struct {
00030     int int_value;
00031     bool bool_value;
00032     coap_conn_handler_t *handler_obj;
00033 
00034     int (*send_to_sock_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, const void *, int);
00035     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);
00036     int (*get_passwd_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, coap_security_keys_t *security_ptr);
00037     void (*sec_done_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, uint8_t keyblock[static 40]);
00038 
00039 } thread_conn_handler_stub_def;
00040 
00041 extern thread_conn_handler_stub_def thread_conn_handler_stub;
00042 
00043 #ifdef __cplusplus
00044 }
00045 #endif
00046 
00047 
00048 #endif