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

soprano

servercore.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of Soprano Project.
00003  *
00004  * Copyright (C) 2007 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_SERVER_CORE_H_
00023 #define _SOPRANO_SERVER_CORE_H_
00024 
00025 #include <QtCore/QObject>
00026 
00027 #include "error.h"
00028 #include "soprano_export.h"
00029 
00030 namespace Soprano {
00031 
00032     class Backend;
00033     class Model;
00034     class BackendSetting;
00035 
00036     namespace Server {
00071         class SOPRANO_SERVER_EXPORT ServerCore : public QObject, public Error::ErrorCache
00072         {
00073             Q_OBJECT
00074 
00075         public:
00076             ServerCore( QObject* parent = 0 );
00077             virtual ~ServerCore();
00078 
00082             static const quint16 DEFAULT_PORT;
00083 
00087             void setBackend( const Backend* backend );
00088 
00092             const Backend* backend() const;
00093 
00101             void setBackendSettings( const QList<BackendSetting>& settings );
00102 
00108             QList<BackendSetting> backendSettings() const;
00109 
00123             void setMaximumConnectionCount( int max );
00124 
00135             int maximumConnectionCount() const;
00136 
00145             virtual Model* model( const QString& name );
00146 
00160             virtual void removeModel( const QString& name );
00161 
00167             virtual QStringList allModels() const;
00168 
00180             bool start( const QString& socketPath = QString() );
00181 
00198             bool listen( quint16 port = DEFAULT_PORT );
00199 
00206             quint16 serverPort() const;
00207 
00221             void registerAsDBusObject( const QString& objectPath = QString() );
00222 
00223         private Q_SLOTS:
00224             void slotNewTcpConnection();
00225             void slotNewSocketConnection();
00226             void serverConnectionFinished();
00227 
00228         protected:
00240             // FIXME: 3.0: this method should be const
00241             virtual Model* createModel( const QList<BackendSetting>& settings );
00242 
00243         private:
00244             class Private;
00245             Private* const d;
00246 
00247             Q_PRIVATE_SLOT( d, void _s_localSocketError( QLocalSocket::LocalSocketError ) )
00248             Q_PRIVATE_SLOT( d, void _s_tcpSocketError( QAbstractSocket::SocketError ) )
00249         };
00250     }
00251 }
00252 
00253 #endif

soprano

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

KDE Support

Skip menu "KDE Support"
  • akonadi
  • attica
  • grantlee
  • kdewin
  • polkit-qt
  • polkit-qt-1
  • qca
  • qimageblitz
  • soprano
  •       searchclient
Generated for KDE Support by doxygen 1.5.9-20090814
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