-
Notifications
You must be signed in to change notification settings - Fork 6
/
dir_list.h
49 lines (38 loc) · 1.34 KB
/
dir_list.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
DeskLink2
Extensions and enhancements Copyright (C) 2005 John R. Hogerhuis
Copyright (c) 2022 Gabriele Gorla
DeskLink2 is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 or any
later as version as published by the Free Software Foundation.
DeskLink2 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program (in the file "COPYING"); if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111, USA.
*/
#ifndef DIR_LIST
#define DIR_LIST
#include <stdint.h>
#include "constants.h"
#define FEQ DIRENTS // number of FILE_ENTRYs to malloc for at a time
typedef struct
{
char client_fname[TPDD_FILENAME_LEN+1];
char local_fname[LOCAL_FILENAME_MAX+1];
uint8_t attr;
uint16_t len;
uint8_t flags;
} FILE_ENTRY;
int file_list_init ();
int file_list_cleanup ();
void file_list_clear_all ();
int add_file (FILE_ENTRY* fe);
FILE_ENTRY* find_file (char* client_fname, uint8_t attr);
FILE_ENTRY* get_first_file (void);
FILE_ENTRY* get_next_file (void);
FILE_ENTRY* get_prev_file (void);
#endif