• 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_PRODUCT_INFO_H
17 #define OHOS_DP_PRODUCT_INFO_H
18 
19 #include <string>
20 #include <vector>
21 
22 #include "dp_parcel.h"
23 
24 namespace OHOS {
25 namespace DistributedDeviceProfile {
26 class ProductInfo : public DpParcel {
27 public:
ProductInfo()28     ProductInfo() : productId_(""),
29         model_(""),
30         productName_(""),
31         productShortName_(""),
32         imageVersion_("")
33     {}
34     ~ProductInfo() = default;
35 
36     std::string GetProductId() const;
37     void SetProductId(const std::string& productId);
38     std::string GetModel() const;
39     void SetModel(const std::string& model);
40     std::string GetProductName() const;
41     void SetProductName(const std::string& productName);
42     std::string GetProductShortName() const;
43     void SetProductShortName(const std::string& productShortName);
44     std::string GetImageVersion() const;
45     void SetImageVersion(const std::string& imageVersion);
46     bool Marshalling(MessageParcel& parcel) const override;
47     bool UnMarshalling(MessageParcel& parcel) override;
48     bool operator!=(const ProductInfo& other) const;
49     std::string dump() const override;
50 
51 private:
52     std::string GetAnonyProductName(const std::string& value) const;
53 
54     std::string productId_;
55     std::string model_;
56     std::string productName_;
57     std::string productShortName_;
58     std::string imageVersion_;
59 };
60 } // namespace DistributedDeviceProfile
61 } // namespace OHOS
62 #endif //OHOS_DP_PRODUCT_INFO_H
63