]> git.vomp.tv Git - vompserver.git/blob - vompclientrrproc.h
Fix a thread not being stopped causing strange connection problems
[vompserver.git] / vompclientrrproc.h
1 /*
2     Copyright 2008 Chris Tallon
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19 */
20
21 #ifndef VOMPCLIENTRRPROC_H
22 #define VOMPCLIENTRRPROC_H
23
24 #include "thread.h"
25 #include "responsepacket.h"
26
27 class VompClient;
28 class Log;
29
30 class RequestPacket
31 {
32   public:
33     RequestPacket(ULONG requestID, ULONG opcode, UCHAR* data, ULONG dataLength)
34      : requestID(requestID), opcode(opcode), data(data), dataLength(dataLength) {}
35     
36     ULONG requestID;
37     ULONG opcode;
38     UCHAR* data;
39     ULONG dataLength;
40 };
41
42 class VompClientRRProc : public Thread
43 {
44   public:
45     VompClientRRProc(VompClient& x);
46     ~VompClientRRProc();
47     
48     bool init();
49     bool recvRequest(RequestPacket*);
50
51   private:
52     bool processPacket();
53   
54 #ifndef VOMPSTANDALONE
55     int processGetRecordingsList();
56     int processDeleteRecording();
57     int processMoveRecording();
58     int processGetChannelsList();
59     int processStartStreamingChannel();
60     int processGetBlock();
61     int processStopStreaming();
62     int processStartStreamingRecording();
63     int processGetChannelSchedule();
64     int processGetTimers();
65     int processSetTimer();
66     int processPositionFromFrameNumber();
67     int processFrameNumberFromPosition();
68     int processGetIFrame();
69     int processGetRecInfo();
70     int processGetMarks();
71     int processGetChannelPids();
72     int processDeleteTimer();
73     int processReScanRecording();           // FIXME obselete
74 #endif
75     int processLogin();
76     int processConfigSave();
77     int processConfigLoad();
78     int processGetMediaList();
79     int processGetPicture();
80     int processGetImageBlock();
81     int processGetLanguageList();
82     int processGetLanguageContent();
83
84     void threadMethod();
85
86     VompClient& x;
87     RequestPacket* req;
88     ResponsePacket* resp;
89     
90     Log* log;
91 };
92
93 #endif
94