24 #include <opensync/opensync.h> 26 using namespace QSync; 33 Result::Result( Type type ) 38 Result::Result( OSyncError **error, bool deleteError ) 40 OSyncErrorType otype = osync_error_get_type( error ); 48 case OSYNC_ERROR_GENERIC: 51 case OSYNC_ERROR_IO_ERROR: 54 case OSYNC_ERROR_NOT_SUPPORTED: 57 case OSYNC_ERROR_TIMEOUT: 60 case OSYNC_ERROR_DISCONNECTED: 63 case OSYNC_ERROR_FILE_NOT_FOUND: 66 case OSYNC_ERROR_EXISTS: 69 case OSYNC_ERROR_CONVERT: 72 case OSYNC_ERROR_MISCONFIGURATION: 73 type = Misconfiguration; 75 case OSYNC_ERROR_INITIALIZATION: 76 type = Initialization; 78 case OSYNC_ERROR_PARAMETER: 81 case OSYNC_ERROR_EXPECTED: 84 case OSYNC_ERROR_NO_CONNECTION: 87 case OSYNC_ERROR_TEMPORARY: 90 case OSYNC_ERROR_LOCKED: 93 case OSYNC_ERROR_PLUGIN_NOT_FOUND: 94 type = PluginNotFound; 99 mName = TQString::fromUtf8( osync_error_get_name( error ) ); 100 mMessage = TQString::fromUtf8( osync_error_print( error ) ); 103 osync_error_free( error ); 110 void Result::setName( const TQString &name ) 115 TQString Result::name() const 120 void Result::setMessage( const TQString &message ) 125 TQString Result::message() const 130 void Result::setType( Type type ) 135 Result::Type Result::type() const 140 bool Result::isError() const 142 return mType != NoError; 145 Result::operator bool () const 147 return ( mType != NoError );
|