Browse Source

IPU框架标准版:添加注释

liufl5 3 years ago
parent
commit
0a9378a48e

+ 2 - 0
IPUMobileFunc/IPUMobileFunc/IPUAudioPlugin.m

12
12
13
@implementation IPUAudioPlugin
13
@implementation IPUAudioPlugin
14
14
15
// 音频录制,供外部接口(JS)调用
15
- (void)recordAudio:(NSArray *)param {
16
- (void)recordAudio:(NSArray *)param {
16
    IPUAudioUtil *audioUtil = [[IPUAudioUtil alloc] init];
17
    IPUAudioUtil *audioUtil = [[IPUAudioUtil alloc] init];
17
    [audioUtil recordAudio:^(BOOL success, NSString *result) {
18
    [audioUtil recordAudio:^(BOOL success, NSString *result) {
19
    }];
20
    }];
20
}
21
}
21
22
23
// 音频播放,供外部接口(JS)调用
22
- (void)playAudio:(NSArray *)param {
24
- (void)playAudio:(NSArray *)param {
23
    IPUAudioUtil *audioUtil = [[IPUAudioUtil alloc] init];
25
    IPUAudioUtil *audioUtil = [[IPUAudioUtil alloc] init];
24
    [audioUtil playAudio:param[0] callback:^(BOOL success, NSString *result) {
26
    [audioUtil playAudio:param[0] callback:^(BOOL success, NSString *result) {

+ 5 - 10
IPUMobileFunc/IPUMobileFunc/IPUDatabasePlugin.h

10
10
11
@interface IPUDatabasePlugin : IPUPlugin
11
@interface IPUDatabasePlugin : IPUPlugin
12
12
13
/***************************************************************************
13
/**
14
 * 表操作(复合语句操作)
14
 * 表操作(复合语句操作)
15
 * param(args)  : 参数
15
 * param(args)  : 参数
16
 *
17
 * 对应JS接口: Mobile.execSQL:function(dbName,sql,bindArgs,limit,offset,callback,err)
16
 * 对应JS接口: Mobile.execSQL:function(dbName,sql,bindArgs,limit,offset,callback,err)
18
 */
17
 */
19
- (void)execSql:(NSArray *)args;
18
- (void)execSql:(NSArray *)args;
20
19
21
/***********************************************
20
/**
22
 * 插入信息:将字段信息插入到指定表中(只适用于单表操作)
21
 * 插入信息:将字段信息插入到指定表中(只适用于单表操作)
23
 * param(args)  : 参数
22
 * param(args)  : 参数
24
 *
25
 * 对应JS接口: Mobile.insert:function(dbName,table,datas,callback,err)
23
 * 对应JS接口: Mobile.insert:function(dbName,table,datas,callback,err)
26
 */
24
 */
27
- (void)insertData:(NSArray *)args;
25
- (void)insertData:(NSArray *)args;
28
26
29
/******************************************************
27
/**
30
 * 修改信息:根据指定条件,修改表中的指定字段(只适用于单表操作)
28
 * 修改信息:根据指定条件,修改表中的指定字段(只适用于单表操作)
31
 * param(args)  : 参数
29
 * param(args)  : 参数
32
 *
33
 * 对应JS接口: Mobile.update:function(dbName,table,datas,condSQL,conds,callback,err)
30
 * 对应JS接口: Mobile.update:function(dbName,table,datas,condSQL,conds,callback,err)
34
 */
31
 */
35
- (void)updateData:(NSArray *)args;
32
- (void)updateData:(NSArray *)args;
36
33
37
/******************************************************
34
/**
38
 * 删除信息:根据指定条件,修改表中的指定字段(只适用于单表操作)
35
 * 删除信息:根据指定条件,修改表中的指定字段(只适用于单表操作)
39
 * param(args)  : 参数
36
 * param(args)  : 参数
40
 *
41
 * 对应JS接口: Mobile.delete:function(dbName,table,condSQL,conds,callback,err)
37
 * 对应JS接口: Mobile.delete:function(dbName,table,condSQL,conds,callback,err)
42
 */
38
 */
43
- (void)deleteData:(NSArray *)args;
39
- (void)deleteData:(NSArray *)args;
44
40
45
/************************************************************************************************
41
/**
46
 * 查询全表数据,根据数据库名称,表名,查询字段,查询条件,生成并执行sql
42
 * 查询全表数据,根据数据库名称,表名,查询字段,查询条件,生成并执行sql
47
 * param(args)      : 参数列表
43
 * param(args)      : 参数列表
48
 *
49
 * 对应JS接口: Mobile.select:function(dbName,table,columns,condSQL,conds,limit,offset,callback,err)
44
 * 对应JS接口: Mobile.select:function(dbName,table,columns,condSQL,conds,limit,offset,callback,err)
50
 */
45
 */
51
- (void)selectData:(NSArray *)args;
46
- (void)selectData:(NSArray *)args;

+ 25 - 3
IPUMobileFunc/IPUMobileFunc/IPUDatabasePlugin.m

15
15
16
@implementation IPUDatabasePlugin
16
@implementation IPUDatabasePlugin
17
17
18
/**
19
* 表操作(复合语句操作)
20
* param(args)  : 参数
21
* 对应JS接口: Mobile.execSQL:function(dbName,sql,bindArgs,limit,offset,callback,err)
22
*/
18
- (void)execSql:(NSArray *)args {
23
- (void)execSql:(NSArray *)args {
19
    if (!args || args.count < 5) {
24
    if (!args || args.count < 5) {
20
        [self callback:@"参数错误"];
25
        [self callback:@"参数错误"];
41
    [self callback:result];
46
    [self callback:result];
42
}
47
}
43
48
49
/**
50
* 插入信息:将字段信息插入到指定表中(只适用于单表操作)
51
* param(args)  : 参数
52
* 对应JS接口: Mobile.insert:function(dbName,table,datas,callback,err)
53
*/
44
- (void)insertData:(NSArray *)args {
54
- (void)insertData:(NSArray *)args {
45
    if (!args || args.count < 3) {
55
    if (!args || args.count < 3) {
46
        [self callback:@"参数错误"];
56
        [self callback:@"参数错误"];
68
    // 3.执行回调函数
78
    // 3.执行回调函数
69
    [self callback:result ? @"YES" : @"NO"];
79
    [self callback:result ? @"YES" : @"NO"];
70
}
80
}
71
81
/**
82
* 修改信息:根据指定条件,修改表中的指定字段(只适用于单表操作)
83
* param(args)  : 参数
84
* 对应JS接口: Mobile.update:function(dbName,table,datas,condSQL,conds,callback,err)
85
*/
72
- (void)updateData:(NSArray *)args {
86
- (void)updateData:(NSArray *)args {
73
    if (!args || args.count < 5) {
87
    if (!args || args.count < 5) {
74
        [self callback:@"参数错误"];
88
        [self callback:@"参数错误"];
96
    // 3.执行回调函数
110
    // 3.执行回调函数
97
    [self callback:result ? @"YES" : @"NO"];
111
    [self callback:result ? @"YES" : @"NO"];
98
}
112
}
99
113
/**
114
* 删除信息:根据指定条件,修改表中的指定字段(只适用于单表操作)
115
* param(args)  : 参数
116
* 对应JS接口: Mobile.delete:function(dbName,table,condSQL,conds,callback,err)
117
*/
100
- (void)deleteData:(NSArray *)args {
118
- (void)deleteData:(NSArray *)args {
101
    if (!args || args.count < 4) {
119
    if (!args || args.count < 4) {
102
        [self callback:@"参数错误"];
120
        [self callback:@"参数错误"];
122
    // 3.执行回调函数
140
    // 3.执行回调函数
123
    [self callback:result ? @"YES" : @"NO"];
141
    [self callback:result ? @"YES" : @"NO"];
124
}
142
}
125
143
/**
144
* 查询全表数据,根据数据库名称,表名,查询字段,查询条件,生成并执行sql
145
* param(args)      : 参数列表
146
* 对应JS接口: Mobile.select:function(dbName,table,columns,condSQL,conds,limit,offset,callback,err)
147
*/
126
- (void)selectData:(NSArray *)args {
148
- (void)selectData:(NSArray *)args {
127
    if (!args || args.count < 7) {
149
    if (!args || args.count < 7) {
128
        return;
150
        return;

BIN
display-center/display-center.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate