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();
35 void serverError(QLocalSocket::LocalSocketError socketError);
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 11:57:20 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.