SmsResponse.java revision c38bb60d867c5d61d90b7179a9ed2b2d1848124f
1/*
2 * Copyright (C) 2007 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 com.android.internal.telephony;
18
19/**
20 * Object returned by the RIL upon successful completion of sendSMS.
21 * Contains message reference and ackPdu.
22 *
23 */
24public class SmsResponse {
25    /** Message reference of the just-sent SMS. */
26    int messageRef;
27    /** ackPdu for the just-sent SMS. */
28    String ackPdu;
29    /**
30     * errorCode: See 3GPP 27.005, 3.2.5 for GSM/UMTS,
31     * 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, -1 if unknown or not applicable.
32     */
33    int errorCode;
34
35    public SmsResponse(int messageRef, String ackPdu, int errorCode) {
36        this.messageRef = messageRef;
37        this.ackPdu = ackPdu;
38        this.errorCode = errorCode;
39    }
40
41    public String toString() {
42        String ret = "{ messageRef = " + messageRef
43                        + ", errorCode = " + errorCode
44                        + ", ackPdu = " + ackPdu
45                        + "}";
46        return ret;
47    }
48}
49