*
* Version $Id$
*/
-
/*
Copyright (C) 2000-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
* subroutines.
* S Q L I T E
*/
-typedef struct s_db {
+struct B_DB {
BQUEUE bq; /* queue control */
brwlock_t lock; /* transaction lock */
struct sqlite *db;
POOLMEM *esc_name; /* Escaped file/path name */
int fnl; /* file name length */
int pnl; /* path name length */
-} B_DB;
+};
/*
* subroutines.
* S Q L I T E
*/
-typedef struct s_db {
+struct B_DB {
BQUEUE bq; /* queue control */
brwlock_t lock; /* transaction lock */
struct sqlite3 *db;
POOLMEM *esc_name; /* Escaped file/path name */
int fnl; /* file name length */
int pnl; /* path name length */
-} B_DB;
+};
/*
* Conversion of sqlite 2 names to sqlite3
*
* M Y S Q L
*/
-typedef struct s_db {
+struct B_DB {
BQUEUE bq; /* queue control */
brwlock_t lock; /* transaction lock */
MYSQL mysql;
POOLMEM *esc_name; /* Escaped file/path name */
int fnl; /* file name length */
int pnl; /* path name length */
-} B_DB;
+};
#define DB_STATUS int
/* "Generic" names for easier conversion */
#define sql_store_result(x) mysql_store_result((x)->db)
+#define sql_use_result(x) mysql_use_result((x)->db)
#define sql_free_result(x) mysql_free_result((x)->result)
#define sql_fetch_row(x) mysql_fetch_row((x)->result)
#define sql_query(x, y) mysql_query((x)->db, (y))
*
* P O S T G R E S Q L
*/
-typedef struct s_db {
+struct B_DB {
BQUEUE bq; /* queue control */
brwlock_t lock; /* transaction lock */
PGconn *db;
POOLMEM *esc_name; /* Escaped file/path name */
int fnl; /* file name length */
int pnl; /* path name length */
-} B_DB;
+};
void my_postgresql_free_result(B_DB *mdb);
POSTGRESQL_ROW my_postgresql_fetch_row (B_DB *mdb);
/* This is the REAL definition for using the
* Bacula internal DB
*/
-typedef struct s_db {
+struct B_DB {
BQUEUE bq; /* queue control */
/* pthread_mutex_t mutex; */ /* single thread lock */
brwlock_t lock; /* transaction lock */
POOLMEM *cached_path;
int cached_path_len; /* length of cached path */
uint32_t cached_path_id;
-} B_DB;
+};
#endif /* HAVE_SQLITE3 */
#endif /* HAVE_MYSQL */
/* This is a "dummy" definition for use outside of sql.c
*/
-typedef struct s_db {
+struct B_DB {
int dummy; /* for SunOS compiler */
-} B_DB;
+};
#endif /* __SQL_C */
char cStartTime[MAX_TIME_LENGTH];
char cEndTime[MAX_TIME_LENGTH];
/* Extra stuff not in DB */
+ int limit; /* limit records to display */
faddr_t rec_addr;
};
DBId_t PathId;
DBId_t FilenameId;
FileId_t FileId;
+ char *Sig;
+ int SigType;
};