5 * ADF Library. (C) 1997-1998 Laurent Clevy
14 #endif /* __cplusplus */
17 /* Visual C++ DLL specific, define WIN32DLL or not in the makefile */
20 #define PREFIX __declspec(dllimport)
29 PREFIX
struct List
* newCell(struct List
* list
, void* content
);
30 PREFIX
void freeList(struct List
* list
);
33 PREFIX RETCODE
adfToRootDir(struct Volume
*vol
);
34 PREFIX RETCODE
adfCreateDir(struct Volume
* vol
, SECTNUM parent
, char* name
);
35 PREFIX RETCODE
adfChangeDir(struct Volume
* vol
, char *name
);
36 PREFIX RETCODE
adfParentDir(struct Volume
* vol
);
37 PREFIX RETCODE
adfRemoveEntry(struct Volume
*vol
, SECTNUM pSect
, char *name
);
38 PREFIX
struct List
* adfGetDirEnt(struct Volume
* vol
, SECTNUM nSect
);
39 PREFIX
struct List
* adfGetRDirEnt(struct Volume
* vol
, SECTNUM nSect
, BOOL recurs
);
40 PREFIX
void printEntry(struct Entry
* entry
);
41 PREFIX
void adfFreeDirList(struct List
* list
);
42 PREFIX
void adfFreeEntry(struct Entry
*);
43 PREFIX RETCODE
adfRenameEntry(struct Volume
*vol
, SECTNUM
, char *old
,SECTNUM
,char *new);
44 PREFIX RETCODE
adfSetEntryAccess(struct Volume
*, SECTNUM
, char*, long);
45 PREFIX RETCODE
adfSetEntryComment(struct Volume
*, SECTNUM
, char*, char*);
48 PREFIX
long adfFileRealSize(unsigned long size
, int blockSize
, long *dataN
, long *extN
);
49 PREFIX
struct File
* adfOpenFile(struct Volume
*vol
, char* name
, char *mode
);
50 PREFIX
void adfCloseFile(struct File
*file
);
51 PREFIX
long adfReadFile(struct File
* file
, long n
, unsigned char *buffer
);
52 PREFIX BOOL
adfEndOfFile(struct File
* file
);
53 PREFIX
long adfWriteFile(struct File
*file
, long n
, unsigned char *buffer
);
54 PREFIX
void adfFlushFile(struct File
*file
);
57 PREFIX RETCODE
adfInstallBootBlock(struct Volume
*vol
,unsigned char*);
58 PREFIX
struct Volume
* adfMount( struct Device
*dev
, int nPart
, BOOL readOnly
);
59 PREFIX
void adfUnMount(struct Volume
*vol
);
60 PREFIX
void adfVolumeInfo(struct Volume
*vol
);
63 PREFIX
void adfDeviceInfo(struct Device
*dev
);
64 PREFIX
struct Device
* adfMountDev( char* filename
,BOOL ro
);
65 PREFIX
void adfUnMountDev( struct Device
* dev
);
66 PREFIX RETCODE
adfCreateHd(struct Device
* dev
, int n
, struct Partition
** partList
);
67 PREFIX RETCODE
adfCreateFlop(struct Device
* dev
, char* volName
, int volType
);
68 PREFIX RETCODE
adfCreateHdFile(struct Device
* dev
, char* volName
, int volType
);
71 PREFIX
struct Device
* adfCreateDumpDevice(char* filename
, long cyl
, long heads
, long sec
);
74 PREFIX
void adfEnvInitDefault();
75 PREFIX
void adfEnvCleanUp();
76 PREFIX
void adfChgEnvProp(int prop
, void *new);
77 PREFIX
char* adfGetVersionNumber();
78 PREFIX
char* adfGetVersionDate();
80 PREFIX
void adfSetEnvFct( void(*e
)(char*), void(*w
)(char*), void(*v
)(char*) );
83 PREFIX RETCODE
adfBlockPtr2EntryName(struct Volume
*, SECTNUM
, SECTNUM
,char **, long *);
86 PREFIX
struct List
* adfGetDelEnt(struct Volume
*vol
);
87 PREFIX RETCODE
adfUndelEntry(struct Volume
* vol
, SECTNUM parent
, SECTNUM nSect
);
88 PREFIX
void adfFreeDelList(struct List
* list
);
89 PREFIX RETCODE
adfCheckEntry(struct Volume
* vol
, SECTNUM nSect
, int level
);
91 /* middle level API */
93 PREFIX BOOL
isSectNumValid(struct Volume
*vol
, SECTNUM nSect
);
97 PREFIX RETCODE
adfReadBlock(struct Volume
* , long nSect
, unsigned char* buf
);
98 PREFIX RETCODE
adfWriteBlock(struct Volume
* , long nSect
, unsigned char* buf
);
99 PREFIX
long adfCountFreeBlocks(struct Volume
* vol
);
106 #endif /* ADFLIB_H */
107 /*##########################################################################*/