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 android.os.Parcel; 20import android.os.Parcelable; 21 22/** @hide */ 23public class PresCmdId implements Parcelable { 24 25 /** Presence Command Status ID 26 * @hide */ 27 28 29 /** Command ID corresponding to function GetVersion(). */ 30 public static final int UCE_PRES_CMD_GET_VERSION = 0; 31 /** Command ID corresponding to function Publish(). */ 32 public static final int UCE_PRES_CMD_PUBLISHMYCAP = 1; 33 /** Command ID corresponding to function GetContactCap(). */ 34 public static final int UCE_PRES_CMD_GETCONTACTCAP = 2; 35 /** Command ID corresponding to function GetContactListCap(). */ 36 public static final int UCE_PRES_CMD_GETCONTACTLISTCAP = 3; 37 /** Command ID corresponding to function SetNewFeatureTag(). */ 38 public static final int UCE_PRES_CMD_SETNEWFEATURETAG = 4; 39 /** Command ID corresponding to API ReenableService(). */ 40 public static final int UCE_PRES_CMD_REENABLE_SERVICE = 5; 41 /** Command ID is unknown. */ 42 public static final int UCE_PRES_CMD_UNKNOWN = 6; 43 44 45 private int mCmdId = UCE_PRES_CMD_UNKNOWN; 46 47 48 /** 49 * Gets the command ID. 50 * @hide 51 */ 52 public int getCmdId() { 53 return mCmdId; 54 } 55 56 /** 57 * Sets the command ID. 58 * @hide 59 */ 60 public void setCmdId(int nCmdId) { 61 this.mCmdId = nCmdId; 62 } 63 64 65 /** 66 * Constructor for the PresCmdId class. 67 * @hide 68 */ 69 public PresCmdId(){}; 70 71 72 /** @hide */ 73 public int describeContents() { 74 75 return 0; 76 } 77 78 /** @hide */ 79 public void writeToParcel(Parcel dest, int flags) { 80 dest.writeInt(mCmdId); 81 } 82 83 /** @hide */ 84 public static final Parcelable.Creator<PresCmdId> CREATOR = 85 new Parcelable.Creator<PresCmdId>() { 86 87 public PresCmdId createFromParcel(Parcel source) { 88 89 return new PresCmdId(source); 90 } 91 92 public PresCmdId[] newArray(int size) { 93 94 return new PresCmdId[size]; 95 } 96 }; 97 98 /** @hide */ 99 private PresCmdId(Parcel source) { 100 readFromParcel(source); 101 } 102 103 /** @hide */ 104 public void readFromParcel(Parcel source) { 105 mCmdId = source.readInt(); 106 } 107}