CPPMyth
Library to interoperate with MythTV server
Loading...
Searching...
No Matches
Myth::BasicEventHandler Class Reference
Inheritance diagram for Myth::BasicEventHandler:
Collaboration diagram for Myth::BasicEventHandler:

Public Member Functions

 BasicEventHandler (const std::string &server, unsigned port)
virtual bool Start ()
virtual void Stop ()
virtual void Reset ()
virtual bool HasStarted ()
virtual bool IsConnected ()
virtual unsigned CreateSubscription (EventSubscriber *sub)
virtual bool SubscribeForEvent (unsigned subid, EVENT_t event)
virtual void RevokeSubscription (unsigned subid)
virtual void RevokeAllSubscriptions (EventSubscriber *sub)
Public Member Functions inherited from Myth::EventHandler::EventHandlerThread
 EventHandlerThread (const std::string &server, unsigned port)
virtual std::string GetServer () const
virtual unsigned GetPort () const

Private Types

typedef std::map< EVENT_t, std::list< unsigned > > subscriptionsByEvent_t
typedef std::map< unsigned, SubscriptionHandlerThread * > subscriptions_t

Private Member Functions

void DispatchEvent (const EventMessagePtr &msg)
virtual void * process (void)
void AnnounceStatus (const char *status)
void AnnounceTimer ()
void RetryConnect ()

Private Attributes

OS::Mutex m_mutex
ProtoEventm_event
bool m_reset
subscriptionsByEvent_t m_subscriptionsByEvent
subscriptions_t m_subscriptions

Additional Inherited Members

Protected Attributes inherited from Myth::EventHandler::EventHandlerThread
std::string m_server
unsigned m_port

Detailed Description

Definition at line 156 of file mytheventhandler.cpp.

Member Typedef Documentation

◆ subscriptions_t

typedef std::map<unsigned, SubscriptionHandlerThread*> Myth::BasicEventHandler::subscriptions_t
private

Definition at line 179 of file mytheventhandler.cpp.

◆ subscriptionsByEvent_t

typedef std::map<EVENT_t, std::list<unsigned> > Myth::BasicEventHandler::subscriptionsByEvent_t
private

Definition at line 177 of file mytheventhandler.cpp.

Constructor & Destructor Documentation

◆ BasicEventHandler()

BasicEventHandler::BasicEventHandler ( const std::string & server,
unsigned port )

Definition at line 190 of file mytheventhandler.cpp.

◆ ~BasicEventHandler()

BasicEventHandler::~BasicEventHandler ( )
virtual

Definition at line 197 of file mytheventhandler.cpp.

Member Function Documentation

◆ AnnounceStatus()

void BasicEventHandler::AnnounceStatus ( const char * status)
private

Definition at line 364 of file mytheventhandler.cpp.

◆ AnnounceTimer()

void BasicEventHandler::AnnounceTimer ( )
private

Definition at line 374 of file mytheventhandler.cpp.

◆ CreateSubscription()

unsigned BasicEventHandler::CreateSubscription ( EventSubscriber * sub)
virtual

Implements Myth::EventHandler::EventHandlerThread.

Definition at line 245 of file mytheventhandler.cpp.

◆ DispatchEvent()

void BasicEventHandler::DispatchEvent ( const EventMessagePtr & msg)
private

Definition at line 308 of file mytheventhandler.cpp.

◆ HasStarted()

bool BasicEventHandler::HasStarted ( )
virtual

Implements Myth::EventHandler::EventHandlerThread.

Definition at line 235 of file mytheventhandler.cpp.

◆ IsConnected()

bool BasicEventHandler::IsConnected ( )
virtual

Implements Myth::EventHandler::EventHandlerThread.

Definition at line 240 of file mytheventhandler.cpp.

◆ process()

void * BasicEventHandler::process ( void )
privatevirtual

Definition at line 329 of file mytheventhandler.cpp.

◆ Reset()

void BasicEventHandler::Reset ( )
virtual

Implements Myth::EventHandler::EventHandlerThread.

Definition at line 229 of file mytheventhandler.cpp.

◆ RetryConnect()

void BasicEventHandler::RetryConnect ( )
private

Definition at line 382 of file mytheventhandler.cpp.

◆ RevokeAllSubscriptions()

void BasicEventHandler::RevokeAllSubscriptions ( EventSubscriber * sub)
virtual

Implements Myth::EventHandler::EventHandlerThread.

Definition at line 292 of file mytheventhandler.cpp.

◆ RevokeSubscription()

void BasicEventHandler::RevokeSubscription ( unsigned subid)
virtual

Implements Myth::EventHandler::EventHandlerThread.

Definition at line 281 of file mytheventhandler.cpp.

◆ Start()

bool BasicEventHandler::Start ( )
virtual

Implements Myth::EventHandler::EventHandlerThread.

Definition at line 210 of file mytheventhandler.cpp.

◆ Stop()

void BasicEventHandler::Stop ( )
virtual

Implements Myth::EventHandler::EventHandlerThread.

Definition at line 217 of file mytheventhandler.cpp.

◆ SubscribeForEvent()

bool BasicEventHandler::SubscribeForEvent ( unsigned subid,
EVENT_t event )
virtual

Implements Myth::EventHandler::EventHandlerThread.

Definition at line 263 of file mytheventhandler.cpp.

Field Documentation

◆ m_event

ProtoEvent* Myth::BasicEventHandler::m_event
private

Definition at line 174 of file mytheventhandler.cpp.

◆ m_mutex

OS::Mutex Myth::BasicEventHandler::m_mutex
private

Definition at line 173 of file mytheventhandler.cpp.

◆ m_reset

bool Myth::BasicEventHandler::m_reset
private

Definition at line 175 of file mytheventhandler.cpp.

◆ m_subscriptions

subscriptions_t Myth::BasicEventHandler::m_subscriptions
private

Definition at line 180 of file mytheventhandler.cpp.

◆ m_subscriptionsByEvent

subscriptionsByEvent_t Myth::BasicEventHandler::m_subscriptionsByEvent
private

Definition at line 178 of file mytheventhandler.cpp.


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