MythTV
master
mythtv
libs
libmythupnp
upnptaskevent.h
Go to the documentation of this file.
1
// 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 "
libmythupnp/upnp.h
"
17
#include "
libmythupnp/bufferedsocketdevice.h
"
18
21
//
22
// UPnpEventTask Class Definition
23
//
26
27
class
UPnpEventTask
:
public
Task
28
{
29
protected
:
30
31
QHostAddress
m_peerAddress
;
32
int
m_nPeerPort
;
33
QByteArray *
m_pPayload
{
nullptr
};
34
35
protected
:
36
37
// Destructor protected to force use of Release Method
38
39
~UPnpEventTask
()
override
;
40
41
public
:
42
43
UPnpEventTask
(
const
QHostAddress& peerAddress,
44
int
nPeerPort,
45
QByteArray *pPayload ) :
46
Task
(
"UPnpEventTask"
),
47
m_peerAddress
(peerAddress),
48
m_nPeerPort
(nPeerPort),
49
m_pPayload
(pPayload)
// We take ownership of this pointer.
50
{}
51
52
QString
Name
()
override
{
return
(
"Event"
); }
// Task
53
void
Execute
(
TaskQueue
*pQueue )
override
;
// Task
54
55
};
56
57
58
#endif // UPNPTASKEVENT_H
UPnpEventTask::m_peerAddress
QHostAddress m_peerAddress
Definition:
upnptaskevent.h:31
UPnpEventTask::~UPnpEventTask
~UPnpEventTask() override
Definition:
upnptaskevent.cpp:31
UPnpEventTask::m_nPeerPort
int m_nPeerPort
Definition:
upnptaskevent.h:32
UPnpEventTask::Execute
void Execute(TaskQueue *pQueue) override
Definition:
upnptaskevent.cpp:40
TaskQueue
Definition:
taskqueue.h:82
upnp.h
UPnpEventTask::m_pPayload
QByteArray * m_pPayload
Definition:
upnptaskevent.h:33
Task
Definition:
taskqueue.h:54
bufferedsocketdevice.h
UPnpEventTask
Definition:
upnptaskevent.h:27
UPnpEventTask::Name
QString Name() override
Definition:
upnptaskevent.h:52
UPnpEventTask::UPnpEventTask
UPnpEventTask(const QHostAddress &peerAddress, int nPeerPort, QByteArray *pPayload)
Definition:
upnptaskevent.h:43
Generated on Tue Jan 7 2025 03:18:37 for MythTV by
1.8.17