14 #include "threads/CriticalSection.h" 15 #include "threads/Event.h" 16 #include "utils/RingBuffer.h" 22 #define PIPE_DEFAULT_MAX_SIZE (6 * 1024 * 1024) 31 virtual void OnPipeOverFlow() = 0;
32 virtual void OnPipeUnderFlow() = 0;
38 Pipe(
const std::string &name,
int nMaxSize = PIPE_DEFAULT_MAX_SIZE );
40 const std::string &GetName();
55 int Read(
char *buf,
int nMaxSize,
int nWaitMillis = -1);
64 bool Write(
const char *buf,
int nSize,
int nWaitMillis = -1);
77 int GetAvailableRead();
78 void SetOpenThreshold(
int threshold);
87 std::string m_strPipeName;
94 std::vector<XFILE::IPipeListener *> m_listeners;
96 CCriticalSection m_lock;
106 std::string GetUniquePipeName();
107 XFILE::Pipe *CreatePipe(
const std::string &name=
"",
int nMaxPipeSize = PIPE_DEFAULT_MAX_SIZE);
110 bool Exists(
const std::string &name);
113 int m_nGenIdHelper = 1;
114 std::map<std::string, XFILE::Pipe *> m_pipes;
116 CCriticalSection m_lock;
This is an Event class built from a ConditionVariable.
Definition: Event.h:35
Definition: PipesManager.h:100
Definition: PipesManager.h:27
Definition: RingBuffer.h:13
Definition: PipesManager.h:35