Home | History | Annotate | Download | only in options
      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      */
     36     StatusCode getVersion(int optionsServiceHandle);
     37 
     38     /**
     39      * Adds a listener to the Options service.
     40      * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener.
     41      * @param optionsListener, IOptionsListener object.
     42      * @param optionsServiceListenerHdl wrapper for client's listener handle to be stored.
     43      *
     44      * The service will fill UceLong.mUceLong with optionsServiceListenerHdl
     45      * @return StatusCode, status of the request placed.
     46      */
     47     StatusCode addListener(int optionsServiceHandle, IOptionsListener optionsListener,
     48                            inout UceLong optionsServiceListenerHdl);
     49 
     50     /**
     51      * Removes a listener from the Options service.
     52      * @param optionsServiceHandle, received in serviceCreated() of IOptionsListener.
     53      * @param optionsListenerHandle, received in serviceCreated() of IOptionsListener.
     54      * @param optionsServiceListenerHdl provided in createOptionsService() or Addlistener().
     55      * @return StatusCode, status of the request placed.
     56      */
     57     StatusCode removeListener(int optionsServiceHandle, in UceLong optionsServiceListenerHdl);
     58 
     59     /**
     60      * Sets the capabilities information of the self device.
     61      * The status of the call is received in cmdStatus callback
     62      * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener.
     63      * @param capInfo, capability information to store.
     64      * @param reqUserData, userData provided by client to identify the request/API call, it
     65      *                  is returned in the cmdStatus() callback for client to match response
     66      *                  with original request.
     67      * @return StatusCode, status of the request placed.
     68      */
     69     StatusCode setMyInfo(int optionsServiceHandle , in CapInfo capInfo, int reqUserData);
     70 
     71 
     72     /**
     73      * Gets the capabilities information of remote device.
     74      * The Capability information is received in cmdStatus callback
     75      * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener.
     76      * @param reqUserData, userData provided by client to identify the request/API call, it
     77      *                  is returned in the cmdStatus() callback for client to match response
     78      *                  with original request.
     79      * @return StatusCode, status of the request placed.
     80      */
     81     StatusCode getMyInfo(int optionsServiceHandle , int reqUserdata);
     82 
     83     /**
     84      * Requests the capabilities information of a remote URI.
     85      * the remote party capability is received in sipResponseReceived() callback.
     86      * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener.
     87      * @param remoteURI, URI of the remote contact.
     88      * @param reqUserData, userData provided by client to identify the request/API call, it
     89      *                  is returned in the cmdStatus() callback for client to match response
     90      *                  with original request.
     91      * @return StatusCode, status of the request placed.
     92      */
     93     StatusCode getContactCap(int optionsServiceHandle , String remoteURI, int reqUserData);
     94 
     95 
     96     /**
     97      * Requests the capabilities information of specified contacts.
     98      * For each remote party capability is received in sipResponseReceived() callback
     99      * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener.
    100      * @param remoteURIList, list of remote contact URI's.
    101      * @param reqUserData, userData provided by client to identify the request/API call, it
    102      *                  is returned in the cmdStatus() callback for client to match response
    103      *                  with original request.
    104      * @return StatusCode, status of the request placed.
    105      */
    106     StatusCode getContactListCap(int optionsServiceHandle, in String[] remoteURIList,
    107                                  int reqUserData);
    108 
    109 
    110     /**
    111      * Requests the capabilities information of specified contacts.
    112      * The incoming Options request is received in incomingOptions() callback.
    113      *
    114      * @param optionsServiceHandle, this returned in serviceCreated() of IOptionsListener.
    115      * @param tId, transaction ID received in incomingOptions() call of IOptionsListener.
    116      * @param sipResponseCode, SIP response code the UE needs to share to network.
    117      * @param reasonPhrase, response phrase corresponding to the response code.
    118      * @param capInfo, capabilities to share in the resonse to network.
    119      * @param bContactInBL, true if the contact is blacklisted, else false.
    120      * @return StatusCode, status of the request placed.
    121      */
    122     StatusCode responseIncomingOptions(int optionsServiceHandle,  int tId, int sipResponseCode,
    123                                        String reasonPhrase, in OptionsCapInfo capInfo,
    124                                        in boolean bContactInBL);
    125 
    126 }
    127