]> git.vomp.tv Git - vompclient.git/blob - message.h
Fix for possible crash when removing bar
[vompclient.git] / message.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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #ifndef MESSAGE_H
22 #define MESSAGE_H
23
24 #include <stdio.h>
25 #include "defines.h"
26
27 // Usage of messages is more dubious now that the single master mutex lock
28 // protects all gui actions. Reason(s) for usage:
29 // 1. View A wants something to be done by View B *after* View A has been deleted
30 // 2. A thread wants its object/view deleting *after* the thread has exited
31
32 // Put a justification line after call to Message* m = new  Message() line
33 // So that the sources can be grepped for proper message useage
34
35 class Message
36 {
37   public:
38     Message();
39
40     void* from;
41     void* to;
42     ULONG message;
43     ULONG parameter;
44     ULONG tag;     // use this for identifying which object / question is being replied to
45
46     const static ULONG QUESTION_YES = 1;
47     const static ULONG CLOSE_ME = 2;
48     const static ULONG PLAY_SELECTED_RECORDING = 3;
49     const static ULONG DELETE_SELECTED_RECORDING = 4;
50     const static ULONG SCREENSHOT = 5;
51     const static ULONG CHANNEL_CHANGE = 6;
52     const static ULONG RESUME_SELECTED_RECORDING = 7;
53     const static ULONG STANDBY = 8;
54     const static ULONG STOP_PLAYBACK = 9;
55     const static ULONG SERVER_SELECTED = 10;
56     const static ULONG VDR_CONNECTED = 11;
57     const static ULONG ADD_VIEW = 12;
58     const static ULONG STREAM_END = 13;
59     const static ULONG REDRAW_LANG = 14;
60     const static ULONG REDRAW = 15;
61     const static ULONG EPG = 16;
62     const static ULONG EPG_CLOSE = 17;
63     const static ULONG CHANGED_OPTIONS = 18;
64     const static ULONG CONNECTION_LOST = 19;
65     const static ULONG MOVE_RECORDING = 20;
66     const static ULONG UDP_BUTTON = 21;
67     const static ULONG PLAYER_EVENT = 22;
68     const static ULONG AUDIO_CHANGE_CHANNEL = 23;
69     const static ULONG CHILD_CLOSE = 24;
70     const static ULONG MOUSE_MOVE = 25;
71     const static ULONG MOUSE_LBDOWN = 26;
72     const static ULONG CHANGE_LANGUAGE = 27;
73     const static ULONG LAST_VIEW_CLOSE = 28;
74     const static ULONG CHANGED_REMOTECONTROL = 29;
75 };
76
77 #endif