• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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 OHOS_DP_PROFILE_SYSTEM_INFO_COLLECTOR_H
17 #define OHOS_DP_PROFILE_SYSTEM_INFO_COLLECTOR_H
18 
19 #include <string>
20 #include <map>
21 
22 #include "collector.h"
23 #include "device_profile.h"
24 
25 namespace OHOS {
26 namespace DistributedDeviceProfile {
27 class SystemInfoCollector : public Collector {
28 public:
29     bool ConvertToProfile(DeviceProfile& profile) override;
30 
31 private:
32     const std::map<std::string, std::string> deviceTypeMap = {
33         {TYPE_UNKNOWN, "00A"},
34         {TYPE_PHONE, "00E"},
35         {TYPE_PAD, "011"},
36         {TYPE_TV, "09C"},
37         {TYPE_CAR, "083"},
38         {TYPE_WATCH, "06D"},
39         {TYPE_PC, "00C"},
40         {TYPE_2IN1, "A2F"}
41     };
42     int32_t GetOsType();
43     int32_t GetProtType();
44     std::string GetOsVersion();
45     std::string GetDeviceName();
46     std::string GetProductId();
47     std::string GetProductName();
48     std::string GetSn();
49     std::string GetDeviceModel();
50     std::string GetDevType();
51     std::string GetDeviceManufacturer();
52     std::string GetDeviceTypeId();
53     std::string GetSubProductId();
54 };
55 } // namespace DeviceProfile
56 } // namespace OHOS
57 #endif // OHOS_DP_PROFILE_SYSTEM_INFO_COLLECTOR_H
58