home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
e
/
extralib
/
!ExtrasLib
/
h
/
Freeway
< prev
next >
Wrap
Text File
|
1996-03-03
|
2KB
|
60 lines
/* Freeway.h */
/* ExtrasLib by Peter Hartley 1995-96
* (K) All Rites Reversed - Copy What You Like
*/
typedef enum {
freewaytype_DISCS = 1,
freewaytype_PRINTERS = 2,
freewaytype_SHAREFS = 5
} freeway_type;
typedef struct {
char name[20]; /* zero-terminated */
int desclen;
char descriptor[256];
unsigned int address;
} freeway_entity;
/*
* Register or deregister interest in a FW type
* Freeway_Register BIC's the flags with 1
* Freeway_Deregister OR's them with 1
*/
os_error *Freeway_Register( unsigned int flags, freeway_type type );
os_error *Freeway_Deregister( unsigned int flags, freeway_type type );
/*
* Add and remove local FW objects from the database
* Freeway_Add BIC's the flags with 1
* Freeway_Remove OR's them with 1
* The address field in the entity is ignored.
*/
os_error *Freeway_Add( unsigned int flags, freeway_type type,
freeway_entity *entity );
os_error *Freeway_Remove( unsigned int flags, freeway_type type,
freeway_entity *entity );
/*
* Read information about a named object
* On entry, only the name field in the entity should be present
* On exit, all fields are filled in
*/
os_error *Freeway_Read( unsigned int flags, freeway_type type,
freeway_entity *entity );
/*
* Enumerate all currently-known objects of a given type.
* Use as:
* int next = 0;
* do {
* per( Freeway_Enumerate( 0, type, &entity, &next ) );
* if ( next >= 0 )
* |* process entity *|
* } while ( next >= 0 );
*/
os_error *Freeway_Enumerate( unsigned int flags, freeway_type type,
freeway_entity *entity, int *next );