1 /* 2 * Copyright (c) 2025 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 OS_ACCOUNT_INTERFACES_INNERKITS_OSACCOUNT_NATIVE_INCLUDE_CONSTRAINT_SUBSCRIBE_INFO_H 17 #define OS_ACCOUNT_INTERFACES_INNERKITS_OSACCOUNT_NATIVE_INCLUDE_CONSTRAINT_SUBSCRIBE_INFO_H 18 19 #include <set> 20 #include <string> 21 #include "parcel.h" 22 23 namespace OHOS { 24 namespace AccountSA { 25 class OsAccountConstraintSubscribeInfo : public Parcelable { 26 public: 27 OsAccountConstraintSubscribeInfo(); 28 OsAccountConstraintSubscribeInfo(const std::set<std::string> &constraints); 29 ~OsAccountConstraintSubscribeInfo() = default; 30 void SetConstraints(const std::set<std::string> &constraints); 31 void GetConstraints(std::set<std::string> &constraints) const; 32 bool Marshalling(Parcel &parcel) const override; 33 static OsAccountConstraintSubscribeInfo *Unmarshalling(Parcel &parcel); 34 35 private: 36 bool ReadFromParcel(Parcel &parcel); 37 private: 38 std::set<std::string> constraintSet_; 39 }; 40 } // namespace AccountSA 41 } // namespace OHOS 42 #endif // OS_ACCOUNT_INTERFACES_INNERKITS_OSACCOUNT_NATIVE_INCLUDE_CONSTRAINT_SUBSCRIBE_INFO_H