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 OHOS_BLUETOOTH_STANDARD_MAP_MCE_PROXY_H 17 #define OHOS_BLUETOOTH_STANDARD_MAP_MCE_PROXY_H 18 19 #include "iremote_proxy.h" 20 #include "i_bluetooth_map_mce.h" 21 22 namespace OHOS { 23 namespace Bluetooth { 24 class BluetoothMapMceProxy : public IRemoteProxy<IBluetoothMapMce> { 25 public: BluetoothMapMceProxy(const sptr<IRemoteObject> & impl)26 explicit BluetoothMapMceProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<IBluetoothMapMce>(impl) 27 {} ~BluetoothMapMceProxy()28 ~BluetoothMapMceProxy() 29 {} 30 31 void RegisterObserver(const sptr<IBluetoothMapMceObserver> &observer) override; 32 void DeregisterObserver(const sptr<IBluetoothMapMceObserver> &observer) override; 33 int Connect(const BluetoothRawAddress &device) override; 34 int Disconnect(const BluetoothRawAddress &device) override; 35 int IsConnected(const BluetoothRawAddress &device) override; 36 void GetConnectDevices(std::vector<BluetoothRawAddress> &devices) override; 37 void GetDevicesByStates(const std::vector<int32_t> &statusList, std::vector<BluetoothRawAddress> &devices) override; 38 int GetConnectionState(const BluetoothRawAddress &device) override; 39 int SetConnectionStrategy(const BluetoothRawAddress &device, int32_t strategy) override; 40 int GetConnectionStrategy(const BluetoothRawAddress &device) override; 41 int GetUnreadMessages(const BluetoothRawAddress &device, const int32_t msgType, const int32_t max) override; 42 int GetSupportedFeatures(const BluetoothRawAddress &device) override; 43 int SendMessage(const BluetoothRawAddress &device, const BluetoothIProfileSendMessageParameters &msg) override; 44 int SetNotificationFilter(const BluetoothRawAddress &device, int32_t mask) override; 45 int GetMessagesListing(const BluetoothRawAddress &device, 46 const BluetoothIProfileGetMessagesListingParameters ¶) override; 47 int GetMessage(const BluetoothRawAddress &device, int32_t msgType, 48 const std::u16string &msgHandle, const BluetoothIProfileGetMessageParameters ¶) override; 49 int UpdateInbox(const BluetoothRawAddress &device, int32_t msgType) override; 50 int GetConversationListing(const BluetoothRawAddress &device, 51 const BluetoothIProfileGetConversationListingParameters ¶) override; 52 int SetMessageStatus(const BluetoothRawAddress &device, int32_t msgType, const std::u16string &msgHandle, 53 int32_t statusIndicator, int32_t statusValue, const std::string &extendedData) override; 54 int SetOwnerStatus(const BluetoothRawAddress &device, 55 const BluetoothIProfileSetOwnerStatusParameters ¶) override; 56 int GetOwnerStatus(const BluetoothRawAddress &device, const std::string &conversationId) override; 57 BluetoothIProfileMasInstanceInfoList GetMasInstanceInfo(const BluetoothRawAddress &device) override; 58 59 private: 60 static inline BrokerDelegator<BluetoothMapMceProxy> delegator_; 61 }; 62 } // namespace Bluetooth 63 } // namespace OHOS 64 #endif // OHOS_BLUETOOTH_STANDARD_MAP_MCE_PROXY_H 65