smsclient.h
来自「Qtopia下的邮件处理程序」· C头文件 代码 · 共 111 行
H
111 行
/******************************************************************************** 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 SmsClient_H#define SmsClient_H#include <qlist.h>#include <qobject.h>#include <qstring.h>#include "client.h"#include <quuid.h>#include <qtopiaphone/qphone.h>#include <qstringlist.h>struct RawSms{ QString number; QString body;};class QPhoneLine;class QSMSRequest;class QSMSMessage;class QRegExp;class SmsClient: public Client{ Q_OBJECT public: static QString vCardPrefix();public: SmsClient(); ~SmsClient(); void setAccount(MailAccount *_account); void newConnection(); void addMail(const QString& number, const QString& body); void clearList(); // Determines if a string is in the form * bool smsAddress(const QString &); // Determines if a string is in the form "^\\+?\\d[\\d-]*$" bool validSmsAddress(const QString &); // Separates the sms (phone numbers) addresses from the passed address list // Returns the sms addressses and modifies the passed list QStringList separateSmsAddresses(QStringList &); // Format an outgoing message QString formatOutgoing( const QString& subject, const QString &body ); bool hasDeleteImmediately() const; void deleteImmediately(const QString& serverUid); void resetNewMailCount();signals: void errorOccurred(int, QString &); void updateStatus(const QString &); void transferredSize(int); void mailSent(int); void newMessage(const QString &, const QString &, const QUuid &, uint, bool); public slots: void errorHandling(int, QString msg);private slots: void finished(const QPhoneLine &, const QString &, bool); void messageCount( const QPhoneLine&, int ); void fetched( const QPhoneLine&, const QString&, const QSMSMessage& ); void queryResult( QPhoneLine::QueryType type, const QString& value );private: QList<RawSms> smsList; QPhoneLine *line; QSMSRequest *req; bool smsFetching, smsSending; int total; int count; bool success; QString simIdentity; bool haveSimIdentity; bool sawNewMessage; QStringList activeIds; MailAccount *account; static QRegExp *sSmsAddress, *sValidSmsAddress;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?