diff --git a/communication/BUILD.gn b/communication/BUILD.gn index ffe83db90eeaca17eadf6dfe4fba131cec90dd2f..db7a546a22887ea99bc1d3539a7a5eb76ea09ebd 100644 --- a/communication/BUILD.gn +++ b/communication/BUILD.gn @@ -21,6 +21,7 @@ group("communication") { "bluetooth_profile:ActsBluetoothProFileJsTest", "bluetooth_standard:ActsBluetoothJsTest", "dsoftbus/rpc:ActsRpcJsTest", + "dsoftbus/rpc_server:ActsRpcJsServer", "wifi_p2p:ActsP2PJSTest", "wifi_standard:ActsWifiJSTest", ] diff --git a/communication/dsoftbus/BUILD.gn b/communication/dsoftbus/BUILD.gn deleted file mode 100644 index db7a546a22887ea99bc1d3539a7a5eb76ea09ebd..0000000000000000000000000000000000000000 --- a/communication/dsoftbus/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# 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" ] - } -} diff --git a/communication/dsoftbus/rpc/BUILD.gn b/communication/dsoftbus/rpc/BUILD.gn old mode 100755 new mode 100644 diff --git a/communication/dsoftbus/rpc/Test.json b/communication/dsoftbus/rpc/Test.json old mode 100755 new mode 100644 index 8298fdcfe0dad0430d313790ff23f272eabc7691..d30fe8c61cd911076108bfb57128c2e73b6086c6 --- a/communication/dsoftbus/rpc/Test.json +++ b/communication/dsoftbus/rpc/Test.json @@ -13,7 +13,7 @@ { "test-file-name": [ "ActsRpcHapTest.hap", - "./resource/dsoftbus/ipcserver/entry-release-standard-signed.hap" + "./testcases/ActsRpcHapServer.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/communication/dsoftbus/rpc/src/main/config.json b/communication/dsoftbus/rpc/src/main/config.json old mode 100755 new mode 100644 diff --git a/communication/dsoftbus/rpc/src/main/js/test/List.test.js b/communication/dsoftbus/rpc/src/main/js/test/List.test.js old mode 100755 new mode 100644 diff --git a/communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js b/communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js old mode 100755 new mode 100644 diff --git a/communication/dsoftbus/rpc/src/main/resources/base/element/string.json b/communication/dsoftbus/rpc/src/main/resources/base/element/string.json old mode 100755 new mode 100644 diff --git a/communication/dsoftbus/rpc/src/main/resources/base/media/icon.png b/communication/dsoftbus/rpc/src/main/resources/base/media/icon.png old mode 100755 new mode 100644 diff --git a/communication/dsoftbus/rpc_server/src/main/config.json b/communication/dsoftbus/rpc_server/src/main/config.json index 8647da0254aa3e6fca097c9eff4222885de80f9d..620105205741d291827589cf159cab26ab91db06 100644 --- a/communication/dsoftbus/rpc_server/src/main/config.json +++ b/communication/dsoftbus/rpc_server/src/main/config.json @@ -1,89 +1,89 @@ -{ - "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 - } - } - ] - } +{ + "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 diff --git a/communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/index/index.js b/communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/index/index.js index 5ebacb543550b58b643ea80b403d554b216adda1..dc1588bf19750fbfc3cdf94b27acd30c60487029 100644 --- a/communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/index/index.js +++ b/communication/dsoftbus/rpc_server/src/main/js/MainAbility/pages/index/index.js @@ -14,30 +14,19 @@ */ import router from '@system.router' -import featureAbility from '@ohos.ability.featureAbility'; export default { data: { title: "" }, - onInit() { - this.grantPermission(); + this.title = this.$t('strings.world'); }, 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) - - }) - }, - + } } diff --git a/communication/dsoftbus/rpc_server/src/main/resources/Test.json:Zone.Identifier b/communication/dsoftbus/rpc_server/src/main/resources/Test.json:Zone.Identifier deleted file mode 100644 index eca5ac5d4d8ed0d4727e56442df5bc37bd8e8cdb..0000000000000000000000000000000000000000 --- a/communication/dsoftbus/rpc_server/src/main/resources/Test.json:Zone.Identifier +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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 diff --git a/communication/dsoftbus/rpc_server/src/main/resources/base/element/string.json b/communication/dsoftbus/rpc_server/src/main/resources/base/element/string.json index a296f2b0fc77262493309ab4d014519d69138c48..16e3bbc3f7c9ec1caf47bc5dcd117beadc774f53 100644 --- a/communication/dsoftbus/rpc_server/src/main/resources/base/element/string.json +++ b/communication/dsoftbus/rpc_server/src/main/resources/base/element/string.json @@ -1,16 +1,16 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "RpcServer" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - }, - { - "name": "serviceability_description", - "value": "hap sample empty service" - } - ] +{ + "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