1 /* Copyright (C) 2009 Trend Micro Inc.
4 * This program is a free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General Public
6 * License (version 2) as published by the FSF - Free Software
10 /* Common API for dealing with directory trees */
15 typedef struct _OSDirTree OSDirTree;
17 typedef struct _OSTreeNode {
18 struct _OSTreeNode *next;
26 OSTreeNode *first_node;
27 OSTreeNode *last_node;
30 OSDirTree *OSDirTree_Create(void);
31 void OSDirTree_AddToTree(OSDirTree *tree, const char *str, void *data, char sep) __attribute__((nonnull(1, 2)));
32 void *OSDirTree_SearchTree(const OSDirTree *tree, const char *str, char sep) __attribute__((nonnull));
34 OSTreeNode *OSDirTree_GetFirstNode(OSDirTree *tree) __attribute__((nonnull));
36 #endif /* _OS_DIRTREE */