Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QLocalSocketPrivate Class Reference

#include <qlocalsocket_p.h>

+ Inheritance diagram for QLocalSocketPrivate:
+ Collaboration diagram for QLocalSocketPrivate:

Public Member Functions

 QLocalSocketPrivate ()
 
void init ()
 
QString generateErrorString (QLocalSocket::LocalSocketError, const QString &function) const
 
void setErrorAndEmit (QLocalSocket::LocalSocketError, const QString &function)
 
void _q_stateChanged (QAbstractSocket::SocketState newState)
 
void _q_errorOccurred (QAbstractSocket::SocketError newError)
 
void _q_connectToSocket ()
 
void _q_abortConnectionAttempt ()
 
void cancelDelayedConnect ()
 
void describeSocket (qintptr socketDescriptor)
 
- Public Member Functions inherited from QIODevicePrivate
 QIODevicePrivate ()
 
virtual ~QIODevicePrivate ()
 
virtual bool putCharHelper (char c)
 
bool isSequential () const
 
bool isBufferEmpty () const
 
bool allWriteBuffersEmpty () const
 
void seekBuffer (qint64 newPos)
 
void setCurrentReadChannel (int channel)
 
void setCurrentWriteChannel (int channel)
 
void setReadChannelCount (int count)
 
void setWriteChannelCount (int count)
 
qint64 read (char *data, qint64 maxSize, bool peeking=false)
 
qint64 readLine (char *data, qint64 maxSize)
 
virtual qint64 peek (char *data, qint64 maxSize)
 
virtual QByteArray peek (qint64 maxSize)
 
qint64 skipByReading (qint64 maxSize)
 
void write (const char *data, qint64 size)
 
bool isWriteChunkCached (const char *data, qint64 size) const
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Static Public Member Functions

static bool parseSockaddr (const sockaddr_un &addr, uint len, QString &fullServerName, QString &serverName, bool &abstractNamespace)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Public Attributes

QLocalUnixSocket unixSocket
 
QSocketNotifierdelayConnect
 
QTimerconnectTimer
 
QString connectingName
 
int connectingSocket
 
QIODevice::OpenMode connectingOpenMode
 
QLocalSocket::LocalSocketState state
 
QString serverName
 
QString fullServerName
 
- Public Attributes inherited from QIODevicePrivate
qint64 pos = 0
 
qint64 devicePos = 0
 
qint64 transactionPos = 0
 
QRingBufferRef buffer
 
QRingBufferRef writeBuffer
 
const QByteArraycurrentWriteChunk = nullptr
 
int readChannelCount = 0
 
int writeChannelCount = 0
 
int currentReadChannel = 0
 
int currentWriteChannel = 0
 
int readBufferChunkSize = QIODEVICE_BUFFERSIZE
 
int writeBufferChunkSize = 0
 
QVarLengthArray< QRingBuffer, 2 > readBuffers
 
QVarLengthArray< QRingBuffer, 1 > writeBuffers
 
QString errorString
 
QIODevice::OpenMode openMode = QIODevice::NotOpen
 
bool transactionStarted = false
 
bool baseReadLineDataCalled = false
 
AccessMode accessMode = Unset
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Public Types inherited from QIODevicePrivate
enum  AccessMode : quint8 { Unset , Sequential , RandomAccess }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Detailed Description

Definition at line 81 of file qlocalsocket_p.h.

Constructor & Destructor Documentation

◆ QLocalSocketPrivate()

QLocalSocketPrivate::QLocalSocketPrivate ( )

Definition at line 16 of file qlocalsocket_tcp.cpp.

Member Function Documentation

◆ _q_abortConnectionAttempt()

void QLocalSocketPrivate::_q_abortConnectionAttempt ( )

Definition at line 421 of file qlocalsocket_unix.cpp.

Referenced by _q_connectToSocket().

+ Here is the caller graph for this function:

◆ _q_connectToSocket()

void QLocalSocketPrivate::_q_connectToSocket ( )

Tries to connect connectingName and connectingOpenMode

See also
connectToServer(), waitForConnected()

Definition at line 251 of file qlocalsocket_unix.cpp.

References _q_abortConnectionAttempt(), _q_connectToSocket(), QLocalSocket::AbstractNamespaceOption, cancelDelayedConnect(), QString::clear(), connected, QAbstractSocket::ConnectedState, connectingName, connectingOpenMode, connectingSocket, QLocalSocket::ConnectionRefusedError, connectTimer, delayConnect, Qt::DirectConnection, QFile::encodeName(), fullServerName, PlatformSupportsAbstractNamespace, QT_CONNECT_TIMEOUT, qt_safe_connect(), serverName, QLocalSocket::ServerNotFoundError, QSocketNotifier::setEnabled(), setErrorAndEmit(), QAbstractSocket::setSocketDescriptor(), SIGNAL, SLOT, QLocalSocket::SocketAccessError, QLocalSocket::SocketTimeoutError, QTimer::start(), unixSocket, QLocalSocket::UnknownSocketError, and QSocketNotifier::Write.

