2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
34 #include "directory.h"
35 #include "recording.h"
38 // FIXME do some tcp connection error checking and kill it!
45 static VDR* getInstance();
50 void findServers(std::vector<char*>& serverIPs);
51 void cancelFindingServer();
52 void setServerIP(char*);
55 ULLONG getResumePoint(char* fileName); // uses configLoad
61 Directory* getRecordingsList();
62 char* getRecordingSummary(char* fileName);
63 int deleteRecording(char* fileName);
64 ULLONG streamRecording(Recording* rec);
66 List* getChannelsList(ULONG type);
67 int streamChannel(ULONG number);
69 int getBlock(UCHAR* buf, ULLONG position, int maxAmount);
71 int getChannelSchedule(ULONG number);
72 int configSave(char* section, char* key, char* value);
73 char* configLoad(char* section, char* key);
77 const static ULONG VIDEO = 1;
78 const static ULONG RADIO = 2;
88 pthread_mutex_t mutex;
90 const static ULONG VDR_LOGIN = 1;
91 const static ULONG VDR_GETRECORDINGLIST = 2;
92 const static ULONG VDR_DELETERECORDING = 3;
93 const static ULONG VDR_GETSUMMARY = 4;
94 const static ULONG VDR_GETCHANNELLIST = 5;
95 const static ULONG VDR_STREAMCHANNEL = 6;
96 const static ULONG VDR_GETBLOCK = 7;
97 const static ULONG VDR_STOPSTREAMING = 8;
98 const static ULONG VDR_STREAMRECORDING = 9;
99 const static ULONG VDR_GETCHANNELSCHEDULE = 10;
100 const static ULONG VDR_CONFIGSAVE = 11;
101 const static ULONG VDR_CONFIGLOAD = 12;
103 long getSimpleReply();
104 char* getStringReply();