MythTV master
upnptaskevent.h
Go to the documentation of this file.
1
2// Program Name: upnptaskevent.h
3// Created : Dec. 31, 2006
4//
5// Purpose : UPnp Task to notifing subscribers of an event
6//
7// Copyright (c) 2006 David Blain <dblain@mythtv.org>
8//
9// Licensed under the GPL v2 or later, see LICENSE for details
10//
12
13#ifndef UPNPTASKEVENT_H
14#define UPNPTASKEVENT_H
15
16#include <QChar> // Fix Qt6 GCC SFINAE warning
17#include <QByteArray>
18#include <QHostAddress>
19
21
24//
25// UPnpEventTask Class Definition
26//
29
30class UPnpEventTask : public Task
31{
32 protected:
33
34 QHostAddress m_peerAddress;
36 QByteArray *m_pPayload {nullptr};
37
38 protected:
39
40 // Destructor protected to force use of Release Method
41
42 ~UPnpEventTask() override;
43
44 public:
45
46 UPnpEventTask( const QHostAddress& peerAddress,
47 int nPeerPort,
48 QByteArray *pPayload ) :
49 Task("UPnpEventTask"),
50 m_peerAddress(peerAddress),
51 m_nPeerPort(nPeerPort),
52 m_pPayload(pPayload) // We take ownership of this pointer.
53 {}
54
55 QString Name() override { return "Event"; } // Task
56 void Execute( TaskQueue *pQueue ) override; // Task
57
58};
59
60
61#endif // UPNPTASKEVENT_H
Definition: taskqueue.h:49
QString Name() override
Definition: upnptaskevent.h:55
UPnpEventTask(const QHostAddress &peerAddress, int nPeerPort, QByteArray *pPayload)
Definition: upnptaskevent.h:46
QHostAddress m_peerAddress
Definition: upnptaskevent.h:34
~UPnpEventTask() override
QByteArray * m_pPayload
Definition: upnptaskevent.h:36
void Execute(TaskQueue *pQueue) override