• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/home/builduser/STABLE_7/pkgs/soprano/BUILD/soprano-2.5.2/soprano/pluginmanager.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of Soprano Project.
00003  *
00004  * Copyright (C) 2007-2009 Sebastian Trueg <trueg@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef _SOPRANO_PLUGIN_MANAGER_H_
00023 #define _SOPRANO_PLUGIN_MANAGER_H_
00024 
00025 #include "sopranotypes.h"
00026 #include "soprano_export.h"
00027 
00028 #include <QtCore/QObject>
00029 #include <QtCore/QStringList>
00030 
00031 
00032 namespace Soprano
00033 {
00034     class Backend;
00035     class Parser;
00036     class Serializer;
00037 
00038     namespace Query {
00039         class Parser;
00040         class Serializer;
00041     }
00042 
00055     class SOPRANO_EXPORT PluginManager : public QObject
00056     {
00057         Q_OBJECT
00058 
00059     public:
00060         ~PluginManager();
00061 
00063 
00075         void setPluginSearchPath( const QStringList& path, bool useDefaults = true );
00076 
00091         bool loadCustomPlugin( const QString& path );
00092 
00106         const Backend* loadCustomBackend( const QString& path );
00107 
00121         const Parser* loadCustomParser( const QString& path );
00122 
00136         const Serializer* loadCustomSerializer( const QString& path );
00138 
00140 
00146         const Backend* discoverBackendByName( const QString& name );
00147 
00156         const Backend* discoverBackendByFeatures( BackendFeatures features, const QStringList& userFeatures = QStringList() );
00157 
00158         QList<const Backend*> allBackends();
00160 
00162 
00168         const Parser* discoverParserByName( const QString& name );
00169 
00182         const Parser* discoverParserForSerialization( RdfSerialization serialization, const QString& userSerialization = QString() );
00183 
00184         QList<const Parser*> allParsers();
00186 
00188 
00194         const Serializer* discoverSerializerByName( const QString& name );
00195 
00208         const Serializer* discoverSerializerForSerialization( RdfSerialization serialization, const QString& userSerialization = QString() );
00209 
00210         QList<const Serializer*> allSerializers();
00212 
00222 //    const Query::Parser* discoverQueryParserByName( const QString& name );
00223 
00234 //    const Query::Parser* discoverQueryParserForQueryLanguage( Query::QueryLanguage lang, const QString& userQueryLanguage = QString() );
00235 
00236 //    QList<const Query::Parser*> allQueryParsers();
00238 
00240 
00246 //    const Query::Serializer* discoverQuerySerializerByName( const QString& name );
00247 
00258 //    const Query::Serializer* discoverQuerySerializerForQueryLanguage( Query::QueryLanguage lang, const QString& userQueryLanguage = QString() );
00259 
00260 //    QList<const Query::Serializer*> allQuerySerializers();
00262 
00268         static PluginManager* instance();
00269 
00270     private:
00271         PluginManager( QObject* parent = 0 );
00272         void loadAllPlugins();
00273         void loadPlugin( const QString& path );
00274         void loadPlugins( const QString& path );
00275 
00276         class Private;
00277         Private* const d;
00278 
00279         friend class PluginManagerFactory;
00280     };
00281 }
00282 
00283 #endif

Generated on Sat Dec 18 2010 20:32:38 for Soprano by  doxygen 1.7.1