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 
17 
18 package com.android.ims.internal;
19 
20 import com.android.ims.ImsConfigListener;
21 
22 /**
23  * Provides APIs to get/set the IMS service feature/capability/parameters.
24  * The config items include:
25  * 1) Items provisioned by the operator.
26  * 2) Items configured by user. Mainly service feature class.
27  *
28  * {@hide}
29  */
30 interface IImsConfig {
31     /**
32      * Gets the value for ims service/capabilities parameters from the provisioned
33      * value storage. Synchronous blocking call.
34      *
35      * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
36      * @return value in Integer format.
37      */
getProvisionedValue(int item)38     int getProvisionedValue(int item);
39 
40     /**
41      * Gets the value for ims service/capabilities parameters from the provisioned
42      * value storage. Synchronous blocking call.
43      *
44      * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
45      * @return value in String format.
46      */
getProvisionedStringValue(int item)47     String getProvisionedStringValue(int item);
48 
49     /**
50      * Sets the value for IMS service/capabilities parameters by the operator device
51      * management entity. It sets the config item value in the provisioned storage
52      * from which the master value is derived. Synchronous blocking call.
53      *
54      * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
55      * @param value in Integer format.
56      * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
57      */
setProvisionedValue(int item, int value)58     int setProvisionedValue(int item, int value);
59 
60     /**
61      * Sets the value for IMS service/capabilities parameters by the operator device
62      * management entity. It sets the config item value in the provisioned storage
63      * from which the master value is derived.  Synchronous blocking call.
64      *
65      * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
66      * @param value in String format.
67      * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
68      */
setProvisionedStringValue(int item, String value)69     int setProvisionedStringValue(int item, String value);
70 
71     /**
72      * Gets the value of the specified IMS feature item for specified network type.
73      * This operation gets the feature config value from the master storage (i.e. final
74      * value). Asynchronous non-blocking call.
75      *
76      * @param feature. as defined in com.android.ims.ImsConfig#FeatureConstants.
77      * @param network. as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX.
78      * @param listener. feature value returned asynchronously through listener.
79      * @return void
80      */
getFeatureValue(int feature, int network, ImsConfigListener listener)81     oneway void getFeatureValue(int feature, int network, ImsConfigListener listener);
82 
83     /**
84      * Sets the value for IMS feature item for specified network type.
85      * This operation stores the user setting in setting db from which master db
86      * is dervied.
87      *
88      * @param feature. as defined in com.android.ims.ImsConfig#FeatureConstants.
89      * @param network. as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX.
90      * @param value. as defined in com.android.ims.ImsConfig#FeatureValueConstants.
91      * @param listener, provided if caller needs to be notified for set result.
92      * @return void
93      */
setFeatureValue(int feature, int network, int value, ImsConfigListener listener)94     oneway void setFeatureValue(int feature, int network, int value, ImsConfigListener listener);
95 
96     /**
97      * Gets the value for IMS volte provisioned.
98      * This should be the same as the operator provisioned value if applies.
99      *
100      * @return void
101      */
getVolteProvisioned()102     boolean getVolteProvisioned();
103 
104     /**
105      *
106      * Gets the value for ims fature item video quality.
107      *
108      * @param listener. Video quality value returned asynchronously through listener.
109      * @return void
110      */
getVideoQuality(ImsConfigListener listener)111     oneway void getVideoQuality(ImsConfigListener listener);
112 
113     /**
114      * Sets the value for IMS feature item video quality.
115      *
116      * @param quality, defines the value of video quality.
117      * @param listener, provided if caller needs to be notified for set result.
118      * @return void
119      *
120      * @throws ImsException if calling the IMS service results in an error.
121      */
setVideoQuality(int quality, ImsConfigListener listener)122      oneway void setVideoQuality(int quality, ImsConfigListener listener);
123 }
124