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 */ 16package com.android.ims.internal.uce.options; 17 18import com.android.ims.internal.uce.common.CapInfo; 19import android.os.Parcel; 20import android.os.Parcelable; 21import android.util.Log; 22 23/** @hide */ 24public class OptionsCapInfo implements Parcelable { 25 26 private String mSdp = ""; // SDP message body. It is client responsibility. 27 private CapInfo mCapInfo; 28 29 public static OptionsCapInfo getOptionsCapInfoInstance() { 30 return new OptionsCapInfo(); 31 } 32 33 public String getSdp() { 34 return mSdp; 35 } 36 37 public void setSdp(String sdp) { 38 this.mSdp = sdp; 39 } 40 41 /** 42 * Constructor for the OptionsCapInfo class. 43 */ 44 public OptionsCapInfo() { 45 mCapInfo = new CapInfo(); 46 }; 47 48 public CapInfo getCapInfo() { 49 return mCapInfo; 50 } 51 /** 52 * Sets the CapInfo 53 */ 54 public void setCapInfo(CapInfo capInfo) { 55 this.mCapInfo = capInfo; 56 } 57 58 public int describeContents() { 59 return 0; 60 } 61 62 public void writeToParcel(Parcel dest, int flags) { 63 dest.writeString(mSdp); 64 dest.writeParcelable(mCapInfo, flags); 65 } 66 67 public static final Parcelable.Creator<OptionsCapInfo> CREATOR = 68 new Parcelable.Creator<OptionsCapInfo>() { 69 70 public OptionsCapInfo createFromParcel(Parcel source) { 71 return new OptionsCapInfo(source); 72 } 73 74 public OptionsCapInfo[] newArray(int size) { 75 return new OptionsCapInfo[size]; 76 } 77 }; 78 79 private OptionsCapInfo(Parcel source) { 80 readFromParcel(source); 81 } 82 83 public void readFromParcel(Parcel source) { 84 mSdp = source.readString(); 85 mCapInfo = source.readParcelable(CapInfo.class.getClassLoader()); 86 } 87}