📄 mmconstants.java
字号:
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Tambur MMS library.
*
* The Initial Developer of the Original Code is FlyerOne Ltd.
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Anders Lindh <alindh@flyerone.com>
*
* ***** END LICENSE BLOCK ***** */
package net.tambur.mms;
/**
* This class contains all constants related to MMMessages
*
* @author Anders Lindh
* @copyright Copyright FlyerOne Ltd 2005
* @version $Revision: 1.1.1.1 $ $Date: 2005/04/14 09:04:10 $
*/
public class MMConstants {
// Constants used in representing MM messages
public static final int MESSAGE_TYPE_M_SEND_REQ = 0;
public static final int MESSAGE_TYPE_M_SEND_CONF = 1;
public static final int MESSAGE_TYPE_M_NOTIFICATION_IND = 2;
public static final int MESSAGE_TYPE_M_NOTIFYRESP_IND = 3;
public static final int MESSAGE_TYPE_M_RETRIEVE_CONF = 4;
public static final int MESSAGE_TYPE_M_ACKNOWLEDGE_IND = 5;
public static final int MESSAGE_TYPE_M_DELIVERY_IND = 6;
protected static final String[] MESSAGE_TYPES = {"m-send-req",
"m-send-conf",
"m-notification-ind",
"m-notifyresp-ind",
"m-retrieve-conf",
"m-acknowledge-ind",
"m-delivery-ind"};
public static final int MESSAGE_CLASS_PERSONAL = 0;
public static final int MESSAGE_CLASS_ADVERTISEMENT = 1;
public static final int MESSAGE_CLASS_INFORMATIONAL = 2;
public static final int MESSAGE_CLASS_AUTO = 3;
protected static final String[] MESSAGE_CLASSES = {"Personal",
"Advertisement",
"Informational",
"Auto"};
public static final int PRIORITY_LOW = 0;
public static final int PRIORITY_NORMAL = 1;
public static final int PRIORITY_HIGH = 2;
protected static final String[] PRIORITIES = {"Low",
"Normal",
"High"};
public static final int RESPONSE_STATUS_OK = 0;
public static final int RESPONSE_STATUS_ERROR_UNSPECIFIED = 1;
public static final int RESPONSE_STATUS_ERROR_SERVICE_DENIED = 2;
public static final int RESPONSE_STATUS_ERROR_MESSAGE_FORMAT_CORRUPT = 3;
public static final int RESPONSE_STATUS_ERROR_SENDING_ADDRESS_UNSPECIFIED = 4;
public static final int RESPONSE_STATUS_ERROR_MESSAGE_NOT_FOUND = 5;
public static final int RESPONSE_STATUS_ERROR_NETWORK_PROBLEM = 6;
public static final int RESPONSE_STATUS_ERROR_CONTENT_NOT_ACCEPTED = 7;
public static final int RESPONSE_STATUS_ERROR_UNSUPPORTED_MESSAGE = 8;
protected static final String[] RESPONSE_STATUSES = {"ok",
"Error-unspecified",
"Error-service-denied",
"Error-message-format-corrupt",
"Error-sending-address-unresolved",
"Error-message-not-found",
"Error-network-problem",
"Error-content-not-accepted",
"Error-unsupported-message"};
public static final int STATUS_EXPIRED = 0;
public static final int STATUS_RETRIEVED = 1;
public static final int STATUS_REJECTED = 2;
public static final int STATUS_DEFERRED = 3;
public static final int STATUS_UNRECOGNIZED = 4;
protected static final String[] STATUSES = { "Expired",
"Retrieved",
"Rejected",
"Deferred",
"Unrecognised"};
public static final int MMS_VERSION_1_0 = (1 << 4);
// valid content types (http://www.wapforum.org/wina/wsp-content-type.htm)
// array index is the encoded value
protected static String[] CONTENT_TYPES = {"*/*",
"text/*",
"text/html",
"text/plain",
"text/x-hdml",
"text/x-ttml",
"text/x-vCalendar",
"text/x-vCard",
"text/vnd.wap.wml",
"text/vnd.wap.wmlscript",
"text/vnd.wap.wta-event",
"multipart/*",
"multipart/mixed",
"multipart/form-data",
"multipart/byterantes",
"multipart/alternative",
"application/*",
"application/java-vm",
"application/x-www-form-urlencoded",
"application/x-hdmlc",
"application/vnd.wap.wmlc",
"application/vnd.wap.wmlscriptc",
"application/vnd.wap.wta-eventc",
"application/vnd.wap.uaprof",
"application/vnd.wap.wtls-ca-certificate",
"application/vnd.wap.wtls-user-certificate",
"application/x-x509-ca-cert",
"application/x-x509-user-cert",
"image/*",
"image/gif",
"image/jpeg",
"image/tiff",
"image/png",
"image/vnd.wap.wbmp",
"application/vnd.wap.multipart.*",
"application/vnd.wap.multipart.mixed",
"application/vnd.wap.multipart.form-data",
"application/vnd.wap.multipart.byteranges",
"application/vnd.wap.multipart.alternative",
"application/xml",
"text/xml",
"application/vnd.wap.wbxml",
"application/x-x968-cross-cert",
"application/x-x968-ca-cert",
"application/x-x968-user-cert",
"text/vnd.wap.si",
"application/vnd.wap.sic",
"text/vnd.wap.sl",
"application/vnd.wap.slc",
"text/vnd.wap.co",
"application/vnd.wap.coc",
"application/vnd.wap.multipart.related",
"application/vnd.wap.sia",
"text/vnd.wap.connectivity-xml",
"application/vnd.wap.connectivity-wbxml",
"application/pkcs7-mime",
"application/vnd.wap.hashed-certificate",
"application/vnd.wap.signed-certificate",
"application/vnd.wap.cert-response",
"application/xhtml+xml",
"application/wml+xml",
"text/css",
"application/vnd.wap.mms-message",
"application/vnd.wap.rollover-certificate",
"application/vnd.wap.locc+wbxml",
"application/vnd.wap.loc+xml",
"application/vnd.syncml.dm+wbxml",
"application/vnd.syncml.dm+xml",
"application/vnd.syncml.notification",
"application/vnd.wap.xhtml+xml" };
// types used for encoding
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -