openATV enigma2
openATV is an open source SetTopBox Graphical user interface.
eSocketNotifier Class Reference

Gives a callback when data on a file descriptor is ready. More...

#include <ebase.h>

Inheritance diagram for eSocketNotifier:
iObject

Public Types

enum  {
  Read =POLLIN , Write =POLLOUT , Priority =POLLPRI , Error =POLLERR ,
  Hungup =POLLHUP
}
 

Public Member Functions

 ~eSocketNotifier ()
 
void start ()
 
void stop ()
 
bool isRunning () const
 
int getFD () const
 
int getRequested () const
 
void setRequested (int req)
 

Static Public Member Functions

static eSocketNotifiercreate (eMainloop *context, int fd, int req, bool startnow=true)
 Constructs a eSocketNotifier. More...
 

Public Attributes

PSignal1< void, int > activated
 
eSmartPtrList< iObjectm_clients
 

Friends

class eMainloop
 

Detailed Description

Gives a callback when data on a file descriptor is ready.

This class emits the signal eSocketNotifier::activate whenever the event specified by req is available.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Read 
Write 
Priority 
Error 
Hungup 

Constructor & Destructor Documentation

◆ ~eSocketNotifier()

eSocketNotifier::~eSocketNotifier ( )

Member Function Documentation

◆ create()

static eSocketNotifier* eSocketNotifier::create ( eMainloop context,
int  fd,
int  req,
bool  startnow = true 
)
inlinestatic

Constructs a eSocketNotifier.

Parameters
contextThe thread where to bind the socketnotifier to. The signal is emitted from that thread.
fdThe filedescriptor to monitor. Can be a device or a socket.
reqThe events to watch to, normally either Read or Write. You can specify any events that poll supports.
startnowSpecifies if the socketnotifier should start immediately.

◆ getFD()

int eSocketNotifier::getFD ( ) const
inline

◆ getRequested()

int eSocketNotifier::getRequested ( ) const
inline

◆ isRunning()

bool eSocketNotifier::isRunning ( ) const
inline

◆ setRequested()

void eSocketNotifier::setRequested ( int  req)
inline

◆ start()

void eSocketNotifier::start ( )

◆ stop()

void eSocketNotifier::stop ( )

Friends And Related Function Documentation

◆ eMainloop

friend class eMainloop
friend

Member Data Documentation

◆ activated

PSignal1<void, int> eSocketNotifier::activated

◆ m_clients

eSmartPtrList<iObject> eSocketNotifier::m_clients

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