]> git.vomp.tv Git - vompclient.git/blob - event.cc
Windows Makefile fix
[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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 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
34 Event::~Event()
35 {
36   if (title) delete[] title;
37   if (subtitle) delete[] subtitle;
38   if (description) delete[] description;
39 }
40
41 void Event::settitle(const char* s)
42 {
43   delete title;
44   title = new char[strlen(s) + 1];
45   strcpy(title, s);
46 }
47
48 void Event::setdescription(const char* s)
49 {
50   delete description;
51   description = new char[strlen(s) + 1];
52   strcpy(description, s);
53 }
54
55 void Event::setsubtitle(const char* s)
56 {
57   delete subtitle;
58   subtitle = new char[strlen(s) + 1];
59   strcpy(subtitle, s);
60 }
61