att_server.h (969a5bba9383f568af3db3db28fba4f765336dc6) att_server.h (cbbb12d994bd0c91688de48a85bc8d2e42a809ed)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 55 unchanged lines hidden (view full) ---

64void att_server_register_packet_handler(btstack_packet_handler_t handler);
65
66/**
67 * @brief register read/write callbacks for specific handle range
68 * @param att_service_handler_t
69 */
70void att_server_register_service_handler(att_service_handler_t * handler);
71
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 55 unchanged lines hidden (view full) ---

64void att_server_register_packet_handler(btstack_packet_handler_t handler);
65
66/**
67 * @brief register read/write callbacks for specific handle range
68 * @param att_service_handler_t
69 */
70void att_server_register_service_handler(att_service_handler_t * handler);
71
72// the following functions will be removed soon
73
72/*
73 * @brief tests if a notification or indication can be send right now
74 * @param con_handle
75 * @return 1, if packet can be sent
76 */
77int att_server_can_send_packet_now(hci_con_handle_t con_handle);
78
74/*
75 * @brief tests if a notification or indication can be send right now
76 * @param con_handle
77 * @return 1, if packet can be sent
78 */
79int att_server_can_send_packet_now(hci_con_handle_t con_handle);
80
79/**
81/**
80 * @brief Request emission of ATT_EVENT_CAN_SEND_NOW as soon as possible
81 * @note ATT_EVENT_CAN_SEND_NOW might be emitted during call to this function
82 * so packet handler should be ready to handle it
83 * @param con_handle
84 */
85void att_server_request_can_send_now_event(hci_con_handle_t con_handle);
86
82 * @brief Request emission of ATT_EVENT_CAN_SEND_NOW as soon as possible
83 * @note ATT_EVENT_CAN_SEND_NOW might be emitted during call to this function
84 * so packet handler should be ready to handle it
85 * @param con_handle
86 */
87void att_server_request_can_send_now_event(hci_con_handle_t con_handle);
88
87/**
89/**
88 * @brief Request callback when sending is possible
89 * @note callback might happend during call to this function
90 * @param callback_registration to point to callback function and context information
91 * @param con_handle
92 * @return 0 if ok, error otherwise
93 */
94int att_server_register_can_send_now_callback(btstack_context_callback_registration_t * callback_registration, hci_con_handle_t con_handle);
95
90 * @brief Request callback when sending is possible
91 * @note callback might happend during call to this function
92 * @param callback_registration to point to callback function and context information
93 * @param con_handle
94 * @return 0 if ok, error otherwise
95 */
96int att_server_register_can_send_now_callback(btstack_context_callback_registration_t * callback_registration, hci_con_handle_t con_handle);
97
98// end of deprecated functions
99
100/**
101 * @brief Request callback when sending notifcation is possible
102 * @note callback might happend during call to this function
103 * @param callback_registration to point to callback function and context information
104 * @param con_handle
105 * @return 0 if ok, error otherwise
106 */
107int att_server_request_to_send_notification(btstack_context_callback_registration_t * callback_registration, hci_con_handle_t con_handle);
108
109/**
110 * @brief Request callback when sending indication is possible
111 * @note callback might happend during call to this function
112 * @param callback_registration to point to callback function and context information
113 * @param con_handle
114 * @return 0 if ok, error otherwise
115 */
116int att_server_request_to_send_indication(btstack_context_callback_registration_t * callback_registration, hci_con_handle_t con_handle);
117
96/*
97 * @brief notify client about attribute value change
98 * @param con_handle
99 * @param attribute_handle
100 * @param value
101 * @param value_len
102 * @return 0 if ok, error otherwise
103 */

--- 29 unchanged lines hidden ---
118/*
119 * @brief notify client about attribute value change
120 * @param con_handle
121 * @param attribute_handle
122 * @param value
123 * @param value_len
124 * @return 0 if ok, error otherwise
125 */

--- 29 unchanged lines hidden ---