Soprano 2.9.4
servercore.h
Go to the documentation of this file.
1/*
2 * This file is part of Soprano Project.
3 *
4 * Copyright (C) 2007 Sebastian Trueg <trueg@kde.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 */
21
22#ifndef _SOPRANO_SERVER_CORE_H_
23#define _SOPRANO_SERVER_CORE_H_
24
25#include <QtCore/QObject>
26
27#include "error.h"
28#include "soprano_export.h"
29
30namespace Soprano {
31
32 class Backend;
33 class Model;
34 class BackendSetting;
35
36 namespace Server {
37
38 class ServerCorePrivate;
39
75 {
76 Q_OBJECT
77
78 public:
80 virtual ~ServerCore();
81
85 static const quint16 DEFAULT_PORT;
86
90 void setBackend( const Backend* backend );
91
95 const Backend* backend() const;
96
105
112
127
139
148 virtual Model* model( const QString& name );
149
163 virtual void removeModel( const QString& name );
164
170 virtual QStringList allModels() const;
171
183 bool start( const QString& socketPath = QString() );
184
201 bool listen( quint16 port = DEFAULT_PORT );
202
209 void stop();
210
217 quint16 serverPort() const;
218
232 void registerAsDBusObject( const QString& objectPath = QString() );
233
234 private Q_SLOTS:
235 void serverConnectionFinished(QObject* obj);
236
237 protected:
249 // FIXME: 3.0: this method should be const
250 virtual Model* createModel( const QList<BackendSetting>& settings );
251
252 private:
253 ServerCorePrivate* const d;
254 };
255 }
256}
257
258#endif
Wraps one setting for Model creation.
Definition backend.h:53
Soprano::Backend defines the interface for a Soprano backend plugin.
Definition backend.h:264
Core class of Soprano's exception system.
Definition error.h:235
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition model.h:95
virtual Model * createModel(const QList< BackendSetting > &settings)
int maximumConnectionCount() const
void registerAsDBusObject(const QString &objectPath=QString())
void setBackend(const Backend *backend)
void setMaximumConnectionCount(int max)
virtual void removeModel(const QString &name)
ServerCore(QObject *parent=0)
bool start(const QString &socketPath=QString())
const Backend * backend() const
QList< BackendSetting > backendSettings() const
quint16 serverPort() const
static const quint16 DEFAULT_PORT
Definition servercore.h:85
void setBackendSettings(const QList< BackendSetting > &settings)
bool listen(quint16 port=DEFAULT_PORT)
virtual Model * model(const QString &name)
virtual QStringList allModels() const
QObject(QObject *parent=0)
#define SOPRANO_SERVER_EXPORT