not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / kcontrol / kfontinst / kio / Server.h
blobfa7ec437c2c1370e447468ce057203c031cd9eba
1 #ifndef __SERVER_H__
2 #define __SERVER_H__
4 /*
5 * KFontInst - KDE Font Installer
7 * Copyright 2003-2007 Craig Drummond <craig@kde.org>
9 * ----
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; see the file COPYING. If not, write to
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
27 #include <QtCore/QByteArray>
29 namespace KFI
32 class CSocket;
34 class CServer
36 public:
38 CServer();
39 ~CServer() { close(); }
41 bool open();
42 void close();
43 bool isOpen() const { return itsOpen; }
44 CSocket * waitForClient(int timeout=5);
45 QByteArray & name() { return itsName; }
47 private:
49 int itsFd;
50 QByteArray itsName;
51 bool itsOpen;
56 #endif