1 Star 0 Fork 16

clickto/qipmsg

forked from caowai/qipmsg 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ipmsgfileclient.h 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
caowai 提交于 2019-01-10 22:06 . fixed compile warnings.
#ifndef IPMSGFILECLIENT_H
#define IPMSGFILECLIENT_H
#include <QObject>
#include <QHostAddress>
#include <QFileInfo>
#include <QThread>
#include "ipmsgcommon.h"
#include "ipmsguser.h"
#include <QTcpSocket>
#define FILE_TRANS_STATUS_IDLE 0
#define FILE_TRANS_STATUS_QUEUE 1
#define FILE_TRANS_STATUS_PRERUN 2
#define FILE_TRANS_STATUS_RUN 3
#define FILE_TRANS_STATUS_FINISHED 4
typedef struct userInfoT
{
QByteArray userVer;
QByteArray userId;
QByteArray userNickName;
QByteArray userGroupName;
QByteArray userHostName;
QByteArray userEmail;
QByteArray userIcon;
QHostAddress userHostAddr;
uint32_t userPktSeq;
uint32_t userCfmSeq;
}userInfoT;
class IpMsgFileClient : public QObject
{
Q_OBJECT
public:
explicit IpMsgFileClient(IpMsgUser *user,QObject *parent = nullptr);
fileEntryT recvFileInfo;
QTcpSocket *sock;
int mProgress;
userInfoT me;
signals:
void ipMsgFileClientErrorSig(quint32 fileid,int progress);
void ipMsgFileClientProgressSig(quint32 fileid,int progress);
void ipMsgFileClientFinishSig(quint32 fileid);
public slots:
private slots:
void ipMsgFileClientStart();
void ipMsgFileClientConnected();
void ipMsgFileClientError(QAbstractSocket::SocketError error);
void ipMsgFileClientDisconnected();
void ipMsgFileClientRecv();
void ipMsgFileClientClose();
private:
QFile mFile;
qint64 mSize;
};
#endif // IPMSGFILECLIENT_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/clickto/qipmsg.git
[email protected]:clickto/qipmsg.git
clickto
qipmsg
qipmsg
master

搜索帮助