Akonadi

asapcat/session.h
1/***************************************************************************
2 * SPDX-FileCopyrightText: 2013 Volker Krause <vkrause@kde.org> *
3 * *
4 * SPDX-License-Identifier: LGPL-2.0-or-later *
5 ***************************************************************************/
6
7#pragma once
8
9#include <QElapsedTimer>
10#include <QLocalSocket>
11#include <QObject>
12
13class QIODevice;
14class QSocketNotifier;
15
16/** ASAP CLI session. */
17class Session : public QObject
18{
20public:
21 explicit Session(const QString &input, QObject *parent = nullptr);
22 ~Session() override;
23
24 void printStats() const;
25
26public Q_SLOTS:
27 void connectToHost();
28
30 void disconnected();
31
32private Q_SLOTS:
33 void inputAvailable();
34 void serverDisconnected();
36 void serverRead();
37
38private:
39 QIODevice *m_input = nullptr;
40 QIODevice *m_session = nullptr;
41 QSocketNotifier *m_notifier = nullptr;
42
43 QElapsedTimer m_connectionTime;
44 qint64 m_receivedBytes = 0;
45 qint64 m_sentBytes = 0;
46};
ASAP CLI session.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.