CPPMyth
Library to interoperate with MythTV server
Loading...
Searching...
No Matches
mythprotoplayback.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 MYTHPROTOPLAYBACK_H
23#define MYTHPROTOPLAYBACK_H
24
25#include "mythprotobase.h"
26#include "mythprototransfer.h"
27
28#define PROTO_PLAYBACK_RCVBUF 64000
29
30namespace Myth
31{
32
33 class ProtoPlayback : public ProtoBase
34 {
35 public:
36 ProtoPlayback(const std::string& server, unsigned port);
37
38 virtual bool Open();
39 virtual void Close();
40 virtual bool IsOpen();
41
42 void TransferDone(ProtoTransfer& transfer)
43 {
44 TransferDone75(transfer);
45 }
46 bool TransferIsOpen(ProtoTransfer& transfer)
47 {
48 return TransferIsOpen75(transfer);
49 }
50 int TransferRequestBlock(ProtoTransfer& transfer, void *buffer, unsigned n);
51 int64_t TransferSeek(ProtoTransfer& transfer, int64_t offset, WHENCE_t whence)
52 {
53 return TransferSeek75(transfer, offset, whence);
54 }
55
56 private:
57 bool Announce75();
58 void TransferDone75(ProtoTransfer& transfer);
59 bool TransferIsOpen75(ProtoTransfer& transfer);
60 bool TransferRequestBlock75(ProtoTransfer& transfer, unsigned n);
61 int32_t TransferRequestBlockFeedback75();
62 int64_t TransferSeek75(ProtoTransfer& transfer, int64_t offset, WHENCE_t whence);
63 };
64
65}
66
67#endif /* MYTHPROTOPLAYBACK_H */
This is the main namespace that encloses all public classes.
Definition mythcontrol.h:30