smsdecoder.h
来自「Qtopia下的邮件处理程序」· C头文件 代码 · 共 100 行
H
100 行
/******************************************************************************** Copyright (C) 2000-2006 TROLLTECH ASA. All rights reserved.**** This file is part of the Phone Edition of the Qtopia Toolkit.**** Licensees holding a valid license agreement from Trolltech or any of its** authorized distributors may use this file in accordance with** the License Agreement provided with the Licensed Software.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for** information about Trolltech's Commercial License Agreements.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.********** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#ifndef _SMSDECODER_H#define _SMSDECODER_H#include <qstring.h>class QSMSMessage;class MailMessage;class WbXmlReader;class SMSDecoder{public: SMSDecoder(); virtual ~SMSDecoder(); // Convert an SMS application port number into a MIME type. // Returns null if no corresponding MIME type. static QString mimeTypeForPort( int port ); // Get an SMS message decoder for a particular port number. // Returns null if there is no special decoding support. static SMSDecoder *decoder( int port ); // Decode the contents of an SMS message into a mail message, // according to the rules of a port number handler. virtual void decode( MailMessage& mail, const QSMSMessage& msg ) = 0; // Format all of the body parts in an SMS message. static void formatMessage( MailMessage& mail, const QSMSMessage& msg );};class SMSMultipartDecoder : public SMSDecoder{public: SMSMultipartDecoder(); virtual ~SMSMultipartDecoder(); virtual void decode( MailMessage& mail, const QSMSMessage& msg );};class SMSLogoDecoder : public SMSDecoder{public: SMSLogoDecoder( bool operatorHeader ); virtual ~SMSLogoDecoder(); virtual void decode( MailMessage& mail, const QSMSMessage& msg );private: bool operatorHeader;};class SMSWbXmlDecoder : public SMSDecoder{public: SMSWbXmlDecoder( WbXmlReader *reader, const QString& mimeType, bool pushHeader ); virtual ~SMSWbXmlDecoder(); virtual void decode( MailMessage& mail, const QSMSMessage& msg );private: WbXmlReader *reader; QString mimeType; bool pushHeader;};class SMSWapPushDecoder : public SMSDecoder{public: SMSWapPushDecoder(); virtual ~SMSWapPushDecoder(); virtual void decode( MailMessage& mail, const QSMSMessage& msg );};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?