mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-18 08:31:16 +02:00
2022-10-28 Fred Gleason <fredg@paravelsystems.com>
* Added an 'RDCatchEvent' class. * Reimplemented the 'Deck Event Processed' command using 'RDCatchEvent'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
61
lib/rdcatchevent.h
Normal file
61
lib/rdcatchevent.h
Normal file
@@ -0,0 +1,61 @@
|
||||
// rdcatchevent.h
|
||||
//
|
||||
// A container class for a Rivendell Catch Event message.
|
||||
//
|
||||
// (C) Copyright 2022 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef RDCATCHEVENT_H
|
||||
#define RDCATCHEVENT_H
|
||||
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
|
||||
#include <rddeck.h>
|
||||
|
||||
class RDCatchEvent
|
||||
{
|
||||
public:
|
||||
enum Operation {NullOp=0,DeckEventProcessedOp=1,LastOp=2};
|
||||
RDCatchEvent(RDDeck::Status status);
|
||||
RDCatchEvent();
|
||||
Operation operation() const;
|
||||
void setOperation(Operation op);
|
||||
QString hostName() const;
|
||||
void setHostName(const QString &str);
|
||||
unsigned deckChannel() const;
|
||||
void setDeckChannel(unsigned chan);
|
||||
int eventNumber() const;
|
||||
void setEventNumber(int num);
|
||||
RDDeck::Status deckStatus() const;
|
||||
void setDeckStatus(RDDeck::Status status);
|
||||
bool isValid() const;
|
||||
bool read(const QString &str);
|
||||
QString write() const;
|
||||
QString dump() const;
|
||||
void clear();
|
||||
static QString operationString(Operation op);
|
||||
|
||||
private:
|
||||
Operation d_operation;
|
||||
QString d_host_name;
|
||||
unsigned d_deck_channel;
|
||||
int d_event_number;
|
||||
RDDeck::Status d_deck_status;
|
||||
};
|
||||
|
||||
|
||||
#endif // RDCATCHEVENT_H
|
Reference in New Issue
Block a user