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