]>
cloud.milkyroute.net Git - dolphin.git/blob - src/fileitemcapabilities.h
1 /***************************************************************************
2 * Copyright (C) 2008 by Peter Penz <peter.penz@gmx.at> *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
20 #ifndef FILEITEMCAPABILITIES_H
21 #define FILEITEMCAPABILITIES_H
26 * @brief Provides information about the access capabilities of file items.
28 * As soon as one file item does not support a specific capability, it is
29 * marked as unsupported for all items.
31 class FileItemCapabilities
34 FileItemCapabilities(const KFileItemList
& items
);
35 virtual ~FileItemCapabilities();
36 bool supportsReading() const;
37 bool supportsDeleting() const;
38 bool supportsWriting() const;
39 bool supportsMoving() const;
43 bool m_supportsReading
: 1;
44 bool m_supportsDeleting
: 1;
45 bool m_supportsWriting
: 1;
46 bool m_supportsMoving
: 1;
50 inline bool FileItemCapabilities::supportsReading() const
52 return m_supportsReading
;
55 inline bool FileItemCapabilities::supportsDeleting() const
57 return m_supportsDeleting
;
60 inline bool FileItemCapabilities::supportsWriting() const
62 return m_supportsWriting
;
65 inline bool FileItemCapabilities::supportsMoving() const
67 return m_supportsMoving
;
70 inline bool FileItemCapabilities::isLocal() const