1 /*
2  * Copyright (C) 2015 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 android.support.v7.mms;
18 
19 import java.util.List;
20 
21 /**
22  * Interface for loading APNs for default SMS SIM
23  */
24 public interface ApnSettingsLoader {
25     /**
26      * Interface to represent the minimal information MMS lib needs from an APN
27      */
28     interface Apn {
29         /**
30          * Get the MMSC URL string
31          *
32          * @return MMSC URL
33          */
getMmsc()34         String getMmsc();
35 
36         /**
37          * Get the MMS proxy host address
38          *
39          * @return MMS proxy
40          */
getMmsProxy()41         String getMmsProxy();
42 
43         /**
44          * Get the MMS proxy host port
45          *
46          * @return the port of MMS proxy
47          */
getMmsProxyPort()48         int getMmsProxyPort();
49 
50         /**
51          * Flag the APN as a successful APN to use
52          */
setSuccess()53         void setSuccess();
54     }
55 
56     /**
57      * Get a list possible APN matching the subId and APN name
58      *
59      * @param apnName the APN name
60      * @return a list of possible APNs
61      */
get(String apnName)62     List<Apn> get(String apnName);
63 }
64