Пример #1
0
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QObject::connect(ui->actionNeue_Verbindung, SIGNAL(triggered()), SLOT(menu_newConnection()));
    QObject::connect(ui->actionServermanager, SIGNAL(triggered()), SLOT(menu_serverManager()));

    QObject::connect(&_serverManager, SIGNAL(ConnectionRequest(QString)), SLOT(servermanager_connectionRequest(QString)));
}
Пример #2
0
void
LocalDeviceImpl::HandleUnexpectedEvent(struct hci_event_header* event)
{
	// Events here might have not been initated by us
	// TODO: ML mark as handled pass a reply by parameter and reply in common
	switch (event->ecode) {
		case HCI_EVENT_HARDWARE_ERROR:
			HardwareError(
				JumpEventHeader<struct hci_ev_hardware_error>(event));
			break;

		case HCI_EVENT_CONN_REQUEST:
			ConnectionRequest(
				JumpEventHeader<struct hci_ev_conn_request>(event), NULL);
			break;

		case HCI_EVENT_NUM_COMP_PKTS:
			NumberOfCompletedPackets(
				JumpEventHeader<struct hci_ev_num_comp_pkts>(event));
			break;

		case HCI_EVENT_DISCONNECTION_COMPLETE:
			// should belong to a request?  can be sporadic or initiated by us?
			DisconnectionComplete(
				JumpEventHeader
					<struct hci_ev_disconnection_complete_reply>(event),
				NULL);
			break;
		case HCI_EVENT_PIN_CODE_REQ:
			PinCodeRequest(
				JumpEventHeader<struct hci_ev_pin_code_req>(event), NULL);
			break;
		default:
			// TODO: feedback unexpected not handled
			break;
	}
}