|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class to store all access point related information |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 package com.nokia.mid.iapinfo; |
|
20 |
|
21 /** |
|
22 * Please refer to IapInfo Spec. |
|
23 */ |
|
24 public class AccessPoint |
|
25 { |
|
26 |
|
27 // ID of the access point |
|
28 private int iAccessPointID; |
|
29 |
|
30 // Name of the access point |
|
31 private String iAccessPointName = null; |
|
32 |
|
33 // Type of the access point |
|
34 private String iAccessPointBearerType = null; |
|
35 private String iAccessPointServiceType = ""; |
|
36 |
|
37 /** Parameter nokia_apnid string */ |
|
38 static final String PARAM_NOKIA_APNID = "nokia_apnid"; |
|
39 |
|
40 /** |
|
41 * Constructor for class com.nokia.mid.iapinfo.AccessPoint, which creates a |
|
42 * new AccessPoint object with the received parameters. |
|
43 * |
|
44 * @param aAccessPointID the ID of the AccessPoint |
|
45 * @param aAccessPointName the name of the AccessPoint |
|
46 * @param aAccessPointBearerType the bearer type of the AccessPoint |
|
47 * @param aAccessPointServiceType the service type of the AccessPoint |
|
48 */ |
|
49 AccessPoint(int aAccessPointID, String aAccessPointName, |
|
50 String aAccessPointBearerType, String aAccessPointServiceType) |
|
51 { |
|
52 iAccessPointID = aAccessPointID; |
|
53 iAccessPointName = aAccessPointName; |
|
54 iAccessPointBearerType = aAccessPointBearerType; |
|
55 iAccessPointServiceType = aAccessPointServiceType; |
|
56 } |
|
57 |
|
58 /** |
|
59 * Please refer to IapInfo Spec. |
|
60 */ |
|
61 public String getServiceType() |
|
62 { |
|
63 return iAccessPointServiceType; |
|
64 } |
|
65 |
|
66 /** |
|
67 * Please refer to IapInfo Spec. |
|
68 */ |
|
69 public String getBearerType() |
|
70 { |
|
71 return iAccessPointBearerType; |
|
72 } |
|
73 |
|
74 /** |
|
75 * Please refer to IapInfo Spec. |
|
76 */ |
|
77 public int getID() |
|
78 { |
|
79 return iAccessPointID; |
|
80 } |
|
81 |
|
82 /** |
|
83 * Please refer to IapInfo Spec. |
|
84 */ |
|
85 public String getName() |
|
86 { |
|
87 return iAccessPointName; |
|
88 } |
|
89 |
|
90 /** |
|
91 * Please refer to IapInfo Spec. |
|
92 */ |
|
93 public String getURL(String aURL) |
|
94 { |
|
95 return aURL + ";" + PARAM_NOKIA_APNID + "=" + iAccessPointID; |
|
96 } |
|
97 } |