diff options
Diffstat (limited to 'ExternalAPI/m_radio.h')
-rw-r--r-- | ExternalAPI/m_radio.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/ExternalAPI/m_radio.h b/ExternalAPI/m_radio.h new file mode 100644 index 0000000..0adc12a --- /dev/null +++ b/ExternalAPI/m_radio.h @@ -0,0 +1,94 @@ +#ifndef M_RADIO
+#define M_RADIO
+
+#ifndef MIID_MRADIO
+#define MIID_MRADIO {0xeebc474c, 0xb0ad, 0x470f, {0x99, 0xa8, 0x9d, 0xd9, 0x21, 0x0c, 0xe2, 0x33}}
+#endif
+
+// command codes
+#define MRC_STOP 0
+#define MRC_PLAY 1 // lParam is radio contact handle
+#define MRC_PAUSE 2
+#define MRC_PREV 3
+#define MRC_NEXT 4
+#define MRC_STATUS 5 // lParam is RD_STATUS_* value (RD_STATUS_GET only now)
+#define MRC_SEEK 6 // lParam is value in sec; -1 mean obtain current position
+#define MRC_RECORD 7 // lParam is 0 - switch; 1 - on; 2 - off
+
+// please, do not use these commands, internal using only
+#define RD_STATUS_NOSTATION 0 // no active station found
+#define RD_STATUS_PLAYING 1 // media is playing
+#define RD_STATUS_PAUSED 2 // media is paused
+#define RD_STATUS_STOPPED 3 // media is stopped (only for playlists)
+#define RD_STATUS_CONNECT 4 // plugin try to connect to the station
+#define RD_STATUS_ABORT 5 // plugin want to abort while try to connect
+// next command is for users
+#define RD_STATUS_GET 6 // to get current status
+
+/*
+ Open radio Options, if Main Options window not opened
+ wParam: 0
+ lParam: 0
+*/
+#define MS_RADIO_SETTINGS "mRadio/Settings"
+/*
+ Switch 'record' mode
+ wParam: 0 - switch mode; else - get record status
+ lParam: 0
+ Return: Current status: 1 - record is ON
+*/
+#define MS_RADIO_RECORD "mRadio/REC"
+
+/*
+ Set current radio volume
+ wParam: volume (0-100)
+ lParam: must be 0
+*/
+#define MS_RADIO_SETVOL "mRadio/SetVol"
+
+/*
+ Send command to mRadio
+ wParam: command (see MRC_* constant)
+ lParam: value (usually 0)
+ Return: return value (now for status only)
+*/
+#define MS_RADIO_COMMAND "mRadio/Command"
+
+/*
+ Starting or stopping radio station
+ wParam: Radio contact handle (lParam=0) or Station name
+ lParam: 0 - wParam is handle, 1 - ANSI, else - unicode
+*/
+#define MS_RADIO_PLAYSTOP "mRadio/PlayStop"
+
+/*
+ wParam: station handle (0 - all)
+ lParam: nil (through dialog, radio.ini by default) or ansi string with filename
+ Return: exported stations amount
+*/
+#define MS_RADIO_EXPORT "mRadio/Export"
+
+/*
+ wParam: group to import radio or 0
+ lParam: nil (through dialog, radio.ini by default) or ansi string with filename
+ Return: imported stations amount
+*/
+#define MS_RADIO_IMPORT "mRadio/Import"
+
+/*
+ MRC_STOP , LParam - 0
+ MRC_PLAY , LParam - url
+ MRC_PAUSE , LParam - 0 (pause) / 1 (play)
+ MRC_SEEK , LParam - lParam is value in sec
+ MRC_RECORD , LParam - 0 (stop) / 1 (record)
+*/
+#define ME_RADIO_STATUS "mRadio/Status"
+
+/*
+ wParam: 0 - switch; 1 - switch on; -1 - switch off
+ lParam: 0
+ Return: last state (0 - was off, 1 - was on)
+*/
+#define MS_RADIO_EQONOFF "mRadio/EqOnOff"
+
+#endif
|