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 PresPublishTriggerType implements Parcelable { 24 25 /** Publish Trigger Indication Definitions 26 * @hide 27 */ 28 29 /** ETag expired. */ 30 public static final int UCE_PRES_PUBLISH_TRIGGER_ETAG_EXPIRED = 0; 31 /** Move to LTE with VoPS disabled. */ 32 public static final int UCE_PRES_PUBLISH_TRIGGER_MOVE_TO_LTE_VOPS_DISABLED = 1; 33 /** Move to LTE with VoPS enabled. */ 34 public static final int UCE_PRES_PUBLISH_TRIGGER_MOVE_TO_LTE_VOPS_ENABLED = 2; 35 /** Move to eHRPD. */ 36 public static final int UCE_PRES_PUBLISH_TRIGGER_MOVE_TO_EHRPD = 3; 37 /** Move to HSPA+. */ 38 public static final int UCE_PRES_PUBLISH_TRIGGER_MOVE_TO_HSPAPLUS = 4; 39 /** Move to 3G. */ 40 public static final int UCE_PRES_PUBLISH_TRIGGER_MOVE_TO_3G = 5; 41 /** Move to 2G. */ 42 public static final int UCE_PRES_PUBLISH_TRIGGER_MOVE_TO_2G = 6; 43 /** Move to WLAN */ 44 public static final int UCE_PRES_PUBLISH_TRIGGER_MOVE_TO_WLAN = 7; 45 /** Move to IWLAN */ 46 public static final int UCE_PRES_PUBLISH_TRIGGER_MOVE_TO_IWLAN = 8; 47 /** Trigger is unknown. */ 48 public static final int UCE_PRES_PUBLISH_TRIGGER_UNKNOWN = 9; 49 50 51 52 53 private int mPublishTriggerType = UCE_PRES_PUBLISH_TRIGGER_UNKNOWN; 54 55 56 /** 57 * Gets the publish trigger types. 58 * @hide 59 */ 60 public int getPublishTrigeerType() { 61 return mPublishTriggerType; 62 } 63 64 /** 65 * Sets the publish trigger type. 66 * @hide 67 */ 68 public void setPublishTrigeerType(int nPublishTriggerType) { 69 this.mPublishTriggerType = nPublishTriggerType; 70 } 71 72 73 /** 74 * Constructor for the PresPublishTriggerType class. 75 * @hide 76 */ 77 public PresPublishTriggerType(){}; 78 79 /** @hide */ 80 public int describeContents() { 81 return 0; 82 } 83 84 /** @hide */ 85 public void writeToParcel(Parcel dest, int flags) { 86 dest.writeInt(mPublishTriggerType); 87 } 88 89 /** @hide */ 90 public static final Parcelable.Creator<PresPublishTriggerType> CREATOR = 91 new Parcelable.Creator<PresPublishTriggerType>() { 92 93 public PresPublishTriggerType createFromParcel(Parcel source) { 94 95 return new PresPublishTriggerType(source); 96 } 97 98 public PresPublishTriggerType[] newArray(int size) { 99 100 return new PresPublishTriggerType[size]; 101 } 102 }; 103 104 /** @hide */ 105 private PresPublishTriggerType(Parcel source) { 106 readFromParcel(source); 107 } 108 109 /** @hide */ 110 public void readFromParcel(Parcel source) { 111 mPublishTriggerType = source.readInt(); 112 } 113}