/*
   Copyright (C) 2008 Norbert Frese <nf2 at scheinwelt at>

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License (LGPL) as published by the Free Software Foundation;
   either version 2 of the License, or (at your option) any later
   version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

#ifndef GIOBRIDGEERRORMAPPER_H_
#define GIOBRIDGEERRORMAPPER_H_

#include <kurl.h>
#include <kio/ioslave_defaults.h>
#include <glib.h>
#include <gio/gio.h>

class GioBridgeErrorMapper
{
public:
    int resultErrId;
    QString resultText;
    
    enum OperationHint {
        IS_FILE_OP = 0x01000000,
        IS_DIR_OP = 0x02000000,
        
        OP_OTHER   =  0,
        OP_READ    =  1 | IS_FILE_OP,
        OP_WRITE   =  2 | IS_FILE_OP,
        OP_CLOSE   =  3 | IS_FILE_OP,
        OP_STAT    =  4 | IS_FILE_OP,
        OP_LIST    =  5 | IS_DIR_OP,
        OP_MKDIR   =  6 | IS_DIR_OP,
        OP_RMDIR   =  7 | IS_DIR_OP,
        OP_RENAME  =  8 | IS_FILE_OP | IS_DIR_OP,
        OP_CHMOD   =  9 | IS_FILE_OP | IS_DIR_OP,
        OP_CHOWN   = 10 | IS_FILE_OP | IS_DIR_OP,
        OP_DELETE  = 11 | IS_FILE_OP | IS_DIR_OP,
        OP_SETTIME = 12 | IS_FILE_OP | IS_DIR_OP
        
    };
    
    GioBridgeErrorMapper(GError * err, OperationHint opHint, const KUrl & url, const KUrl & targetUrl);
    
    
};



#endif /*GIOBRIDGEERRORMAPPER_H_*/
