1 /* 2 * Copyright (C) 2021 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.imsserviceentitlement.ts43; 18 19 /** Constants to be used in GSMA TS.43 protocol. */ 20 public final class Ts43Constants { Ts43Constants()21 private Ts43Constants() {} 22 23 /** Node types of XML response content. */ 24 public static final class ResponseXmlNode { ResponseXmlNode()25 private ResponseXmlNode() {} 26 27 /** Node name of token. */ 28 public static final String TOKEN = "TOKEN"; 29 /** Node name of application. */ 30 public static final String APPLICATION = "APPLICATION"; 31 /** Node name of vers. */ 32 public static final String VERS = "VERS"; 33 } 34 35 /** Attribute names of XML response content. */ 36 public static final class ResponseXmlAttributes { ResponseXmlAttributes()37 private ResponseXmlAttributes() {} 38 39 /** XML attribute name of token. */ 40 public static final String TOKEN = "token"; 41 /** XML attribute name of application identifier. */ 42 public static final String APP_ID = "AppID"; 43 /** XML attribute name of entitlement status. */ 44 public static final String ENTITLEMENT_STATUS = "EntitlementStatus"; 45 /** XML attribute name of E911 address status. */ 46 public static final String ADDR_STATUS = "AddrStatus"; 47 /** XML attribute name of terms and condition status. */ 48 public static final String TC_STATUS = "TC_Status"; 49 /** XML attribute name of provision status. */ 50 public static final String PROVISION_STATUS = "ProvStatus"; 51 /** XML attribute name of entitlement server URL. */ 52 public static final String SERVER_FLOW_URL = "ServiceFlow_URL"; 53 /** XML attribute name of entitlement server user data. */ 54 public static final String SERVER_FLOW_USER_DATA = "ServiceFlow_UserData"; 55 /** XML attribute name of version. */ 56 public static final String VERSION = "version"; 57 /** XML attribute name of validity. */ 58 public static final String VALIDITY = "validity"; 59 /** XML attribute name of RATVoiceEntitleInfoDetails. */ 60 public static final String RAT_VOICE_ENTITLE_INFO_DETAILS = "RATVoiceEntitleInfoDetails"; 61 /** XML attribute name of AccessType in TS43 v8 section 4.1.1. */ 62 public static final String ACCESS_TYPE = "AccessType"; 63 /** XML attribute name of HomeRoamingNWType in TS43 v8 section 4.1.1. */ 64 public static final String HOME_ROAMING_NW_TYPE = "HomeRoamingNWType"; 65 /** XML attribute name of NetworkVoiceIRatCapability in TS43 v8 section 4.1.1. */ 66 public static final String NETWORK_VOICE_IRAT_CAPABILITY = "NetworkVoiceIRatCapability"; 67 } 68 69 /** Value of EntitlementStatus. */ 70 public static final class EntitlementStatus { EntitlementStatus()71 private EntitlementStatus() {} 72 73 /** The service allowed, but not yet provisioned and activated on the network side. */ 74 public static final int DISABLED = 0; 75 /** The service allowed, provisioned and activated on the network side. */ 76 public static final int ENABLED = 1; 77 /** The service cannot be offered. */ 78 public static final int INCOMPATIBLE = 2; 79 /** The service being provisioned on the network side. */ 80 public static final int PROVISIONING = 3; 81 } 82 83 /** Value of AccessType. */ 84 public static final class AccessTypeValue { AccessTypeValue()85 private AccessTypeValue() {} 86 87 /** RAT of type LTE (4G). */ 88 public static final String LTE = "1"; 89 90 /** RAT of type NG-RAN (5G). */ 91 public static final String NGRAN = "2"; 92 } 93 94 /** Value of HomeRoamingNWTypeValue. */ 95 public static final class HomeRoamingNwTypeValue { HomeRoamingNwTypeValue()96 private HomeRoamingNwTypeValue() {} 97 98 /** Include both home and roaming networks. */ 99 public static final String ALL = "1"; 100 101 /** Home network type. */ 102 public static final String HOME = "2"; 103 104 /** Roaming network type. */ 105 public static final String ROAMING = "3"; 106 } 107 108 /** Value of entitlement_version parameters */ 109 public static final class EntitlementVersion { EntitlementVersion()110 private EntitlementVersion() {} 111 112 /** Version 2.0. */ 113 public static final int ENTITLEMENT_VERSION_TWO = 2; 114 115 /** Version 8.0. */ 116 public static final int ENTITLEMENT_VERSION_EIGHT = 8; 117 } 118 } 119