blob: 02a043df4aa8b0baa50d14f488d6edec6c24fe89 [file] [log] [blame]
Dennis Syrovatskybbbc0362005-10-18 05:14:08 +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// -=- TransferQueue.
23
24#ifndef __RFB_TRANSFERQUEUE_H__
25#define __RFB_TRANSFERQUEUE_H__
26
27#include <stdlib.h>
28
29#include <rfb/FileInfo.h>
30#include <rfb/fttypes.h>
31
32namespace rfb {
33 class TransferQueue
34 {
35 public:
36 TransferQueue();
37 ~TransferQueue();
38
39 void add(TransferQueue *pTQ);
40 void add(char *pLocPath, char*pRemPath, FileInfo *pFI, unsigned int flags);
41 void add(char *pLocPath, char *pRemPath, char *pLocName, char *pRemName,
42 unsigned int size, unsigned int data, unsigned int flags);
43
44 char *getLocPathAt(unsigned int number);
45 char *getLocNameAt(unsigned int number);
46 char *getRemPathAt(unsigned int number);
47 char *getRemNameAt(unsigned int number);
48
49 char *getFullLocPathAt(unsigned int number);
50 char *getFullRemPathAt(unsigned int number);
51
52 bool setLocPathAt(unsigned int number, char *pName);
53 bool setLocNameAt(unsigned int number, char *pName);
54 bool setRemPathAt(unsigned int number, char *pName);
55 bool setRemNameAt(unsigned int number, char *pName);
56
57 unsigned int getSizeAt(unsigned int number);
58 unsigned int getDataAt(unsigned int number);
59 unsigned int getFlagsAt(unsigned int number);
60
61 SIZEDATAFLAGSINFO * getSizeDataFlagsAt(unsigned int number);
62
63
64 bool setSizeAt(unsigned int number, unsigned int value);
65 bool setDataAt(unsigned int number, unsigned int value);
66 bool setFlagsAt(unsigned int number, unsigned int value);
Dennis Syrovatsky6806fec2005-11-28 06:12:44 +000067 bool clearFlagAt(unsigned int number, unsigned int value);
68 bool setFlagToAll(unsigned int flag);
Dennis Syrovatskybbbc0362005-10-18 05:14:08 +000069
70 bool deleteAt(unsigned int number);
71
72 unsigned int getNumEntries();
73
74 void free();
75
76 private:
77 FILEINFOEX *m_pEntries;
78 unsigned int m_numEntries;
79
80 char m_szFullLocPath[FT_FILENAME_SIZE];
81 char m_szFullRemPath[FT_FILENAME_SIZE];
82 };
83}
84
85#endif // __RFB_TRANSFERQUEUE_H__