1 /*
2  * Copyright (C) 2021 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 OHOS_I_WIFI_SCAN_CALLBACK_PROXY_H
16 #define OHOS_I_WIFI_SCAN_CALLBACK_PROXY_H
17 
18 #include "i_wifi_scan_callback.h"
19 #ifdef OHOS_ARCH_LITE
20 #include "serializer.h"
21 #else
22 #include "iremote_proxy.h"
23 #endif
24 
25 namespace OHOS {
26 namespace Wifi {
27 #ifdef OHOS_ARCH_LITE
28 class WifiScanCallbackProxy : public IWifiScanCallback {
29 public:
30     explicit WifiScanCallbackProxy(SvcIdentity *sid);
31 #else
32 class WifiScanCallbackProxy : public IRemoteProxy<IWifiScanCallback> {
33 public:
34     explicit WifiScanCallbackProxy(const sptr<IRemoteObject> &impl);
35 #endif
36 
37     virtual ~WifiScanCallbackProxy();
38 
39     void OnWifiScanStateChanged(int state) override;
40 
41 private:
42 #ifdef OHOS_ARCH_LITE
43     SvcIdentity sid_;
44     static const int DEFAULT_IPC_SIZE = 256;
45 #else
46     static inline BrokerDelegator<WifiScanCallbackProxy> g_delegator;
47 #endif
48 };
49 }  // namespace Wifi
50 }  // namespace OHOS
51 #endif
52