Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016 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 | package com.android.ims.internal.uce.options; |
| 18 | |
| 19 | import com.android.ims.internal.uce.options.IOptionsListener; |
| 20 | import com.android.ims.internal.uce.options.OptionsCapInfo; |
| 21 | import com.android.ims.internal.uce.common.CapInfo; |
| 22 | import com.android.ims.internal.uce.common.StatusCode; |
| 23 | import com.android.ims.internal.uce.common.UceLong; |
| 24 | |
| 25 | /** {@hide} */ |
| 26 | interface IOptionsService |
| 27 | { |
| 28 | |
| 29 | /** |
| 30 | * Gets the version of the Options service implementation. |
| 31 | * the result of this Call is received in getVersionCb |
| 32 | * @param optionsServiceHandle, received in serviceCreated() of IOptionsListener. |
| 33 | * @return StatusCode, status of the request placed. |
| 34 | * @hide |
| 35 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 36 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 37 | StatusCode getVersion(int optionsServiceHandle); |
| 38 | |
| 39 | /** |
| 40 | * Adds a listener to the Options service. |
| 41 | * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener. |
| 42 | * @param optionsListener, IOptionsListener object. |
| 43 | * @param optionsServiceListenerHdl wrapper for client's listener handle to be stored. |
| 44 | * |
| 45 | * The service will fill UceLong.mUceLong with optionsServiceListenerHdl |
| 46 | * @return StatusCode, status of the request placed. |
| 47 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 48 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 49 | StatusCode addListener(int optionsServiceHandle, IOptionsListener optionsListener, |
| 50 | inout UceLong optionsServiceListenerHdl); |
| 51 | |
| 52 | /** |
| 53 | * Removes a listener from the Options service. |
| 54 | * @param optionsServiceHandle, received in serviceCreated() of IOptionsListener. |
| 55 | * @param optionsListenerHandle, received in serviceCreated() of IOptionsListener. |
| 56 | * @param optionsServiceListenerHdl provided in createOptionsService() or Addlistener(). |
| 57 | * @return StatusCode, status of the request placed. |
| 58 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 59 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 60 | StatusCode removeListener(int optionsServiceHandle, in UceLong optionsServiceListenerHdl); |
| 61 | |
| 62 | /** |
| 63 | * Sets the capabilities information of the self device. |
| 64 | * The status of the call is received in cmdStatus callback |
| 65 | * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener. |
| 66 | * @param capInfo, capability information to store. |
| 67 | * @param reqUserData, userData provided by client to identify the request/API call, it |
| 68 | * is returned in the cmdStatus() callback for client to match response |
| 69 | * with original request. |
| 70 | * @return StatusCode, status of the request placed. |
| 71 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 72 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 73 | StatusCode setMyInfo(int optionsServiceHandle , in CapInfo capInfo, int reqUserData); |
| 74 | |
| 75 | |
| 76 | /** |
| 77 | * Gets the capabilities information of remote device. |
| 78 | * The Capability information is received in cmdStatus callback |
| 79 | * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener. |
| 80 | * @param reqUserData, userData provided by client to identify the request/API call, it |
| 81 | * is returned in the cmdStatus() callback for client to match response |
| 82 | * with original request. |
| 83 | * @return StatusCode, status of the request placed. |
| 84 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 85 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 86 | StatusCode getMyInfo(int optionsServiceHandle , int reqUserdata); |
| 87 | |
| 88 | /** |
| 89 | * Requests the capabilities information of a remote URI. |
| 90 | * the remote party capability is received in sipResponseReceived() callback. |
| 91 | * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener. |
| 92 | * @param remoteURI, URI of the remote contact. |
| 93 | * @param reqUserData, userData provided by client to identify the request/API call, it |
| 94 | * is returned in the cmdStatus() callback for client to match response |
| 95 | * with original request. |
| 96 | * @return StatusCode, status of the request placed. |
| 97 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 98 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 99 | StatusCode getContactCap(int optionsServiceHandle , String remoteURI, int reqUserData); |
| 100 | |
| 101 | |
| 102 | /** |
| 103 | * Requests the capabilities information of specified contacts. |
| 104 | * For each remote party capability is received in sipResponseReceived() callback |
| 105 | * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener. |
| 106 | * @param remoteURIList, list of remote contact URI's. |
| 107 | * @param reqUserData, userData provided by client to identify the request/API call, it |
| 108 | * is returned in the cmdStatus() callback for client to match response |
| 109 | * with original request. |
| 110 | * @return StatusCode, status of the request placed. |
| 111 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 112 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 113 | StatusCode getContactListCap(int optionsServiceHandle, in String[] remoteURIList, |
| 114 | int reqUserData); |
| 115 | |
| 116 | |
| 117 | /** |
| 118 | * Requests the capabilities information of specified contacts. |
| 119 | * The incoming Options request is received in incomingOptions() callback. |
| 120 | * |
| 121 | * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener. |
| 122 | * @param tId, transaction ID received in incomingOptions() call of IOptionsListener. |
| 123 | * @param sipResponseCode, SIP response code the UE needs to share to network. |
| 124 | * @param reasonPhrase, response phrase corresponding to the response code. |
| 125 | * @param capInfo, capabilities to share in the resonse to network. |
| 126 | * @param bContactInBL, true if the contact is blacklisted, else false. |
| 127 | * @return StatusCode, status of the request placed. |
| 128 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 129 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 130 | StatusCode responseIncomingOptions(int optionsServiceHandle, int tId, int sipResponseCode, |
| 131 | String reasonPhrase, in OptionsCapInfo capInfo, |
| 132 | in boolean bContactInBL); |
| 133 | |
| 134 | } |