1 /*
2  * Copyright (c) 2021-2023 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 RS_SCREEN_PROPS
17 #define RS_SCREEN_PROPS
18 
19 #include <cstdint>
20 #include <parcel.h>
21 #include <refbase.h>
22 #include <string>
23 
24 #include "common/rs_macros.h"
25 #include "screen_manager/screen_types.h"
26 
27 namespace OHOS {
28 namespace Rosen {
29 class RSB_EXPORT RSScreenProps : public Parcelable {
30 public:
31     RSScreenProps() = default;
32     RSScreenProps(std::string propName, uint32_t propId, uint64_t value);
33     ~RSScreenProps() = default;
34     [[nodiscard]] static RSScreenProps* Unmarshalling(Parcel &parcel);
35     bool Marshalling(Parcel &parcel) const override;
36 
37     void SetPropertyName(const std::string& propName);
38     void SetPropId(uint32_t propId);
39     void SetValue(uint64_t value);
40 
41     const std::string& GetPropertyName() const;
42     uint32_t GetPropId() const;
43     uint64_t GetValue() const;
44 
45 private:
46     std::string propName_;
47     uint32_t propId_;
48     uint64_t value_;
49 };
50 } // namespace Rosen
51 } // namespace OHOS
52 #endif // RS_SCREEN_PROPS