mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2025-03-05 01:28:04 +00:00
fix:delete redundant spaces
Signed-off-by: quyh <quyihao@huawei.com>
This commit is contained in:
parent
1d6bcc44dc
commit
57c611daf8
10
README_zh.md
10
README_zh.md
@ -64,8 +64,6 @@
|
||||
>**须知:**
|
||||
>使用跨设备通信时,必须添加权限`ohos.permission.DISTRIBUTED_DATASYNC`和`ohos.permission.DISTRIBUTED_SOFTBUS_CENTER`,该权限类型为 _**dangerous**_ 。
|
||||
|
||||
>设备主动发现手机时,手机需打开超级终端的允许被“附近设备”发现开关(设置-超级终端-我的设备-允许被发现-附近设备),才能被设备发现。
|
||||
|
||||
**1、发现**
|
||||
|
||||
- **发布流程**
|
||||
@ -81,10 +79,10 @@
|
||||
|
||||
// 发布信息
|
||||
typedef struct {
|
||||
int publishId; // 发现消息Id
|
||||
DiscoverMode mode; // 发现模式
|
||||
ExchangeMedium medium; // 发现媒介
|
||||
ExchangeFreq freq; // 发现频率
|
||||
int publishId; // 发布消息Id
|
||||
DiscoverMode mode; // 发布模式
|
||||
ExchangeMedium medium; // 发布媒介
|
||||
ExchangeFreq freq; // 发布频率
|
||||
const char *capability; // 被发现设备需要具备的能力
|
||||
unsigned char *capabilityData; // 业务发布的自定义数据
|
||||
unsigned int dataLen; // 数据长度
|
||||
|
@ -393,7 +393,7 @@ static int32_t RegisterScanCallback(int32_t *scannerId, const SoftbusScanCallbac
|
||||
continue;
|
||||
}
|
||||
int ret = BleRegisterScanCallbacks(GetAdapterScanCallback(channelId), &g_scanChannel[channelId].scannerId);
|
||||
if ( ret != OHOS_BT_STATUS_SUCCESS) {
|
||||
if (ret != OHOS_BT_STATUS_SUCCESS) {
|
||||
DISC_LOGE(DISC_BLE_ADAPTER, "register callback failed, scannerId=%{public}u", channelId);
|
||||
SoftBusMutexUnlock(&g_scannerLock);
|
||||
return ret;
|
||||
|
@ -574,6 +574,8 @@ enum SoftBusErrNo {
|
||||
SOFTBUS_BC_ADAPTER_ASSEMBLE_FAIL,
|
||||
SOFTBUS_BC_ADAPTER_PARSE_FAIL,
|
||||
SOFTBUS_BC_ADAPTER_NOT_IN_USED_FAIL,
|
||||
SOFTBUS_BC_ADAPTER_START_ADV_FAIL,
|
||||
|
||||
/* softbus ok */
|
||||
SOFTBUS_OK = 0,
|
||||
};
|
||||
|
@ -175,7 +175,7 @@ int ServerIpcStartDiscovery(const char *pkgName, const SubscribeInfo *info)
|
||||
if (!ret) {
|
||||
DISC_LOGE(DISC_SDK, "Write pkgName failed");
|
||||
return SOFTBUS_IPC_ERR;
|
||||
}
|
||||
}
|
||||
DiscSerializer serializer = {
|
||||
.dataLen = info->dataLen,
|
||||
.freq = info->freq,
|
||||
@ -197,13 +197,13 @@ int ServerIpcStartDiscovery(const char *pkgName, const SubscribeInfo *info)
|
||||
if (!ret) {
|
||||
DISC_LOGE(DISC_SDK, "Write capability failed");
|
||||
return SOFTBUS_IPC_ERR;
|
||||
}
|
||||
}
|
||||
if (info->dataLen != 0) {
|
||||
ret = WriteString(&request, (const char *)(info->capabilityData));
|
||||
if (!ret) {
|
||||
DISC_LOGE(DISC_SDK, "Write capabilityData failed");
|
||||
return SOFTBUS_IPC_ERR;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* asynchronous invocation */
|
||||
int32_t ans = g_serverProxy->Invoke(g_serverProxy, SERVER_START_DISCOVERY, &request, NULL, NULL);
|
||||
@ -232,7 +232,7 @@ int ServerIpcStopDiscovery(const char *pkgName, int subscribeId)
|
||||
if (!ret) {
|
||||
DISC_LOGE(DISC_SDK, "Write pkgName failed");
|
||||
return SOFTBUS_IPC_ERR;
|
||||
}
|
||||
}
|
||||
ret = WriteInt32(&request, subscribeId);
|
||||
if (!ret) {
|
||||
DISC_LOGE(DISC_SDK, "Write subscribeId failed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user