]> git.vomp.tv Git - vompclient.git/blob - message.h
Minor code cleaning re: Messages
[vompclient.git] / message.h
1 /*
2     Copyright 2004-2020 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, see <https://www.gnu.org/licenses/>.
18 */
19
20 #ifndef MESSAGE_H
21 #define MESSAGE_H
22
23 #include <stdio.h>
24
25 #include "defines.h"
26
27 class Message
28 {
29   public:
30
31     // Not using a pre-defined target if one is available is deprecated, and is now essential for CONTROL
32
33     enum PreDefinedTarget
34     {
35       NA = 0,
36       CONTROL,
37       BOXSTACK,
38       MOUSE_RECEIVER
39     };
40
41     Message();
42
43     void* from{};
44     PreDefinedTarget p_to{NA}; // If this is set 'to' is ignored
45     void* to{};
46     int message{};
47     ULONG parameter{};
48     ULONG tag{};     // use this for identifying which object / question is being replied to
49     void* data{};    // Use this for anything. Int, pointer, pointer to memory to be freed by the recipient, etc.
50
51     // Never use the values, only the names
52     const static int INVALID                       = 0;
53     const static int QUESTION_YES                  = 1;
54     const static int CLOSE_ME                      = 2;
55     const static int PLAY_SELECTED_RECORDING       = 3;
56     const static int DELETE_SELECTED_RECORDING     = 4;
57     const static int SCREENSHOT                    = 5;
58     const static int CHANNEL_CHANGE                = 6;
59     const static int RESUME_SELECTED_RECORDING     = 7;
60     const static int INPUT_EVENT                   = 8;
61     const static int STOP_PLAYBACK                 = 9;
62     const static int SERVER_SELECTED               = 10;
63     const static int VDR_CONNECTED                 = 11;
64     const static int ADD_VIEW                      = 12;
65     const static int REDRAW_LANG                   = 14;
66     const static int EPG                           = 16;
67     const static int CHANGED_OPTIONS               = 18;
68     const static int CONNECTION_LOST               = 19;
69     const static int MOVE_RECORDING                = 20;
70     const static int PLAYER_EVENT                  = 22;
71     const static int AUDIO_CHANGE_CHANNEL          = 23;
72     const static int CHILD_CLOSE                   = 24;
73     const static int MOUSE_MOVE                    = 25;
74     const static int MOUSE_LBDOWN                  = 26;
75     const static int CHANGE_LANGUAGE               = 27;
76     const static int LAST_VIEW_CLOSE               = 28;
77     const static int CHANGED_REMOTECONTROL         = 29;
78     const static int DELETE_SELECTED_TIMER         = 30;
79     const static int CHANGED_DEVICEOPTIONS         = 31;
80     const static int TELETEXTUPDATE                = 32;
81     const static int TELETEXTUPDATEFIRSTLINE       = 33;
82     const static int SUBTITLE_CHANGE_CHANNEL       = 34;
83     const static int MOUSE_SCROLL                  = 35;
84     const static int NEW_PICTURE                   = 36;
85     const static int NEW_PICTURE_STATIC            = 37;
86     const static int REDRAW                        = 38;
87     const static int SHUTDOWN                      = 39;
88
89 };
90
91 #endif