24#include <opensync/opensync.h>
33Result::Result( Type type )
38Result::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 );
110void Result::setName( const TQString &name )
115TQString Result::name() const
120void Result::setMessage( const TQString &message )
125TQString Result::message() const
130void Result::setType( Type type )
135Result::Type Result::type() const
140bool Result::isError() const
142 return mType != NoError;
145Result::operator bool () const
147 return ( mType != NoError );
|