• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 MOCK_OHOS_ABILITY_BASE_CONFIGURATION_H
17 #define MOCK_OHOS_ABILITY_BASE_CONFIGURATION_H
18 
19 #include <mutex>
20 #include <set>
21 #include <string>
22 #include <vector>
23 #include "parcel.h"
24 
25 namespace OHOS {
26 namespace AppExecFwk {
27 class Configuration final: public Parcelable {
28 public:
29     Configuration();
30 
CompareDifferent(std::vector<std::string> & diffKeyV,const Configuration & other)31     void CompareDifferent(std::vector<std::string> &diffKeyV, const Configuration &other) {}
32 
Merge(const std::vector<std::string> & diffKeyV,const Configuration & other)33     void Merge(const std::vector<std::string> &diffKeyV, const Configuration &other) {}
34 
AddItem(int displayId,const std::string & key,const std::string & value)35     bool AddItem(int displayId, const std::string &key, const std::string &value)
36     {
37         return false;
38     }
39 
GetItem(int displayId,const std::string & key)40     std::string GetItem(int displayId, const std::string &key) const
41     {
42         return "";
43     }
44 
RemoveItem(int displayId,const std::string & key)45     int RemoveItem(int displayId, const std::string &key)
46     {
47         return 0;
48     }
49 
AddItem(const std::string & key,const std::string & value)50     bool AddItem(const std::string &key, const std::string &value)
51     {
52         return false;
53     }
54 
GetItem(const std::string & key)55     std::string GetItem(const std::string &key) const
56     {
57         return "";
58     }
59 
RemoveItem(const std::string & key)60     int RemoveItem(const std::string &key)
61     {
62         return 0;
63     }
64 
GetItemSize()65     int GetItemSize() const
66     {
67         return 0;
68     }
69 
GetName()70     const std::string GetName() const
71     {
72         return "";
73     }
74 
ReadFromParcel(Parcel & parcel)75     bool ReadFromParcel(Parcel &parcel)
76     {
77         return false;
78     }
79 
Marshalling(Parcel & parcel)80     virtual bool Marshalling(Parcel &parcel) const override
81     {
82         return false;
83     }
84 
Unmarshalling(Parcel & parcel)85     static Configuration *Unmarshalling(Parcel &parcel)
86     {
87         return nullptr;
88     }
89 
FilterDuplicates(const Configuration & other)90     void FilterDuplicates(const Configuration &other) {}
91 };
92 }  // namespace AppExecFwk
93 }  // namespace OHOS
94 #endif  // OHOS_ABILITY_BASE_CONFIGURATION_H
95