blob: 16a3167bf550d1cea3d04eac36bf4a87500f7838 [file] [log] [blame]
Thomas Nguyen7ea5df62022-11-28 16:41:46 -08001/*
2 * Copyright (C) 2022 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 <libradiocompat/RadioSatellite.h>
18
19#include "commonStructs.h"
20#include "debug.h"
21
22#include "collections.h"
23
24#define RADIO_MODULE "RadioSatellite"
25
26namespace android::hardware::radio::compat {
27
28using ::ndk::ScopedAStatus;
29namespace aidl = ::aidl::android::hardware::radio::satellite;
30constexpr auto ok = &ScopedAStatus::ok;
31
32std::shared_ptr<aidl::IRadioSatelliteResponse> RadioSatellite::respond() {
33 return mCallbackManager->response().satelliteCb();
34}
35
36ScopedAStatus RadioSatellite::responseAcknowledgement() {
37 LOG(ERROR) << " responseAcknowledgement is unsupported by HIDL HALs";
38 return ok();
39}
40ScopedAStatus RadioSatellite::getCapabilities(int32_t serial) {
41 LOG_CALL << serial;
42 LOG(ERROR) << " getCapabilities is unsupported by HIDL HALs";
43 return ok();
44}
45ScopedAStatus RadioSatellite::setPower(int32_t serial, bool /*on*/) {
46 LOG_CALL << serial;
47 LOG(ERROR) << " setPower is unsupported by HIDL HALs";
48 return ok();
49}
50ScopedAStatus RadioSatellite::getPowerState(int32_t serial) {
51 LOG_CALL << serial;
52 LOG(ERROR) << " getPowerSate is unsupported by HIDL HALs";
53 return ok();
54}
55ScopedAStatus RadioSatellite::provisionService(
56 int32_t serial, const std::string& /*imei*/, const std::string& /*msisdn*/,
57 const std::string& /*imsi*/,
58 const std::vector<
59 ::aidl::android::hardware::radio::satellite::SatelliteFeature>& /*features*/) {
60 LOG_CALL << serial;
61 LOG(ERROR) << " provisionService is unsupported by HIDL HALs";
62 return ok();
63}
64ScopedAStatus RadioSatellite::addAllowedSatelliteContacts(
65 int32_t serial, const std::vector<std::string>& /*contacts*/) {
66 LOG_CALL << serial;
67 LOG(ERROR) << " addAllowedSatelliteContacts is unsupported by HIDL HALs";
68 return ok();
69}
70ScopedAStatus RadioSatellite::removeAllowedSatelliteContacts(
71 int32_t serial, const std::vector<std::string>& /*contacts*/) {
72 LOG_CALL << serial;
73 LOG(ERROR) << " removeAllowedSatelliteContacts is unsupported by HIDL HALs";
74 return ok();
75}
76ScopedAStatus RadioSatellite::sendMessages(int32_t serial,
77 const std::vector<std::string>& /*messages*/,
78 const std::string& /*destination*/, double /*latitude*/,
79 double /*longitude*/) {
80 LOG_CALL << serial;
81 LOG(ERROR) << " sendMessage is unsupported by HIDL HALs";
82 return ok();
83}
84ScopedAStatus RadioSatellite::getPendingMessages(int32_t serial) {
85 LOG_CALL << serial;
86 LOG(ERROR) << " getPendingMessages is unsupported by HIDL HALs";
87 return ok();
88}
89ScopedAStatus RadioSatellite::getSatelliteMode(int32_t serial) {
90 LOG_CALL << serial;
91 LOG(ERROR) << " getSatelliteMode is unsupported by HIDL HALs";
92 return ok();
93}
94ScopedAStatus RadioSatellite::setIndicationFilter(int32_t serial, int32_t /*filterBitmask*/) {
95 LOG_CALL << serial;
96 LOG(ERROR) << " setIndicationFilter is unsupported by HIDL HALs";
97 return ok();
98}
99ScopedAStatus RadioSatellite::startSendingSatellitePointingInfo(int32_t serial) {
100 LOG_CALL << serial;
101 LOG(ERROR) << " startSendingSatellitePointingInfo is unsupported by HIDL HALs";
102 return ok();
103}
104ScopedAStatus RadioSatellite::stopSendingSatellitePointingInfo(int32_t serial) {
105 LOG_CALL << serial;
106 LOG(ERROR) << " stopSendingSatellitePointingInfo is unsupported by HIDL HALs";
107 return ok();
108}
109ScopedAStatus RadioSatellite::getMaxCharactersPerTextMessage(int32_t serial) {
110 LOG_CALL << serial;
111 LOG(ERROR) << " getMaxCharactersPerTextMessage is unsupported by HIDL HALs";
112 return ok();
113}
114ScopedAStatus RadioSatellite::getTimeForNextSatelliteVisibility(int32_t serial) {
115 LOG_CALL << serial;
116 LOG(ERROR) << " getTimeForNextSatelliteVisibility is unsupported by HIDL HALs";
117 return ok();
118}
119
120ScopedAStatus RadioSatellite::setResponseFunctions(
121 const std::shared_ptr<aidl::IRadioSatelliteResponse>& response,
122 const std::shared_ptr<aidl::IRadioSatelliteIndication>& indication) {
123 LOG_CALL << response << ' ' << indication;
124 mCallbackManager->setResponseFunctions(response, indication);
125 return ok();
126}
127
128} // namespace android::hardware::radio::compat