~ubuntu-branches/ubuntu/utopic/nepomuk-core/utopic

« back to all changes in this revision

Viewing changes to libnepomukcore/resource/resourcemanager_p.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-07-26 22:43:09 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120726224309-pf2v1e78ee7uljjp
Tags: 4:4.9.0a-0ubuntu1
* Use direct build-depends versions rather than kde-sc-dev-latest
* New upstream release
* New symbols, rename libnepomukcore4 to libnepomukcore4abi and enable Debian ABI manager

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    class MainModel;
42
42
    class ResourceWatcher;
43
43
 
44
 
    typedef QHash<KUrl, Nepomuk2::ResourceData*> ResourceDataHash;
 
44
    typedef QHash<KUrl, ResourceData*> ResourceDataHash;
45
45
 
46
46
    class ResourceManagerPrivate
47
47
    {
61
61
        /// successfully ran determineUri()
62
62
        ResourceDataHash m_initializedData;
63
63
 
64
 
        /// contains all non-initialized ResourceData objects created in data(QUrl)
65
 
        ResourceDataHash m_uriKickoffData;
 
64
        /// Maps the nie:url -> ResourceData*
 
65
        QHash<QUrl, ResourceData*> m_urlKickOff;
 
66
        /// Maps the nao:identifier -> ResourceData* (Used in tags)
 
67
        QHash<QString, ResourceData*> m_identifierKickOff;
66
68
 
67
69
        QAtomicInt dataCnt;
68
70
 
101
103
         */
102
104
        ResourceData* dataForResourceUri( const QUrl& uri, const QUrl& type );
103
105
 
104
 
        bool dataCacheFull() const;
105
 
 
106
 
        /**
107
 
         * Delete unused ResourceData objects from the cache.
108
 
         * \param num The number of needed slots. The ResourceData constructor
109
 
         * uses this to make room for itself. Use < 0 to free the complete cache.
110
 
         *
111
 
         * Does NOT lock the mutex.
112
 
         */
113
 
        void cleanupCache( int num = 1 );
114
 
 
115
106
        bool shouldBeDeleted( ResourceData* rd ) const;
116
107
 
117
 
        void addToKickOffList( ResourceData* rd, const QSet<KUrl>& uris );
118
 
 
119
 
        QList<ResourceData*> allResourceData();
120
 
        QList<ResourceData*> allResourceDataOfType( const QUrl& type );
121
 
        QList<ResourceData*> allResourceDataWithProperty( const QUrl& _uri, const Variant& v );
 
108
        QSet<ResourceData*> allResourceData();
122
109
 
123
110
        void _k_storageServiceInitialized( bool );
124
111
        void _k_dbusServiceUnregistered( const QString& serviceName );
125
112
 
126
113
    private:
127
114
        ResourceData* findData( const QUrl& uri );
128
 
 
129
 
        QUrl m_mainContext;
130
115
    };
131
116
}
132
117