MagicSmoke  $VERSION$
MTUseTicket Class Reference

Attempts to mark a ticket as used. Fails if the ticket has already been used or is not paid for. More...

#include <srcMTUseTicket.h>

Inheritance diagram for MTUseTicket:
MTransaction

Public Member Functions

 MTUseTicket ()
 default constructor: generates an invalid transaction More...
 
 MTUseTicket (const MTUseTicket &)
 copy constructor: the two copies share their state More...
 
virtual ~MTUseTicket ()
 deletes this instance More...
 
Q_SLOT Nullable< MOTicketUsegetticketuse () const
 
MTUseTicketoperator= (const MTUseTicket &)
 copy assignment: the copy shares the state of the original object More...
 

Static Public Member Functions

static MTUseTicket asyncQuery (const QString &aticketid, const qint64 &aeventid, QString iface="MagicSmoke")
 emits the query over the network and returns the transaction object, use isFinished() to check for the transaction's state More...
 
static MTUseTicket query (const QString &aticketid, const qint64 &aeventid, QString iface="MagicSmoke")
 emits the query over the network and returns the finished transaction object More...
 
- Static Public Member Functions inherited from MTransaction
static void setStartStopActions (const MTStartStop &start, const MTStartStop &stop)
 set actions to be executed at start/stop More...
 

Protected Member Functions

 MTUseTicket (const QString &aticketid, const qint64 &aeventid, QString iface)
 generates an instance from its properties More...
 
virtual void endQuery ()
 
- Protected Member Functions inherited from MTransaction
 MTransaction (QString iface=QString())
 internal: construct the transaction More...
 
 MTransaction (const WTransaction &)
 internal: copy the transaction More...
 
 MTransaction (const MTransaction &)
 internal: copy the transaction More...
 
QByteArray executeQuery (QString, QByteArray)
 internal: extend executeQuery to show a wait cursor More...
 

Friends

class MTUseTicket_Private
 

Detailed Description

Attempts to mark a ticket as used. Fails if the ticket has already been used or is not paid for.

Constructor & Destructor Documentation

MTUseTicket::MTUseTicket ( const QString &  aticketid,
const qint64 &  aeventid,
QString  iface 
)
explicitprotected

generates an instance from its properties

Parameters
aticketidThe ticket to be used
aeventidThe event to use it on
ifaceID of the interface that the transaction will be sent on

References MTUseTicket_Private::in_eventid, MTUseTicket_Private::in_ticketid, and MTUseTicket_Private.

MTUseTicket::MTUseTicket ( )

default constructor: generates an invalid transaction

References MTUseTicket_Private.

MTUseTicket::MTUseTicket ( const MTUseTicket t)

copy constructor: the two copies share their state

References MTUseTicket_Private::attach().

MTUseTicket::~MTUseTicket ( )
virtual

deletes this instance

References MTUseTicket_Private::detach().

Member Function Documentation

MTUseTicket MTUseTicket::asyncQuery ( const QString &  aticketid,
const qint64 &  aeventid,
QString  iface = "MagicSmoke" 
)
static

emits the query over the network and returns the transaction object, use isFinished() to check for the transaction's state

Parameters
aticketidThe ticket to be used
aeventidThe event to use it on
ifaceID of the interface that the transaction will be sent on
void MTUseTicket::endQuery ( )
protectedvirtual
Nullable< MOTicketUse > MTUseTicket::getticketuse ( ) const
MTUseTicket & MTUseTicket::operator= ( const MTUseTicket t)

copy assignment: the copy shares the state of the original object

References MTUseTicket_Private::attach(), and MTUseTicket_Private::detach().

MTUseTicket MTUseTicket::query ( const QString &  aticketid,
const qint64 &  aeventid,
QString  iface = "MagicSmoke" 
)
static

emits the query over the network and returns the finished transaction object

Parameters
aticketidThe ticket to be used
aeventidThe event to use it on
ifaceID of the interface that the transaction will be sent on

Referenced by MInterface::queryUseTicket().

Friends And Related Function Documentation

friend class MTUseTicket_Private
friend

Referenced by MTUseTicket().


The documentation for this class was generated from the following files: