event.h
/*
Copyright (c) 2008-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef EVENT_H__
#define EVENT_H__
namespace gloox
{
class Stanza;
class Event
{
public:
enum EventType
{
PingPing,
PingPong,
PingError
};
Event( EventType type ) : m_eventType( type ), m_stanza( 0 ) {}
Event( EventType type, const Stanza& stanza ) : m_eventType( type ), m_stanza( &stanza ) {}
virtual ~Event() {}
EventType eventType() const { return m_eventType; }
const Stanza* stanza() const { return m_stanza; }
protected:
EventType m_eventType;
const Stanza* m_stanza;
};
}
#endif // EVENT_H__
gloox::Event::Event
Event(EventType type, const Stanza &stanza)
Definition event.h:53
gloox::Event::stanza
const Stanza * stanza() const
Definition event.h:71
gloox::Event::EventType
EventType
Definition event.h:36
gloox::Event::PingError
@ PingError
Definition event.h:39
gloox::Event::PingPong
@ PingPong
Definition event.h:38
gloox::Event::PingPing
@ PingPing
Definition event.h:37
gloox::Event::Event
Event(EventType type)
Definition event.h:46
gloox::Event::~Event
virtual ~Event()
Definition event.h:58
gloox::Event::eventType
EventType eventType() const
Definition event.h:64
gloox::Stanza
This is the base class for XMPP stanza abstractions.
Definition stanza.h:34
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28