• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

NepomukDaemons

nepomukmainmodel.h

Go to the documentation of this file.
00001 /* 
00002  * This file is part of the Nepomuk KDE project.
00003  * Copyright (C) 2008 Sebastian Trueg <trueg@kde.org>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  * 
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef _NEPOMUK_MAIN_MODEL_H_
00022 #define _NEPOMUK_MAIN_MODEL_H_
00023 
00024 #include <Soprano/Model>
00025 #include <Soprano/Client/DBusClient>
00026 #include <Soprano/Client/LocalSocketClient>
00027 
00028 namespace Soprano {
00029     namespace Client {
00030         class DBusModel;
00031         class LocalSocketModel;
00032     }
00033     namespace Util {
00034         class MutexModel;
00035     }
00036 }
00037 
00038 namespace Nepomuk {
00048     class MainModel : public Soprano::Model
00049     {
00050         Q_OBJECT
00051 
00052     public:
00056         MainModel( QObject* parent = 0 );
00057 
00061         ~MainModel();
00062 
00068         bool isValid() const;
00069 
00070         Soprano::StatementIterator listStatements( const Soprano::Statement &partial ) const;
00071         Soprano::NodeIterator listContexts() const;
00072         Soprano::QueryResultIterator executeQuery( const QString& query, 
00073                                                    Soprano::Query::QueryLanguage language, 
00074                                                    const QString& userQueryLanguage = QString() ) const;
00075         bool containsStatement( const Soprano::Statement &statement ) const;
00076         bool containsAnyStatement( const Soprano::Statement &statement ) const;
00077         bool isEmpty() const;
00078         int statementCount() const;
00079         Soprano::Error::ErrorCode addStatement( const Soprano::Statement& statement );
00080         Soprano::Error::ErrorCode removeStatement( const Soprano::Statement& statement );
00081         Soprano::Error::ErrorCode removeAllStatements( const Soprano::Statement& statement );
00082         Soprano::Node createBlankNode();
00083 
00084     private:
00085         void init();
00086         Soprano::Model* model() const;
00087 
00088         Soprano::Client::DBusClient m_dbusClient;
00089         Soprano::Client::LocalSocketClient m_localSocketClient;
00090         Soprano::Client::DBusModel* m_dbusModel;
00091         Soprano::Model* m_localSocketModel;
00092         Soprano::Util::MutexModel* m_mutexModel;
00093         bool m_socketConnectFailed;
00094     };
00095 }
00096 
00097 #endif

NepomukDaemons

Skip menu "NepomukDaemons"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KCMShell
  • KNotify
  • KStyles
  • Nepomuk Daemons
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal