Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

stmtbase.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *
00003  * Verball Model Storage Library, Common Information Model Library 
00004  * for integration of Intelligent Services.
00005  * Copyright (C) 2005 Nikita Vinokurov, Orgway LLC.
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; 
00010  * version 2.1 of the License.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, 
00020  * Boston, MA  02110-1301  USA
00021  *
00022  * $Id: stmtbase.h,v 1.20 2006/12/10 10:21:26 yagel Exp $
00023  **********************************************************************/
00024 
00033 #ifndef _STMTBASE_H_
00034 #define _STMTBASE_H_
00035 #include "stmt/statement.h"
00036 #include <stdio.h>
00037 
00038 typedef int ( *StmtBaseFilter ) ( void *obj, void *data );
00039 typedef void ( *StmtUpdateCallback) (Statement *stmt, void *obj, void *data);
00040 
00041 typedef struct _StmtBaseHandle StmtBaseHandle;
00042 
00043 void stmtbase_set_filter(StmtBaseHandle *h, StmtBaseFilter func);
00044 void stmtbase_set_update_cb(StmtBaseHandle *h, StmtUpdateCallback cb);
00045 
00050 int stmtbase_init();
00071 int stmtbase_get(StmtBaseHandle *h, const Statement *mask, Statement **result); 
00072 
00073 int stmtbase_get_ex(StmtBaseHandle *h, const Statement *mask, Statement **result, 
00074                      void *data, int flags);
00075 
00076 int stmtbase_save(StmtBaseHandle *h, FILE *f);
00077 
00078 int stmtbase_load(StmtBaseHandle *h, FILE *f);
00079 
00080 
00091 int stmtbase_set(StmtBaseHandle *h, Statement *stmt);
00092 int stmtbase_set_ex(StmtBaseHandle *h, Statement *stmt, int flags);
00093 
00094 
00096 void stmtbase_destoy();
00097 
00098 
00106 int stmtbase_open(char *opts, StmtBaseHandle **h);
00107 
00108 
00109 
00111 int stmtbase_close(StmtBaseHandle *h);
00112 
00113 #endif /* _STMTBASE_H_ */
00114 
00115 #ifdef DMALLOC
00116 #include<dmalloc.h>
00117 #endif

Generated on Wed Dec 27 16:52:18 2006 for VRB Online Server by  doxygen 1.4.4