1 /* 2 * Copyright (C) 2011 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.internal.telephony.cat; 18 19 /** 20 * Enumeration for representing the tag value of COMPREHENSION-TLV objects. If 21 * you want to get the actual value, call {@link #value() value} method. 22 * 23 * {@hide} 24 */ 25 public enum ComprehensionTlvTag { 26 COMMAND_DETAILS(0x01), 27 DEVICE_IDENTITIES(0x02), 28 RESULT(0x03), 29 DURATION(0x04), 30 ALPHA_ID(0x05), 31 ADDRESS(0x06), 32 USSD_STRING(0x0a), 33 SMS_TPDU(0x0b), 34 TEXT_STRING(0x0d), 35 TONE(0x0e), 36 ITEM(0x0f), 37 ITEM_ID(0x10), 38 RESPONSE_LENGTH(0x11), 39 FILE_LIST(0x12), 40 HELP_REQUEST(0x15), 41 DEFAULT_TEXT(0x17), 42 EVENT_LIST(0x19), 43 ICON_ID(0x1e), 44 ITEM_ICON_ID_LIST(0x1f), 45 IMMEDIATE_RESPONSE(0x2b), 46 LANGUAGE(0x2d), 47 URL(0x31), 48 BROWSER_TERMINATION_CAUSE(0x34), 49 TEXT_ATTRIBUTE(0x50); 50 51 private int mValue; 52 53 ComprehensionTlvTag(int value) { 54 mValue = value; 55 } 56 57 /** 58 * Returns the actual value of this COMPREHENSION-TLV object. 59 * 60 * @return Actual tag value of this object 61 */ 62 public int value() { 63 return mValue; 64 } 65 66 public static ComprehensionTlvTag fromInt(int value) { 67 for (ComprehensionTlvTag e : ComprehensionTlvTag.values()) { 68 if (e.mValue == value) { 69 return e; 70 } 71 } 72 return null; 73 } 74 } 75