mirror of
https://github.com/openharmony/device_manager.git
synced 2026-07-20 21:58:27 -04:00
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
.container {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<div class="container">
|
||||
<text class="title">
|
||||
是否允许对端连接本机
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
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 router from '@ohos.router'
|
||||
|
||||
var timel = null;
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
void StartAbilityDone();
|
||||
|
||||
private:
|
||||
void waitForTimeout(uint32_t timeout_s);
|
||||
void WaitForTimeout(uint32_t timeout_s);
|
||||
|
||||
private:
|
||||
sem_t mSem_;
|
||||
|
||||
@@ -37,7 +37,7 @@ AbilityStatus DmAbilityManager::StartAbility(AbilityRole role)
|
||||
return mStatus_;
|
||||
}
|
||||
|
||||
void DmAbilityManager::waitForTimeout(uint32_t timeout_s)
|
||||
void DmAbilityManager::WaitForTimeout(uint32_t timeout_s)
|
||||
{
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
|
||||
@@ -76,11 +76,11 @@ AbilityStatus DmAbilityManager::StartAbility(AbilityRole role)
|
||||
mStatus_ = AbilityStatus::ABILITY_STATUS_FAILED;
|
||||
return mStatus_;
|
||||
}
|
||||
waitForTimeout(ABILITY_START_TIMEOUT);
|
||||
WaitForTimeout(ABILITY_START_TIMEOUT);
|
||||
return mStatus_;
|
||||
}
|
||||
|
||||
void DmAbilityManager::waitForTimeout(uint32_t timeout_s)
|
||||
void DmAbilityManager::WaitForTimeout(uint32_t timeout_s)
|
||||
{
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
|
||||
@@ -73,9 +73,12 @@ void DMLog(DMLogLevel logLevel, const char *fmt, ...)
|
||||
{
|
||||
char logBuf[LOG_MAX_LEN] = {0};
|
||||
va_list arg;
|
||||
int32_t ret = 0;
|
||||
|
||||
(void)memset_s(&arg, sizeof(va_list), 0, sizeof(va_list));
|
||||
int32_t ret = (void)memset_s(&arg, sizeof(va_list), 0, sizeof(va_list));
|
||||
if (ret != 0) {
|
||||
DMLogOut(logLevel, "DM log memset_s error.");
|
||||
return;
|
||||
}
|
||||
va_start(arg, fmt);
|
||||
ret = vsprintf_s(logBuf, sizeof(logBuf), fmt, arg);
|
||||
va_end(arg);
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
void StartAbilityDone();
|
||||
|
||||
private:
|
||||
void waitForTimeout(uint32_t timeout_s);
|
||||
void WaitForTimeout(uint32_t timeout_s);
|
||||
|
||||
private:
|
||||
sem_t mSem_;
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
.container {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
<!--
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<div class="container">
|
||||
<text class="title">
|
||||
PIN码连接
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
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 router from '@ohos.router';
|
||||
|
||||
var numbs = 0;
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
.container {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
<!--
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<div class="container">
|
||||
<text class="title">
|
||||
PIN码连接
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
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 router from '@ohos.router'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -30,7 +30,7 @@ AbilityStatus DmAbilityManager::StartAbility(AbilityRole role)
|
||||
return mStatus_;
|
||||
}
|
||||
|
||||
void DmAbilityManager::waitForTimeout(uint32_t timeout_s)
|
||||
void DmAbilityManager::WaitForTimeout(uint32_t timeout_s)
|
||||
{
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
|
||||
@@ -53,11 +53,11 @@ AbilityStatus DmAbilityManager::StartAbility(AbilityRole role)
|
||||
mStatus_ = ABILITY_STATUS_FAILED;
|
||||
return mStatus_;
|
||||
}
|
||||
waitForTimeout(ABILITY_START_TIMEOUT);
|
||||
WaitForTimeout(ABILITY_START_TIMEOUT);
|
||||
return mStatus_;
|
||||
}
|
||||
|
||||
void DmAbilityManager::waitForTimeout(uint32_t timeout_s)
|
||||
void DmAbilityManager::WaitForTimeout(uint32_t timeout_s)
|
||||
{
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
|
||||
Reference in New Issue
Block a user