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 16 /** 17 * @addtogroup Graphic 18 * @{ 19 * 20 * @brief Defines a lightweight graphics system that provides basic UI and container views, 21 * including buttons, images, labels, lists, animators, scroll views, swipe views, and layouts. 22 * This system also provides the Design for X (DFX) capability to implement features such as 23 * view rendering, animation, and input event distribution. 24 * 25 * @since 1.0 26 * @version 1.0 27 */ 28 29 /** 30 * @file gatt_client_profile.h 31 * 32 * @brief Declares function of gatt client definition. 33 * 34 * @since 1.0 35 * @version 1.0 36 */ 37 #ifndef GATT_SERVER_PROFILE_CALLBACK_H 38 #define GATT_SERVER_PROFILE_CALLBACK_H 39 40 namespace OHOS { 41 namespace bluetooth { 42 class GattServerProfileCallback { 43 public: OnExchangeMtuEvent(uint16_t connectHandle,uint16_t rxMtu)44 virtual void OnExchangeMtuEvent(uint16_t connectHandle, uint16_t rxMtu){}; OnReadCharacteristicValueEvent(uint16_t connectHandle,uint16_t valueHandle)45 virtual void OnReadCharacteristicValueEvent(uint16_t connectHandle, uint16_t valueHandle){}; OnReadUsingCharacteristicUuidEvent(uint16_t connectHandle,uint16_t valueHandle)46 virtual void OnReadUsingCharacteristicUuidEvent(uint16_t connectHandle, uint16_t valueHandle){}; ReadBlobValueEvent(uint16_t connectHandle,uint16_t valueHandle)47 virtual void ReadBlobValueEvent(uint16_t connectHandle, uint16_t valueHandle){}; OnMultipleCharacteristicValueEvent(uint16_t connectHandle,GattValue & value,size_t len)48 virtual void OnMultipleCharacteristicValueEvent(uint16_t connectHandle, GattValue &value, size_t len){}; OnWriteWithoutResponseEvent(uint16_t connectHandle,uint16_t valueHandle,GattValue & value,size_t len)49 virtual void OnWriteWithoutResponseEvent( 50 uint16_t connectHandle, uint16_t valueHandle, GattValue &value, size_t len){}; OnWriteCharacteristicValueEvent(uint16_t connectHandle,uint16_t valueHandle,GattValue & value,size_t len)51 virtual void OnWriteCharacteristicValueEvent( 52 uint16_t connectHandle, uint16_t valueHandle, GattValue &value, size_t len){}; OnPrepareWriteValueEvent(uint16_t connectHandle,uint16_t valueHandle,uint16_t offset,GattValue & value,size_t len)53 virtual void OnPrepareWriteValueEvent( 54 uint16_t connectHandle, uint16_t valueHandle, uint16_t offset, GattValue &value, size_t len){}; OnExecuteWriteValueEvent(uint16_t connectHandle,bool flag)55 virtual void OnExecuteWriteValueEvent(uint16_t connectHandle, bool flag){}; OnIndicationEvent(uint16_t connectHandle,uint16_t valueHandle,int result)56 virtual void OnIndicationEvent(uint16_t connectHandle, uint16_t valueHandle, int result){}; OnReliableWriteEvent(uint16_t connectHandle,uint16_t valueHandle,GattValue & value,size_t len)57 virtual void OnReliableWriteEvent(uint16_t connectHandle, uint16_t valueHandle, GattValue &value, size_t len){}; OnExecuteWriteEvent(uint16_t connectHandle,uint16_t valueHandle,int state)58 virtual void OnExecuteWriteEvent(uint16_t connectHandle, uint16_t valueHandle, int state){}; OnDescriptorReadEvent(uint16_t connectHandle,uint16_t valueHandle)59 virtual void OnDescriptorReadEvent(uint16_t connectHandle, uint16_t valueHandle){}; OnDescriptorWriteEvent(uint16_t connectHandle,uint16_t valueHandle,GattValue & value,size_t len)60 virtual void OnDescriptorWriteEvent(uint16_t connectHandle, uint16_t valueHandle, GattValue &value, size_t len){}; 61 ~GattServerProfileCallback()62 virtual ~GattServerProfileCallback() 63 {} 64 }; 65 } // namespace bluetooth 66 } // namespace OHOS 67 68 #endif // GATT_SERVER_PROFILE_CALLBACK_H 69