12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef LHFILEREMOTE_H
- #define LHFILEREMOTE_H
- #include <QString>
- struct SUsreDate
- {
- char btRequestType;
- void* pOwner;
- QString strContent;
- char* buffer;
- int buffersize;
- };
- struct SUpDownData
- {
- char* pBuffer;
- FILE* pFile;
- qint64 llTotal;
- qint64 llCurrent;
- long* nProgress;
- qint64 llBaseSize;
- };
- class CLHFileRemote
- {
- public:
- CLHFileRemote(void);
- ~CLHFileRemote(void);
- bool LoginServer(const QString& lpszPath, const QString& lpszUser, const QString& lpszPwd);
- size_t curl_ReceivePost(SUsreDate* ud);
- bool curl_Post(const QString& strUrl,const QString& strContent);
- bool curl_IsFileExist(const QString& strRemoteFile);
- bool curl_Upload(const char* szLocalFile, const char* szRemoteFile,const char* szUser,const char* szPwd);
- bool curl_Download(const char* szLocalFile, const char* szRemoteFile,const char* szUser,const char* szPwd,qint64 llSize,qint64 llEnd,bool bAppendFile,qint64 nTotal,qint64 nBaseSize,long& nProgress);
- qint64 curl_Read(char* pBuffer,const char* szRemoteFile,const char* szUser,const char* szPwd,qint64 llStart,qint64 llSize,long& nProgress);
- qint64 curl_GetFileLength(const char* szRemoteFile,const char* szUser,const char* szPwd);
- QString GetLastError() {return m_strError;}
- protected:
-
-
- QString m_strError;
- char m_btCurlPASV;
- public:
- QString m_strErrorPostContent;
- };
- #endif
|