1 /* 2 * Copyright (C) 2017 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 #include "chre/platform/host_link.h" 18 #include "chre/core/event_loop_manager.h" 19 20 namespace chre { 21 flushMessagesSentByNanoapp(uint64_t)22void HostLink::flushMessagesSentByNanoapp(uint64_t /* appId */) { 23 // (empty) 24 } 25 sendMessage(const MessageToHost * message)26bool HostLink::sendMessage(const MessageToHost *message) { 27 // Just drop the message since we do not have a real host to send the message 28 EventLoopManagerSingleton::get() 29 ->getHostCommsManager() 30 .onMessageToHostComplete(message); 31 return true; 32 } 33 sendMessageDeliveryStatus(uint32_t,uint8_t)34bool HostLink::sendMessageDeliveryStatus(uint32_t /* messageSequenceNumber */, 35 uint8_t /* errorCode */) { 36 // Just drop the message delivery status since we do not have a 37 // real host to send the status 38 return true; 39 } 40 sendNanConfiguration(bool enable)41void HostLinkBase::sendNanConfiguration(bool enable) { 42 #if defined(CHRE_WIFI_SUPPORT_ENABLED) && defined(CHRE_WIFI_NAN_SUPPORT_ENABLED) 43 EventLoopManagerSingleton::get() 44 ->getWifiRequestManager() 45 .updateNanAvailability(enable); 46 #else 47 UNUSED_VAR(enable); 48 #endif 49 } 50 51 } // namespace chre 52