2 This file is part of GNUnet.
3 (C) 2009, 2010 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file monkey/edb_api.c
23 * @brief Monkey API for accessing the Expression Database (edb)
27 #include "gnunet_common.h"
28 #include "gnunet_monkey_edb.h"
33 * Context for Database connection and Expressions
35 struct GNUNET_MONKEY_EDB_Context
45 * Establish a connection to the Expression Database
47 * @param db_file_name path the Expression Database file
48 * @return context to use for Accessing the Expression Database, NULL on error
50 struct GNUNET_MONKEY_EDB_Context *
51 GNUNET_MONKEY_EDB_connect (const char *db_file_name)
53 /* TODO: Implementation */
59 * Disconnect from Database, and cleanup resources
61 * @param context context
62 * @return GNUNET_OK on success, GNUNET_NO on failure
65 GNUNET_MONKEY_EDB_disconnect (struct GNUNET_MONKEY_EDB_Context *context)
67 /* TODO: Implementation */
73 * Update the context with a list of expressions.
74 * The list is the initializations of sub-expressions
75 * of the expression pointed to by start_line_no and end_line_no
77 * @param context the returned expessions will be available in it.
78 * expression_list_head, and expression_list_tail must be null,
79 * otherwise GNUNET_NO will be returned
80 * @param file_name path to the file in which the expression in question exists
81 * @param start_line_no expression beginning line
82 * @param end_line_no expression end line
83 * @param iter callback function, iterator for expressions returned from the Database
84 * @param iter_cls closure for the expression iterator
85 * @return GNUNET_OK success, GNUNET_NO failure
88 GNUNET_MONKEY_EDB_get_expressions (struct GNUNET_MONKEY_EDB_Context *context,
89 const char *file_name, int start_line_no,
91 GNUNET_MONKEY_ExpressionIterator iter, void *iter_cls)
93 /* TODO: Implementation */