• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • network
klocalsocket_p.h
Go to the documentation of this file.
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (C) 2007 Thiago Macieira <thiago@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 #ifndef KLOCALSOCKET_P_H
21 #define KLOCALSOCKET_P_H
22 
23 #include <QtCore/QString>
24 #include <QtCore/QQueue>
25 #include "klocalsocket.h"
26 #define MIN_SOCKADDR_UN_LEN (sizeof(quint16) + sizeof(char))
27 
28 class QSocketNotifier;
29 
30 class KLocalSocketPrivate
31 {
32 public:
33  KLocalSocket * const q;
34  KLocalSocketPrivate(KLocalSocket *qq)
35  : q(qq), type(KLocalSocket::UnknownLocalSocketType)
36  { }
37 
38  QString localPath;
39  QString peerPath;
40  KLocalSocket::LocalSocketType type;
41 
42  void connectToPath(const QString &path, KLocalSocket::LocalSocketType type,
43  QAbstractSocket::OpenMode openMode);
44 
45  void emitError(QAbstractSocket::SocketError, const QString &errorString);
46 
47  static inline KLocalSocketPrivate *d(KLocalSocket *aq)
48  { return aq->d; }
49 };
50 
51 class KLocalSocketServerPrivate
52 {
53 public:
54  KLocalSocketServer * const q;
55  KLocalSocketServerPrivate(KLocalSocketServer *qq);
56 
57  int descriptor;
58  int maxPendingConnections;
59  QAbstractSocket::SocketState state;
60  QAbstractSocket::SocketError error;
61  KLocalSocket::LocalSocketType type;
62  QString localPath;
63  QString errorString;
64 
65  QSocketNotifier *readNotifier;
66  QQueue<KLocalSocket *> pendingConnections;
67 
68  bool listen(const QString &path, KLocalSocket::LocalSocketType type);
69  void close();
70  bool waitForNewConnection(int msec, bool *timedOut);
71  bool processSocketActivity();
72  void _k_newConnectionActivity();
73  void emitError(QAbstractSocket::SocketError, const QString &errorString);
74 };
75 
76 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 20:27:53 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal