inline void QDBusMarshaller::append(const QDBusUnixFileDescriptor &arg) { int fd = arg.fileDescriptor(); if (!ba && fd == -1) { error(QLatin1String("Invalid file descriptor passed in arguments")); } else { qIterAppend(&iterator, ba, DBUS_TYPE_UNIX_FD, &fd); } }
void BluetoothSinkPlugin::newConnection(string, QDBusUnixFileDescriptor fd, QVariantMap) { SerialPort *bluetoothDev = new SerialPort(); bluetoothDev->setDescriptor(fd.fileDescriptor()); auto client = amb::make_shared(new amb::AmbRemoteServer(bluetoothDev, routingEngine)); client->disconnected = [this, client]() { removeOne(&clients, client); }; clients.push_back(client); }
inline QDBusUnixFileDescriptor QDBusDemarshaller::toUnixFileDescriptor() { QDBusUnixFileDescriptor fd; fd.giveFileDescriptor(qIterGet<dbus_int32_t>(&iterator)); return fd; }
void AbstractBluetoothSerialProfile::newConnection(string path, QDBusUnixFileDescriptor fd, QVariantMap props) { DebugOut()<<"new Connection! Path: "<<path<<" fd: "<<fd.fileDescriptor()<<endl; }