#ifndef _foldt_h_
#define _foldt_h_

typedef struct AlFoldT_st *AlFoldT;

#include "sysdep.h"
#include "msg.h"
#include "bool.h"
#include "folder.h"

typedef VOIDP AlFoldT_IterObj;	/* Pointer to private iterator state */
typedef VOIDP AlFoldT_FoldObj;	/* Pointer to private folder state */

#ifdef __STDC__
typedef AlFoldT_FoldObj (*AlFoldT_CreateFunc)(const char *, AlFolder);
typedef NORET (*AlFoldT_DestroyFunc)(AlFoldT_FoldObj);
typedef AlFoldT_IterObj (*AlFoldT_IterCreateFunc)(AlFoldT_FoldObj, Bool);
typedef NORET (*AlFoldT_IterDestroyFunc)(AlFoldT_IterObj);
typedef Msg (*AlFoldT_IterGetFunc)(AlFoldT_IterObj);

extern AlFoldT AlFoldT_create(AlFoldT_CreateFunc,
			      AlFoldT_DestroyFunc,
			      AlFoldT_IterCreateFunc,
			      AlFoldT_IterDestroyFunc,
			      AlFoldT_IterGetFunc);
extern AlFoldT_CreateFunc AlFoldT_create_func(AlFoldT);
extern AlFoldT_DestroyFunc AlFoldT_destroy_func(AlFoldT);
extern AlFoldT_IterCreateFunc AlFoldT_iter_create_func(AlFoldT);
extern AlFoldT_IterDestroyFunc AlFoldT_iter_destroy_func(AlFoldT);
extern AlFoldT_IterGetFunc AlFoldT_iter_get_func(AlFoldT);
#else
typedef AlFoldT_FoldObj (*AlFoldT_CreateFunc)();
typedef NORET (*AlFoldT_DestroyFunc)();
typedef AlFoldT_IterObj (*AlFoldT_IterCreateFunc)();
typedef NORET (*AlFoldT_IterDestroyFunc)();
typedef Msg (*AlFoldT_IterGetFunc)();

extern AlFoldT AlFoldT_create();
extern AlFoldT_CreateFunc AlFoldT_create_func();
extern AlFoldT_DestroyFunc AlFoldT_destroy_func();
extern AlFoldT_IterCreateFunc AlFoldT_iter_create_func();
extern AlFoldT_IterDestroyFunc AlFoldT_iter_destroy_func();
extern AlFoldT_IterGetFunc AlFoldT_iter_get_func();
#endif

#endif
