#import <Foundation/Foundation.h>
#import <sqlite3.h>
typedef struct sqlite3 sqlite3;
@class JABDatabaseAction;
@class JABDatabaseQuery;
@interface JABDatabase : NSObject {
NSString *_dbPath; NSString *_backupPath; sqlite3 *_sqlDB;
JABDatabaseAction *_dbAction; JABDatabaseQuery *_dbQuery; NSInteger _dbResult; }
@property(retain, readwrite) NSString *dbPath;
@property(retain, readwrite) NSString *backupPath;
@property(assign, readwrite) sqlite3 *sqlDB;
@property(retain, readwrite) JABDatabaseAction *dbAction;
@property(retain, readwrite) JABDatabaseQuery *dbQuery;
@property(assign, readwrite) NSInteger dbResult;
+ (id) jabDatabaseWithOptions: (NSDictionary *) cmdOpts forAction: (JABDatabaseAction *) dbAction;
- (id) initWithOptions: (NSDictionary *) cmdOpts forAction: (JABDatabaseAction *) dbAction;
- (void) dealloc;
- (BOOL) createBackup;
- (void) openDatabase;
- (void) closeDatabase;
- (BOOL) verifyActiveJid: (NSString *) aJid expectedResult: (BOOL) expected;
- (void) insertActiveItemForOwner: (NSString *) ownerJid source: (const char *) source line: (int) line;
- (void) insertVcardItemForOwner: (NSString *) ownerJid source: (const char *) source line: (int) line;
- (BOOL) verifyRosterItemForOwner: (NSString *) ownerJid andBuddy: (NSString *) ownerJid;
- (void) insertRosterItemForOwner: (NSString *) ownerJid andBuddy: (NSString *) buddyJid
source: (const char *) source line: (int) line;
- (void) deleteRosterItemForOwner: (NSString *) ownerJid andBuddy: (NSString *) buddyJid
source: (const char *) source line: (int) line;
- (BOOL) verifyRosterGroup: (NSString *) grpName forOwner: (NSString *) ownerJid andBuddy: (NSString *) ownerJid;
- (void) insertRosterGroup: (NSString *) grpName forOwner: (NSString *) ownerJid andBuddy: (NSString *) buddyJid
source: (const char *) source line: (int) line;
- (void) deleteRosterGroup: (NSString *) grpName forOwner: (NSString *) ownerJid andBuddy: (NSString *) buddyJid
source: (const char *) source line: (int) line;
- (void) updateTable: (NSString *) tableName column: (NSString *) setCol
oldValue: (NSString *) oldVal newValue: (NSString *) newVal
source: (const char *) source line: (int) line;
- (void) deleteAllRowsFromTable: (NSString *) tableName source: (const char *) source line: (int) line;
- (void) deleteRowFromTable: (NSString *) tableName whereColumn: (NSString *) colName equalsValue: (NSString *) aVal
source: (const char *) source line: (int) line;
- (BOOL) checkQueryStatus: (JABDatabaseQuery *) dbQuery source: (const char *) source line: (int) line;
- (NSString *) getDatabaseErrorMessage;
@end