Home | History | Annotate | Download | only in options
      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 
     17 package com.android.ims.internal.uce.options;
     18 
     19 
     20 import android.os.Parcel;
     21 import android.os.Parcelable;
     22 
     23 /** @hide */
     24 public class OptionsCmdId implements Parcelable {
     25 
     26     /** UCE CD command ID types  */
     27 
     28     /** Command ID corresponding to API GetMyInfo(). */
     29     public static final int UCE_OPTIONS_CMD_GETMYCDINFO = 0;
     30     /** Command ID corresponding to API SetMyInfo(). */
     31     public static final int UCE_OPTIONS_CMD_SETMYCDINFO = 1;
     32     /** Command ID corresponding to API GetContactCap(). */
     33     public static final int UCE_OPTIONS_CMD_GETCONTACTCAP = 2;
     34     /** Command ID corresponding to API GetContactListCap(). */
     35     public static final int UCE_OPTIONS_CMD_GETCONTACTLISTCAP = 3;
     36     /** Command ID corresponding to API ResponseIncomingOptions(). */
     37     public static final int UCE_OPTIONS_CMD_RESPONSEINCOMINGOPTIONS = 4;
     38     /** Command ID corresponding to API GetVersion(). */
     39     public static final int UCE_OPTIONS_CMD_GET_VERSION = 5;
     40     /** Default Command ID as Unknown. */
     41     public static final int UCE_OPTIONS_CMD_UNKNOWN = 6;
     42 
     43 
     44     private int mCmdId = UCE_OPTIONS_CMD_UNKNOWN;
     45 
     46     /**
     47      * Gets the command ID.
     48      * @hide
     49      */
     50     public int getCmdId() {
     51         return mCmdId;
     52     }
     53 
     54     /**
     55      * Sets the command ID.
     56      * @hide
     57      */
     58     public void setCmdId(int nCmdId) {
     59         this.mCmdId = nCmdId;
     60     }
     61 
     62     /**
     63      * Constructor for the OptionsCDCmdId class.
     64      * @hide
     65      */
     66     public OptionsCmdId(){};
     67 
     68     /** @hide */
     69     public int describeContents() {
     70         return 0;
     71     }
     72 
     73     /** @hide */
     74     public void writeToParcel(Parcel dest, int flags) {
     75         dest.writeInt(mCmdId);
     76     }
     77 
     78     /** @hide */
     79     public static final Parcelable.Creator<OptionsCmdId> CREATOR =
     80                                   new Parcelable.Creator<OptionsCmdId>() {
     81         public OptionsCmdId createFromParcel(Parcel source) {
     82             return new OptionsCmdId(source);
     83         }
     84 
     85         public OptionsCmdId[] newArray(int size) {
     86             return new OptionsCmdId[size];
     87         }
     88     };
     89 
     90     /** @hide */
     91     private OptionsCmdId(Parcel source) {
     92         readFromParcel(source);
     93     }
     94 
     95     /** @hide */
     96     public void readFromParcel(Parcel source) {
     97         mCmdId = source.readInt();
     98     }
     99 }
    100