]> git.vomp.tv Git - vompclient.git/blob - event.cc
Prebuffering
[vompclient.git] / event.cc
1 /*
2     Copyright 2004-2005 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #include "event.h"
22
23 Event::Event()
24 {
25   id = 0;
26   time = 0;
27   duration = 0;
28
29   title = NULL;
30   subtitle = NULL;
31   description = NULL;
32
33   index = -1;
34 }
35
36 Event::~Event()
37 {
38   if (title) delete[] title;
39   if (subtitle) delete[] subtitle;
40   if (description) delete[] description;
41 }
42
43 void Event::settitle(char* s)
44 {
45   delete title;
46   title = new char[strlen(s) + 1];
47   strcpy(title, s);
48 }
49
50 void Event::setdescription(char* s)
51 {
52   delete description;
53   description = new char[strlen(s) + 1];
54   strcpy(description, s);
55 }
56
57 void Event::setsubtitle(char* s)
58 {
59   delete subtitle;
60   subtitle = new char[strlen(s) + 1];
61   strcpy(subtitle, s);
62 }
63