Lines Matching refs:g_internal

76 static bluetooth::gatt::ServerInternals* g_internal = nullptr;  variable
137 g_internal->server_if = server_if; in RegisterServerCallback()
150 std::lock_guard<std::mutex> lock(g_internal->lock); in ServiceAddedCallback()
151 g_internal->server_if = server_if; in ServiceAddedCallback()
153 g_internal->service_handle = service[0].attribute_handle; in ServiceAddedCallback()
167 g_internal->uuid_to_attribute[id] = char_handle; in ServiceAddedCallback()
168 g_internal->characteristics[char_handle].uuid = id; in ServiceAddedCallback()
169 g_internal->characteristics[char_handle].blob_section = 0; in ServiceAddedCallback()
177 g_internal->controlled_blobs[control_attribute] = blob_attribute; in ServiceAddedCallback()
178 g_internal->characteristics[blob_attribute].notify = in ServiceAddedCallback()
182 g_internal->characteristics[control_attribute]; in ServiceAddedCallback()
202 bt_status_t btstat = g_internal->gatt->client->register_client(client_id); in ServiceAddedCallback()
211 std::lock_guard<std::mutex> lock(g_internal->lock); in RequestReadCallback()
214 g_internal->characteristics[attr_handle]; in RequestReadCallback()
248 g_internal->gatt->server->send_response(conn_id, trans_id, 0, response); in RequestReadCallback()
262 std::lock_guard<std::mutex> lock(g_internal->lock); in RequestWriteCallback()
265 g_internal->characteristics[attr_handle]; in RequestWriteCallback()
271 auto target_blob = g_internal->controlled_blobs.find(attr_handle); in RequestWriteCallback()
273 if (target_blob != g_internal->controlled_blobs.end() && in RequestWriteCallback()
275 g_internal->characteristics[target_blob->second].blob_section = ch.blob[0]; in RequestWriteCallback()
283 OSI_NO_INTR(status = write(g_internal->pipefd[kPipeWriteEnd], in RequestWriteCallback()
290 g_internal->last_write = ch.uuid; in RequestWriteCallback()
304 g_internal->gatt->server->send_response(conn_id, trans_id, 0, response); in RequestWriteCallback()
316 g_internal->gatt->server->send_response(conn_id, trans_id, 0, response); in RequestExecWriteCallback()
320 std::lock_guard<std::mutex> lock(g_internal->lock); in RequestExecWriteCallback()
322 const bluetooth::Uuid::UUID128Bit uuid = g_internal->last_write.To128BitBE(); in RequestExecWriteCallback()
324 OSI_NO_INTR(status = write(g_internal->pipefd[kPipeWriteEnd], uuid.data(), in RequestExecWriteCallback()
336 g_internal->connections.insert(conn_id); in ConnectionCallback()
338 g_internal->connections.erase(conn_id); in ConnectionCallback()
345 std::lock_guard<std::mutex> lock(g_internal->lock); in EnableAdvertisingCallback()
346 g_internal->api_synchronize.notify_one(); in EnableAdvertisingCallback()
353 g_internal->client_if = client_if; in RegisterClientCallback()
356 g_internal->gatt->advertiser->SetData(0 /* std_inst */, false, in RegisterClientCallback()
360 g_internal->gatt->advertiser->Enable( in RegisterClientCallback()
370 std::lock_guard<std::mutex> lock(g_internal->lock); in ServiceStoppedCallback()
371 g_internal->api_synchronize.notify_one(); in ServiceStoppedCallback()
381 std::lock_guard<std::mutex> lock(g_internal->lock); in ScanResultCallback()
382 g_internal->scan_results[addr] = rssi; in ScanResultCallback()
539 g_internal = internal_.get(); in Initialize()