first re-commit.
This commit is contained in:
58
libMiniCash/mcsender.h
Normal file
58
libMiniCash/mcsender.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/***************************************************************************
|
||||
|
||||
miniCashConnect
|
||||
Copyright © 2022 christoph holzheuer
|
||||
c.holzheuer@sourceworx.org
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef MCSENDER_H
|
||||
#define MCSENDER_H
|
||||
|
||||
#include <QTcpSocket>
|
||||
#include <QObject>
|
||||
|
||||
#include <libMiniCash.h>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Ein angepasstes QTcpSocket zur Datenübertragung
|
||||
*/
|
||||
|
||||
class LIBMINICASH_EXPORT MCSender : public QTcpSocket
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
MCSender();
|
||||
virtual ~MCSender();
|
||||
|
||||
void setupConnection( const QString& host, int port );
|
||||
|
||||
signals:
|
||||
|
||||
void connectionChanged( miniCash::CState newState );
|
||||
|
||||
public slots:
|
||||
|
||||
void onCreateConnection();
|
||||
void onDiscardConnection();
|
||||
|
||||
void onSendTransaction( const QString& transaction );
|
||||
|
||||
protected:
|
||||
|
||||
int _port = -1;
|
||||
QString _host;
|
||||
|
||||
};
|
||||
|
||||
#endif // MCSENDER_H
|
Reference in New Issue
Block a user