5 * ADF Library. (C) 1997-1998 Laurent Clevy
14 #endif /* __cplusplus */
20 PREFIX
struct List
* newCell(struct List
* list
, void* content
);
21 PREFIX
void freeList(struct List
* list
);
24 PREFIX RETCODE
adfToRootDir(struct Volume
*vol
);
25 PREFIX RETCODE
adfCreateDir(struct Volume
* vol
, SECTNUM parent
, char* name
);
26 PREFIX SECTNUM
adfCurrentDir(struct Volume
*vol
);
27 PREFIX RETCODE
adfChangeDir(struct Volume
* vol
, char *name
);
28 PREFIX RETCODE
adfParentDir(struct Volume
* vol
);
29 PREFIX RETCODE
adfRemoveEntry(struct Volume
*vol
, SECTNUM pSect
, char *name
);
30 PREFIX
struct List
* adfGetDirEnt(struct Volume
* vol
, SECTNUM nSect
);
31 PREFIX
struct List
* adfGetRDirEnt(struct Volume
* vol
, SECTNUM nSect
, BOOL recurs
);
32 PREFIX
void printEntry(struct Entry
* entry
);
33 PREFIX
void adfFreeDirList(struct List
* list
);
34 PREFIX
void adfFreeEntry(struct Entry
*);
35 PREFIX RETCODE
adfRenameEntry(struct Volume
*vol
, SECTNUM
, char *old
,SECTNUM
,char *new);
36 PREFIX RETCODE
adfSetEntryAccess(struct Volume
*, SECTNUM
, char*, ULONG
);
37 PREFIX RETCODE
adfSetEntryComment(struct Volume
*, SECTNUM
, char*, char*);
40 PREFIX ULONG
adfFileRealSize(ULONG size
, int blockSize
, ULONG
*dataN
, ULONG
*extN
);
41 PREFIX
struct File
* adfOpenFile(struct Volume
*vol
, char* name
, char *mode
);
42 PREFIX
void adfCloseFile(struct File
*file
);
43 PREFIX ULONG
adfReadFile(struct File
* file
, ULONG n
, unsigned char *buffer
);
44 PREFIX BOOL
adfEndOfFile(struct File
* file
);
45 PREFIX ULONG
adfWriteFile(struct File
*file
, ULONG n
, unsigned char *buffer
);
46 PREFIX
void adfFlushFile(struct File
*file
);
49 PREFIX RETCODE
adfInstallBootBlock(struct Volume
*vol
,unsigned char*);
50 PREFIX
struct Volume
* adfMount( struct Device
*dev
, int nPart
, BOOL readOnly
);
51 PREFIX
void adfUnMount(struct Volume
*vol
);
52 PREFIX
void adfVolumeInfo(struct Volume
*vol
);
55 PREFIX
void adfDeviceInfo(struct Device
*dev
);
56 PREFIX
struct Device
* adfMountDev( char* filename
,BOOL ro
);
57 PREFIX
void adfUnMountDev( struct Device
* dev
);
58 PREFIX RETCODE
adfCreateHd(struct Device
* dev
, int n
, struct Partition
** partList
);
59 PREFIX RETCODE
adfCreateFlop(struct Device
* dev
, char* volName
, int volType
);
60 PREFIX RETCODE
adfCreateHdFile(struct Device
* dev
, char* volName
, int volType
);
63 PREFIX
struct Device
* adfCreateDumpDevice(char* filename
, ULONG cyl
, ULONG heads
, ULONG sec
);
66 PREFIX
void adfEnvInitDefault();
67 PREFIX
void adfEnvCleanUp();
68 PREFIX
void adfChgEnvProp(int prop
, void *new);
69 PREFIX
char* adfGetVersionNumber();
70 PREFIX
char* adfGetVersionDate();
72 PREFIX
void adfSetEnvFct( void(*e
)(char*), void(*w
)(char*), void(*v
)(char*) );
75 PREFIX RETCODE
adfBlockPtr2EntryName(struct Volume
*, SECTNUM
, SECTNUM
,char **, ULONG
*);
78 PREFIX
struct List
* adfGetDelEnt(struct Volume
*vol
);
79 PREFIX RETCODE
adfUndelEntry(struct Volume
* vol
, SECTNUM parent
, SECTNUM nSect
);
80 PREFIX
void adfFreeDelList(struct List
* list
);
81 PREFIX RETCODE
adfCheckEntry(struct Volume
* vol
, SECTNUM nSect
, int level
);
83 /* middle level API */
85 PREFIX BOOL
isSectNumValid(struct Volume
*vol
, SECTNUM nSect
);
89 PREFIX RETCODE
adfReadBlock(struct Volume
* , ULONG nSect
, unsigned char* buf
);
90 PREFIX RETCODE
adfWriteBlock(struct Volume
* , ULONG nSect
, unsigned char* buf
);
91 PREFIX ULONG
adfCountFreeBlocks(struct Volume
* vol
);
99 /*##########################################################################*/