2005-06-18 07:43:52 +00:00
/*
ldb database library - command line handling for ldb tools
Copyright ( C ) Andrew Tridgell 2005
* * NOTE ! The following LGPL license applies to the ldb
* * library . This does NOT imply that all of Samba is released
* * under the LGPL
This library is free software ; you can redistribute it and / or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
2007-07-10 02:46:15 +00:00
version 3 of the License , or ( at your option ) any later version .
2005-06-18 07:43:52 +00:00
This library is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public
2007-07-10 03:42:26 +00:00
License along with this library ; if not , see < http : //www.gnu.org/licenses/>.
2005-06-18 07:43:52 +00:00
*/
# include <popt.h>
struct ldb_cmdline {
const char * url ;
enum ldb_scope scope ;
const char * basedn ;
2007-11-05 21:57:33 +01:00
const char * modules_path ;
2005-06-18 07:43:52 +00:00
int interactive ;
int sorted ;
const char * editor ;
int verbose ;
int recursive ;
int all_records ;
2005-09-22 04:16:46 +00:00
int nosync ;
2005-06-18 07:43:52 +00:00
const char * * options ;
int argc ;
const char * * argv ;
int num_records ;
int num_searches ;
2005-06-18 09:01:09 +00:00
const char * sasl_mechanism ;
2009-11-28 17:35:36 +11:00
const char * * controls ;
2009-09-08 20:57:31 +10:00
int show_binary ;
2009-09-21 15:24:39 -07:00
int tracing ;
2005-06-18 07:43:52 +00:00
} ;
2010-11-01 11:03:38 +01:00
struct ldb_cmdline * ldb_cmdline_process ( struct ldb_context * ldb , int argc ,
const char * * argv ,
2010-11-01 15:41:07 +11:00
void ( * usage ) ( struct ldb_context * ) ) ;
2005-06-18 07:43:52 +00:00
2006-01-18 04:36:30 +00:00
int handle_controls_reply ( struct ldb_control * * reply , struct ldb_control * * request ) ;
2010-11-01 15:41:07 +11:00
void ldb_cmdline_help ( struct ldb_context * ldb , const char * cmdname , FILE * f ) ;
2009-09-02 16:56:39 +10:00