/*
 * collection.h:
 *
 * Copyright (c) 2000 James McKenzie <james@fishsoup.dhs.org>,
 * All rights reserved.
 *
 */

/*
 * $Id: collection.h,v 1.5 2001/01/30 06:16:18 root Exp $
 */

/*
 * $Log: collection.h,v $
 * Revision 1.5  2001/01/30 06:16:18  root
 * #
 *
 * Revision 1.4  2000/12/01 04:13:42  root
 * #
 *
 * Revision 1.3  2000/09/24 01:12:43  root
 * #
 *
 * Revision 1.2  2000/09/19 05:06:22  root
 * #
 *
 * Revision 1.1  2000/09/19 03:53:27  root
 * #
 *
 */

#ifndef __COLLECTION_H__
#define __COLLECTION_H__



#define CFH_FILLER			\
	off_t (*tell)(struct CFH_struct *);		\
	off_t (*seek)(struct CFH_struct *,off_t,int);	\
	int   (*read)(struct CFH_struct *,void *,int);	\
	int   (*tread)(struct CFH_struct *,void *,int);	\
	int   (*write)(struct CFH_struct *,void *,int);	\
	int   (*get)(struct CFH_struct *);		\
	int   (*put)(int c,struct CFH_struct *);		\
	int   (*eof)(struct CFH_struct *);		\
	off_t (*size)(struct CFH_struct *);		\
	void  (*close)(struct CFH_struct *);		\
	int   (*canread)(struct CFH_struct *);		\
	void  (*dispatch)(struct CFH_struct *);		\
	int   (*status)(struct CFH_struct *);		

BEGIN_OBJECT(CFH) 
	CFH_FILLER;
END_OBJECT(CFH)

CREATOR(CFH)=(Creator(CFH)) Obj_DefaultCreator;
DESTRUCTOR(CFH)=(Destructor(CFH)) Obj_DefaultDestructor;

#define COLLECTION_FILLER 		\
	char *name;    			\
	Eweid e; 			\
	CFH (*open)(struct Collection_struct *,Eweid,int mode);		

BEGIN_OBJECT(Collection)
	COLLECTION_FILLER;
END_OBJECT(Collection)

CREATOR(Collection)=(Creator(Collection)) Obj_DefaultCreator;
DESTRUCTOR(Collection)=(Destructor(Collection)) Obj_DefaultDestructor;


typedef Collection_list Files;
	
#endif __COLLECTION_H__
