⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filesystemoperator-h.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/src/qtopiadesktop/common/filesystemoperator.h:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>filesystemoperator.h Include File</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="200" align="left" valign="top"><a href="index.html"><img height="27" width="472" src="dochead.png" border="0"></a><br><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qtopia</font>   <a href="index.html">Home</a> - <a href="qtopiaclasses.html">Classes</a> - <a href="qtopiaannotated.html">Annotated</a> - <a href="qtopiafunctions.html">Functions</a> - <a href="qtindex.html">Qt Embedded</a></td><td align="right" valign="top">  <table border="0" cellpadding="0" cellspacing="0" width="137">  <tr>  <td><a href="http://www.trolltech.com/company/about/trolls.html"><img height="100" width="100" src="face.png" border="0"></a></td>  <td><img height="100" width="100" src="qtlogo.png" align="top" border="0"></td>  </tr>  </table></td></tr></table><h1 align=center>filesystemoperator.h</h1><p>This is the verbatim text of the filesystemoperator.h include file. It is provided only for illustration; the copyright remains with Trolltech.<hr><pre>/************************************************************************ Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.**** This file is part of the Qtopia Environment.**** Licensees holding valid Qtopia Developer license may use this** file in accordance with the Qtopia Developer License Agreement** provided with the Software.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR** PURPOSE.**** email sales@trolltech.com for information about Qtopia License** Agreements.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.************************************************************************/#ifndef QTOPIA_FILE_SYSTEM_OPERATOR_H#define QTOPIA_FILE_SYSTEM_OPERATOR_H#include &lt;qurloperator.h&gt;#include &lt;qnetworkprotocol.h&gt;#include &lt;qguardedptr.h&gt;#include &lt;qtimer.h&gt;#include &lt;qptrlist.h&gt;#include &lt;qtopia/qpeglobal.h&gt;#include "qpcwinexports.h"#include "doclnk.h"class FtpCommand;class QPC_EXPORT TransferReceipt : public QObject{    friend class FtpCommand;    friend class FileSystemOperator;    friend class QPtrList&lt;TransferReceipt&gt;;    Q_OBJECTpublic:    enum OperationType { Retrieve=0, Send, List, Remove, RSync };    OperationType operationType() const { return fOpType; }    enum FileType { Setting=0, AppData, Documents, Other };    FileType fileType() const { return fFileType; }    const QString &amp;filename() const { return fFname; }    const QString &amp;name() const { return fName; }    const QString &amp;arg() const { return fArg; }    bool succeeded() const;    QNetworkProtocol::Error error() const { return fError; }    bool op1Finished() const;    bool op2Finished() const;    int getTotalBytesTransferred();signals:    /** Signals when the ftp operation has actually been called */    void operationCreated(TransferReceipt *thisPtr);    void listing(const QValueList&lt;QUrlInfo&gt; &amp;listing,		 TransferReceipt *thisPtr);    void progress(int bytesDone, int bytesTotal,		  QNetworkOperation *op, TransferReceipt *thisPtr);    void finished(TransferReceipt *thisPtr);    void pdaMessage( const QString &amp;call, const QByteArray &amp;data );protected:    bool match( QNetworkOperation *op ) const;    bool finished() const;    void finished( QNetworkOperation *op );    /** emit start signal */    void setOperation(QNetworkOperation *op);    void setOperations(QNetworkOperation *op1, QNetworkOperation *op2);    void notifyListing(const QValueList&lt;QUrlInfo&gt; &amp;listing);    void notifyProgress(int bytesDone, int bytesTotal,			QNetworkOperation *op);    void setError( QNetworkProtocol::Error e );    // This was added just as a workaround for transferring zero-byte files.    void setOp2State(QNetworkProtocol::State newState) { fOp2State = newState; }private:    void processed();    TransferReceipt(OperationType optype, FileType ftype,		    const QString &amp;file, const QString &amp;argParam);    virtual ~TransferReceipt() { }    OperationType fOpType;    FileType fFileType;    QString fFname;    QString fName;    QString fArg;    QNetworkOperation *fOp1;    QNetworkOperation *fOp2;    QNetworkProtocol::State fOp1State;    QNetworkProtocol::State fOp2State;    QNetworkProtocol::Error fError;    int mTotalBytesTransferred;};#define QPC_DEFINED_TRANSFERRECEIPT#include &lt;private/ftpcommands_p.h&gt;class Account;class CheckRemotePath;class RemoteDir;class QdDocLnk;class PalmtopConnection;class FileSystemOperatorPrivate;class QPC_EXPORT FileSystemOperator : public QUrlOperator{    friend class SendCommand;    friend class RetrieveCommand;    friend class ListCommand;    friend class RemoveCommand;    friend class RdiffRetrieve;    friend class RdiffSend;    friend class FtpCommand;    Q_OBJECTpublic:    FileSystemOperator( PalmtopConnection *con );    virtual ~FileSystemOperator();    static const QString &amp;localCenterPath();    static QString localBackupPath() { return localCenterPath() + "Backup/"; }    QString localDocsRoot() const;    QString localDocsPath(const QString &amp;mimetype) const;    QString remoteSettingsPath() const { return fRemoteBasePath + "Settings/";}    QString remoteDocsPath(const QString &amp;mimeType) const;    QString remoteAppPath(const QString &amp;app) const;    QString remoteDocsRoot() const;    QString remoteAppRoot() const;    QString remoteDocURI( const QString &amp;remoteFileName ) const;    enum ExtType { LocalBaseFile, LocalChangesFile, RemoteBaseFile,		   RemoteChangesFile};    /** LocalBaseFile = ~/.palmtopcenter/&lt;app&gt;/filename    *   LocalChangesFile = ~/.palmtopcenter/&lt;pda id&gt;/Applications/&lt;app&gt;/filename.local_changes    *   RemoteBaseFile = (dir same as above)/filename.remote_base    *   RemoteChangesFile = (dir same as above)/filename.remote_changes    */    QString localAppFile( const QString &amp;app, const QString &amp;filename,			  ExtType type ) const;    /** Same extentions as above */    QString localSettingsFile( const QString &amp;filename,			       ExtType type = LocalChangesFile ) const;    QString localAppPath(const QString &amp;app,			 ExtType type=LocalChangesFile ) const;    QString localSettingsPath( ExtType type=LocalChangesFile ) const;    static bool ensureLocalPath(const QString &amp;localPath);    static QString stripPath(const QString &amp;filePath);    static QString fileBase(const QString &amp;filePath);    static QString dirPath(const QString &amp;filePath);    static QString tempPath();    static bool copyLocalFile(const QString &amp;source,			      const QStringList &amp;destFiles);    QGuardedPtr&lt;TransferReceipt&gt; sendSetting(const QString &amp;filename);    QGuardedPtr&lt;TransferReceipt&gt; sendSetting(const QString &amp;localFile,					     const QString &amp;filename);    QGuardedPtr&lt;TransferReceipt&gt; retrieveSetting(const QString &amp;filename,						 uint size=100,						 bool remoteChangesFile=TRUE);    QGuardedPtr&lt;TransferReceipt&gt; removeSetting(const QString &amp;filename);    QGuardedPtr&lt;TransferReceipt&gt; listSettings();    // when calling this method, make sure the Remote Changes file is the    // same as the remote file so rdiff will work correctly; uses    // the RemoteBaseFile if exists, or the LocalChangesFile if not    QGuardedPtr&lt;TransferReceipt&gt; sendAppData(const QString &amp;app,					     const QString &amp;filename);    QGuardedPtr&lt;TransferReceipt&gt; sendAppData(const QString &amp;app,					     const QString &amp;localFilePath,					     const QString &amp;remoteFilename);    QGuardedPtr&lt;TransferReceipt&gt; retrieveAppData(const QString &amp;app,						 const QString &amp;filename,						 uint size=100,						 bool remoteChangesFile=TRUE);    QGuardedPtr&lt;TransferReceipt&gt; listAppData(const QString &amp;app);    QGuardedPtr&lt;TransferReceipt&gt; removeAppData(const QString &amp;app,					       const QString &amp;filename);    /** Sends the lnk file and the file itself; return both receipts */    TransferReceipt *sendDocument(const QdDocLnk &amp;lnk, bool link);    QPtrList&lt;TransferReceipt&gt; removeDocument(QdDocLnk &amp;lnk);    /** /a size is needed for progress bar information only     * If /a destDir is null, then it downloads to the mirrored directory */    TransferReceipt *retrieveDocument( const QString &amp;docRoot,				       const QString &amp;filename,				       const QString &amp;mimetype,				       uint size=1024,				       QString destDir=QString::null);    /** /a mimetype can be the full mime type (i.e. text/plain) or just     *  the mime group (i.e. text) */    QGuardedPtr&lt;TransferReceipt&gt; listDocuments(const QString &amp;docRoot,					       const QString &amp;mimetype);    TransferReceipt *removeDocument(const QString &amp;docRoot,				    const QString &amp;filename,				    const QString &amp;mimetype);    QGuardedPtr&lt;TransferReceipt&gt; listDocumentRoot();    QGuardedPtr&lt;TransferReceipt&gt; list(const QString &amp;path);    QGuardedPtr&lt;TransferReceipt&gt; sendOther( const QString &amp;localFile,					    const QString &amp;remoteFile );    QGuardedPtr&lt;TransferReceipt&gt; retrieveOther( const QString &amp;remoteFile,						const QString &amp;localFile,						uint size=1024 );    QGuardedPtr&lt;TransferReceipt&gt; removeOther( const QString&amp; path, const QString&amp; fileName );    /** Clears all processing and waiting commands */    virtual void stop();    bool isExecuting() const { return (processingQueue.count() &gt; 0); }    // Would like to change the qcop call so you can specify the files    // to clean up so this method is not necessary but can be done    // whenever an rsync command is done    void rdiffCleanup();signals:    void pdaVersionReceived(int major, int minor, const QString&amp;);    void handshakeDone( bool locked );    void start(int totalNumBytes);    void newTotalBytes(int newTotal);    void progressUpdate( int numBytesDone, int totalNumBytes,			 TransferReceipt *receipt );    void progress(int bytesDone);    void done(int totalNumBytes);    void executing(TransferReceipt *r);    void errorExecuting(TransferReceipt *r);    void successExecuting(TransferReceipt *r);    void pdaMessage( const QString &amp;call, const QByteArray &amp;params );public slots:    void setConnectionEnabled(bool v);    void setConnected() { setConnectionEnabled(true); }    void setDisconnected() { setConnectionEnabled(false); }private slots:    void opFinished(QNetworkOperation *op);    void setFtpConnectionState(int state, const QString &amp;desc);    void listing(const QValueList&lt;QUrlInfo&gt; &amp;children,		 QNetworkOperation *op);    void progress(int bytesDone, int bytesTotal, QNetworkOperation *op);    void processNext();    void pdaHomeDir( const QString &amp;call, const QByteArray &amp;data );    void pdaVersion( const QString &amp;call, const QByteArray &amp;data );private:    enum Priority{ Fifo=0, Enqueue, ProcessNext };    void schedule(FtpCommand *cmd, Priority p=Fifo);    void startProcess();    void process(FtpCommand *cmd);    void processed(FtpCommand *cmd);    void setProgress(uint bytesDone, uint totalBytes, FtpCommand *cmd);    void initConnection();    QString appPath(const QString &amp;app) const;    QString settingsPath() const { return QString("Settings/"); }    static const QString &amp;remoteTempPath() { return fRemoteTempPath; }    QString docsPath(const QString &amp;docRoot, const QString &amp;mimeType) const;    QGuardedPtr&lt;TransferReceipt&gt; send(const QString &amp;localFile,				      const QString &amp;remoteFile,				      TransferReceipt::FileType type,				      const QString &amp;arg, Priority priority = Fifo);    QGuardedPtr&lt;TransferReceipt&gt; retrieve(const QString &amp;remoteFile,					  const QString &amp;localFile,					  TransferReceipt::FileType type,					  const QString &amp;arg,					  uint size=1024);    QGuardedPtr&lt;TransferReceipt&gt; remove(QString path,					const QString &amp;file,					TransferReceipt::FileType type,					const QString &amp;arg);    QGuardedPtr&lt;TransferReceipt&gt; list(QString path,				      TransferReceipt::FileType type,				      const QString &amp;arg,				      QString filter="*",				      Priority priority = Fifo);    QGuardedPtr&lt;TransferReceipt&gt; list(const QString &amp;absFilePath,				      TransferReceipt::FileType type);    bool isConnectionEnabled() const { return fConnectionEnabled; }    const QString &amp;ftpLogin() const { return fFtpLogin; }    const QString &amp;localPdaPath() const { return fLocalPdaPath; }    const QString &amp;remoteBasePath() const { return fRemoteBasePath; }    void setNormalTimeout();    static QString extStr( ExtType t );    static ExtType extType( bool remoteChangesFile );    // convienve method for the above method    static QString extStr( bool remoteChangesFile ){ return extStr( extType(remoteChangesFile) ); }    static const QString RDIFF_SIG_EXT;    static const QString RDIFF_DIFF_EXT;    PalmtopConnection *qcopCon() { return mQcopConn; }    QString fFtpLogin;    static QString fLocalCenterPath;    QString fLocalPdaPath;    QString fRemoteBasePath;    static QString fTempPath;    static QString fRemoteTempPath;    bool fConnectionEnabled;    QPtrList&lt; FtpCommand &gt; waitQueue;    QPtrList&lt; FtpCommand &gt; processingQueue;    uint totalTransferBytes;    uint bytesDone;    PalmtopConnection *mQcopConn;    bool mInOpFinished;    bool mSetLongTimeout;    FileSystemOperatorPrivate *d;};#endif</pre><!-- eof --><p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright &copy; 2001-2004 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align="right"><div align="right">Qtopia version 2.0.0</div></table></div></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -