ICarrierMessagingService.aidl revision b72eb97e4bca1e4fd68e79f9d04e9a6a15aebd21
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
17package android.service.carrier;
18
19import android.net.Uri;
20import android.service.carrier.ICarrierMessagingCallback;
21import 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 */
28oneway 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 callback the callback to notify upon completion
52     */
53    void sendTextSms(String text, int subId, String destAddress,
54            in ICarrierMessagingCallback callback);
55
56    /**
57     * Request sending a new data SMS from the device.
58     * The service will call {@link ICarrierMessagingCallback#onSendSmsComplete} with the send
59     * status.
60     *
61     * @param data the data to send
62     * @param subId SMS subscription ID of the SIM
63     * @param destAddress phone number of the recipient of the message
64     * @param destPort port number of the recipient of the message
65     * @param callback the callback to notify upon completion
66     */
67    void sendDataSms(in byte[] data, int subId, String destAddress, int destPort,
68            in ICarrierMessagingCallback callback);
69
70    /**
71     * Request sending a new multi-part text SMS from the device.
72     * The service will call {@link ICarrierMessagingCallback#onSendMultipartSmsComplete}
73     * with the send status.
74     *
75     * @param parts the parts of the multi-part text SMS to send
76     * @param subId SMS subscription ID of the SIM
77     * @param destAddress phone number of the recipient of the message
78     * @param callback the callback to notify upon completion
79     */
80    void sendMultipartTextSms(in List<String> parts, int subId, String destAddress,
81            in ICarrierMessagingCallback callback);
82
83    /**
84     * Request sending a new MMS PDU from the device.
85     * The service will call {@link ICarrierMessagingCallback#onSendMmsComplete} with the send
86     * status.
87     *
88     * @param pduUri the content provider URI of the PDU to send
89     * @param subId SMS subscription ID of the SIM
90     * @param location the optional URI to send this MMS PDU. If this is {code null},
91     *        the PDU should be sent to the default MMSC URL.
92     * @param callback the callback to notify upon completion
93     */
94    void sendMms(in Uri pduUri, int subId, in Uri location,
95            in ICarrierMessagingCallback callback);
96
97    /**
98     * Request downloading a new MMS.
99     * The service will call {@link ICarrierMessagingCallback#onDownloadMmsComplete} with the
100     * download status.
101     *
102     * @param pduUri the content provider URI of the PDU to be downloaded.
103     * @param subId SMS subscription ID of the SIM
104     * @param location the URI of the message to be downloaded.
105     * @param callback the callback to notify upon completion
106     */
107    void downloadMms(in Uri pduUri, int subId, in Uri location,
108            in ICarrierMessagingCallback callback);
109}
110
111