LibVNCServer/LibVNCClient
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
filelistinfo.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005 Novell, Inc.
3  * All Rights Reserved.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, contact Novell, Inc.
16  *
17  * To contact Novell about this file by physical or electronic mail,
18  * you may find current contact information at www.novell.com
19  *
20  * Author : Rohit Kumar
21  * Email ID : rokumar@novell.com
22  * Date : 14th July 2005
23  */
24 
25 
26 #ifndef FILE_LIST_INFO_H
27 #define FILE_LIST_INFO_H
28 
29 #include <limits.h>
30 
31 #if !defined(NAME_MAX)
32 #define NAME_MAX 255
33 #endif
34 
35 
36 #define SUCCESS 1
37 #define FAILURE 0
38 
39 typedef struct _FileListItemInfo {
40  char name[NAME_MAX];
41  unsigned int size;
42  unsigned int data;
43 } FileListItemInfo, *FileListItemInfoPtr;
44 
45 typedef struct _FileListItemSize {
46  unsigned int size;
47  unsigned int data;
48 } FileListItemSize, *FileListItemSizePtr;
49 
50 typedef struct _FileListInfo {
51  FileListItemInfoPtr pEntries;
53 } FileListInfo, *FileListInfoPtr;
54 
55 int AddFileListItemInfo(FileListInfoPtr fileListInfoPtr, char* name, unsigned int size, unsigned int data);
56 char* GetFileNameAt(FileListInfo fileListInfo, int number);
57 unsigned int GetFileSizeAt(FileListInfo fileListInfo, int number);
58 unsigned int GetFileDataAt(FileListInfo fileListInfo, int number);
59 unsigned int GetSumOfFileNamesLength(FileListInfo fileListInfo);
60 void FreeFileListInfo(FileListInfo fileListInfo);
61 
63 
64 #endif
65