blob: d25364575d1ba60b02abbfbb01a8c464ba5ec0b1 [file] [log] [blame]
Dennis Syrovatsky613f7c82005-12-18 14:24:06 +00001/* Copyright (C) 2005 TightVNC Team. All Rights Reserved.
2 *
3 * This is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this software; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA.
17 *
18 * TightVNC distribution homepage on the Web: http://www.tightvnc.com/
19 *
20 */
21
22// -=- SFTMsgReader.h
23
24#ifndef __RFB_SFTMSGREADER_H__
25#define __RFB_SFTMSGREADER_H__
26
27#include <rdr/InStream.h>
28
29namespace rfb {
30 class SFTMsgReader
31 {
32 public:
33 SFTMsgReader(rdr::InStream *pIS);
34 ~SFTMsgReader();
35
36 bool readFileListRqst(unsigned int *pDirNameSize, char *pDirName,
37 unsigned int *pFlags, bool *bDirOnly);
38
39
40 bool readFileDownloadRqst(unsigned int *pFilenameSize, char *pFilename,
41 unsigned int *pPosition);
42
43 bool readFileUploadRqst(unsigned int *pFilenameSize, char *pFilename,
44 unsigned int *pPosition);
45
46 void *readFileUploadData(unsigned int *pDataSize, unsigned int *pModTime);
47
48
49 bool readFileCreateDirRqst(unsigned int *pDirNameSize, char *pDirName);
50 bool readFileDirSizeRqst(unsigned int *pDirNameSize, char *pDirName);
51 bool readFileDeleteRqst(unsigned int *pNameSize, char *pName);
52
53 bool readFileRenameRqst(unsigned int *pOldNameSize, unsigned int *pNewNameSize,
54 char *pOldName, char *pNewName);
55
56 char *readFileDownloadCancel(unsigned int *pReasonSize);
57 char *readFileUploadFailed(unsigned int *pReasonSize);
58
59 private:
60 rdr::InStream *m_pIS;
61
62 bool readU8U16StringMsg(unsigned int *pReasonSize, char *pReason);
63 };
64}
65
66#endif // __RFB_SFTMSGREADER_H__