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_CON_H 00026 #define _LD_CON_H 00027 00036 #include "../../lib/srdb2/db_pool.h" 00037 #include "../../lib/srdb2/db_con.h" 00038 #include "../../lib/srdb2/db_uri.h" 00039 00040 #include <time.h> 00041 #include <ldap.h> 00042 00046 enum ld_con_flags { 00047 LD_CONNECTED = (1 << 0), 00048 }; 00049 00050 00055 struct ld_con { 00056 db_pool_entry_t gen; 00057 LDAP* con; 00058 unsigned int flags; 00059 }; 00060 00061 00069 int ld_con(db_con_t* con); 00070 00071 00079 int ld_con_connect(db_con_t* con); 00080 00081 00086 void ld_con_disconnect(db_con_t* con); 00087 00090 #endif /* _LD_CON_H */
1.7.1