* 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.
*/
#ifndef OHOS_DM_SUBSCRIBE_INFO_H
#define OHOS_DM_SUBSCRIBE_INFO_H
#include <stdbool.h>
#define DM_MAX_DEVICE_CAPABILITY_LEN 65
namespace OHOS {
namespace DistributedHardware {
typedef enum DmDiscoverMode {
DM_DISCOVER_MODE_PASSIVE = 0x55,
DM_DISCOVER_MODE_ACTIVE = 0xAA
} DmDiscoverMode;
typedef enum DmExchangeMedium {
DM_AUTO = 0,
DM_BLE = 1,
DM_COAP = 2,
DM_USB = 3,
DM_MEDIUM_BUTT
} DmExchangeMedium;
* @brief Enumerates frequencies for publishing services.
*
* This enumeration applies only to Bluetooth and is not supported currently.
*/
typedef enum DmExchangeFreq {
DM_LOW = 0,
DM_MID = 1,
DM_HIGH = 2,
DM_SUPER_HIGH = 3,
DM_FREQ_BUTT
} DmExchangeFreq;
typedef struct DmSubscribeInfo {
uint16_t subscribeId;
DmDiscoverMode mode;
DmExchangeMedium medium;
DmExchangeFreq freq;
bool isSameAccount;
bool isWakeRemote;
char capability[DM_MAX_DEVICE_CAPABILITY_LEN];
} DmSubscribeInfo;
}
}
#endif