]> git.vomp.tv Git - vompclient.git/blob - event.h
d118b3829e0b3f2a31cffa032b944b0aee63698a
[vompclient.git] / event.h
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 #ifndef EVENT_H
22 #define EVENT_H
23
24 #include <stdio.h>
25 #include <string.h>
26 #include <time.h>
27
28 #include "defines.h"
29
30 class Event
31 {
32   public:
33     Event();
34     ~Event();
35
36     void settitle(const char* title);
37     void setsubtitle(const char* subtitle);
38     void setdescription(const char* description);
39
40     ULONG id;
41     #ifdef WIN32
42     time_t time;
43     time_t duration;
44     #else
45     ULONG time;
46     ULONG duration;
47     #endif // FIXME sort this out, causes signedness problems under linux
48
49     char* title;
50     char* subtitle;
51     char* description;
52 };
53
54 class EventSorter
55 {
56   public:
57     bool operator()(const Event* e1, const Event* e2)
58     {
59       return e1->time < e2->time;
60     }
61 };
62
63 #endif