1 /*
2  * cleanup.h
3  *
4  * Copyright (c) 2002 Marius Aamodt Eriksen <marius@monkey.org>
5  * All rights reserved.
6  *
7  * $Id: cleanup.h,v 1.1 2003/03/06 04:11:39 marius Exp $
8  */
9 
10 #ifndef TRICKLE_CLEANUP_H
11 #define TRICKLE_CLEANUP_H
12 
13 typedef struct cleanup cleanup_t;
14 
15 cleanup_t *cleanup_new(void);
16 cleanup_t *cleanup_free(cleanup_t *);
17 int        cleanup_add(cleanup_t *, void (*)(void *), void *);
18 int        cleanup_remove(cleanup_t *, void (*)(void *), void *);
19 void       cleanup_cleanup(cleanup_t *);
20 
21 /* Utility */
22 void       cleanupcb_close(void *);
23 void       cleanupcb_unlink(void *);
24 
25 #endif /* TRICKLE_CLEANUP_H */
26