• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 OHOS_DP_DEVICE_ICON_INFO_H
17 #define OHOS_DP_DEVICE_ICON_INFO_H
18 
19 #include <string>
20 #include <vector>
21 
22 #include "dp_parcel.h"
23 
24 namespace OHOS {
25 namespace DistributedDeviceProfile {
26 class DeviceIconInfo : public DpParcel {
27 public:
DeviceIconInfo()28     DeviceIconInfo()
29         : id_(0),
30         productId_(""),
31         internalModel_(""),
32         subProductId_(""),
33         imageType_(""),
34         specName_("")
35     {}
36     ~DeviceIconInfo() = default;
37     int32_t GetId() const;
38     void SetId(const int32_t id);
39     std::string GetProductId() const;
40     void SetProductId(const std::string& productId);
41     std::string GetSubProductId() const;
42     void SetSubProductId(const std::string& subProductId);
43     std::string GetInternalModel() const;
44     void SetInternalModel(const std::string& internalModel);
45     std::string GetImageType() const;
46     void SetImageType(const std::string& imageType);
47     std::string GetSpecName() const;
48     void SetSpecName(const std::string& specName);
49     std::string GetVersion() const;
50     void SetVersion(const std::string& version);
51     std::string GetWiseVersion() const;
52     void SetWiseVersion(const std::string& wiseVersion);
53     std::string GetUrl() const;
54     void SetUrl(const std::string& url);
55     std::vector<uint8_t> GetIcon() const;
56     void SetIcon(const std::vector<uint8_t>& icon);
57     bool Marshalling(MessageParcel& parcel) const override;
58     bool UnMarshalling(MessageParcel& parcel) override;
59     bool operator!=(const DeviceIconInfo& other) const;
60     std::string dump() const override;
61 
62 private:
63     int32_t id_;
64     std::string productId_;
65     std::string internalModel_;
66     std::string subProductId_;
67     std::string imageType_;
68     std::string specName_;
69     std::string version_;
70     std::string wiseVersion_;
71     std::string url_;
72     std::vector<uint8_t> icon_;
73 };
74 } // namespace DistributedDeviceProfile
75 } // namespace OHOS
76 #endif //OHOS_DP_DEVICE_ICON_INFO_H
77