40 #include <QAbstractSocket> 41 #include <QStringList> 44 class ArnClientPrivate;
123 explicit ArnClient(QObject *parent = arnNullptr);
131 void clearArnList(
int prioFilter = -1);
138 HostList arnList(
int prioFilter = -1)
const;
148 void addToArnList(
const QString& arnHost, quint16 port = 0,
int prio = 0);
155 void connectToArnList();
163 void connectToArn(
const QString& arnHost, quint16 port = 0);
176 void disconnectFromArn();
192 void loginToArn(
const QString& userName,
const QString& password,
206 void loginToArnHashed(
const QString& userName,
const QString& passwordHashed,
231 bool setMountPoint(
const QString& path);
247 bool addMountPoint(
const QString& localPath,
const QString& remotePath = QString());
258 bool removeMountPoint(
const QString& localPath);
274 void setAutoConnect(
bool isAuto,
int retryTime = 2);
286 void registerClient(
const QString&
id);
293 static ArnClient* getClient(
const QString&
id);
305 int receiveTimeout()
const;
318 void setReceiveTimeout(
int receiveTimeout);
325 bool isDemandLogin()
const;
332 void setDemandLogin(
bool isDemandLogin);
348 void setSyncMode(
SyncMode syncMode);
354 static QString passwordHash(
const QString& password);
366 QStringList freePaths()
const;
401 bool isReContact()
const;
412 bool isReConnect()
const;
420 void chatSend(
const QString& text,
int prioType);
428 void abortKillRequest();
435 bool getTraffic( quint64& in, quint64& out)
const;
440 void commandGet(
const QString& path);
441 void commandSet(
const QString& path,
const QString& data);
442 void commandLs(
const QString& path);
443 void commandInfo(
int type,
const QByteArray& data = QByteArray());
444 void commandVersion();
445 bool getLocalRemotePath(
const QString& path,
446 QString& localMountPath, QString& remoteMountPath);
447 ArnItemNet* newNetItem(
const QString& path,
449 bool* isNewPtr = arnNullptr);
457 void tcpError(
const QString& errorText, QAbstractSocket::SocketError socketError);
463 void tcpConnected(
const QString& arnHost, quint16 port);
466 void tcpDisConnected();
473 void connectionStatusChanged(
int status,
int curPrio);
486 void loginRequired(
int contextCode);
493 void killRequested();
500 void chatReceived(
const QString& text,
int prioType);
504 void replyGet(
const QString& data,
const QString& path);
505 void replyLs(
const QStringList& subItems,
const QString& path);
506 void replyInfo(
int type,
const QByteArray& data);
507 void replyVer(
const QString& version);
510 ArnClient( ArnClientPrivate& dd, QObject* parent);
511 ArnClientPrivate*
const d_ptr;
515 void newNetItemProxy( ArnThreadCom* threadCom,
516 const QString& path,
int syncMode = 0,
void* isNewPtr = arnNullptr);
517 void createNewItem(
const QString& path);
518 void doCreateArnTree(
const QString& path);
519 void doDestroyArnTree(
const QString& path,
bool isGlobal);
521 void doLoginRequired(
int contextCode);
522 void onConnectWaitDone();
523 void doTcpConnected();
524 void doTcpError( QAbstractSocket::SocketError socketError);
525 void doTcpError(
int socketError);
526 void doTcpDisconnected();
527 void doSyncStateChanged(
int state);
528 void doRecNotified();
530 void onCommandDelete(
const QString& remotePath);
531 void onMessageReceived(
int type,
const QByteArray& data);
534 struct MountPointSlot {
535 ArnItemNetEar* arnMountPoint;
541 arnMountPoint = arnNullptr;
546 void startConnectArn();
548 void doConnectArnLogic();
549 static QString toRemotePathCB(
void* context,
const QString& path);
554 bool addMountPointNL(
const QString& localPath,
const QString& remotePath);
555 bool removeMountPointNL(
const QString& localPath);
558 #endif // ARNCLIENT_HPP
No data flow within set timeout (still connected)
Unsuccessfull when trying to connect to an Arn host.
Successfully connected to an Arn host.
#define MQ_DECLARE_ENUM_NSTXT(...)
#define MQ_NSTXT_FILL_MISSING_FROM(FromNs)
QList< HostAddrPort > HostList
Unsuccessfully tried to connect to all hosts in the Arn connection List.
Container class with string representation for serialized data.
TCP connection is broken (has been successfull)
The Client session Sync mode at connect & reconnect.
const quint16 defaultTcpPort
Negotiating terms and compatibility with an Arn host.
Class for connecting to an Arn Server.
Trying to connect to an Arn host.
Arn::ClientSyncMode SyncMode
ArnClientConnectStat ConnectStat
Initialized, not yet any result of trying to connect ...
#define MQ_DECLARE_ENUMTXT(EStruct)
Enums text.
#define ARNLIBSHARED_EXPORT