Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f2d6b246
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f2d6b246
编写于
8月 27, 2022
作者:
Y
yang-qibo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dsoftbus_ipc服务端代码开源
Signed-off-by:
N
yang-qibo
<
yangqibo1@huawei.com
>
上级
061ef18c
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
856 addition
and
0 deletion
+856
-0
communication/dsoftbus/BUILD.gn
communication/dsoftbus/BUILD.gn
+31
-0
communication/dsoftbus/rpc_server/BUILD.gn
communication/dsoftbus/rpc_server/BUILD.gn
+34
-0
communication/dsoftbus/rpc_server/Test.json
communication/dsoftbus/rpc_server/Test.json
+20
-0
communication/dsoftbus/rpc_server/signature/openharmony_sx.p7b
...nication/dsoftbus/rpc_server/signature/openharmony_sx.p7b
+0
-0
communication/dsoftbus/rpc_server/src/main/config.json
communication/dsoftbus/rpc_server/src/main/config.json
+89
-0
communication/dsoftbus/rpc_server/src/main/js/MainAbility/app.js
...cation/dsoftbus/rpc_server/src/main/js/MainAbility/app.js
+23
-0
communication/dsoftbus/rpc_server/src/main/js/MainAbility/i18n/en-US.json
...oftbus/rpc_server/src/main/js/MainAbility/i18n/en-US.json
+11
-0
communication/dsoftbus/rpc_server/src/main/js/MainAbility/i18n/zh-CN.json
...oftbus/rpc_server/src/main/js/MainAbility/i18n/zh-CN.json
+11
-0
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/index/index.css
.../rpc_server/src/main/js/MainAbility/pages/index/index.css
+24
-0
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/index/index.hml
.../rpc_server/src/main/js/MainAbility/pages/index/index.hml
+6
-0
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/index/index.js
...s/rpc_server/src/main/js/MainAbility/pages/index/index.js
+43
-0
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/second/second.css
...pc_server/src/main/js/MainAbility/pages/second/second.css
+24
-0
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/second/second.hml
...pc_server/src/main/js/MainAbility/pages/second/second.hml
+6
-0
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/second/second.js
...rpc_server/src/main/js/MainAbility/pages/second/second.js
+27
-0
communication/dsoftbus/rpc_server/src/main/js/ServiceAbility/service.js
...dsoftbus/rpc_server/src/main/js/ServiceAbility/service.js
+472
-0
communication/dsoftbus/rpc_server/src/main/resources/Test.json:Zone.Identifier
...s/rpc_server/src/main/resources/Test.json:Zone.Identifier
+19
-0
communication/dsoftbus/rpc_server/src/main/resources/base/element/string.json
...us/rpc_server/src/main/resources/base/element/string.json
+16
-0
communication/dsoftbus/rpc_server/src/main/resources/base/media/icon.png
...softbus/rpc_server/src/main/resources/base/media/icon.png
+0
-0
未找到文件。
communication/dsoftbus/BUILD.gn
0 → 100644
浏览文件 @
f2d6b246
# 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.
import("//build/ohos_var.gni")
group("communication") {
testonly = true
if (is_standard_system) {
deps = [
"bluetooth_ble:ActsBluetoothBleJsTest",
"bluetooth_on:ActsBluetoothOnJsTest",
"bluetooth_profile:ActsBluetoothProFileJsTest",
"bluetooth_standard:ActsBluetoothJsTest",
"dsoftbus/rpc:ActsRpcJsTest",
"dsoftbus/rpc_server:ActsRpcJsServer",
"wifi_p2p:ActsP2PJSTest",
"wifi_standard:ActsWifiJSTest",
]
} else {
deps = [ "wifi_standard:ActsWifiJSTest" ]
}
}
communication/dsoftbus/rpc_server/BUILD.gn
0 → 100644
浏览文件 @
f2d6b246
# Copyright (C) 2021 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsRpcJsServer") {
hap_profile = "./src/main/config.json"
deps = [
":rpc_js_assets",
":rpc_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsRpcHapServer"
subsystem_name = "communication"
part_name = "ipc"
}
ohos_js_assets("rpc_js_assets") {
source_dir = "./src/main/js"
hap_profile = "./src/main/config.json"
}
ohos_resources("rpc_js_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
communication/dsoftbus/rpc_server/Test.json
0 → 100644
浏览文件 @
f2d6b246
{
"description"
:
"Configuration for rpc Servers"
,
"driver"
:
{
"type"
:
"JSUnitServer"
,
"test-timeout"
:
"900000"
,
"package"
:
"ohos.rpc.test.server"
,
"abilityName"
:
".MainAbility"
,
"shell-timeout"
:
"900000"
},
"kits"
:
[
{
"test-file-name"
:
[
"ActsRpcHapServer.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
]
}
communication/dsoftbus/rpc_server/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
f2d6b246
文件已添加
communication/dsoftbus/rpc_server/src/main/config.json
0 → 100644
浏览文件 @
f2d6b246
{
"app"
:
{
"bundleName"
:
"ohos.rpc.test.server"
,
"vendor"
:
"rpc"
,
"version"
:
{
"code"
:
1000000
,
"name"
:
"1.0.0"
},
"apiVersion"
:
{
"compatible"
:
7
,
"target"
:
8
}
},
"deviceConfig"
:
{},
"module"
:
{
"reqPermissions"
:
[
{
"name"
:
"ohos.permission.DISTRIBUTED_DATASYNC"
},
{
"name"
:
"ohos.permission.GET_DISTRIBUTED_DEVICE_INFO"
},
{
"name"
:
"ohos.permission.GET_BUNDLE_INFO"
}
],
"package"
:
"ohos.rpc.test.server"
,
"name"
:
".MyApplication"
,
"mainAbility"
:
".MainAbility"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
,
"installationFree"
:
false
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"orientation"
:
"unspecified"
,
"visible"
:
true
,
"srcPath"
:
"MainAbility"
,
"name"
:
".MainAbility"
,
"srcLanguage"
:
"js"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"formsEnabled"
:
false
,
"label"
:
"$string:entry_MainAbility"
,
"type"
:
"page"
,
"launchType"
:
"standard"
},
{
"srcPath"
:
"ServiceAbility"
,
"name"
:
".ServiceAbility"
,
"icon"
:
"$media:icon"
,
"srcLanguage"
:
"js"
,
"description"
:
"$string:serviceability_description"
,
"type"
:
"service"
,
"visible"
:
true
,
"formsEnabled"
:
false
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
,
"pages/second/second"
],
"name"
:
".MainAbility"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
]
}
}
\ No newline at end of file
communication/dsoftbus/rpc_server/src/main/js/MainAbility/app.js
0 → 100644
浏览文件 @
f2d6b246
/*
* Copyright (c) 2021 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.
*/
export
default
{
onCreate
()
{
console
.
info
(
"
Application onCreate
"
);
},
onDestroy
()
{
console
.
info
(
"
Application onDestroy
"
);
}
};
communication/dsoftbus/rpc_server/src/main/js/MainAbility/i18n/en-US.json
0 → 100644
浏览文件 @
f2d6b246
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
,
"page"
:
"Second Page"
,
"next"
:
"Next Page"
,
"back"
:
"Back"
},
"Files"
:
{
}
}
\ No newline at end of file
communication/dsoftbus/rpc_server/src/main/js/MainAbility/i18n/zh-CN.json
0 → 100644
浏览文件 @
f2d6b246
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
,
"page"
:
"第二页"
,
"next"
:
"下一页"
,
"back"
:
"返回"
},
"Files"
:
{
}
}
\ No newline at end of file
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/index/index.css
0 → 100644
浏览文件 @
f2d6b246
.container
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
left
:
0px
;
top
:
0px
;
width
:
100%
;
height
:
100%
;
}
.title
{
font-size
:
60px
;
text-align
:
center
;
width
:
100%
;
height
:
40%
;
margin
:
10px
;
}
.btn
{
width
:
50%
;
height
:
100px
;
font-size
:
40px
;
}
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/index/index.hml
0 → 100644
浏览文件 @
f2d6b246
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/index/index.js
0 → 100644
浏览文件 @
f2d6b246
/*
* Copyright (c) 2021 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.
*/
import
router
from
'
@system.router
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
grantPermission
();
},
onclick
:
function
()
{
router
.
replace
({
uri
:
"
pages/second/second
"
})
},
grantPermission
()
{
console
.
info
(
'
Calc[IndexPage] grantPermission
'
)
let
context
=
featureAbility
.
getContext
()
context
.
requestPermissionsFromUser
([
'
ohos.permission.DISTRIBUTED_DATASYNC
'
],
666
,
function
(
result
)
{
console
.
info
(
'
Calc[IndexPage] grantPermission,requestPermissionsFromUser,
'
+
result
.
requestCode
)
})
},
}
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/second/second.css
0 → 100644
浏览文件 @
f2d6b246
.container
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
left
:
0px
;
top
:
0px
;
width
:
100%
;
height
:
100%
;
}
.title
{
font-size
:
60px
;
text-align
:
center
;
width
:
100%
;
height
:
40%
;
margin
:
10px
;
}
.btn
{
width
:
50%
;
height
:
100px
;
font-size
:
40px
;
}
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/second/second.hml
0 → 100644
浏览文件 @
f2d6b246
<div class="container">
<text class="title">
{{ $t('strings.page') }}
</text>
<input class="btn" type="button" value="{{ $t('strings.back') }}" onclick="onclick"></input>
</div>
communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/second/second.js
0 → 100644
浏览文件 @
f2d6b246
/*
* Copyright (c) 2021 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.
*/
import
router
from
'
@system.router
'
export
default
{
data
:
{
title
:
'
World
'
},
onclick
:
function
()
{
router
.
replace
({
uri
:
"
pages/index/index
"
})
}
}
communication/dsoftbus/rpc_server/src/main/js/ServiceAbility/service.js
0 → 100644
浏览文件 @
f2d6b246
此差异已折叠。
点击以展开。
communication/dsoftbus/rpc_server/src/main/resources/Test.json:Zone.Identifier
0 → 100644
浏览文件 @
f2d6b246
/*
* Copyright (c) 2021 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.
*/
[ZoneTransfer]
ZoneId=1
ReferrerUrl=vscode-file://vscode-app/d:/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html
HostUrl=file:///z%3A/home/yqb/openharmony/master/test/xts/acts/communication/dsoftbus/rpc_server/Test.json
communication/dsoftbus/rpc_server/src/main/resources/base/element/string.json
0 → 100644
浏览文件 @
f2d6b246
{
"string"
:
[
{
"name"
:
"entry_MainAbility"
,
"value"
:
"RpcServer"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Empty Ability"
},
{
"name"
:
"serviceability_description"
,
"value"
:
"hap sample empty service"
}
]
}
\ No newline at end of file
communication/dsoftbus/rpc_server/src/main/resources/base/media/icon.png
0 → 100644
浏览文件 @
f2d6b246
6.6 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录