kodi
Public Member Functions | Protected Attributes | List of all members
XFILE::Pipe Class Reference
Collaboration diagram for XFILE::Pipe:
Collaboration graph
[legend]

Public Member Functions

 Pipe (const std::string &name, int nMaxSize=PIPE_DEFAULT_MAX_SIZE)
 
const std::string & GetName ()
 
void AddRef ()
 
void DecRef ()
 
int RefCount ()
 
bool IsEmpty ()
 
int Read (char *buf, int nMaxSize, int nWaitMillis=-1)
 Read into the buffer from the Pipe the num of bytes asked for blocking forever (which happens to be 5 minutes in this case). More...
 
bool Write (const char *buf, int nSize, int nWaitMillis=-1)
 Write into the Pipe from the buffer the num of bytes asked for blocking forever. More...
 
void Flush ()
 
void CheckStatus ()
 
void Close ()
 
void AddListener (IPipeListener *l)
 
void RemoveListener (IPipeListener *l)
 
void SetEof ()
 
bool IsEof ()
 
int GetAvailableRead ()
 
void SetOpenThreshold (int threshold)
 

Protected Attributes

bool m_bOpen
 
bool m_bReadyForRead
 
bool m_bEof
 
CRingBuffer m_buffer
 
std::string m_strPipeName
 
int m_nRefCount
 
int m_nOpenThreshold
 
CEvent m_readEvent
 
CEvent m_writeEvent
 
std::vector< XFILE::IPipeListener * > m_listeners
 
CCriticalSection m_lock
 

Member Function Documentation

◆ Read()

int Pipe::Read ( char *  buf,
int  nMaxSize,
int  nWaitMillis = -1 
)

Read into the buffer from the Pipe the num of bytes asked for blocking forever (which happens to be 5 minutes in this case).

In the case where nWaitMillis is provided block for that number of milliseconds instead.

◆ Write()

bool Pipe::Write ( const char *  buf,
int  nSize,
int  nWaitMillis = -1 
)

Write into the Pipe from the buffer the num of bytes asked for blocking forever.

In the case where nWaitMillis is provided block for that number of milliseconds instead.


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