2020-08-28 Fred Gleason <fredg@paravelsystems.com>

* Added an 'RDNotification::FeedType' value to the
	'RDNotification::Type' enumeration.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2020-08-28 13:40:11 -04:00
parent b2809f6aca
commit 288b7a9826
10 changed files with 102 additions and 36 deletions

View File

@@ -119,6 +119,10 @@ bool RDNotification::read(const QString &str)
notify_id=QVariant(args[3].toUInt());
break;
case RDNotification::FeedType:
notify_id=QVariant(args[3]);
break;
case RDNotification::NullType:
case RDNotification::LastType:
break;
@@ -174,6 +178,10 @@ QString RDNotification::write() const
ret+=QString().sprintf("%u",notify_id.toUInt());
break;
case RDNotification::FeedType:
ret+=notify_id.toString();
break;
case RDNotification::NullType:
case RDNotification::LastType:
break;
@@ -211,6 +219,10 @@ QString RDNotification::typeString(RDNotification::Type type)
ret="FEED_ITEM";
break;
case RDNotification::FeedType:
ret="FEED";
break;
case RDNotification::NullType:
case RDNotification::LastType:
break;

View File

@@ -28,7 +28,7 @@ class RDNotification
{
public:
enum Type {NullType=0,CartType=1,LogType=2,PypadType=3,DropboxType=4,
CatchEventType=5,FeedItemType=6,LastType=7};
CatchEventType=5,FeedItemType=6,FeedType=7,LastType=8};
enum Action {NoAction=0,AddAction=1,DeleteAction=2,ModifyAction=3,
LastAction=4};
RDNotification(Type type,Action action,const QVariant &id);

View File

@@ -139,6 +139,15 @@ void RDRipc::sendGpoCart(int matrix)
}
void RDRipc::sendNotification(RDNotification::Type type,
RDNotification::Action action,const QVariant &id)
{
RDNotification *notify=new RDNotification(type,action,id);
sendNotification(*notify);
delete notify;
}
void RDRipc::sendNotification(const RDNotification &notify)
{
SendCommand("ON "+notify.write()+"!");

View File

@@ -55,6 +55,8 @@ class RDRipc : public QObject
void sendGpoMask(int matrix);
void sendGpiCart(int matrix);
void sendGpoCart(int matrix);
void sendNotification(RDNotification::Type type,
RDNotification::Action action,const QVariant &id);
void sendNotification(const RDNotification &notify);
void sendOnairFlag();
void sendRml(RDMacro *macro);