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 */
16
17package com.android.ims.internal.uce.presence;
18
19import com.android.ims.internal.uce.common.CapInfo;
20
21import android.os.Parcel;
22import android.os.Parcelable;
23
24
25/** @hide */
26public class PresCapInfo implements Parcelable {
27
28    private CapInfo mCapInfo;
29    private String mContactUri = "";
30
31    /**
32     * Gets the UCE capability information.
33     * @hide
34     */
35    public CapInfo getCapInfo() {
36        return mCapInfo;
37    }
38
39    /** Sets the UCE Capability information.
40     *  @hide
41     */
42    public void setCapInfo(CapInfo capInfo) {
43        this.mCapInfo = capInfo;
44    }
45
46
47    /**
48     *  Gets the contact URI.
49     *  @hide
50     */
51    public String getContactUri() {
52        return mContactUri;
53    }
54
55    /**
56     *  Sets the contact URI.
57     *  @hide
58     */
59    public void setContactUri(String contactUri) {
60        this.mContactUri = contactUri;
61    }
62
63    /**
64     * Constructor for the PresCapInfo class.
65     * @hide
66     */
67    public PresCapInfo() {
68        mCapInfo = new CapInfo();
69    };
70
71    /** @hide */
72    public int describeContents() {
73        return 0;
74    }
75
76    /** @hide */
77    public void writeToParcel(Parcel dest, int flags) {
78        dest.writeString(mContactUri);
79        dest.writeParcelable(mCapInfo, flags);
80    }
81
82    /** @hide */
83    public static final Parcelable.Creator<PresCapInfo> CREATOR =
84                                    new Parcelable.Creator<PresCapInfo>() {
85
86        public PresCapInfo createFromParcel(Parcel source) {
87            return new PresCapInfo(source);
88        }
89
90        public PresCapInfo[] newArray(int size) {
91            return new PresCapInfo[size];
92        }
93    };
94
95    /** @hide */
96    private PresCapInfo(Parcel source) {
97        readFromParcel(source);
98    }
99
100    /** @hide */
101    public void readFromParcel(Parcel source) {
102        mContactUri = source.readString();
103        mCapInfo = source.readParcelable(CapInfo.class.getClassLoader());
104    }
105}
106