view src/lib-storage/mailbox-tree.h @ 9266:cd29b745c8dd HEAD

configure: clock_gettime()'s -lrt adding dropped everything else from $LIBS.
author Timo Sirainen <tss@iki.fi>
date Mon, 27 Jul 2009 06:32:42 -0400
parents e4eb71ae8e96
children
line wrap: on
line source

#ifndef MAILBOX_TREE_H
#define MAILBOX_TREE_H

#include "mailbox-list.h"

struct mailbox_node {
	struct mailbox_node *parent;
	struct mailbox_node *next;
	struct mailbox_node *children;

	char *name;
	enum mailbox_info_flags flags;
};

struct mailbox_tree_context *mailbox_tree_init(char separator);
void mailbox_tree_deinit(struct mailbox_tree_context **tree);

struct mailbox_node *
mailbox_tree_get(struct mailbox_tree_context *tree, const char *path,
		 bool *created);

struct mailbox_node *
mailbox_tree_lookup(struct mailbox_tree_context *tree, const char *path);

struct mailbox_tree_iterate_context *
mailbox_tree_iterate_init(struct mailbox_tree_context *tree,
			  struct mailbox_node *root, unsigned int flags_mask);
struct mailbox_node *
mailbox_tree_iterate_next(struct mailbox_tree_iterate_context *ctx,
			  const char **path_r);
void mailbox_tree_iterate_deinit(struct mailbox_tree_iterate_context **ctx);

#endif