165 void clearPendingCommands();
169 {
return currentCmd; }
180 void rawFtpReply(
int,
const QString&);
185 void connectionClosed();
186 void delayedCloseFinished();
190 void dtpConnectState(
int);
258 : command(cmd), rawCmds(raw),
is_ba(true)
322 #ifndef QT_NO_BEARERMANAGEMENT 338 #ifndef QT_NO_BEARERMANAGEMENT 402 #if defined(QFTPDTP_DEBUG) 403 qDebug(
"QFtpDTP::writeData: write %d bytes",
data.ba->size());
405 if (
data.ba->size() == 0)
413 }
else if (
data.dev) {
418 #if defined(QFTPDTP_DEBUG) 419 qDebug(
"QFtpDTP::writeData: write() of size %lli bytes", read);
423 }
else if (read == -1 || (!
data.dev->isSequential() &&
data.dev->atEnd())) {
458 #if defined(QFTPDTP_DEBUG) 459 qDebug(
"QFtpDTP::abortConnection, bytesAvailable == %lli",
472 const int futureTolerance = 86400;
476 int prevLeapYear = d.
year() - 1;
495 if (tokens.
size() != 8)
503 }
else if (first ==
'-') {
507 }
else if (first ==
'l') {
534 dateString[0] = dateString[0].
toUpper();
539 #ifndef QT_NO_DATESTRING 542 }
while (n < formats.
size() && (!dateTime.
isValid()));
545 if (n == 2 || n == 4) {
554 else if (dateString.
startsWith(QLatin1String(
"Feb 29"))) {
593 bool isOwner = info->
owner() == userName;
603 if (tokens.
size() != 4)
629 ext = name.
mid(extIndex + 1);
638 #ifndef QT_NO_DATESTRING 640 if (dateTime.
date().
year() < 1971) {
660 "(\\S*)\\s+(\\d+)\\s+(\\S+\\s+\\S+\\s+\\S+)\\s+(\\S.*)"));
661 if (unixPattern.
indexIn(bufferStr) == 0) {
668 "(<DIR>|\\d+)\\s+(\\S.*)$"));
669 if (dosPattern.
indexIn(bufferStr) == 0) {
681 #if defined(QFTPDTP_DEBUG) 682 qDebug(
"QFtpDTP::connectState(CsConnected)");
694 #if defined(QFTPDTP_DEBUG) 695 qDebug(
"QFtpDTP::connectState(CsClosed)");
711 #if defined(QFTPDTP_DEBUG) 720 if (line.
endsWith(
"No such file or directory\r\n"))
737 #if defined(QFTPDTP_DEBUG) 738 qDebug(
"QFtpDTP read: %lli bytes (total %lli bytes)", bytesRead,
bytesDone);
749 #if defined(QFTPDTP_DEBUG) 750 qDebug(
"QFtpDTP readyRead: %lli bytes available (total %lli bytes read)",
762 #if defined(QFTPDTP_DEBUG) 763 qDebug(
"QFtpDTP::connectState(CsHostNotFound)");
767 #if defined(QFTPDTP_DEBUG) 768 qDebug(
"QFtpDTP::connectState(CsConnectionRefused)");
781 #if defined(QFTPDTP_DEBUG) 782 qDebug(
"QFtpDTP::connectState(CsClosed)");
790 #if defined(QFTPDTP_DEBUG) 825 transferConnectionExtended(true),
830 waitForDtpToConnect(false),
831 waitForDtpToClose(false)
852 #ifndef QT_NO_BEARERMANAGEMENT 904 #if defined(QFTPPI_DEBUG) 905 qDebug(
"QFtpPI send: ABOR");
928 #if defined(QFTPPI_DEBUG) 978 const int lowerLimit[3] = {1,0,0};
979 const int upperLimit[3] = {5,5,9};
980 for (
int i=0; i<3; i++) {
993 QString lineCont(endOfMultiLine);
997 while (lineLeft4 != endOfMultiLine) {
998 if (lineLeft4 == lineCont)
1005 lineLeft4 = line.
left(4);
1024 #if defined(QFTPPI_DEBUG) 1055 static const State table[5] = {
1061 if (replyCode[0] == 1) {
1063 }
else if (replyCode[0] == 2) {
1071 if (static_cast<signed char>(replyCode[0]) < 0 || replyCode[0] > 5)
1074 #if defined(Q_OS_IRIX) && defined(Q_CC_GNU) 1078 state = t[replyCode[0] - 1];
1081 if (replyCodeInt == 202)
1084 state = table[replyCode[0] - 1];
1091 #if defined(QFTPPI_DEBUG) 1099 }
else if (replyCodeInt == 227) {
1107 #if defined(QFTPPI_DEBUG) 1108 qDebug(
"QFtp: bad 227 response -- address and port information missing");
1114 quint16 port = (lst[5].toUInt() << 8) + lst[6].toUInt();
1118 }
else if (replyCodeInt == 229) {
1121 if (portPos == -1) {
1122 #if defined(QFTPPI_DEBUG) 1123 qDebug(
"QFtp: bad 229 response -- port information missing");
1133 epsvParameters.
at(3).
toInt());
1136 }
else if (replyCodeInt == 230) {
1144 }
else if (replyCodeInt == 213) {
1190 #if defined(QFTPPI_DEBUG) 1206 #if defined(QFTPPI_DEBUG) 1208 qDebug(
"QFtpPI startNextCmd: Internal error! QFtpPI called in non-Idle state %d",
state);
1255 #if defined(QFTPPI_DEBUG) 1284 QFtp::tr(
"Connection refused for data connection"));
1299 #include <private/qobject_p.h> 1314 void _q_startNextCommand();
1315 void _q_piFinished(
const QString&);
1316 void _q_piError(
int,
const QString&);
1317 void _q_piConnectState(
int);
1318 void _q_piFtpReply(
int,
const QString&);
1338 pending.append(cmd);
1340 if (pending.count() == 1) {
1465 d->errorString =
tr(
"Unknown error");
1468 SLOT(_q_piConnectState(
int)));
1494 d->errorString =
tr(
"Unknown error");
1497 SLOT(_q_piConnectState(
int)));
1769 d_func()->pi.transferConnectionExtended =
true;
1830 d_func()->pi.transferConnectionExtended =
true;
1831 d_func()->transferMode = mode;
2129 return d_func()->pi.dtp.bytesAvailable();
2145 return d_func()->pi.dtp.read(data, maxlen);
2156 return d_func()->pi.dtp.readAll();
2190 if (d_func()->pending.isEmpty())
2194 d_func()->pi.abort();
2205 if (d_func()->pending.isEmpty())
2207 return d_func()->pending.first()->id;
2218 if (d_func()->pending.isEmpty())
2220 return d_func()->pending.first()->command;
2235 if (d_func()->pending.isEmpty())
2254 return d_func()->pending.count() > 1;
2267 while (d_func()->pending.count() > 1)
2268 delete d_func()->pending.takeLast();
2279 return d_func()->state;
2291 return d_func()->error;
2307 return d_func()->errorString;
2315 if (pending.isEmpty())
2322 if (q->bytesAvailable())
2324 emit q->commandStarted(c->
id);
2331 if (port && port != 21)
2341 proxyPort = c->
rawCmds[1].toUInt();
2345 #ifndef QT_NO_BEARERMANAGEMENT 2347 pi.setProperty(
"_q_networksession", q->property(
"_q_networksession"));
2349 if (!proxyHost.isEmpty()) {
2351 port = c->
rawCmds[1].toUInt();
2352 pi.connectToHost(proxyHost, proxyPort);
2359 pi.dtp.setData(c->
data.
ba);
2362 pi.dtp.setDevice(c->
data.
dev);
2364 pi.dtp.setBytesTotal(0);
2366 pi.dtp.connect(c->
data.
dev,
SIGNAL(readChannelFinished()),
SLOT(dataReadyRead()));
2373 pi.dtp.setDevice(c->
data.
dev);
2387 if (pending.isEmpty())
2397 close_waitForStateChange =
true;
2401 emit q_func()->commandFinished(c->
id,
false);
2402 pending.removeFirst();
2406 if (pending.isEmpty()) {
2407 emit q_func()->done(
false);
2409 _q_startNextCommand();
2419 if (pending.isEmpty()) {
2420 qWarning(
"QFtpPrivate::_q_piError was called without pending command!");
2428 pi.dtp.setBytesTotal(0);
2435 switch (q->currentCommand()) {
2477 pi.clearPendingCommands();
2478 q->clearPendingCommands();
2479 emit q->commandFinished(c->
id,
true);
2481 pending.removeFirst();
2483 if (pending.isEmpty())
2486 _q_startNextCommand();
2495 if (close_waitForStateChange) {
2496 close_waitForStateChange =
false;
2506 pi.rawCommand =
true;
2507 emit q_func()->rawCommandReply(code, text);
2524 #include "moc_qftp.cpp" static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void socketConnectionClosed()
virtual void setSize(qint64 size)
Specifies the size of the URL.
virtual void setFile(bool b)
If b is true then the URL is set to be a file; if is false then the URL is set not to be a file (whic...
QString owner() const
Returns the owner of the URL.
bool transferConnectionExtended
qlonglong toLongLong(bool *ok=0, int base=10) const
Returns the string converted to a long long using base base, which is 10 by default and must be betwe...
virtual qint64 size() const
For open random-access devices, this function returns the size of the device.
QString peerName() const
Returns the name of the peer as specified by connectToHost(), or an empty QString if connectToHost() ...
bool isFile() const
Returns true if the URL is a file; otherwise returns false.
qint64 bytesAvailable() const
int connectToHost(const QString &host, quint16 port=21)
Connects to the FTP server host using port port.
static mach_timebase_info_data_t info
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
QByteArray readAll()
Reads all the bytes available from the data socket and returns them.
#define QT_END_NAMESPACE
This macro expands to.
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
char * data()
Returns a pointer to the data stored in the byte array.
const QChar at(int i) const
Returns the character at the given index position in the string.
QHostAddress localAddress() const
Returns the host address of the local socket if available; otherwise returns QHostAddress::Null.
void connectToHost(const QString &host, quint16 port)
The QRegExp class provides pattern matching using regular expressions.
qint64 bytesAvailable() const
Returns the number of incoming bytes that are waiting to be read.
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
void rawFtpReply(int, const QString &)
QDateTime toDateTime(const QString &string, FormatType format=LongFormat) const
Parses the date/time string given in string and returns the time.
int cd(const QString &dir)
Changes the working directory of the server to dir.
void _q_piFinished(const QString &)
void connectToHost(const QString &hostName, quint16 port, OpenMode mode=ReadWrite)
Attempts to make a connection to hostName on the given port.
The QByteArray class provides an array of bytes.
void chop(int n)
Removes n characters from the end of the string.
void error(int, const QString &)
int length() const
Returns the number of characters in this string.
QString toUpper() const Q_REQUIRED_RESULT
Returns an uppercase copy of the string.
virtual void setGroup(const QString &s)
Specifies that the owning group of the URL is called s.
int month() const
Returns the number corresponding to the month of this date, using the following convention: ...
int rawCommand(const QString &command)
Sends the raw FTP command command to the FTP server.
QFtpDTP(QFtpPI *p, QObject *parent=0)
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
Command
This enum is used as the return value for the currentCommand() function.
bool listen(const QHostAddress &address=QHostAddress::Any, quint16 port=0)
Tells the server to listen for incoming connections on address address and port port.
State
This enum defines the connection state:
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
int day() const
Returns the day of the month (1 to 31) of this date.
Command currentCommand() const
Returns the command type of the FTP command being executed or None if there is no command being execu...
int rmdir(const QString &dir)
Removes the directory called dir from the server.
bool isValid() const
Returns true if both the date and the time are valid; otherwise returns false.
bool isSymLink() const
Returns true if the URL is a symbolic link; otherwise returns false.
#define QT_TRANSLATE_NOOP(scope, x)
Marks the string literal sourceText for dynamic translation in the given context; i...
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
The QDate class provides date functions.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static QBasicAtomicInt idCounter
void pop_front()
This function is provided for STL compatibility.
int count(const T &t) const
Returns the number of occurrences of value in the list.
quint32 toIPv4Address() const
Returns the IPv4 address as a number.
void abort()
Aborts the current connection and resets the socket.
The QString class provides a Unicode character string.
int put(const QByteArray &data, const QString &file, TransferType type=Binary)
Writes a copy of the given data to the file called file on the server.
void setData(QByteArray *)
The QFtp class provides an implementation of the client side of FTP protocol.
The QObject class is the base class of all Qt objects.
#define Q_BASIC_ATOMIC_INITIALIZER(a)
int setTransferMode(TransferMode mode)
Sets the current FTP transfer mode to mode.
void abort()
Aborts the current command and deletes all scheduled commands.
virtual void setDir(bool b)
If b is true then the URL is set to be a directory; if b is false then the URL is set not to be a dir...
virtual void setOwner(const QString &s)
Specifies that the owner of the URL is called s.
bool isListening() const
Returns true if the server is currently listening for incoming connections; otherwise returns false...
The QChar class provides a 16-bit Unicode character.
int setupListener(const QHostAddress &address)
void setSocketOption(QAbstractSocket::SocketOption option, const QVariant &value)
Sets the given option to the value described by value.
static bool isLeapYear(int year)
Returns true if the specified year is a leap year; otherwise returns false.
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
int currentId() const
Returns the identifier of the FTP command that is being executed or 0 if there is no command being ex...
void setObjectName(const QString &name)
QString errorMessage() const
qint64 read(char *data, qint64 maxlen)
Reads at most maxSize bytes from the device into data, and returns the number of bytes read...
SocketState
This enum describes the different states in which a socket can be.
static bool parseDir(const QByteArray &buffer, const QString &userName, QUrlInfo *info)
Q_CORE_EXPORT void qDebug(const char *,...)
void socketError(QAbstractSocket::SocketError)
The QUrlInfo class stores information about URLs.
void socketBytesWritten(qint64)
TransferMode
FTP works with two socket connections; one for commands and another for transmitting data...
virtual void setName(const QString &name)
Sets the name of the URL to name.
virtual void setPermissions(int p)
Specifies that the URL has access permissions p.
int addCommand(QFtpCommand *cmd)
#define QT_BEGIN_NAMESPACE
This macro expands to.
static QIntfbScreen * connected
qint64 read(char *data, qint64 maxlen)
Reads maxlen bytes from the data socket into data and returns the number of bytes read...
bool isOpen() const
Returns true if the device is open; otherwise returns false.
void clearPendingCommands()
Deletes all pending commands from the list of scheduled commands.
Error
This enum identifies the error that occurred.
void setDate(const QDate &date)
Sets the date part of this datetime to date.
int indexIn(const QString &str, int offset=0, CaretMode caretMode=CaretAtZero) const
Attempts to find a match in str from position offset (0 by default).
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
int get(const QString &file, QIODevice *dev=0, TransferType type=Binary)
Downloads the file file from the server.
QString trimmed() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end.
virtual QTcpSocket * nextPendingConnection()
Returns the next pending connection as a connected QTcpSocket object.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
QStringList capturedTexts() const
Returns a list of the captured text strings.
static QDate currentDate()
Returns the current date, as reported by the system clock.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QFtpPI(QObject *parent=0)
QFtp::TransferMode transferMode
void prepend(const T &t)
Inserts value at the beginning of the list.
QString currentCommand() const
const T & at(int i) const
Returns the item at index position i in the list.
The QStringList class provides a list of strings.
SocketError
This enum describes the socket errors that can occur.
int secsTo(const QDateTime &) const
Returns the number of seconds from this datetime to the other datetime.
Q_CORE_EXPORT void qWarning(const char *,...)
QIODevice * currentDevice() const
Returns the QIODevice pointer that is used by the FTP command to read data from or store data to...
static const char * data(const QByteArray &arr)
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
The QTcpSocket class provides a TCP socket.
void dataTransferProgress(qint64, qint64)
This signal is emitted in response to a get() or put() request to indicate the current progress of th...
QString toString() const
Returns the address as a string.
void listInfo(const QUrlInfo &)
This signal is emitted for each directory entry the list() command finds.
void connectToHost(const QString &host, quint16 port)
bool waitForNewConnection(int msec=0, bool *timedOut=0)
Waits for at most msec milliseconds or until an incoming connection is available. ...
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
void clear()
Removes all items from the list.
The State element defines configurations of objects and properties.
void finished(const QString &)
int mkdir(const QString &dir)
Creates a directory called dir on the server.
void close()
Closes the I/O device for the socket, disconnects the socket's connection with the host...
QFtpCommand(QFtp::Command cmd, QStringList raw, const QByteArray &ba)
void setBytesTotal(qint64 bytes)
virtual bool isSequential() const
Returns true if this device is sequential; otherwise returns false.
void resize(int size)
Sets the size of the string to size characters.
T & first()
Returns a reference to the first item in the list.
const char * constData() const
Returns a pointer to the data stored in the byte array.
QDate date() const
Returns the date part of the datetime.
bool isNull() const
Returns true if this string is null; otherwise returns false.
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
static void _q_fixupDateTime(QDateTime *dateTime, bool leapYear=false)
static QLocale c()
Returns a QLocale object initialized to the "C" locale.
#define Q_DECLARE_PUBLIC(Class)
QFtp(QObject *parent=0)
Constructs a QFtp object with the given parent.
QAbstractSocket::NetworkLayerProtocol protocol() const
Returns the network layer protocol of the host address.
bool sendCommands(const QStringList &cmds)
The QDateTime class provides date and time functions.
int list(const QString &dir=QString())
Lists the contents of directory dir on the FTP server.
QList< QFtpCommand * > pending
qint64 readLine(char *data, qint64 maxlen)
This function reads a line of ASCII characters from the device, up to a maximum of maxSize - 1 bytes...
QString simplified() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end, and that has each sequence o...
void clear()
Clears the contents of the string and makes it empty.
void readyRead()
This signal is emitted in response to a get() command when there is new data to read.
virtual void setSymLink(bool b)
Specifies that the URL refers to a symbolic link if b is true and that it does not if b is false...
int lastIndexOf(QChar c, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
void _q_startNextCommand()
Q_INVOKABLE QObject(QObject *parent=0)
Constructs an object with parent object parent.
QObject * parent() const
Returns a pointer to the parent object.
int rename(const QString &oldname, const QString &newname)
Renames the file called oldname to newname on the server.
bool singleShot
This static function calls a slot after a given time interval.
QString toLower() const Q_REQUIRED_RESULT
Returns a lowercase copy of the string.
int remove(const QString &file)
Deletes the file called file from the server.
void resize(int size)
Sets the size of the byte array to size bytes.
int close()
Closes the connection to the FTP server.
int size() const
Returns the number of items in the list.
The QTcpServer class provides a TCP-based server.
QString errorString() const
Returns a human-readable description of the last error that occurred.
int fetchAndAddRelaxed(int valueToAdd)
static QDateTime currentDateTime()
Returns the current datetime, as reported by the system clock, in the local time zone.
bool setYMD(int y, int m, int d)
Sets the date's year y, month m, and day d.
qint64 bytesAvailable() const
Returns the number of bytes that can be read from the data socket at the moment.
qint64 bytesToWrite() const
Returns the number of bytes that are waiting to be written.
QTcpSocket::SocketState state() const
QByteArray readAll()
Reads all available data from the device, and returns it as a QByteArray.
quint16 serverPort() const
Returns the server's port if the server is listening for connections; otherwise returns 0...
TransferType
This enum identifies the data transfer type used with get and put commands.
int size() const
Returns the number of bytes in this byte array.
QHostAddress peerAddress() const
Returns the address of the connected peer if the socket is in ConnectedState; otherwise returns QHost...
char toLatin1() const
Returns the Latin-1 character equivalent to the QChar, or 0.
void listInfo(const QUrlInfo &)
virtual bool open(OpenMode mode)
Opens the device and sets its OpenMode to mode.
void dataTransferProgress(qint64, qint64)
bool close_waitForStateChange
void _q_piConnectState(int)
QVariant property(const char *name) const
Returns the value of the object's name property.
QByteArray bytesFromSocket
virtual void setWritable(bool b)
Specifies that the URL is writable if b is true and not writable if b is false.
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
virtual void setLastModified(const QDateTime &dt)
Specifies that the object the URL refers to was last modified at dt.
void delayedCloseFinished()
union QFtpCommand::@311 data
QStringList pendingCommands
void _q_piFtpReply(int, const QString &)
static void _q_parseDosDir(const QStringList &tokens, const QString &userName, QUrlInfo *info)
int year() const
Returns the year of this date.
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
void dtpConnectState(int)
static void _q_parseUnixDir(const QStringList &tokens, const QString &userName, QUrlInfo *info)
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
virtual ~QFtp()
Destructor.
int login(const QString &user=QString(), const QString &password=QString())
Logs in to the FTP server with the username user and the password password.
void close()
Closes the server.
The QHostAddress class provides an IP address.
static QNSListener * listener
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
void clearPendingCommands()
virtual void setReadable(bool b)
Specifies that the URL is readable if b is true and not readable if b is false.
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
Error error() const
Returns the last error that occurred.
The QIODevice class is the base interface class of all I/O devices in Qt.
int setProxy(const QString &host, quint16 port)
Enables use of the FTP proxy on host host and port port.
QByteArray bytesFromSocket
bool sendCommand(const QString &cmd)
bool canReadLine() const
Returns true if a line of data can be read from the socket; otherwise returns false.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
void setDevice(QIODevice *)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
const QChar * constData() const
Returns a pointer to the data stored in the QString.
QByteArray & remove(int index, int len)
Removes len bytes from the array, starting at index position pos, and returns a reference to the arra...
State state() const
Returns the current state of the object.
void clear()
Clears the contents of the byte array and makes it empty.
SocketState state() const
Returns the state of the socket.
bool endsWith(const QByteArray &a) const
Returns true if this byte array ends with byte array ba; otherwise returns false. ...
The QList class is a template class that provides lists.
qint64 read(char *data, qint64 maxlen)
void _q_piError(int, const QString &)
bool hasPendingCommands() const
Returns true if there are any commands scheduled that have not yet been executed; otherwise returns f...