blob: ba748e0e68a3c19cf394a2bf1c60f32bd2af090b [file] [log] [blame]
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +00001/* Copyright (C) 2005 TightVNC Team. All Rights Reserved.
2 *
3 * Developed by Dennis Syrovatsky.
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18 * USA.
19 *
20 * TightVNC distribution homepage on the Web: http://www.tightvnc.com/
21 *
22 */
23
24// -=- TransferQueue.
25
26#ifndef __RFB_TRANSFERQUEUE_H__
27#define __RFB_TRANSFERQUEUE_H__
28
29#include <stdlib.h>
30
31#include <rfb/FileInfo.h>
32#include <rfb/fttypes.h>
33
34namespace rfb {
35 class TransferQueue
36 {
37 public:
38 TransferQueue();
39 ~TransferQueue();
40
41 void add(TransferQueue *pTQ);
42 void add(char *pLocPath, char*pRemPath, FileInfo *pFI, unsigned int flags);
43 void add(char *pLocPath, char *pRemPath, char *pLocName, char *pRemName,
44 unsigned int size, unsigned int data, unsigned int flags);
45
46 char *getLocPathAt(unsigned int number);
47 char *getLocNameAt(unsigned int number);
48 char *getRemPathAt(unsigned int number);
49 char *getRemNameAt(unsigned int number);
50
51 char *getFullLocPathAt(unsigned int number);
52 char *getFullRemPathAt(unsigned int number);
53
54 bool setLocPathAt(unsigned int number, char *pName);
55 bool setLocNameAt(unsigned int number, char *pName);
56 bool setRemPathAt(unsigned int number, char *pName);
57 bool setRemNameAt(unsigned int number, char *pName);
58
59 unsigned int getSizeAt(unsigned int number);
60 unsigned int getDataAt(unsigned int number);
61 unsigned int getFlagsAt(unsigned int number);
62
63 SIZEDATAFLAGSINFO * getSizeDataFlagsAt(unsigned int number);
64
65
66 bool setSizeAt(unsigned int number, unsigned int value);
67 bool setDataAt(unsigned int number, unsigned int value);
68 bool setFlagsAt(unsigned int number, unsigned int value);
69 bool clearFlagAt(unsigned int number, unsigned int value);
70 bool setFlagToAll(unsigned int flag);
71
72 bool deleteAt(unsigned int number);
73
74 unsigned int getNumEntries();
75
76 void free();
77
78 private:
79 FILEINFOEX *m_pEntries;
80 unsigned int m_numEntries;
81
82 char m_szFullLocPath[FT_FILENAME_SIZE];
83 char m_szFullRemPath[FT_FILENAME_SIZE];
84 };
85}
86
87#endif // __RFB_TRANSFERQUEUE_H__