2 * Copyright (c) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #include <telephony/ril.h>
21 #include <ril_internal.h>
24 void registerService(RIL_RadioFunctions *callbacks, android::CommandInfo *commands);
26 int getIccCardStatusResponse(int slotId, int responseType,
27 int token, RIL_Errno e, void *response, size_t responselen);
29 int supplyIccPinForAppResponse(int slotId,
30 int responseType, int serial, RIL_Errno e, void *response,
33 int supplyIccPukForAppResponse(int slotId,
34 int responseType, int serial, RIL_Errno e, void *response,
37 int supplyIccPin2ForAppResponse(int slotId,
38 int responseType, int serial, RIL_Errno e, void *response,
41 int supplyIccPuk2ForAppResponse(int slotId,
42 int responseType, int serial, RIL_Errno e, void *response,
45 int changeIccPinForAppResponse(int slotId,
46 int responseType, int serial, RIL_Errno e, void *response,
49 int changeIccPin2ForAppResponse(int slotId,
50 int responseType, int serial, RIL_Errno e, void *response,
53 int supplyNetworkDepersonalizationResponse(int slotId,
54 int responseType, int serial, RIL_Errno e,
55 void *response, size_t responselen);
57 int getCurrentCallsResponse(int slotId,
58 int responseType, int serial, RIL_Errno e, void *response,
61 int dialResponse(int slotId,
62 int responseType, int serial, RIL_Errno e, void *response, size_t responselen);
64 int getIMSIForAppResponse(int slotId, int responseType,
65 int serial, RIL_Errno e, void *response, size_t responselen);
67 int hangupConnectionResponse(int slotId, int responseType,
68 int serial, RIL_Errno e, void *response, size_t responselen);
70 int hangupWaitingOrBackgroundResponse(int slotId,
71 int responseType, int serial, RIL_Errno e, void *response,
74 int hangupForegroundResumeBackgroundResponse(int slotId,
75 int responseType, int serial, RIL_Errno e,
76 void *response, size_t responselen);
78 int switchWaitingOrHoldingAndActiveResponse(int slotId,
79 int responseType, int serial, RIL_Errno e,
80 void *response, size_t responselen);
82 int conferenceResponse(int slotId, int responseType,
83 int serial, RIL_Errno e, void *response, size_t responselen);
85 int rejectCallResponse(int slotId, int responseType,
86 int serial, RIL_Errno e, void *response, size_t responselen);
88 int getLastCallFailCauseResponse(int slotId,
89 int responseType, int serial, RIL_Errno e, void *response,
92 int getSignalStrengthResponse(int slotId,
93 int responseType, int serial, RIL_Errno e,
94 void *response, size_t responseLen);
96 int getVoiceRegistrationStateResponse(int slotId,
97 int responseType, int serial, RIL_Errno e, void *response,
100 int getDataRegistrationStateResponse(int slotId,
101 int responseType, int serial, RIL_Errno e, void *response,
104 int getOperatorResponse(int slotId,
105 int responseType, int serial, RIL_Errno e, void *response,
108 int setRadioPowerResponse(int slotId,
109 int responseType, int serial, RIL_Errno e, void *response,
112 int sendDtmfResponse(int slotId,
113 int responseType, int serial, RIL_Errno e, void *response,
116 int sendSmsResponse(int slotId,
117 int responseType, int serial, RIL_Errno e, void *response,
120 int sendSMSExpectMoreResponse(int slotId,
121 int responseType, int serial, RIL_Errno e, void *response,
124 int setupDataCallResponse(int slotId,
125 int responseType, int serial, RIL_Errno e, void *response,
128 int iccIOForAppResponse(int slotId,
129 int responseType, int serial, RIL_Errno e, void *response,
132 int sendUssdResponse(int slotId,
133 int responseType, int serial, RIL_Errno e, void *response,
136 int cancelPendingUssdResponse(int slotId,
137 int responseType, int serial, RIL_Errno e, void *response,
140 int getClirResponse(int slotId,
141 int responseType, int serial, RIL_Errno e, void *response, size_t responselen);
143 int setClirResponse(int slotId,
144 int responseType, int serial, RIL_Errno e, void *response, size_t responselen);
146 int getCallForwardStatusResponse(int slotId,
147 int responseType, int serial, RIL_Errno e, void *response,
150 int setCallForwardResponse(int slotId,
151 int responseType, int serial, RIL_Errno e, void *response,
154 int getCallWaitingResponse(int slotId,
155 int responseType, int serial, RIL_Errno e, void *response,
158 int setCallWaitingResponse(int slotId,
159 int responseType, int serial, RIL_Errno e, void *response,
162 int acknowledgeLastIncomingGsmSmsResponse(int slotId,
163 int responseType, int serial, RIL_Errno e, void *response,
166 int acceptCallResponse(int slotId,
167 int responseType, int serial, RIL_Errno e, void *response,
170 int deactivateDataCallResponse(int slotId,
171 int responseType, int serial, RIL_Errno e, void *response,
174 int getFacilityLockForAppResponse(int slotId,
175 int responseType, int serial, RIL_Errno e, void *response,
178 int setFacilityLockForAppResponse(int slotId,
179 int responseType, int serial, RIL_Errno e, void *response,
182 int setBarringPasswordResponse(int slotId,
183 int responseType, int serial, RIL_Errno e, void *response,
186 int getNetworkSelectionModeResponse(int slotId,
187 int responseType, int serial, RIL_Errno e, void *response,
190 int setNetworkSelectionModeAutomaticResponse(int slotId,
191 int responseType, int serial, RIL_Errno e,
192 void *response, size_t responselen);
194 int setNetworkSelectionModeManualResponse(int slotId,
195 int responseType, int serial, RIL_Errno e, void *response,
198 int getAvailableNetworksResponse(int slotId,
199 int responseType, int serial, RIL_Errno e, void *response,
202 int startDtmfResponse(int slotId,
203 int responseType, int serial, RIL_Errno e, void *response,
206 int stopDtmfResponse(int slotId,
207 int responseType, int serial, RIL_Errno e, void *response,
210 int getBasebandVersionResponse(int slotId,
211 int responseType, int serial, RIL_Errno e, void *response,
214 int separateConnectionResponse(int slotId,
215 int responseType, int serial, RIL_Errno e, void *response,
218 int setMuteResponse(int slotId,
219 int responseType, int serial, RIL_Errno e, void *response,
222 int getMuteResponse(int slotId,
223 int responseType, int serial, RIL_Errno e, void *response,
226 int getClipResponse(int slotId,
227 int responseType, int serial, RIL_Errno e, void *response,
230 int getDataCallListResponse(int slotId,
231 int responseType, int serial, RIL_Errno e,
232 void *response, size_t responseLen);
234 int setSuppServiceNotificationsResponse(int slotId,
235 int responseType, int serial, RIL_Errno e, void *response,
238 int writeSmsToSimResponse(int slotId,
239 int responseType, int serial, RIL_Errno e, void *response,
242 int deleteSmsOnSimResponse(int slotId,
243 int responseType, int serial, RIL_Errno e, void *response,
246 int setBandModeResponse(int slotId,
247 int responseType, int serial, RIL_Errno e, void *response,
250 int getAvailableBandModesResponse(int slotId,
251 int responseType, int serial, RIL_Errno e, void *response,
254 int sendEnvelopeResponse(int slotId,
255 int responseType, int serial, RIL_Errno e, void *response,
258 int sendTerminalResponseToSimResponse(int slotId,
259 int responseType, int serial, RIL_Errno e, void *response,
262 int handleStkCallSetupRequestFromSimResponse(int slotId,
263 int responseType, int serial, RIL_Errno e,
264 void *response, size_t responselen);
266 int explicitCallTransferResponse(int slotId,
267 int responseType, int serial, RIL_Errno e, void *response,
270 int setPreferredNetworkTypeResponse(int slotId,
271 int responseType, int serial, RIL_Errno e, void *response,
274 int getPreferredNetworkTypeResponse(int slotId,
275 int responseType, int serial, RIL_Errno e, void *response,
278 int getNeighboringCidsResponse(int slotId,
279 int responseType, int serial, RIL_Errno e, void *response,
282 int setLocationUpdatesResponse(int slotId,
283 int responseType, int serial, RIL_Errno e, void *response,
286 int setCdmaSubscriptionSourceResponse(int slotId,
287 int responseType, int serial, RIL_Errno e, void *response,
290 int setCdmaRoamingPreferenceResponse(int slotId,
291 int responseType, int serial, RIL_Errno e, void *response,
294 int getCdmaRoamingPreferenceResponse(int slotId,
295 int responseType, int serial, RIL_Errno e, void *response,
298 int setTTYModeResponse(int slotId,
299 int responseType, int serial, RIL_Errno e, void *response,
302 int getTTYModeResponse(int slotId,
303 int responseType, int serial, RIL_Errno e, void *response,
306 int setPreferredVoicePrivacyResponse(int slotId,
307 int responseType, int serial, RIL_Errno e, void *response,
310 int getPreferredVoicePrivacyResponse(int slotId,
311 int responseType, int serial, RIL_Errno e, void *response,
314 int sendCDMAFeatureCodeResponse(int slotId,
315 int responseType, int serial, RIL_Errno e,
316 void *response, size_t responselen);
318 int sendBurstDtmfResponse(int slotId,
319 int responseType, int serial, RIL_Errno e, void *response,
322 int sendCdmaSmsResponse(int slotId,
323 int responseType, int serial, RIL_Errno e, void *response,
326 int acknowledgeLastIncomingCdmaSmsResponse(int slotId,
327 int responseType, int serial, RIL_Errno e, void *response,
330 int getGsmBroadcastConfigResponse(int slotId,
331 int responseType, int serial, RIL_Errno e, void *response,
334 int setGsmBroadcastConfigResponse(int slotId,
335 int responseType, int serial, RIL_Errno e, void *response,
338 int setGsmBroadcastActivationResponse(int slotId,
339 int responseType, int serial, RIL_Errno e, void *response,
342 int getCdmaBroadcastConfigResponse(int slotId,
343 int responseType, int serial, RIL_Errno e, void *response,
346 int setCdmaBroadcastConfigResponse(int slotId,
347 int responseType, int serial, RIL_Errno e, void *response,
350 int setCdmaBroadcastActivationResponse(int slotId,
351 int responseType, int serial, RIL_Errno e,
352 void *response, size_t responselen);
354 int getCDMASubscriptionResponse(int slotId,
355 int responseType, int serial, RIL_Errno e, void *response,
358 int writeSmsToRuimResponse(int slotId,
359 int responseType, int serial, RIL_Errno e, void *response,
362 int deleteSmsOnRuimResponse(int slotId,
363 int responseType, int serial, RIL_Errno e, void *response,
366 int getDeviceIdentityResponse(int slotId,
367 int responseType, int serial, RIL_Errno e, void *response,
370 int exitEmergencyCallbackModeResponse(int slotId,
371 int responseType, int serial, RIL_Errno e, void *response,
374 int getSmscAddressResponse(int slotId,
375 int responseType, int serial, RIL_Errno e, void *response,
378 int setCdmaBroadcastActivationResponse(int slotId,
379 int responseType, int serial, RIL_Errno e,
380 void *response, size_t responselen);
382 int setSmscAddressResponse(int slotId,
383 int responseType, int serial, RIL_Errno e,
384 void *response, size_t responselen);
386 int reportSmsMemoryStatusResponse(int slotId,
387 int responseType, int serial, RIL_Errno e,
388 void *response, size_t responselen);
390 int reportStkServiceIsRunningResponse(int slotId,
391 int responseType, int serial, RIL_Errno e,
392 void *response, size_t responseLen);
394 int getCdmaSubscriptionSourceResponse(int slotId,
395 int responseType, int serial, RIL_Errno e, void *response,
398 int requestIsimAuthenticationResponse(int slotId,
399 int responseType, int serial, RIL_Errno e, void *response,
402 int acknowledgeIncomingGsmSmsWithPduResponse(int slotId,
403 int responseType, int serial, RIL_Errno e,
404 void *response, size_t responselen);
406 int sendEnvelopeWithStatusResponse(int slotId,
407 int responseType, int serial, RIL_Errno e, void *response,
410 int getVoiceRadioTechnologyResponse(int slotId,
411 int responseType, int serial, RIL_Errno e,
412 void *response, size_t responselen);
414 int getCellInfoListResponse(int slotId,
416 int serial, RIL_Errno e, void *response,
419 int setCellInfoListRateResponse(int slotId,
420 int responseType, int serial, RIL_Errno e,
421 void *response, size_t responselen);
423 int setInitialAttachApnResponse(int slotId,
424 int responseType, int serial, RIL_Errno e,
425 void *response, size_t responselen);
427 int getImsRegistrationStateResponse(int slotId,
428 int responseType, int serial, RIL_Errno e,
429 void *response, size_t responselen);
431 int sendImsSmsResponse(int slotId, int responseType,
432 int serial, RIL_Errno e, void *response, size_t responselen);
434 int iccTransmitApduBasicChannelResponse(int slotId,
435 int responseType, int serial, RIL_Errno e,
436 void *response, size_t responselen);
438 int iccOpenLogicalChannelResponse(int slotId,
439 int responseType, int serial, RIL_Errno e, void *response,
443 int iccCloseLogicalChannelResponse(int slotId,
444 int responseType, int serial, RIL_Errno e,
445 void *response, size_t responselen);
447 int iccTransmitApduLogicalChannelResponse(int slotId,
448 int responseType, int serial, RIL_Errno e,
449 void *response, size_t responselen);
451 int nvReadItemResponse(int slotId,
452 int responseType, int serial, RIL_Errno e,
453 void *response, size_t responselen);
456 int nvWriteItemResponse(int slotId,
457 int responseType, int serial, RIL_Errno e,
458 void *response, size_t responselen);
460 int nvWriteCdmaPrlResponse(int slotId,
461 int responseType, int serial, RIL_Errno e,
462 void *response, size_t responselen);
464 int nvResetConfigResponse(int slotId,
465 int responseType, int serial, RIL_Errno e,
466 void *response, size_t responselen);
468 int setUiccSubscriptionResponse(int slotId,
469 int responseType, int serial, RIL_Errno e,
470 void *response, size_t responselen);
472 int setDataAllowedResponse(int slotId,
473 int responseType, int serial, RIL_Errno e,
474 void *response, size_t responselen);
476 int getHardwareConfigResponse(int slotId,
477 int responseType, int serial, RIL_Errno e,
478 void *response, size_t responseLen);
480 int requestIccSimAuthenticationResponse(int slotId,
481 int responseType, int serial, RIL_Errno e,
482 void *response, size_t responselen);
484 int setDataProfileResponse(int slotId,
485 int responseType, int serial, RIL_Errno e,
486 void *response, size_t responselen);
488 int requestShutdownResponse(int slotId,
489 int responseType, int serial, RIL_Errno e,
490 void *response, size_t responselen);
492 int getRadioCapabilityResponse(int slotId,
493 int responseType, int serial, RIL_Errno e,
494 void *response, size_t responseLen);
496 int setRadioCapabilityResponse(int slotId,
497 int responseType, int serial, RIL_Errno e,
498 void *response, size_t responseLen);
500 int startLceServiceResponse(int slotId,
501 int responseType, int serial, RIL_Errno e,
502 void *response, size_t responselen);
504 int stopLceServiceResponse(int slotId,
505 int responseType, int serial, RIL_Errno e,
506 void *response, size_t responselen);
508 int pullLceDataResponse(int slotId,
509 int responseType, int serial, RIL_Errno e,
510 void *response, size_t responseLen);
512 int getModemActivityInfoResponse(int slotId,
513 int responseType, int serial, RIL_Errno e,
514 void *response, size_t responselen);
516 int setAllowedCarriersResponse(int slotId,
517 int responseType, int serial, RIL_Errno e,
518 void *response, size_t responselen);
520 int getAllowedCarriersResponse(int slotId,
521 int responseType, int serial, RIL_Errno e,
522 void *response, size_t responselen);
524 int sendDeviceStateResponse(int slotId,
525 int responseType, int serial, RIL_Errno e,
526 void *response, size_t responselen);
528 int setIndicationFilterResponse(int slotId,
529 int responseType, int serial, RIL_Errno e,
530 void *response, size_t responselen);
532 int setSimCardPowerResponse(int slotId,
533 int responseType, int serial, RIL_Errno e,
534 void *response, size_t responselen);
536 void acknowledgeRequest(int slotId, int serial);
538 int radioStateChangedInd(int slotId,
539 int indicationType, int token, RIL_Errno e, void *response,
542 int callStateChangedInd(int slotId, int indType, int token,
543 RIL_Errno e, void *response, size_t responselen);
545 int networkStateChangedInd(int slotId, int indType,
546 int token, RIL_Errno e, void *response, size_t responselen);
548 int newSmsInd(int slotId, int indicationType,
549 int token, RIL_Errno e, void *response, size_t responselen);
551 int newSmsStatusReportInd(int slotId, int indicationType,
552 int token, RIL_Errno e, void *response, size_t responselen);
554 int newSmsOnSimInd(int slotId, int indicationType,
555 int token, RIL_Errno e, void *response, size_t responselen);
557 int onUssdInd(int slotId, int indicationType,
558 int token, RIL_Errno e, void *response, size_t responselen);
560 int nitzTimeReceivedInd(int slotId, int indicationType,
561 int token, RIL_Errno e, void *response, size_t responselen);
563 int currentSignalStrengthInd(int slotId,
564 int indicationType, int token, RIL_Errno e,
565 void *response, size_t responselen);
567 int dataCallListChangedInd(int slotId, int indicationType,
568 int token, RIL_Errno e, void *response, size_t responselen);
570 int suppSvcNotifyInd(int slotId, int indicationType,
571 int token, RIL_Errno e, void *response, size_t responselen);
573 int stkSessionEndInd(int slotId, int indicationType,
574 int token, RIL_Errno e, void *response, size_t responselen);
576 int stkProactiveCommandInd(int slotId, int indicationType,
577 int token, RIL_Errno e, void *response, size_t responselen);
579 int stkEventNotifyInd(int slotId, int indicationType,
580 int token, RIL_Errno e, void *response, size_t responselen);
582 int stkCallSetupInd(int slotId, int indicationType,
583 int token, RIL_Errno e, void *response, size_t responselen);
585 int simSmsStorageFullInd(int slotId, int indicationType,
586 int token, RIL_Errno e, void *response, size_t responselen);
588 int simRefreshInd(int slotId, int indicationType,
589 int token, RIL_Errno e, void *response, size_t responselen);
591 int callRingInd(int slotId, int indicationType,
592 int token, RIL_Errno e, void *response, size_t responselen);
594 int simStatusChangedInd(int slotId, int indicationType,
595 int token, RIL_Errno e, void *response, size_t responselen);
597 int cdmaNewSmsInd(int slotId, int indicationType,
598 int token, RIL_Errno e, void *response, size_t responselen);
600 int newBroadcastSmsInd(int slotId,
601 int indicationType, int token, RIL_Errno e, void *response,
604 int cdmaRuimSmsStorageFullInd(int slotId,
605 int indicationType, int token, RIL_Errno e, void *response,
608 int restrictedStateChangedInd(int slotId,
609 int indicationType, int token, RIL_Errno e, void *response,
612 int enterEmergencyCallbackModeInd(int slotId,
613 int indicationType, int token, RIL_Errno e, void *response,
616 int cdmaCallWaitingInd(int slotId,
617 int indicationType, int token, RIL_Errno e, void *response,
620 int cdmaOtaProvisionStatusInd(int slotId,
621 int indicationType, int token, RIL_Errno e, void *response,
624 int cdmaInfoRecInd(int slotId,
625 int indicationType, int token, RIL_Errno e, void *response,
628 int oemHookRawInd(int slotId,
629 int indicationType, int token, RIL_Errno e, void *response,
632 int indicateRingbackToneInd(int slotId,
633 int indicationType, int token, RIL_Errno e, void *response,
636 int resendIncallMuteInd(int slotId,
637 int indicationType, int token, RIL_Errno e, void *response,
640 int cdmaSubscriptionSourceChangedInd(int slotId,
641 int indicationType, int token, RIL_Errno e,
642 void *response, size_t responselen);
644 int cdmaPrlChangedInd(int slotId,
645 int indicationType, int token, RIL_Errno e, void *response,
648 int exitEmergencyCallbackModeInd(int slotId,
649 int indicationType, int token, RIL_Errno e, void *response,
652 int rilConnectedInd(int slotId,
653 int indicationType, int token, RIL_Errno e, void *response,
656 int voiceRadioTechChangedInd(int slotId,
657 int indicationType, int token, RIL_Errno e, void *response,
660 int cellInfoListInd(int slotId,
661 int indicationType, int token, RIL_Errno e, void *response,
664 int imsNetworkStateChangedInd(int slotId,
665 int indicationType, int token, RIL_Errno e, void *response,
668 int subscriptionStatusChangedInd(int slotId,
669 int indicationType, int token, RIL_Errno e, void *response,
672 int srvccStateNotifyInd(int slotId,
673 int indicationType, int token, RIL_Errno e, void *response,
676 int hardwareConfigChangedInd(int slotId,
677 int indicationType, int token, RIL_Errno e, void *response,
680 int radioCapabilityIndicationInd(int slotId,
681 int indicationType, int token, RIL_Errno e, void *response,
684 int onSupplementaryServiceIndicationInd(int slotId,
685 int indicationType, int token, RIL_Errno e,
686 void *response, size_t responselen);
688 int stkCallControlAlphaNotifyInd(int slotId,
689 int indicationType, int token, RIL_Errno e, void *response,
692 int lceDataInd(int slotId,
693 int indicationType, int token, RIL_Errno e, void *response,
696 int pcoDataInd(int slotId,
697 int indicationType, int token, RIL_Errno e, void *response,
700 int modemResetInd(int slotId,
701 int indicationType, int token, RIL_Errno e, void *response,
704 int sendRequestRawResponse(int slotId,
705 int responseType, int serial, RIL_Errno e,
706 void *response, size_t responseLen);
708 int sendRequestStringsResponse(int slotId,
709 int responseType, int serial, RIL_Errno e,
710 void *response, size_t responseLen);
712 pthread_rwlock_t * getRadioServiceRwlock(int slotId);
716 #endif // RIL_SERVICE_H