1/*
2 * Copyright (C) 2013 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
17package com.android.internal.telephony;
18
19import com.android.internal.telephony.CallInfo;
20
21/**
22 * Provides methods for ICallService implementations to interact with the system phone app.
23 */
24oneway interface ICallServiceAdapter {
25
26    /**
27     * Retrieves a new unique call id for use with newOutgoingCall and newIncomingCall.
28     */
29    void getNextCallId(/* TODO(santoscordon): Needs response object */);
30
31    /**
32     * Tells CallsManager of a new incoming call.
33     */
34    void newIncomingCall(String callId, in CallInfo info);
35
36    /**
37     * Tells CallsManager of a new outgoing call.
38     */
39    void newOutgoingCall(String callId, in CallInfo info);
40
41    /**
42     * Sets a call's state to active (e.g., an ongoing call where two parties can actively
43     * communicate).
44     */
45    void setActive(String callId);
46
47    /**
48     * Sets a call's state to ringing (e.g., an inbound ringing call).
49     */
50    void setRinging(String callId);
51
52    /**
53     * Sets a call's state to dialing (e.g., dialing an outbound call).
54     */
55    void setDialing(String callId);
56
57    /**
58     * Sets a call's state to disconnected.
59     */
60    void setDisconnected(String callId);
61}
62