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

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • 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
QIODevice::OpenMode
typedef OpenMode
QQueue< KLocalSocket * >
QSocketNotifier
KLocalSocketServerPrivate::state
QAbstractSocket::SocketState state
Definition: klocalsocket_p.h:59
KLocalSocketServerPrivate::processSocketActivity
bool processSocketActivity()
Definition: klocalsocket_unix.cpp:374
KLocalSocketPrivate::q
KLocalSocket *const q
Definition: klocalsocket_p.h:33
KLocalSocketServerPrivate::readNotifier
QSocketNotifier * readNotifier
Definition: klocalsocket_p.h:65
KLocalSocketPrivate::localPath
QString localPath
Definition: klocalsocket_p.h:38
KLocalSocketServerPrivate::_k_newConnectionActivity
void _k_newConnectionActivity()
Definition: klocalsocket_unix.cpp:399
KLocalSocketServerPrivate::errorString
QString errorString
Definition: klocalsocket_p.h:63
KLocalSocketServerPrivate::localPath
QString localPath
Definition: klocalsocket_p.h:62
KLocalSocketServerPrivate::pendingConnections
QQueue< KLocalSocket * > pendingConnections
Definition: klocalsocket_p.h:66
KLocalSocketServerPrivate::descriptor
int descriptor
Definition: klocalsocket_p.h:57
KLocalSocketServerPrivate::KLocalSocketServerPrivate
KLocalSocketServerPrivate(KLocalSocketServer *qq)
Definition: klocalsocket.cpp:111
KLocalSocketServerPrivate::listen
bool listen(const QString &path, KLocalSocket::LocalSocketType type)
Definition: klocalsocket_unix.cpp:238
KLocalSocketServerPrivate
Definition: klocalsocket_p.h:51
KLocalSocketServerPrivate::error
QAbstractSocket::SocketError error
Definition: klocalsocket_p.h:60
KLocalSocketPrivate::connectToPath
void connectToPath(const QString &path, KLocalSocket::LocalSocketType type, QAbstractSocket::OpenMode openMode)
Definition: klocalsocket_unix.cpp:171
KLocalSocketServerPrivate::q
KLocalSocketServer *const q
Definition: klocalsocket_p.h:54
KLocalSocketPrivate::emitError
void emitError(QAbstractSocket::SocketError, const QString &errorString)
Definition: klocalsocket.cpp:29
QString
KLocalSocket
KLocalSocket allows one to create and use local (Unix) sockets.
Definition: klocalsocket.h:51
KLocalSocketServer
KLocalSocketServer allows one to create a listening local socket and accept incoming connections...
Definition: klocalsocket.h:159
KLocalSocketServerPrivate::maxPendingConnections
int maxPendingConnections
Definition: klocalsocket_p.h:58
KLocalSocketPrivate::d
static KLocalSocketPrivate * d(KLocalSocket *aq)
Definition: klocalsocket_p.h:47
KLocalSocketServerPrivate::close
void close()
Definition: klocalsocket_unix.cpp:318
KLocalSocketPrivate::type
KLocalSocket::LocalSocketType type
Definition: klocalsocket_p.h:40
KLocalSocketPrivate
Definition: klocalsocket_p.h:30
KLocalSocketPrivate::KLocalSocketPrivate
KLocalSocketPrivate(KLocalSocket *qq)
Definition: klocalsocket_p.h:34
KLocalSocketPrivate::peerPath
QString peerPath
Definition: klocalsocket_p.h:39
KLocalSocketServerPrivate::emitError
void emitError(QAbstractSocket::SocketError, const QString &errorString)
Definition: klocalsocket.cpp:38
KLocalSocket::LocalSocketType
LocalSocketType
Defines the local socket type.
Definition: klocalsocket.h:59
KLocalSocketServerPrivate::type
KLocalSocket::LocalSocketType type
Definition: klocalsocket_p.h:61
klocalsocket.h
KLocalSocketServerPrivate::waitForNewConnection
bool waitForNewConnection(int msec, bool *timedOut)
Definition: klocalsocket_unix.cpp:337
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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