mirror of
https://gitee.com/openharmony/startup_init
synced 2024-12-03 08:21:46 +00:00
d7af296049
Signed-off-by: zhaohaoran <zhaohaoran9@huawei.com> Change-Id: I08d8408f0052af5b38694b61bb87b7a67918f775
60 lines
1.8 KiB
C++
60 lines
1.8 KiB
C++
/*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef OHOS_SYSTEM_IDEVICEID_H
|
|
#define OHOS_SYSTEM_IDEVICEID_H
|
|
|
|
#include <iostream>
|
|
#include "beget_ext.h"
|
|
#include "iremote_broker.h"
|
|
#include "iremote_proxy.h"
|
|
|
|
namespace OHOS {
|
|
namespace device_info {
|
|
class IDeviceInfo : public OHOS::IRemoteBroker {
|
|
public:
|
|
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.system.IDeviceInfo");
|
|
|
|
virtual int32_t GetUdid(std::string& result) = 0;
|
|
virtual int32_t GetSerialID(std::string& result) = 0;
|
|
|
|
static constexpr int ERR_FAIL = -1;
|
|
};
|
|
} // namespace device_info
|
|
} // namespace OHOS
|
|
|
|
#ifndef DINFO_DOMAIN
|
|
#define DINFO_DOMAIN (BASE_DOMAIN + 8)
|
|
#endif
|
|
|
|
#ifndef DINFO_TAG
|
|
#define DINFO_TAG "DeviceInfoKits"
|
|
#endif
|
|
|
|
#define DINFO_LOGI(fmt, ...) STARTUP_LOGI(DINFO_DOMAIN, DINFO_TAG, fmt, ##__VA_ARGS__)
|
|
#define DINFO_LOGE(fmt, ...) STARTUP_LOGE(DINFO_DOMAIN, DINFO_TAG, fmt, ##__VA_ARGS__)
|
|
#define DINFO_LOGV(fmt, ...) STARTUP_LOGV(DINFO_DOMAIN, DINFO_TAG, fmt, ##__VA_ARGS__)
|
|
|
|
#define DINFO_CHECK(ret, exper, ...) \
|
|
if (!(ret)) { \
|
|
DINFO_LOGE(__VA_ARGS__); \
|
|
exper; \
|
|
}
|
|
#define DINFO_ONLY_CHECK(ret, exper, ...) \
|
|
if (!(ret)) { \
|
|
exper; \
|
|
}
|
|
|
|
#endif // OHOS_SYSTEM_IDEVICEID_H
|