void QuteMessenger::createNewTab(const QBtAddress & address) { QChatWidget* tmpChat; tmpChat = new QChatWidgetServer(this); tmpChat->SetName(address.toString()); ((QChatWidgetServer*) tmpChat)->SetDiscoverer(devDisc); ((QChatWidgetServer*) tmpChat)->SetServer(rfcommServer); connect(tmpChat, SIGNAL(tabNameChanged(QString, QChatWidget*)), this, SLOT(tabNameChangedReport(QString, QChatWidget*))); ui.tabWidget->addTab(tmpChat, "Chat"); chatTabs.append(tmpChat); }
bool QBtLocalDevicePrivate::UnpairDevice(const QBtAddress& address) { BTINT32 result = BTSDK_FALSE; //get device handle BTDEVHDL devHandle = BTSDK_INVALID_HANDLE; BTUINT8 btAddr [6]= {0}; QByteArray btAddrQt = address.toReversedByteArray(); memcpy(btAddr, btAddrQt.constData(), btAddrQt.size()); devHandle = Btsdk_GetRemoteDeviceHandle(btAddr); if(devHandle == BTSDK_INVALID_HANDLE) return false; result = Btsdk_UnPairDevice (devHandle); return (result == BTSDK_OK); }
bool QBtAddress::operator< (const QBtAddress & other ) { return (this->toString() < other.toString()); }
bool QBtAddress::operator!= (const QBtAddress & other ) { int result = _address.compare(other.toString(),Qt::CaseInsensitive); return ((result == 0) ? false : true); }