2 * Sherlock Library -- Object Functions
4 * (c) 1997--2003 Martin Mares <mj@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
10 #ifndef _SHERLOCK_OBJECT_H
11 #define _SHERLOCK_OBJECT_H
15 struct odes { /* Object description */
18 struct oattr *cached_attr;
21 struct oattr { /* Object attribute */
22 struct oattr *next, *same;
27 void obj_dump(struct odes *);
28 struct odes *obj_new(struct mempool *);
29 int obj_read(struct fastbuf *, struct odes *);
30 void obj_write(struct fastbuf *, struct odes *);
31 void obj_write_nocheck(struct fastbuf *, struct odes *);
32 struct oattr *obj_find_attr(struct odes *, uns);
33 struct oattr *obj_find_attr_last(struct odes *, uns);
34 uns obj_del_attr(struct odes *, struct oattr *);
35 byte *obj_find_aval(struct odes *, uns);
36 struct oattr *obj_set_attr(struct odes *, uns, byte *);
37 struct oattr *obj_set_attr_num(struct odes *, uns, uns);
38 struct oattr *obj_add_attr(struct odes *, uns, byte *);
39 struct oattr *obj_prepend_attr(struct odes *, uns, byte *);
40 struct oattr *obj_insert_attr(struct odes *o, struct oattr *first, struct oattr *after, byte *v);