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_SMS_PROXY_H 17 #define SATELLITE_SMS_PROXY_H 18 19 #include "satellite/i_satellite_sms_service.h" 20 21 namespace OHOS { 22 namespace Telephony { 23 class SatelliteSmsProxy : public IRemoteProxy<ISatelliteSmsService> { 24 public: SatelliteSmsProxy(const sptr<IRemoteObject> & impl)25 explicit SatelliteSmsProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<ISatelliteSmsService>(impl) {} 26 virtual ~SatelliteSmsProxy() = default; 27 28 int32_t RegisterSmsNotify(int32_t slotId, int32_t what, const sptr<ISatelliteSmsCallback> &callback) override; 29 int32_t UnRegisterSmsNotify(int32_t slotId, int32_t what) override; 30 31 int32_t SendSms(int32_t slotId, int32_t eventId, SatelliteMessage &message) override; 32 int32_t SendSmsMoreMode(int32_t slotId, int32_t eventId, SatelliteMessage &message) override; 33 int32_t SendSmsAck(int32_t slotId, int32_t eventId, bool success, int32_t cause) override; 34 35 private: 36 bool WriteInterfaceToken(MessageParcel &data); 37 38 private: 39 static inline BrokerDelegator<SatelliteSmsProxy> delegator_; 40 }; 41 } // namespace Telephony 42 } // namespace OHOS 43 #endif // SATELLITE_SMS_PROXY_H 44