1 /*
2  * Copyright (C) 2023 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 SATELLITE_SERVICE_PROXY_H
17 #define SATELLITE_SERVICE_PROXY_H
18 
19 #include "i_satellite_service.h"
20 
21 namespace OHOS {
22 namespace Telephony {
23 class SatelliteServiceProxy : public IRemoteProxy<ISatelliteService> {
24 public:
SatelliteServiceProxy(const sptr<IRemoteObject> & impl)25     explicit SatelliteServiceProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<ISatelliteService>(impl) {}
26     virtual ~SatelliteServiceProxy() = default;
27 
28     bool IsSatelliteEnabled() override;
29     int32_t RegisterCoreNotify(int32_t slotId, int32_t what, const sptr<ISatelliteCoreCallback> &callback) override;
30     int32_t UnRegisterCoreNotify(int32_t slotId, int32_t what) override;
31     int32_t SetRadioState(int32_t slotId, int32_t isRadioOn, int32_t rst) override;
32     std::string GetImei() override;
33     int32_t GetSatelliteCapability() override;
34     sptr<IRemoteObject> GetProxyObjectPtr(SatelliteServiceProxyType proxyType) override;
35 
36 private:
37     bool WriteInterfaceToken(MessageParcel &data);
38 
39 private:
40     static inline BrokerDelegator<SatelliteServiceProxy> delegator_;
41 };
42 } // namespace Telephony
43 } // namespace OHOS
44 #endif // SATELLITE_SERVICE_PROXY_H
45