Kstars

blobmanager.h
1/*
2 SPDX-FileCopyrightText: 2018 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#ifdef USE_QT5_INDI
10#include <baseclientqt.h>
11#else
12#include <baseclient.h>
13#include <QObject>
14#endif
15
16class DeviceInfo;
17class DriverInfo;
18class ServerManager;
19
20/**
21 * @class BlobManager
22 * BlobManager manages connection to INDI server to handle a specific BLOB.
23 *
24 * BlobManager is a subclass of INDI::BaseClient class part of the INDI Library.
25 *
26 * @author Jasem Mutlaq
27 * @version 1.0
28 */
29#ifdef USE_QT5_INDI
30class BlobManager : public INDI::BaseClientQt
31#else
32class BlobManager : public QObject, public INDI::BaseClient
33#endif
34{
36 Q_PROPERTY(QString device MEMBER m_Device)
37 Q_PROPERTY(QString property MEMBER m_Property)
38 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
39
40 public:
41 BlobManager(QObject *parent, const QString &host, int port, const QString &device, const QString &prop);
42 virtual ~BlobManager() override = default;
43
44 bool enabled() { return m_Enabled; }
45 void setEnabled(bool enabled);
46
47 protected:
48 virtual void newDevice(INDI::BaseDevice device) override;
49 virtual void updateProperty(INDI::Property prop) override;
50
51 virtual void serverConnected() override {}
52 virtual void serverDisconnected(int exit_code) override;
53
54 signals:
55 void propertyUpdated(INDI::Property prop);
56 void connected();
57 void connectionFailure();
58
59 private:
60 QString m_Device;
61 QString m_Property;
62 bool m_Enabled { true };
63};
BlobManager manages connection to INDI server to handle a specific BLOB.
Definition blobmanager.h:34
DeviceInfo is simple class to hold DriverInfo and INDI::BaseDevice associated with a particular devic...
Definition deviceinfo.h:21
DriverInfo holds all metadata associated with a particular INDI driver.
Definition driverinfo.h:46
ServerManager is responsible for starting and shutting local INDI servers.
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.