Skip to content

Commit bbd0ee3

Browse files
committed
Update Framework API interface
1 parent 467c01d commit bbd0ee3

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

Diff for: DESIGN

+21-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
app
2-
-----------
3-
framework
4-
-----------
5-
provider
6-
-----------
1+
架构图:
2+
3+
***************
4+
* app *
5+
*-------------*
6+
* framework *
7+
*-------------*
8+
* provider *
9+
***************
10+
711

812
framework structs:
913
provider: represent a provider.
@@ -29,16 +33,25 @@ framework apis:
2933
int set_provider(char *provider_name, int model);
3034
/*==========================================
3135
在字典中查询 query_string,将查询结果保存在 result 中。
36+
direction 表示查询方向:
37+
+1 表示 中 --> 英
38+
0 表示自动判断。
39+
-1 表示 英 --> 中
3240
返回值:
3341
0 查询成功。
3442
-1 查询失败。
3543
*========================================== */
36-
int query_dict(char *query_string, dict_result *result);
44+
int query_dict(int direction, char *query_string, dict_result *result);
45+
3746
/*==========================================
3847
翻译 orgi,将结果保存在 trans 中。
48+
direction 表示查询方向:
49+
+1 表示 中 --> 英
50+
0 表示自动判断。
51+
-1 表示 英 --> 中
3952
返回值:
4053
0 查询成功。
4154
-1 查询失败。
4255
*========================================== */
43-
int translate(char *orgi, char *trans);
56+
int translate(int direction, char *orgi, char *trans);
4457

0 commit comments

Comments
 (0)