Referenced by _q_connectToSocket().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_errorOccurred()

void QLocalSocketPrivate::_q_errorOccurred ( QAbstractSocket::SocketError newError)

Definition at line 51 of file qlocalsocket_tcp.cpp.

References emit, error, QIODevicePrivate::errorString, and generateErrorString().

+ Here is the call graph for this function:

◆ _q_stateChanged()

void QLocalSocketPrivate::_q_stateChanged ( QAbstractSocket::SocketState newState)

◆ cancelDelayedConnect()

void QLocalSocketPrivate::cancelDelayedConnect ( )

Definition at line 427 of file qlocalsocket_unix.cpp.

References connectTimer, delayConnect, QSocketNotifier::setEnabled(), and QTimer::stop().

Referenced by _q_connectToSocket().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ describeSocket()

void QLocalSocketPrivate::describeSocket ( qintptr socketDescriptor)

Definition at line 363 of file qlocalsocket_unix.cpp.

References QLocalSocket::AbstractNamespaceOption, fullServerName, parseSockaddr(), and serverName.

+ Here is the call graph for this function:

◆ generateErrorString()

QString QLocalSocketPrivate::generateErrorString ( QLocalSocket::LocalSocketError error,
const QString & function ) const

Definition at line 90 of file qlocalsocket_tcp.cpp.

References QString::arg(), QLocalSocket::ConnectionError, QLocalSocket::ConnectionRefusedError, QLocalSocket::DatagramTooLargeError, error, QIODevicePrivate::errorString, QLocalSocket::OperationError, QLocalSocket::PeerClosedError, QLocalSocket::ServerNotFoundError, QLocalSocket::SocketAccessError, QLocalSocket::SocketResourceError, QLocalSocket::SocketTimeoutError, QLocalSocket::UnknownSocketError, and QLocalSocket::UnsupportedSocketOperationError.

Referenced by _q_errorOccurred(), and setErrorAndEmit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

void QLocalSocketPrivate::init ( )

Definition at line 23 of file qlocalsocket_tcp.cpp.

◆ parseSockaddr()

bool QLocalSocketPrivate::parseSockaddr ( const sockaddr_un & addr,
uint len,
QString & fullServerName,
QString & serverName,
bool & abstractNamespace )
static

Definition at line 383 of file qlocalsocket_unix.cpp.

References fullServerName, QString::isEmpty(), QString::lastIndexOf(), QString::mid(), PlatformSupportsAbstractNamespace, serverName, QStringConverterBase::Stateless, QStringConverter::System, and toUtf16.

Referenced by describeSocket().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setErrorAndEmit()

Member Data Documentation

◆ connectingName

QString QLocalSocketPrivate::connectingName

Definition at line 123 of file qlocalsocket_p.h.

Referenced by _q_connectToSocket().

◆ connectingOpenMode

QIODevice::OpenMode QLocalSocketPrivate::connectingOpenMode

Definition at line 125 of file qlocalsocket_p.h.

Referenced by _q_connectToSocket().

◆ connectingSocket

int QLocalSocketPrivate::connectingSocket

Definition at line 124 of file qlocalsocket_p.h.

Referenced by _q_connectToSocket().

◆ connectTimer

QTimer* QLocalSocketPrivate::connectTimer

Definition at line 122 of file qlocalsocket_p.h.

Referenced by _q_connectToSocket(), and cancelDelayedConnect().

◆ delayConnect

QSocketNotifier* QLocalSocketPrivate::delayConnect

Definition at line 121 of file qlocalsocket_p.h.

Referenced by _q_connectToSocket(), and cancelDelayedConnect().

◆ fullServerName

QString QLocalSocketPrivate::fullServerName

◆ serverName

QString QLocalSocketPrivate::serverName

◆ state

QLocalSocket::LocalSocketState QLocalSocketPrivate::state

Definition at line 127 of file qlocalsocket_p.h.

Referenced by _q_stateChanged(), and setErrorAndEmit().

◆ unixSocket

QLocalUnixSocket QLocalSocketPrivate::unixSocket

Definition at line 110 of file qlocalsocket_p.h.

Referenced by _q_connectToSocket().


The documentation for this class was generated from the following files: