blob: c2b63ac5fbe5a30c3f4193ed7870aff7ff468c3f [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();
Dennis Syrovatskyd5a05532005-12-18 15:08:34 +000056
57 unsigned int getFilenamesSize();
58 char *getAllFilenames(unsigned int *pFilenameSize);
Dennis Syrovatsky487a4e92005-10-18 04:44:36 +000059
60 void sort();
61 void free();
62
63 FileInfo();
64 ~FileInfo();
65
66 private:
67 FILEINFO *m_pEntries;
68 unsigned int m_numEntries;
Dennis Syrovatskyd5a05532005-12-18 15:08:34 +000069
Dennis Syrovatsky487a4e92005-10-18 04:44:36 +000070 };
71}
72
73#endif // __RFB_FILEINFO_H__