| 1 | /* |
| 2 | * Copyright (C) 2011 Canonical Ltd. |
| 3 | * |
| 4 | * This program is free software: you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 3 as |
| 6 | * published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | * |
| 16 | * Authors: |
| 17 | * Jim Nelson <[email protected]> |
| 18 | */ |
| 19 | |
| 20 | #ifndef GALLERY_MEDIA_COLLECTION_H_ |
| 21 | #define GALLERY_MEDIA_COLLECTION_H_cxx . . $ `src/media/media-collection.h:21:9`! |
| 22 | |
| 23 | #include <QFileInfo> |
| 24 | #include <QHash> |
| 25 | #include <QSet> |
| 26 | |
| 27 | // core |
| 28 | #include "source-collection.h"cxx . . $ `<file>/src/core/source-collection.h`/ |
| 29 | |
| 30 | class DataObjectcxx . . $ DataObject#; |
| 31 | class MediaSourcecxx . . $ MediaSource#; |
| 32 | class MediaTablecxx . . $ MediaTable#; |
| 33 | |
| 34 | /*! |
| 35 | * \brief The MediaCollection class |
| 36 | */ |
| 37 | class MediaCollectioncxx . . $ MediaCollection# : public SourceCollectioncxx . . $ SourceCollection# |
| 38 | { |
| 39 | Q_OBJECTcxx . . $ MediaCollection#staticMetaObject. |
| 40 | |
| 41 | public: |
| 42 | MediaCollectioncxx . . $ MediaCollection#MediaCollection(59c6a4488b5c41a8).(MediaTablecxx . . $ MediaTable# *mediaTable); |
| 43 | |
| 44 | static bool exposureDateTimeAscendingComparatorcxx . . $ MediaCollection#exposureDateTimeAscendingComparator(dcca5f817d2e687a).(DataObjectcxx . . $ DataObject#* a, DataObjectcxx . . $ DataObject#* b); |
| 45 | static bool exposureDateTimeDescendingComparatorcxx . . $ MediaCollection#exposureDateTimeDescendingComparator(dcca5f817d2e687a).(DataObjectcxx . . $ DataObject#* a, DataObjectcxx . . $ DataObject#* b); |
| 46 | |
| 47 | MediaSourcecxx . . $ MediaSource#* mediaForIdcxx . . $ MediaCollection#mediaForId(4411a4973056f607).(qint64cxx . . $ qint64# id); |
| 48 | const MediaSourcecxx . . $ MediaSource#* mediaFromFileinfocxx . . $ MediaCollection#mediaFromFileinfo(f6e12ac9143d4ff9).(const QFileInfocxx . . $ QFileInfo# &file) const; |
| 49 | bool containsFilecxx . . $ MediaCollection#containsFile(f3b39adf77d9c36c).(const QStringcxx . . $ QString#& filename) const; |
| 50 | |
| 51 | virtual void addcxx . . $ MediaCollection#add(e18e925454d211a5).(DataObjectcxx . . $ DataObject#* object); |
| 52 | virtual void addManycxx . . $ MediaCollection#addMany(a5ca8d31e17284ab).(const QSetcxx . . $ QSet#<DataObjectcxx . . $ DataObject#*>& objects); |
| 53 | |
| 54 | void destroycxx . . $ MediaCollection#destroy(6a436c53d7c83fd9).(MediaSourcecxx . . $ MediaSource# *media, bool destroy_backing); |
| 55 | void destroycxx . . $ MediaCollection#destroy(d6aa4707fe0c3f26).(qint64cxx . . $ qint64# id, bool destroy_backing); |
| 56 | |
| 57 | signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!: |
| 58 | void mediaIsBusycxx . . $ MediaCollection#mediaIsBusy(b45ddcbc8423892c).(bool busy); |
| 59 | void collectionChangedcxx . . $ MediaCollection#collectionChanged(49f6e7a06ebc5aa8).(); |
| 60 | |
| 61 | protected slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 62 | virtual void notifyContentsChangedcxx . . $ MediaCollection#notifyContentsChanged(a79063cbd855ce99).(const QSetcxx . . $ QSet#<DataObjectcxx . . $ DataObject#*>* added, |
| 63 | const QSetcxx . . $ QSet#<DataObjectcxx . . $ DataObject#*>* removed, |
| 64 | bool notify); |
| 65 | |
| 66 | private: |
| 67 | // Used by photoFromFileinfo() to prevent ourselves from accidentally |
| 68 | // seeing a duplicate photo after an edit. |
| 69 | QHashcxx . . $ QHash#<QStringcxx . . $ QString#, MediaSourcecxx . . $ MediaSource#*> m_fileMediaMapcxx . . $ MediaCollection#m_fileMediaMap.; |
| 70 | QHashcxx . . $ QHash#<qint64cxx . . $ qint64#, DataObjectcxx . . $ DataObject#*> m_idMapcxx . . $ MediaCollection#m_idMap.; |
| 71 | MediaTablecxx . . $ MediaTable# *m_mediaTablecxx . . $ MediaCollection#m_mediaTable.; |
| 72 | }; |
| 73 | |
| 74 | #endif // GALLERY_MEDIA_COLLECTION_H_ |