本文整理汇总了C++中qbluetoothserviceinfo::Sequence::isEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ Sequence::isEmpty方法的具体用法?C++ Sequence::isEmpty怎么用?C++ Sequence::isEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qbluetoothserviceinfo::Sequence
的用法示例。
在下文中一共展示了Sequence::isEmpty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: socketProtocol
/*!
Returns the protocol that the QBluetoothServiceInfo object uses.
*/
QBluetoothServiceInfo::Protocol QBluetoothServiceInfo::socketProtocol() const
{
QBluetoothServiceInfo::Sequence parameters = protocolDescriptor(QBluetoothUuid::Rfcomm);
if (!parameters.isEmpty())
return RfcommProtocol;
parameters = protocolDescriptor(QBluetoothUuid::L2cap);
if (!parameters.isEmpty())
return L2capProtocol;
return UnknownProtocol;
}
示例2: protocolServiceMultiplexer
/*!
This is a convenience function. Returns the protocol/service multiplexer for services which
support the L2CAP protocol, otherwise returns -1.
This function is equivalent to extracting the information from
QBluetoothServiceInfo::Sequence returned by
QBluetoothServiceInfo::attribute(QBluetoothServiceInfo::ProtocolDescriptorList).
*/
int QBluetoothServiceInfo::protocolServiceMultiplexer() const
{
QBluetoothServiceInfo::Sequence parameters = protocolDescriptor(QBluetoothUuid::L2cap);
if (parameters.isEmpty())
return -1;
else if (parameters.count() == 1)
return 0;
else
return parameters.at(1).toUInt();
}