1 /*
2  * Copyright (C) 2022 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 ACCESSIBILITY_ABILITY_MANAGER_CONFIG_OBSERVER_STUB_H
17 #define ACCESSIBILITY_ABILITY_MANAGER_CONFIG_OBSERVER_STUB_H
18 
19 #include "i_accessible_ability_manager_config_observer.h"
20 #include "iremote_stub.h"
21 
22 namespace OHOS {
23 namespace Accessibility {
24 class AccessibleAbilityManagerConfigObserverStub : public IRemoteStub<IAccessibleAbilityManagerConfigObserver> {
25 public:
26     /**
27      * @brief construct function
28      * @param object The object of IPC
29      */
30     AccessibleAbilityManagerConfigObserverStub();
31 
32     /**
33      * @brief destruct function
34      */
35     virtual ~AccessibleAbilityManagerConfigObserverStub() = default;
36 
37     /**
38      * @brief Receive the event from proxy by IPC mechanism.
39      * @param code The code is matched with the process function.
40      * @param data The data of process communication
41      * @param reply The response of IPC request
42      * @param option The option parameter of IPC,such as: async,sync
43      */
44     int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
45         MessageOption &option) override;
46 
47 private:
48     /**
49      * @brief Handle the IPC request for the function:HandleOnConfigStateChanged.
50      * @param data The data of process communication
51      * @param reply The response of IPC request
52      * @return NO_ERROR: successful; otherwise is failed.
53      */
54     ErrCode HandleOnConfigStateChanged(MessageParcel &data, MessageParcel &reply);
55     ErrCode HandleOnAudioBalanceChanged(MessageParcel &data, MessageParcel &reply);
56     ErrCode HandleOnBrightnessDiscountChanged(MessageParcel &data, MessageParcel &reply);
57     ErrCode HandleOnContentTimeoutChanged(MessageParcel &data, MessageParcel &reply);
58     ErrCode HandleOnDaltonizationColorFilterChanged(MessageParcel &data, MessageParcel &reply);
59     ErrCode HandleOnMouseAutoClickChanged(MessageParcel &data, MessageParcel &reply);
60     ErrCode HandleOnShortkeyTargetChanged(MessageParcel &data, MessageParcel &reply);
61     ErrCode HandleOnShortkeyMultiTargetChanged(MessageParcel &data, MessageParcel &reply);
62     ErrCode HandleOnClickResponseTimeChanged(MessageParcel &data, MessageParcel &reply);
63     ErrCode HandleOnIgnoreRepeatClickTimeChanged(MessageParcel &data, MessageParcel &reply);
64 };
65 } // namespace Accessibility
66 } // namespace OHOS
67 #endif // ACCESSIBILITY_ABILITY_MANAGER_CONFIG_OBSERVER_STUB_H