Diffstat (limited to 'noncore/apps/opie-console/receive_layer.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/receive_layer.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/noncore/apps/opie-console/receive_layer.h b/noncore/apps/opie-console/receive_layer.h index 0cfe16d..157c7e5 100644 --- a/noncore/apps/opie-console/receive_layer.h +++ b/noncore/apps/opie-console/receive_layer.h @@ -24,90 +24,98 @@ public: Binary }; /** * What features to use * DISCUSS IT!!!! * see rz --help for more info */ enum Features { Append = 0, AllowRemoteCommands = 1, WriteToNull = 2, Escape = 4, Rename = 8, OpenSync = 16, ProtectExisting = 32, Resume = 64, KeepUppercase = 128, DisableRestrict = 256, Restricted = 512, Overwrite = 1024 }; /** - * which protocol to use? + * Error codes */ - enum Type{ - SZ = 0, - SX, - SY + enum Error { + Unknown = 0, + StartError }; /** * C'tor constructs an new Object * @param lay The Layer to be used * @param t The Type * @param startDir In which dir should files be received? */ - ReceiveLayer( IOLayer* lay, Type t, const QString& startDir = QString::null ); + ReceiveLayer( IOLayer* lay, const QString& startDir = QString::null ); virtual ~ReceiveLayer(); public slots: /** * start receiving in current dir * with protocol from the c'tor */ virtual void receive() = 0; /** * start to receive in dir with type * from the c'tor */ virtual void receive( const QString& dir ) = 0; /** * advanced method with features and Mode */ - virtual void receive( const QString& dir, Mode, Features ) {} + virtual void receive( const QString& dir, Mode, Features ); /** * cancel receive */ virtual void cancel(); signals: /** * error happend * error code as int * and a QString for UI translated string */ void error(int, const QString& ); /** * progress * @param file The completed path to the file which is received * @param speed the speed in bps * @param hour The hours remaining * @param minutes The miniutes remaining * @param seconds The seconds remaining */ void progress( const QString& file, int progress, int speed, int hour, int min, int seconds ); /** * completely received a file */ void received( const QString& file ); +protected: + QString m_curDir; + IOLayer* layer(); + /* from a variable set from the outside */ + QString currentDir()const; + void changeDir( const QString& ); +private: + IOLayer* m_layer; + }; #endif |