2 Copyright (C) 2008 by Sebastian Trueg <trueg at kde.org>
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, or (at your option)
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 Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #include "legacystoragebridge.h"
21 #include <Soprano/Client/DBusClient>
22 #include <Soprano/Client/DBusModel>
25 Nepomuk::LegacyStorageBridge::LegacyStorageBridge( QObject
* parent
)
26 : Soprano::Server::ServerCore( parent
),
29 registerAsDBusObject();
33 Nepomuk::LegacyStorageBridge::~LegacyStorageBridge()
38 Soprano::Model
* Nepomuk::LegacyStorageBridge::model( const QString
& name
)
41 return m_client
->createModel( name
);
45 void Nepomuk::LegacyStorageBridge::removeModel( const QString
& name
)
48 m_client
->removeModel( name
);
52 QStringList
Nepomuk::LegacyStorageBridge::allModels() const
54 const_cast<LegacyStorageBridge
*>( this )->initClient();
55 return m_client
->allModels();
59 void Nepomuk::LegacyStorageBridge::initClient()
62 m_client
= new Soprano::Client::DBusClient( "org.kde.NepomukStorage", this );
66 #include "legacystoragebridge.moc"