blob: f51bd1686fbe32562636e99226dc22160bb20d9e [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 *
Peter Åstrand7877cd62009-02-25 16:15:48 +000020 *
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +000021 *
22 */
23
24// -=- FileInfo.
25
26#ifndef __RFB_FILEINFO_H__
27#define __RFB_FILEINFO_H__
28
29#include <stdlib.h>
30
31#include <rfb/fttypes.h>
32
33namespace rfb {
34 class FileInfo
35 {
36 public:
37 void add(FileInfo *pFI);
38 void add(FILEINFO *pFIStruct);
39 void add(char *pName, unsigned int size, unsigned int data, unsigned int flags);
40
41 char *getNameAt(unsigned int number);
42
43 bool setNameAt(unsigned int number, char *pName);
44
45 unsigned int getSizeAt(unsigned int number);
46 unsigned int getDataAt(unsigned int number);
47 unsigned int getFlagsAt(unsigned int number);
48
49 FILEINFO *getFullDataAt(unsigned int number);
50
51 bool setSizeAt(unsigned int number, unsigned int value);
52 bool setDataAt(unsigned int number, unsigned int value);
53 bool setFlagsAt(unsigned int number, unsigned int value);
54
55 bool deleteAt(unsigned int number);
56
57 unsigned int getNumEntries();
58
59 unsigned int getFilenamesSize();
60
61 void sort();
62 void free();
63
64 FileInfo();
65 ~FileInfo();
66
67 private:
68 FILEINFO *m_pEntries;
69 unsigned int m_numEntries;
70
71 };
72}
73
74#endif // __RFB_FILEINFO_H__