ld_cmd.h

Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * LDAP Database Driver for SER
00005  *
00006  * Copyright (C) 2008 iptelorg GmbH
00007  *
00008  * This file is part of SER, a free SIP server.
00009  *
00010  * SER is free software; you can redistribute it and/or modify it under the
00011  * terms of the GNU General Public License as published by the Free Software
00012  * Foundation; either version 2 of the License, or (at your option) any later
00013  * version.
00014  *
00015  * SER is distributed in the hope that it will be useful, but WITHOUT ANY
00016  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00017  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00018  * details.
00019  *
00020  * You should have received a copy of the GNU General Public License along
00021  * with this program; if not, write to the Free Software Foundation, Inc.,
00022  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00023  */
00024 
00025 #ifndef _LD_CMD_H
00026 #define _LD_CMD_H
00027 
00037 #include "../../lib/srdb2/db_drv.h"
00038 #include "../../lib/srdb2/db_cmd.h"
00039 #include "../../lib/srdb2/db_res.h"
00040 #include "../../str.h"
00041 
00042 #include <stdarg.h>
00043 #include <sys/time.h>
00044 
00045 
00050 struct ld_cmd {
00051         db_drv_t gen; 
00052         char* base;   
00053         int scope;    
00054         str filter;   
00055         char** result; 
00056         int sizelimit; 
00057         struct timeval timelimit; 
00058         int chase_references;  
00059         int chase_referrals;   
00060 };
00061 
00062 
00070 int ld_cmd(db_cmd_t* cmd);
00071 
00072 
00083 int ld_cmd_exec(db_res_t* res, db_cmd_t* cmd);
00084 
00085 
00086 int ld_cmd_first(db_res_t* res);
00087 
00088 
00089 int ld_cmd_next(db_res_t* res);
00090 
00091 int ld_cmd_setopt(db_cmd_t* cmd, char* optname, va_list ap);
00092 
00095 #endif /* _LD_CMD_H */