22 #include "mythwsstream.h" 23 #include "private/wsresponse.h" 24 #include "private/cppdef.h" 34 WSStream::WSStream(WSResponse *response)
35 : m_response(response)
42 SAFE_DELETE(m_response);
45 int WSStream::Read(
void* buffer,
unsigned n)
47 if (m_response == NULL)
49 size_t s = m_response->ReadContent((
char *)buffer, n);
54 int64_t WSStream::GetSize()
const 56 return (m_response != NULL ? (int64_t)(-1) : 0);
59 int64_t WSStream::GetPosition()
const 61 return (m_response != NULL ? m_position : 0);
64 int64_t WSStream::Seek(int64_t offset, WHENCE_t whence)
71 std::string WSStream::GetContentType()
const 74 if (m_response->GetHeaderValue(
"CONTENT-TYPE", val))
75 return val.substr(0, val.find(
';'));
This is the main namespace that encloses all public classes.