• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2005 Novell, Inc.
3  * All Rights Reserved.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, contact Novell, Inc.
16  *
17  * To contact Novell about this file by physical or electronic mail,
18  * you may find current contact information at www.novell.com
19  *
20  * Author		: Rohit Kumar
21  * Email ID	: rokumar@novell.com
22  * Date		: 14th July 2005
23  */
24 
25 
26 #ifndef FILE_TRANSFER_MSG_H
27 #define FILE_TRANSFER_MSG_H
28 
29 #ifdef _MSC_VER
30 #pragma push_macro("CreateDirectory")
31 #undef CreateDirectory /* Prevent macro clashes under Windows */
32 #endif /* _MSC_VER */
33 
34 typedef struct _FileTransferMsg {
35 	char* data;
36 	unsigned int length;
37 } FileTransferMsg;
38 
39 FileTransferMsg GetFileListResponseMsg(char* path, char flag);
40 
41 FileTransferMsg GetFileDownloadResponseMsg(char* path);
42 FileTransferMsg GetFileDownloadLengthErrResponseMsg();
43 FileTransferMsg  GetFileDownLoadErrMsg();
44 FileTransferMsg GetFileDownloadResponseMsgInBlocks(rfbClientPtr cl, rfbTightClientPtr data);
45 FileTransferMsg ChkFileDownloadErr(rfbClientPtr cl, rfbTightClientPtr data);
46 
47 FileTransferMsg GetFileUploadLengthErrResponseMsg();
48 FileTransferMsg GetFileUploadCompressedLevelErrMsg();
49 FileTransferMsg ChkFileUploadErr(rfbClientPtr cl, rfbTightClientPtr data);
50 FileTransferMsg ChkFileUploadWriteErr(rfbClientPtr cl, rfbTightClientPtr data, char* pBuf);
51 
52 void CreateDirectory(char* dirName);
53 void FileUpdateComplete(rfbClientPtr cl, rfbTightClientPtr data);
54 void CloseUndoneFileTransfer(rfbClientPtr cl, rfbTightClientPtr data);
55 
56 void FreeFileTransferMsg(FileTransferMsg ftm);
57 
58 #ifdef _MSC_VER
59 #  pragma pop_macro("CreateDirectory") /* Restore original macro */
60 #endif /* _MSC_VER */
61 
62 #endif
63 
64