mirror of
https://gitee.com/openharmony/ability_idl_tool
synced 2024-11-23 07:20:29 +00:00
IssueNo:#I5C49D
Description:更新代码及readme文档 Sig:SIG_ApplicationFramework Feature or Bugfix: Feature Binary Source: No Signed-off-by: dy_study <dingyao5@huawei.com>
This commit is contained in:
parent
f005cf0f66
commit
2581040f9a
4
BUILD.gn
4
BUILD.gn
@ -81,6 +81,6 @@ ohos_executable("idl") {
|
||||
|
||||
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
|
||||
|
||||
part_name = "idl"
|
||||
subsystem_name = "aafwk"
|
||||
part_name = "idl_tool"
|
||||
subsystem_name = "ability"
|
||||
}
|
||||
|
6
OAT.xml
6
OAT.xml
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
<!-- Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -61,8 +61,8 @@ Note:If the text contains special characters, please escape them according to th
|
||||
</policylist>
|
||||
<filefilterlist>
|
||||
<filefilter name="defaultFilter" desc="Files not to check">
|
||||
<filteritem type="filename" name="zidl/test/zidlgen/zidl" desc="zidl binary file"/>
|
||||
<filteritem type="filepath" name="zidl/test/zidlgen/zidl" desc="zidl binary file"/>
|
||||
<filteritem type="filename" name="test/idlgen/idl" desc="idl binary file"/>
|
||||
<filteritem type="filepath" name="test/idlgen/idl" desc="idl binary file"/>
|
||||
</filefilter>
|
||||
</filefilterlist>
|
||||
</oatconfig>
|
||||
|
14
README.md
14
README.md
@ -2,7 +2,7 @@
|
||||
|
||||
## 简介
|
||||
|
||||
在OpenHarmony中,当客户端和服务器进行IPC通信时,需要定义双方都认可的接口,以保障双方可以成功通信,OpenHarmony IDL(OpenHarmony Interface Definition Language)则是一种定义此类接口的工具。OpenHarmony IDL先把需要传递的对象分解成操作系统能够理解的基本类型,并根据开发者的需要封装跨边界的对象。
|
||||
在OpenHarmony中,当应用/系统服务的客户端和服务端进行IPC(Inter-Process Communication)跨线程通信时,需要定义双方都认可的接口,以保障双方可以成功通信,OpenHarmony IDL(Interface Definition Language)则是一种定义此类接口的工具。OpenHarmony IDL先把需要传递的对象分解成操作系统能够理解的基本类型,并根据开发者的需要封装跨边界的对象。
|
||||
|
||||
**图1** IDL接口描述
|
||||
![IDL-interface-description](./figures/IDL-interface-description.png)
|
||||
@ -23,17 +23,17 @@ OpenHarmony IDL接口描述语言主要用于:
|
||||
|
||||
- OpenHarmony IDL中定义的接口可以支持跨进程调用或跨设备调用。根据OpenHarmony IDL中的定义生成的信息或代码可以简化跨进程或跨设备调用接口的实现。
|
||||
|
||||
## 部件内子模块职责
|
||||
**部件内子模块职责**
|
||||
|
||||
| 子模块名称 | 职责 |
|
||||
| ---------------- | ------------------------------------------------------------|
|
||||
| 接口文件解析模块 | 解析校验接口定义文件。 |
|
||||
| stub/proxy自动生成模块 | 根据IPC/RPC规格自动生成Stub服务端和Proxy客户端代码 |
|
||||
| stub/proxy自动生成模块 | 根据IPC/RPC规格自动生成Stub服务端和Proxy客户端代码。 |
|
||||
|
||||
## 目录
|
||||
|
||||
```
|
||||
foundation/ability/idl
|
||||
foundation/ability/idl_tool
|
||||
├── ast # idl语法解析定义代码
|
||||
├── codegen # 跨进程通信模板生成模块代码
|
||||
├── metadata # matedata自定义数据解析模块代码
|
||||
@ -43,7 +43,7 @@ foundation/ability/idl
|
||||
```
|
||||
|
||||
## 开发步骤
|
||||
开发步骤可参考[开发指导](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/IDL/idl-guidelines.md#31-c%E5%BC%80%E5%8F%91%E6%AD%A5%E9%AA%A4)
|
||||
开发步骤可参考[开发指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/IDL/idl-guidelines.md#31-c%E5%BC%80%E5%8F%91%E6%AD%A5%E9%AA%A4)
|
||||
|
||||
|
||||
## 相关仓
|
||||
@ -53,6 +53,6 @@ ability_base
|
||||
|
||||
ability_runtime
|
||||
|
||||
form_runtime
|
||||
form_fwk
|
||||
|
||||
[**idl**]
|
||||
[**idl_tool**](https://gitee.com/openharmony/ability_idl_tool)
|
||||
|
12
bundle.json
12
bundle.json
@ -1,17 +1,17 @@
|
||||
{
|
||||
"name": "@ohos/idl",
|
||||
"name": "@ohos/idl_tool",
|
||||
"description": "提供自动生成Extension 服务端及客户端接口文件的能力",
|
||||
"version": "3.1",
|
||||
"license": "Apache License 2.0",
|
||||
"publishAs": "code-segment",
|
||||
"segment": {
|
||||
"destPath": "foundation/ability/ability_runtime/idl"
|
||||
"destPath": "foundation/ability/idl_tool"
|
||||
},
|
||||
"dirs": {},
|
||||
"scripts": {},
|
||||
"component": {
|
||||
"name": "idl",
|
||||
"subsystem": "aafwk",
|
||||
"name": "idl_tool",
|
||||
"subsystem": "ability",
|
||||
"syscap": [],
|
||||
"features": [],
|
||||
"adapted_system_type": [
|
||||
@ -32,8 +32,8 @@
|
||||
"sub_component": [],
|
||||
"inner_kits": [],
|
||||
"test": [
|
||||
"//foundation/ability/ability_runtime/idl/test/ts/moduletest:moduletest",
|
||||
"//foundation/ability/ability_runtime/idl/test/ts/unittest:unittest"
|
||||
"//foundation/ability/idl_tool/test/ts/moduletest:moduletest",
|
||||
"//foundation/ability/idl_tool/test/ts/unittest:unittest"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 19 KiB |
16
idl_tool.gni
Executable file
16
idl_tool.gni
Executable file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ability_runtime_path = "//foundation/ability/ability_runtime"
|
||||
IPC_SUBSYSTEM_DIR = "//foundation/communication/ipc"
|
||||
IDL_TEST_DIR = "${ability_runtime_path}/idl_tool/test/native"
|
@ -12,7 +12,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/idl/idl.gni")
|
||||
import("//foundation/ability/idl_tool/idl_tool.gni")
|
||||
|
||||
config("ipc_test_config") {
|
||||
include_dirs = [
|
||||
@ -40,8 +40,8 @@ ohos_executable("idl_server_test") {
|
||||
"samgr_standard:samgr_proxy",
|
||||
]
|
||||
|
||||
subsystem_name = "aafwk"
|
||||
part_name = "idl"
|
||||
subsystem_name = "ability"
|
||||
part_name = "idl_tool"
|
||||
}
|
||||
|
||||
ohos_executable("idl_client_test") {
|
||||
@ -61,6 +61,6 @@ ohos_executable("idl_client_test") {
|
||||
"samgr_standard:samgr_proxy",
|
||||
]
|
||||
|
||||
subsystem_name = "aafwk"
|
||||
part_name = "idl"
|
||||
subsystem_name = "ability"
|
||||
part_name = "idl_tool"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user