Lines Matching refs:g_internal

74 static bluetooth::gatt::ServerInternals *g_internal = nullptr;  variable
137 g_internal->server_if = server_if; in RegisterServerCallback()
144 g_internal->gatt->server->add_service( in RegisterServerCallback()
153 std::lock_guard<std::mutex> lock(g_internal->lock); in ServiceAddedCallback()
154 g_internal->server_if = server_if; in ServiceAddedCallback()
155 g_internal->service_handle = srvc_handle; in ServiceAddedCallback()
156 g_internal->service_id = *srvc_id; in ServiceAddedCallback()
158 g_internal->api_synchronize.notify_one(); in ServiceAddedCallback()
164 std::lock_guard<std::mutex> lock(g_internal->lock); in RequestReadCallback()
166 bluetooth::gatt::Characteristic &ch = g_internal->characteristics[attr_handle]; in RequestReadCallback()
200 g_internal->gatt->server->send_response(conn_id, trans_id, 0, &response); in RequestReadCallback()
214 std::lock_guard<std::mutex> lock(g_internal->lock); in RequestWriteCallback()
217 g_internal->characteristics[attr_handle]; in RequestWriteCallback()
223 auto target_blob = g_internal->controlled_blobs.find(attr_handle); in RequestWriteCallback()
225 if (target_blob != g_internal->controlled_blobs.end() && in RequestWriteCallback()
227 g_internal->characteristics[target_blob->second].blob_section = ch.blob[0]; in RequestWriteCallback()
235 OSI_NO_INTR(status = write(g_internal->pipefd[kPipeWriteEnd], in RequestWriteCallback()
242 g_internal->last_write = ch.uuid; in RequestWriteCallback()
256 g_internal->gatt->server->send_response(conn_id, trans_id, 0, &response); in RequestWriteCallback()
268 g_internal->gatt->server->send_response(conn_id, trans_id, 0, &response); in RequestExecWriteCallback()
273 std::lock_guard<std::mutex> lock(g_internal->lock); in RequestExecWriteCallback()
276 g_internal->last_write.GetFullBigEndian(); in RequestExecWriteCallback()
278 OSI_NO_INTR(status = write(g_internal->pipefd[kPipeWriteEnd], uuid.data(), in RequestExecWriteCallback()
290 g_internal->connections.insert(conn_id); in ConnectionCallback()
292 g_internal->connections.erase(conn_id); in ConnectionCallback()
304 std::lock_guard<std::mutex> lock(g_internal->lock); in CharacteristicAddedCallback()
306 g_internal->uuid_to_attribute[id] = char_handle; in CharacteristicAddedCallback()
307 g_internal->characteristics[char_handle].uuid = id; in CharacteristicAddedCallback()
308 g_internal->characteristics[char_handle].blob_section = 0; in CharacteristicAddedCallback()
311 g_internal->api_synchronize.notify_one(); in CharacteristicAddedCallback()
329 bt_uuid_t client_id = g_internal->service_id.id.uuid; in ServiceStartedCallback()
332 bt_status_t btstat = g_internal->gatt->client->register_client(&client_id); in ServiceStartedCallback()
341 g_internal->client_if = client_if; in RegisterClientCallback()
344 bt_status_t btstat = g_internal->gatt->client->set_adv_data( in RegisterClientCallback()
360 btstat = g_internal->gatt->client->listen(client_if, true); in RegisterClientCallback()
369 std::lock_guard<std::mutex> lock(g_internal->lock); in ListenCallback()
370 g_internal->api_synchronize.notify_one(); in ListenCallback()
378 std::lock_guard<std::mutex> lock(g_internal->lock); in ServiceStoppedCallback()
379 g_internal->api_synchronize.notify_one(); in ServiceStoppedCallback()
385 std::lock_guard<std::mutex> lock(g_internal->lock); in ScanResultCallback()
386 g_internal->scan_results[addr] = rssi; in ScanResultCallback()
547 g_internal = internal_.get(); in Initialize()