1 /*
2  * Copyright (c) 2024 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 BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_SWING_CALLBACK_PROXY_H
16 #define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_SWING_CALLBACK_PROXY_H
17 #ifdef NOTIFICATION_SMART_REMINDER_SUPPORTED
18 
19 #include "distributed_notification_service_ipc_interface_code.h"
20 #include "swing_callback_interface.h"
21 #include "iremote_proxy.h"
22 
23 namespace OHOS {
24 namespace Notification {
25 /**
26  * @class SwingCallBackProxy
27  * SwingCallBack proxy.
28  */
29 class SwingCallBackProxy : public IRemoteProxy<ISwingCallBack> {
30 public:
SwingCallBackProxy(const sptr<IRemoteObject> & impl)31     explicit SwingCallBackProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<ISwingCallBack>(impl)
32     {}
33 
~SwingCallBackProxy()34     virtual ~SwingCallBackProxy()
35     {}
36 
37     /**
38      * OnUpdateStatus, update status.
39      *
40      * @param isEnable enable swing.
41      * @param triggerMode trigger mode.
42      * @return Returns true success, false fail.
43      */
44     int32_t OnUpdateStatus(bool isEnable, int triggerMode) override;
45 
46 private:
47     static inline BrokerDelegator<SwingCallBackProxy> delegator_;
48 };
49 }  // namespace Notification
50 }  // namespace OHOS
51 #endif  // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_SWING_CALLBACK_PROXY_H
52 #endif