1a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande/* 2a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * Copyright (C) 2016 The Android Open Source Project 3a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * 4a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * Licensed under the Apache License, Version 2.0 (the "License"); 5a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * you may not use this file except in compliance with the License. 6a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * You may obtain a copy of the License at 7a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * 8a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * http://www.apache.org/licenses/LICENSE-2.0 9a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * 10a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * Unless required by applicable law or agreed to in writing, software 11a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * distributed under the License is distributed on an "AS IS" BASIS, 12a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * See the License for the specific language governing permissions and 14a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * limitations under the License. 15a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande */ 16a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 17a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpandepackage android.net.wifi; 18a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 19a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpandeimport android.os.Parcel; 20a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpandeimport android.os.Parcelable; 21a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 22a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande/** 23a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * This object describes a partial tree structure in the Hotspot 2.0 release 2 management object. 24a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * The object is used during subscription remediation to modify parts of an existing PPS MO 25a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * tree (Hotspot 2.0 specification section 9.1). 26a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * @hide 27a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande */ 28a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpandepublic class PasspointManagementObjectDefinition implements Parcelable { 29a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande private final String mBaseUri; 30a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande private final String mUrn; 31a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande private final String mMoTree; 32a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 33a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande public PasspointManagementObjectDefinition(String baseUri, String urn, String moTree) { 34a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande mBaseUri = baseUri; 35a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande mUrn = urn; 36a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande mMoTree = moTree; 37a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande } 38a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 39afebe357fbbdbfef8e274c1c5ae449d746fa0d93Jan Nordqvist public String getBaseUri() { 40a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande return mBaseUri; 41a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande } 42a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 43afebe357fbbdbfef8e274c1c5ae449d746fa0d93Jan Nordqvist public String getUrn() { 44a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande return mUrn; 45a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande } 46a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 47afebe357fbbdbfef8e274c1c5ae449d746fa0d93Jan Nordqvist public String getMoTree() { 48a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande return mMoTree; 49a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande } 50a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 51a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande @Override 52a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande public int describeContents() { 53a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande return 0; 54a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande } 55a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 56a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande @Override 57a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande public void writeToParcel(Parcel dest, int flags) { 58a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande dest.writeString(mBaseUri); 59a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande dest.writeString(mUrn); 60a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande dest.writeString(mMoTree); 61a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande } 62a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 63a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande /** 64a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande * Implement the Parcelable interface {@hide} 65a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande */ 66a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande public static final Creator<PasspointManagementObjectDefinition> CREATOR = 67a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande new Creator<PasspointManagementObjectDefinition>() { 68a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande public PasspointManagementObjectDefinition createFromParcel(Parcel in) { 69a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande return new PasspointManagementObjectDefinition( 70a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande in.readString(), /* base URI */ 71a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande in.readString(), /* URN */ 72a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande in.readString() /* Tree XML */ 73a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande ); 74a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande } 75a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 76a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande public PasspointManagementObjectDefinition[] newArray(int size) { 77a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande return new PasspointManagementObjectDefinition[size]; 78a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande } 79a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande }; 80a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande} 81a772f0cf34f0db67997cb31fa44315c0933563daVinit Deshpande 82