CPPMyth
Library to interoperate with MythTV server
Loading...
Searching...
No Matches
mythwsstream.h
1/*
2 * Copyright (C) 2014 Jean-Luc Barriere
3 *
4 * This Program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
7 * any later version.
8 *
9 * This Program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 * http://www.gnu.org/copyleft/gpl.html
19 *
20 */
21
22#ifndef MYTHWSSTREAM_H
23#define MYTHWSSTREAM_H
24
25#include "mythtypes.h"
26#include "mythstream.h"
27
28namespace Myth
29{
30 class WSStream;
31 class WSResponse;
32
33 typedef MYTH_SHARED_PTR<WSStream> WSStreamPtr;
34
35 class WSStream : public Stream
36 {
37 public:
38 WSStream();
39 WSStream(WSResponse *response);
40 ~WSStream();
41
42 int Read(void* buffer, unsigned n);
43 int64_t GetSize() const; // Always returns -1 for valid stream else 0
44 int64_t GetPosition() const;
45 int64_t Seek(int64_t offset, WHENCE_t whence);
46
47 std::string GetContentType() const;
48
49 private:
50 WSResponse *m_response;
51 int64_t m_position;
52 };
53}
54
55#endif /* MYTHWSSTREAM_H */
56
This is the main namespace that encloses all public classes.
Definition mythcontrol.h:30