Home | History | Annotate | Download | only in telephony
      1 /*
      2  * Copyright (C) 2012 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 package com.android.internal.telephony;
     17 
     18 /**
     19  * SMS Constants and must be the same as the corresponding
     20  * deprecated version in SmsMessage.
     21  *
     22  * @hide
     23  */
     24 public class SmsConstants {
     25     /** User data text encoding code unit size */
     26     public static final int ENCODING_UNKNOWN = 0;
     27     public static final int ENCODING_7BIT = 1;
     28     public static final int ENCODING_8BIT = 2;
     29     public static final int ENCODING_16BIT = 3;
     30 
     31     /** The maximum number of payload septets per message */
     32     public static final int MAX_USER_DATA_SEPTETS = 160;
     33 
     34     /**
     35      * The maximum number of payload septets per message if a user data header
     36      * is present.  This assumes the header only contains the
     37      * CONCATENATED_8_BIT_REFERENCE element.
     38      */
     39     public static final int MAX_USER_DATA_SEPTETS_WITH_HEADER = 153;
     40 
     41     /**
     42      * This value is not defined in global standard. Only in Korea, this is used.
     43      */
     44     public static final int ENCODING_KSC5601 = 4;
     45 
     46     /** The maximum number of payload bytes per message */
     47     public static final int MAX_USER_DATA_BYTES = 140;
     48 
     49     /**
     50      * The maximum number of payload bytes per message if a user data header
     51      * is present.  This assumes the header only contains the
     52      * CONCATENATED_8_BIT_REFERENCE element.
     53      */
     54     public static final int MAX_USER_DATA_BYTES_WITH_HEADER = 134;
     55 
     56     /**
     57      * SMS Class enumeration.
     58      * See TS 23.038.
     59      */
     60     public enum MessageClass{
     61         UNKNOWN, CLASS_0, CLASS_1, CLASS_2, CLASS_3;
     62     }
     63 
     64     /**
     65      * Indicates unknown format SMS message.
     66      * @hide pending API council approval
     67      */
     68     public static final String FORMAT_UNKNOWN = "unknown";
     69 
     70     /**
     71      * Indicates a 3GPP format SMS message.
     72      * @hide pending API council approval
     73      */
     74     public static final String FORMAT_3GPP = "3gpp";
     75 
     76     /**
     77      * Indicates a 3GPP2 format SMS message.
     78      * @hide pending API council approval
     79      */
     80     public static final String FORMAT_3GPP2 = "3gpp2";
     81 }
     82