-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSmartITOMSqlite.h
56 lines (32 loc) · 922 Bytes
/
SmartITOMSqlite.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// smartITOMSqlite.h
// SmartITOM
//
// Created by Apple002 on 12-11-7.
// Copyright (c) 2012年 Ambrose. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "DHUser.h"
@interface SmartITOMSqlite : NSObject
{
sqlite3 * database;
sqlite3_stmt *statement;
char *errorMsg;
NSString *databaseName;
NSString *databasePath;
}
- (id)init;
- (BOOL)openSplite;
- (BOOL)createTable;
- (BOOL)createIpTable;
- (BOOL)insert:(DHUser*)aUser;
- (BOOL)insert:(NSString*)_username andIp:(NSString*)_ip andPort:(NSInteger)_port;
- (BOOL)deleteUser:(DHUser*)aUser;
- (BOOL)selectUserName:(NSString*)_username;
- (NSString*)selectPassword:(NSString*)_username;
- (NSInteger)deleteUser:(NSString*)username andPass:(NSString*)password;
- (NSMutableArray*)selectAllUser;
- (NSMutableArray*)selectAllIp;
- (NSMutableArray*)selectAllPort;
@end