• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef INTERFACES_INNER_API_DEVICE_INFO_INCLUDE_DEVICE_INFO_PROXY_H
17 #define INTERFACES_INNER_API_DEVICE_INFO_INCLUDE_DEVICE_INFO_PROXY_H
18 #include "enterprise_device_mgr_proxy.h"
19 
20 namespace OHOS {
21 namespace EDM {
22 class DeviceInfoProxy {
23 public:
24     DeviceInfoProxy();
25     ~DeviceInfoProxy();
26     static std::shared_ptr<DeviceInfoProxy> GetDeviceInfoProxy();
27     int32_t GetDeviceSerial(MessageParcel &data, std::string &info);
28     int32_t GetDisplayVersion(MessageParcel &data, std::string &info);
29     int32_t GetDeviceName(MessageParcel &data, std::string &info);
30     int32_t GetDeviceInfo(MessageParcel &data, const std::string &label, int policyCode, std::string &info);
31 private:
32     static std::shared_ptr<DeviceInfoProxy> instance_;
33     static std::once_flag flag_;
34 };
35 } // namespace EDM
36 } // namespace OHOS
37 
38 #endif // INTERFACES_INNER_API_DEVICE_INFO_INCLUDE_DEVICE_INFO_PROXY_H
39