kitchensync
result.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef TQSYNC_RESULT_H
00023 #define TQSYNC_RESULT_H
00024
00025 #include <tqstring.h>
00026
00027 struct OSyncError;
00028
00029 namespace QSync {
00030
00031 class Result
00032 {
00033 public:
00037 enum Type {
00038 NoError,
00039 GenericError,
00040 IOError,
00041 NotSupported,
00042 Timeout,
00043 Disconnected,
00044 FileNotFound,
00045 Exists,
00046 Convert,
00047 Misconfiguration,
00048 Initialization,
00049 Parameter,
00050 Expected,
00051 NoConnection,
00052 Temporary,
00053 Locked,
00054 PluginNotFound
00055 };
00056
00060 Result();
00061
00065 Result( Type type );
00066
00071 Result( OSyncError **, bool deleteError = true );
00072
00076 ~Result();
00077
00081 void setName( const TQString &name );
00082
00086 TQString name() const;
00087
00091 void setMessage( const TQString &message );
00092
00096 TQString message() const;
00097
00101 void setType( Type type );
00102
00106 Type type() const;
00107
00111 operator bool () const;
00112
00116 bool isError() const;
00117
00118 private:
00119 TQString mName;
00120 TQString mMessage;
00121 Type mType;
00122 };
00123
00124 }
00125
00126 #endif
|