Home | History | Annotate | Download | only in carrier
      1 /**
      2  * Copyright (c) 2014, 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 android.service.carrier;
     18 
     19 import android.net.Uri;
     20 import android.service.carrier.ICarrierMessagingCallback;
     21 import android.service.carrier.MessagePdu;
     22 
     23 /**
     24  * <p class="note"><strong>Note:</strong>
     25  * This service can only be implemented by a carrier privileged app.
     26  * @hide
     27  */
     28 oneway interface ICarrierMessagingService {
     29     /**
     30      * Request filtering an incoming SMS message.
     31      * The service will call callback.onFilterComplete with the filtering result.
     32      *
     33      * @param pdu the PDUs of the message
     34      * @param format the format of the PDUs, typically "3gpp" or "3gpp2"
     35      * @param destPort the destination port of a data SMS. It will be -1 for text SMS
     36      * @param subId SMS subscription ID of the SIM
     37      * @param callback the callback to notify upon completion
     38      */
     39     void filterSms(
     40         in MessagePdu pdu, String format, int destPort, int subId,
     41         in ICarrierMessagingCallback callback);
     42 
     43     /**
     44      * Request sending a new text SMS from the device.
     45      * The service will call {@link ICarrierMessagingCallback#onSendSmsComplete} with the send
     46      * status.
     47      *
     48      * @param text the text to send
     49      * @param subId SMS subscription ID of the SIM
     50      * @param destAddress phone number of the recipient of the message
     51      * @param sendSmsFlag flag for sending SMS
     52      * @param callback the callback to notify upon completion
     53      */
     54     void sendTextSms(String text, int subId, String destAddress, int sendSmsFlag,
     55             in ICarrierMessagingCallback callback);
     56 
     57     /**
     58      * Request sending a new data SMS from the device.
     59      * The service will call {@link ICarrierMessagingCallback#onSendSmsComplete} with the send
     60      * status.
     61      *
     62      * @param data the data to send
     63      * @param subId SMS subscription ID of the SIM
     64      * @param destAddress phone number of the recipient of the message
     65      * @param destPort port number of the recipient of the message
     66      * @param sendSmsFlag flag for sending SMS
     67      * @param callback the callback to notify upon completion
     68      */
     69     void sendDataSms(in byte[] data, int subId, String destAddress, int destPort,
     70             int sendSmsFlag, in ICarrierMessagingCallback callback);
     71 
     72     /**
     73      * Request sending a new multi-part text SMS from the device.
     74      * The service will call {@link ICarrierMessagingCallback#onSendMultipartSmsComplete}
     75      * with the send status.
     76      *
     77      * @param parts the parts of the multi-part text SMS to send
     78      * @param subId SMS subscription ID of the SIM
     79      * @param destAddress phone number of the recipient of the message
     80      * @param sendSmsFlag flag for sending SMS
     81      * @param callback the callback to notify upon completion
     82      */
     83     void sendMultipartTextSms(in List<String> parts, int subId, String destAddress,
     84             int sendSmsFlag, in ICarrierMessagingCallback callback);
     85 
     86     /**
     87      * Request sending a new MMS PDU from the device.
     88      * The service will call {@link ICarrierMessagingCallback#onSendMmsComplete} with the send
     89      * status.
     90      *
     91      * @param pduUri the content provider URI of the PDU to send
     92      * @param subId SMS subscription ID of the SIM
     93      * @param location the optional URI to send this MMS PDU. If this is {code null},
     94      *        the PDU should be sent to the default MMSC URL.
     95      * @param callback the callback to notify upon completion
     96      */
     97     void sendMms(in Uri pduUri, int subId, in Uri location,
     98             in ICarrierMessagingCallback callback);
     99 
    100     /**
    101      * Request downloading a new MMS.
    102      * The service will call {@link ICarrierMessagingCallback#onDownloadMmsComplete} with the
    103      * download status.
    104      *
    105      * @param pduUri the content provider URI of the PDU to be downloaded.
    106      * @param subId SMS subscription ID of the SIM
    107      * @param location the URI of the message to be downloaded.
    108      * @param callback the callback to notify upon completion
    109      */
    110     void downloadMms(in Uri pduUri, int subId, in Uri location,
    111             in ICarrierMessagingCallback callback);
    112 }
    113 
    114