1 /* 2 * Copyright (C) 2025 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 19 #ifdef CHRE_BLE_SOCKET_SUPPORT_ENABLED 20 21 #include "chre/core/ble_l2cap_coc_socket_data.h" 22 #include "chre_api/chre.h" 23 24 namespace chre { 25 26 /** 27 * Manages offloaded BLE sockets. Handles sending packets between nanoapps and 28 * BLE sockets. 29 */ 30 class BleSocketManager : public NonCopyable { 31 public: socketConnected(const BleL2capCocSocketData &)32 chreError socketConnected(const BleL2capCocSocketData & /* socketData */) { 33 return CHRE_ERROR_NOT_SUPPORTED; 34 } 35 acceptBleSocket(uint64_t)36 bool acceptBleSocket(uint64_t /*socketId*/) { 37 return false; 38 } 39 sendBleSocketPacket(uint64_t,const void *,uint16_t,chreBleSocketPacketFreeFunction *)40 int32_t sendBleSocketPacket( 41 uint64_t /*socketId*/, const void * /*data*/, uint16_t /*length*/, 42 chreBleSocketPacketFreeFunction * /*freeCallback*/) { 43 return CHRE_ERROR_NOT_SUPPORTED; 44 } 45 }; 46 47 } // namespace chre 48 49 #endif // CHRE_BLE_SOCKET_SUPPORT_ENABLED 50