Home | History | Annotate | Download | only in internal
      1 /*
      2  * Copyright (c) 2015, Motorola Mobility LLC
      3  * All rights reserved.
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that the following conditions are met:
      7  *     - Redistributions of source code must retain the above copyright
      8  *       notice, this list of conditions and the following disclaimer.
      9  *     - Redistributions in binary form must reproduce the above copyright
     10  *       notice, this list of conditions and the following disclaimer in the
     11  *       documentation and/or other materials provided with the distribution.
     12  *     - Neither the name of Motorola Mobility nor the
     13  *       names of its contributors may be used to endorse or promote products
     14  *       derived from this software without specific prior written permission.
     15  *
     16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MOTOROLA MOBILITY LLC BE LIABLE
     20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     22  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
     26  * DAMAGE.
     27  */
     28 
     29 package com.android.ims.internal;
     30 
     31 import android.net.Uri;
     32 import android.provider.BaseColumns;
     33 
     34 /**
     35  * <p>
     36  * The contract between the EAB provider and applications. Contains
     37  * definitions for the supported URIs and data columns.
     38  * </p>
     39  * <h3>Overview</h3>
     40  * <p>
     41  * EABContract defines the data model of EAB related information.
     42  * This data is stored in a table EABPresence.
     43  * </p>
     44  *
     45  * @hide
     46  *
     47  */
     48 public final class EABContract {
     49     /**
     50      * This authority is used for writing to or querying from the EAB provider.
     51      */
     52     public static final String AUTHORITY = "com.android.rcs.eab";
     53 
     54     /**
     55      * The content:// style URL for the top-level EAB authority
     56      */
     57     public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY);
     58 
     59     /**
     60      *  Class for EABProviderItem
     61      */
     62     public static class EABColumns implements BaseColumns {
     63         public static final String TABLE_NAME = "EABPresence";
     64         public static final String GROUPITEMS_NAME = "EABGroupDetails";
     65 
     66         /**
     67          * CONTENT_URI
     68          * <P>
     69          * "content://com.android.vt.eab/EABPresence"
     70          * </P>
     71          */
     72         public static final Uri CONTENT_URI = Uri.withAppendedPath(EABContract.CONTENT_URI,
     73                 TABLE_NAME);
     74 
     75         public static final String CONTENT_TYPE =
     76                 "vnd.android.cursor.dir/vnd.android.rcs.eab.provider.eabprovider";
     77 
     78         public static final String CONTENT_ITEM_TYPE =
     79                 "vnd.android.cursor.item/vnd.android.rcs.eab.provider.eabprovider";
     80 
     81         /**
     82          * Key defining the contact number.
     83          * <P>
     84          * Type: TEXT
     85          * </P>
     86          */
     87         public static final String CONTACT_NUMBER = "contact_number";
     88 
     89         /**
     90          * Key defining the contact name.
     91          * <P>
     92          * Type: TEXT
     93          * </P>
     94          */
     95         public static final String CONTACT_NAME = "contact_name";
     96 
     97         /**
     98          * Key defining the reference to ContactContract raw_contact_id of the number.
     99          * <P>
    100          * Type: TEXT
    101          * </P>
    102          */
    103         public static final String RAW_CONTACT_ID = "raw_contact_id";
    104 
    105         /**
    106          * Key defining the reference to ContactContract contact_id of the number.
    107          * <P>
    108          * Type: TEXT
    109          * </P>
    110          */
    111         public static final String CONTACT_ID = "contact_id";
    112 
    113         /**
    114          * Key defining the reference to ContactContract data_id of the number.
    115          * <P>
    116          * Type: TEXT
    117          * </P>
    118          */
    119         public static final String DATA_ID = "data_id";
    120 
    121         /**
    122          * Key defining the account type.
    123          * <P>
    124          * Type: TEXT
    125          * </P>
    126          */
    127         public static final String ACCOUNT_TYPE = "account_type";
    128 
    129         /**
    130          * Key defining the VoLTE call service contact address.
    131          * <P>
    132          * Type: TEXT
    133          * </P>
    134          */
    135         public static final String VOLTE_CALL_SERVICE_CONTACT_ADDRESS = "volte_contact_address";
    136 
    137         /**
    138          * Key defining the VoLTE call capability.
    139          * <P>
    140          * Type: TEXT
    141          * </P>
    142          */
    143         public static final String VOLTE_CALL_CAPABILITY = "volte_call_capability";
    144 
    145         /**
    146          * Key defining the VoLTE call capability timestamp.
    147          * <P>
    148          * Type: TEXT
    149          * </P>
    150          */
    151         public static final String VOLTE_CALL_CAPABILITY_TIMESTAMP = "volte_capability_timestamp";
    152 
    153         /**
    154          * Key defining the VoLTE call availability.
    155          * <P>
    156          * Type: LONG
    157          * </P>
    158          */
    159         public static final String VOLTE_CALL_AVAILABILITY = "volte_call_avalibility";
    160 
    161         /**
    162          * Key defining the VoLTE call availability timestamp.
    163          * <P>
    164          * Type: TEXT
    165          * </P>
    166          */
    167         public static final String VOLTE_CALL_AVAILABILITY_TIMESTAMP =
    168                 "volte_availability_timestamp";
    169 
    170         /**
    171          * Key defining the Video call service contact address.
    172          * <P>
    173          * Type: LONG
    174          * </P>
    175          */
    176         public static final String VIDEO_CALL_SERVICE_CONTACT_ADDRESS = "video_contact_address";
    177 
    178         /**
    179          * Key defining the Video call capability.
    180          * <P>
    181          * Type: TEXT
    182          * </P>
    183          */
    184         public static final String VIDEO_CALL_CAPABILITY = "video_call_capability";
    185 
    186         /**
    187          * Key defining the Video call capability timestamp.
    188          * <P>
    189          * Type: TEXT
    190          * </P>
    191          */
    192         public static final String VIDEO_CALL_CAPABILITY_TIMESTAMP = "video_capability_timestamp";
    193 
    194         /**
    195          * Key defining the Video call availability.
    196          * <P>
    197          * Type: LONG
    198          * </P>
    199          */
    200         public static final String VIDEO_CALL_AVAILABILITY = "video_call_availability";
    201 
    202         /**
    203          * Key defining the Video call availability timestamp.
    204          * <P>
    205          * Type: TEXT
    206          * </P>
    207          */
    208         public static final String VIDEO_CALL_AVAILABILITY_TIMESTAMP =
    209                 "video_availability_timestamp";
    210 
    211         /**
    212          * Key defining the Video call availability timestamp.
    213          * <P>
    214          * Type: LONG
    215          * </P>
    216          */
    217         public static final String CONTACT_LAST_UPDATED_TIMESTAMP =
    218                 "contact_last_updated_timestamp";
    219 
    220         /**
    221          * Key defining the volte status.
    222          * <p>
    223          * Type: INT
    224          * </p>
    225          */
    226         public static final String VOLTE_STATUS = "volte_status";
    227 
    228         /**
    229          * Key defining the formatted number.
    230          * <p>
    231          * Type: TEXT
    232          * </p>
    233          */
    234         public static final String FORMATTED_NUMBER = "formatted_number";
    235 
    236         /**
    237          * @hide
    238          */
    239         public static final String[] PROJECTION = new String[] {
    240             _ID,
    241             CONTACT_NAME,
    242             CONTACT_NUMBER,
    243             RAW_CONTACT_ID,
    244             CONTACT_ID,
    245             DATA_ID,
    246             ACCOUNT_TYPE,
    247             VOLTE_CALL_SERVICE_CONTACT_ADDRESS,
    248             VOLTE_CALL_CAPABILITY,
    249             VOLTE_CALL_AVAILABILITY_TIMESTAMP,
    250             VOLTE_CALL_AVAILABILITY,
    251             VOLTE_CALL_CAPABILITY_TIMESTAMP,
    252             VIDEO_CALL_SERVICE_CONTACT_ADDRESS,
    253             VIDEO_CALL_CAPABILITY,
    254             VIDEO_CALL_CAPABILITY_TIMESTAMP,
    255             VIDEO_CALL_AVAILABILITY,
    256             VIDEO_CALL_AVAILABILITY_TIMESTAMP,
    257             CONTACT_LAST_UPDATED_TIMESTAMP,
    258             VOLTE_STATUS
    259         };
    260     }
    261 }
    262 
    263