• 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 #ifndef MOCK_OHOS_ABILITY_BASE_WANT_PARAMS_H
16 #define MOCK_OHOS_ABILITY_BASE_WANT_PARAMS_H
17 
18 #include <unistd.h>
19 
20 #include "parcel.h"
21 #include "refbase.h"
22 #include "string_wrapper.h"
23 
24 namespace OHOS {
25 namespace AAFwk {
26 enum ScreenMode : int8_t {
27     IDLE_SCREEN_MODE = -1,
28     JUMP_SCREEN_MODE = 0,
29     EMBEDDED_FULL_SCREEN_MODE = 1,
30     EMBEDDED_HALF_SCREEN_MODE = 2
31 };
32 constexpr const char* SCREEN_MODE_KEY = "ohos.extra.param.key.showMode";
33 
34 class WantParams final : public Parcelable {
35 public:
36     WantParams() = default;
WantParams(const WantParams & wantParams)37     WantParams(const WantParams &wantParams) {}
~WantParams()38     ~WantParams() {}
39     WantParams &operator=(const WantParams &other)
40     {
41         return *this;
42     }
43 
SetParam(const std::string & key,int value)44     void SetParam(const std::string &key, int value) {}
45 
GetStringParam(const std::string & key)46     std::string GetStringParam(const std::string& key) const
47     {
48         return "";
49     }
50 
Size()51     int Size() const
52     {
53         return 0;
54     }
55 
Marshalling(Parcel & parcel)56     virtual bool Marshalling(Parcel &parcel) const
57     {
58         return false;
59     }
60 
61     static WantParams *Unmarshalling(Parcel &parcel, int depth = 1)
62     {
63         return nullptr;
64     }
65 };
66 }  // namespace AAFwk
67 }  // namespace OHOS
68 #endif
69