blob: 803a174b2f4b3d3bb70fdc8926b3d49bb9ed63bd [file] [log] [blame]
Dennis Syrovatsky487a4e92005-10-18 04:44:36 +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// -=- FileInfo.
23
24#ifndef __RFB_FILEINFO_H__
25#define __RFB_FILEINFO_H__
26
27#include <stdlib.h>
28
29#include <rfb/fttypes.h>
30
31namespace rfb {
32 class FileInfo
33 {
34 public:
35 void add(FileInfo *pFI);
36 void add(FILEINFO *pFIStruct);
37 void add(char *pName, unsigned int size, unsigned int data, unsigned int flags);
38
39 char *getNameAt(unsigned int number);
40
41 bool setNameAt(unsigned int number, char *pName);
42
43 unsigned int getSizeAt(unsigned int number);
44 unsigned int getDataAt(unsigned int number);
45 unsigned int getFlagsAt(unsigned int number);
46
47 FILEINFO *getFullDataAt(unsigned int number);
48
49 bool setSizeAt(unsigned int number, unsigned int value);
50 bool setDataAt(unsigned int number, unsigned int value);
51 bool setFlagsAt(unsigned int number, unsigned int value);
52
53 bool deleteAt(unsigned int number);
54
55 unsigned int getNumEntries();
56
57 void sort();
58 void free();
59
60 FileInfo();
61 ~FileInfo();
62
63 private:
64 FILEINFO *m_pEntries;
65 unsigned int m_numEntries;
66 };
67}
68
69#endif // __RFB_FILEINFO_H__