2 * Copyright (C) 2007 Esmertec AG.
3 * Copyright (C) 2007 The Android Open Source Project
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 package com.google.android.mms.pdu;
20 import com.google.android.mms.InvalidHeaderValueException;
22 public class SendConf extends GenericPdu {
25 * Since the Pdu corresponding to this class is constructed
26 * by the Proxy-Relay server, this class is only instantiated
29 * @throws InvalidHeaderValueException if error occurs.
31 public SendConf() throws InvalidHeaderValueException {
33 setMessageType(PduHeaders.MESSAGE_TYPE_SEND_CONF);
37 * Constructor with given headers.
39 * @param headers Headers for this PDU.
41 SendConf(PduHeaders headers) {
46 * Get Message-ID value.
50 public byte[] getMessageId() {
51 return mPduHeaders.getTextString(PduHeaders.MESSAGE_ID);
55 * Set Message-ID value.
57 * @param value the value
58 * @throws NullPointerException if the value is null.
60 public void setMessageId(byte[] value) {
61 mPduHeaders.setTextString(value, PduHeaders.MESSAGE_ID);
65 * Get X-Mms-Response-Status.
69 public int getResponseStatus() {
70 return mPduHeaders.getOctet(PduHeaders.RESPONSE_STATUS);
74 * Set X-Mms-Response-Status.
76 * @param value the values
77 * @throws InvalidHeaderValueException if the value is invalid.
79 public void setResponseStatus(int value) throws InvalidHeaderValueException {
80 mPduHeaders.setOctet(value, PduHeaders.RESPONSE_STATUS);
84 * Get X-Mms-Transaction-Id field value.
86 * @return the X-Mms-Report-Allowed value
88 public byte[] getTransactionId() {
89 return mPduHeaders.getTextString(PduHeaders.TRANSACTION_ID);
93 * Set X-Mms-Transaction-Id field value.
95 * @param value the value
96 * @throws NullPointerException if the value is null.
98 public void setTransactionId(byte[] value) {
99 mPduHeaders.setTextString(value, PduHeaders.TRANSACTION_ID);
103 * Optional, not supported header fields:
105 * public byte[] getContentLocation() {return null;}
106 * public void setContentLocation(byte[] value) {}
108 * public EncodedStringValue getResponseText() {return null;}
109 * public void setResponseText(EncodedStringValue value) {}
111 * public byte getStoreStatus() {return 0x00;}
112 * public void setStoreStatus(byte value) {}
114 * public byte[] getStoreStatusText() {return null;}
115 * public void setStoreStatusText(byte[] value) {}