Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtuio_p.h
Go to the documentation of this file.
1// Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QTUIO_P_H
6#define QTUIO_P_H
7
9
10inline bool qt_readOscString(const QByteArray &source, QByteArray &dest, quint32 &pos)
11{
12 int end = source.indexOf('\0', pos);
13 if (end < 0) {
14 pos = source.size();
15 dest = QByteArray();
16 return false;
17 }
18
19 dest = source.mid(pos, end - pos);
20
21 // Skip additional NULL bytes at the end of the string to make sure the
22 // total number of bits a multiple of 32 bits ("OSC-string" in the
23 // specification).
24 end += 4 - ((end - pos) % 4);
25
26 pos = end;
27 return true;
28}
29
30QT_END_NAMESPACE
31
32#endif
QList< QOscMessage > messages() const
QOscBundle(const QByteArray &data)
bool isValid() const
QList< QOscBundle > bundles() const
Q_DECLARE_TYPEINFO(QOscBundle, Q_RELOCATABLE_TYPE)
Q_DECLARE_TYPEINFO(QOscMessage, Q_RELOCATABLE_TYPE)
QT_BEGIN_NAMESPACE bool qt_readOscString(const QByteArray &source, QByteArray &dest, quint32 &pos)
Definition qtuio_p.h:10