-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSqliteHelper.h
More file actions
35 lines (31 loc) · 875 Bytes
/
SqliteHelper.h
File metadata and controls
35 lines (31 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// SqliteHelper.h
// PasswordSaver
//
// Created by GuoJing on 10-5-3.
// Copyright 2010 GuoJingMe. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <sqlite3.h>
#import "KeyModel.h"
#import "Consts.h"
#import "lib/db/FMDatabase.h"
@interface SqliteHelper : NSObject {
sqlite3 *database;
FMDatabase *db;
NSUserDefaults *prefs;
}
@property (nonatomic) sqlite3 *database;
@property (assign) FMDatabase *db;
@property (assign) NSUserDefaults *prefs;
-(NSString*)getFilePath;
-(BOOL)connect;
-(BOOL)disconnect;
-(BOOL)insertKey:(NSString*) key insertPwd:(NSString*) password insertDesc:(NSString*) description;
-(BOOL)removeKey:(NSString*) key;
-(BOOL)checkKey:(NSString*) key;
-(NSString*)checkPwd:(NSString*) key;
-(NSMutableArray*)getValues:(NSString*) key;
-(NSData*)stringWithEncode:(NSData*) key;
-(NSData*)stringWithDecode:(NSData*) key;
@end