Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
XFILE::Pipe Class Reference

#include <PipesManager.h>

Public Member Functions

 Pipe (const std::string &name, int nMaxSize=PIPE_DEFAULT_MAX_SIZE)
 
virtual ~Pipe ()
 
const std::string & GetName ()
 
void AddRef ()
 
void DecRef ()
 
int RefCount ()
 
bool IsEmpty ()
 
int Read (char *buf, int nMaxSize, int nWaitMillis=-1)
 
bool Write (const char *buf, int nSize, int nWaitMillis=-1)
 
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
 

Constructor & Destructor Documentation

◆ Pipe()

Pipe::Pipe ( const std::string & name,
int nMaxSize = PIPE_DEFAULT_MAX_SIZE )

◆ ~Pipe()

Pipe::~Pipe ( )
virtualdefault

Member Function Documentation

◆ AddListener()

void Pipe::AddListener ( IPipeListener * l)

◆ AddRef()

void Pipe::AddRef ( )

◆ CheckStatus()

void Pipe::CheckStatus ( )

◆ Close()

void Pipe::Close ( )

◆ DecRef()

void Pipe::DecRef ( )

◆ Flush()

void Pipe::Flush ( )

◆ GetAvailableRead()

int Pipe::GetAvailableRead ( )

◆ GetName()

const std::string & Pipe::GetName ( )

◆ IsEmpty()

bool Pipe::IsEmpty ( )

◆ IsEof()

bool Pipe::IsEof ( )

◆ 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.

◆ RefCount()

int Pipe::RefCount ( )

◆ RemoveListener()

void Pipe::RemoveListener ( IPipeListener * l)

◆ SetEof()

void Pipe::SetEof ( )

◆ SetOpenThreshold()

void Pipe::SetOpenThreshold ( int threshold)

◆ 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.

Member Data Documentation

◆ m_bEof

bool XFILE::Pipe::m_bEof
protected

◆ m_bOpen

bool XFILE::Pipe::m_bOpen
protected

◆ m_bReadyForRead

bool XFILE::Pipe::m_bReadyForRead
protected

◆ m_buffer

CRingBuffer XFILE::Pipe::m_buffer
protected

◆ m_listeners

std::vector<XFILE::IPipeListener *> XFILE::Pipe::m_listeners
protected

◆ m_lock

CCriticalSection XFILE::Pipe::m_lock
protected

◆ m_nOpenThreshold

int XFILE::Pipe::m_nOpenThreshold
protected

◆ m_nRefCount

int XFILE::Pipe::m_nRefCount
protected

◆ m_readEvent

CEvent XFILE::Pipe::m_readEvent
protected

◆ m_strPipeName

std::string XFILE::Pipe::m_strPipeName
protected

◆ m_writeEvent

CEvent XFILE::Pipe::m_writeEvent
protected

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