Faith::SocketNotifier Class Reference

tells you when a file descriptor has changed state (Linux) More...

#include <faith/socketnotifier.h>

Inheritance diagram for Faith::SocketNotifier:

Faith::Object List of all members.

Public Types

 Read
 Write
 Exception
enum  Type { Read, Write, Exception }

Signals

void activated (int)
void activated (Faith::SocketNotifier *socket)
void activated ()

Public Member Functions

 SocketNotifier (int socket, Type type, Faith::Object *parent=0, const char *name=0)
 ~SocketNotifier ()
int socket () const
Type type () const
bool isEnabled () const
virtual void setEnabled (bool enable)

Detailed Description

tells you when a file descriptor has changed state (Linux)

this class tells you when it's time to deal with a socket. Create me, connect to one or more of the activated signals, and call setEnabled(true)

Similar to the POSIX (unix) "select" function.


Member Enumeration Documentation

enum Faith::SocketNotifier::Type

Specifies which kind of events to announce

Enumerator:
Read 
Write 
Exception 


Constructor & Destructor Documentation

Faith::SocketNotifier::SocketNotifier ( int  socket,
Type  type,
Faith::Object parent = 0,
const char *  name = 0 
)

Listens to the socket object for the type of events specified by type

Faith::SocketNotifier::~SocketNotifier (  ) 


Member Function Documentation

void Faith::SocketNotifier::activated (  )  [signal]

Same as above, but with no parameters

void Faith::SocketNotifier::activated ( Faith::SocketNotifier socket  )  [signal]

Same as above, except socket is "this"

void Faith::SocketNotifier::activated ( int   )  [signal]

This signal is emitted when the socket triggers an event.

Parameters:
socket is the file descriptor

bool Faith::SocketNotifier::isEnabled (  )  const

Returns:
true if the activated signals will ever be emitted

virtual void Faith::SocketNotifier::setEnabled ( bool  enable  )  [virtual]

Remember to call setEnabled(true) when you want to recieve events

int Faith::SocketNotifier::socket (  )  const [inline]

Returns:
the file descriptor I'm attached to

Type Faith::SocketNotifier::type (  )  const [inline]

Returns:
the type of events I'm listening for


The documentation for this class was generated from the following file:
Generated on Fri Sep 1 00:23:09 2006 for Faith by  doxygen 1.4.7