diff --git a/src/daemonc/remotecontrol.h b/src/daemonc/remotecontrol.h index 4c4cae072..615efbdf9 100644 --- a/src/daemonc/remotecontrol.h +++ b/src/daemonc/remotecontrol.h @@ -33,7 +33,7 @@ #ifndef __remotecontrol__ #define __remotecontrol__ -#include /* neutrino_msg_t, neutrino_msg_data_t */ +#include #include diff --git a/src/driver/neutrino_msg_t.h b/src/driver/neutrino_msg_t.h new file mode 100644 index 000000000..4f20b26f0 --- /dev/null +++ b/src/driver/neutrino_msg_t.h @@ -0,0 +1,20 @@ +/* + * (C) 2018 Stefan Seyfried + * SPDX-License-Identifier: GPL-2.0 + * + * define neutrino_msg_t and friends + * pulled out of rcinput.h to reduce impact of that header + */ + +#ifndef __neutrino_msg_t_h__ +#define __neutrino_msg_t_h__ + +typedef unsigned long neutrino_msg_t; +typedef unsigned long neutrino_msg_data_t; + +/* ugly hack to avoid including rcinput.h for key default values */ +#define RC_NOKEY 0xFFFFFFFE + +#define NEUTRINO_UDS_NAME "/tmp/neutrino.sock" + +#endif diff --git a/src/driver/rcinput.h b/src/driver/rcinput.h index 173bd76a8..7314acc39 100644 --- a/src/driver/rcinput.h +++ b/src/driver/rcinput.h @@ -52,6 +52,8 @@ #endif #endif +#include + #ifndef KEY_OK #define KEY_OK 0x160 #endif @@ -117,13 +119,6 @@ #define KEY_FN_B */ - -typedef unsigned long neutrino_msg_t; -typedef unsigned long neutrino_msg_data_t; - -#define NEUTRINO_UDS_NAME "/tmp/neutrino.sock" - - class CRCInput { private: @@ -275,7 +270,7 @@ class CRCInput RC_zoomout = KEY_ZOOMOUT, RC_timeout = 0xFFFFFFFF, - RC_nokey = 0xFFFFFFFE + RC_nokey = RC_NOKEY }; //rc-hardware definitions diff --git a/src/gui/components/cc_frm_button.h b/src/gui/components/cc_frm_button.h index c4b68543b..7989542bb 100644 --- a/src/gui/components/cc_frm_button.h +++ b/src/gui/components/cc_frm_button.h @@ -34,7 +34,7 @@ #include #include #include -#include +#include #define COL_BUTTON_BODY COL_MENUFOOT_PLUS_0 #define COL_BUTTON_TEXT_ENABLED COL_MENUCONTENTSELECTED_PLUS_0 diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index 2586d1772..f8d097272 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -96,7 +96,7 @@ class CComponentsFooter : public CComponentsHeader, public CCButtonSelect const std::string& text, const int& chain_width = 0, const int& label_width = 0, - const neutrino_msg_t& msg = CRCInput::RC_nokey, + const neutrino_msg_t& msg = RC_NOKEY /*CRCInput::RC_nokey*/, const int& result_value = -1, const int& alias_value = -1); ///add single button label with locale label type as content, chain_width as int, label width as int @@ -104,7 +104,7 @@ class CComponentsFooter : public CComponentsHeader, public CCButtonSelect const neutrino_locale_t& locale, const int& chain_width = 0, const int& label_width = 0, - const neutrino_msg_t& msg = CRCInput::RC_nokey, + const neutrino_msg_t& msg = RC_NOKEY /*CRCInput::RC_nokey*/, const int& result_value = -1, const int& alias_value = -1); diff --git a/src/gui/components/cc_signals.h b/src/gui/components/cc_signals.h index 5c3fdaca1..f4b5a0790 100644 --- a/src/gui/components/cc_signals.h +++ b/src/gui/components/cc_signals.h @@ -89,7 +89,7 @@ class CYourClass : sigc::trackable //<- not forget, requierd by destructor! #include #include -#include +#include class CComponentsSignals : public sigc::trackable { diff --git a/src/gui/components/cc_types.h b/src/gui/components/cc_types.h index 4e929c660..1faa2e789 100644 --- a/src/gui/components/cc_types.h +++ b/src/gui/components/cc_types.h @@ -27,8 +27,9 @@ #define __CC_TYPES__ #include -#include +#include #include +#include struct gradientData_t; class Font; @@ -202,7 +203,7 @@ typedef struct button_label_cc button_label_cc(): button(NULL), text(std::string()), locale(NONEXISTANT_LOCALE), - directKeys(1, CRCInput::RC_nokey){} + directKeys(1, RC_NOKEY /*CRCInput::RC_nokey*/){} } button_label_cc_struct; #define CC_WIDTH_MIN CFrameBuffer::getInstance()->scale2Res(16) diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index e6df12580..46cc510c8 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -28,7 +28,7 @@ #include -#include +#include #include #include #include diff --git a/src/gui/filebrowser.h b/src/gui/filebrowser.h index 63d2245e7..e589b0412 100644 --- a/src/gui/filebrowser.h +++ b/src/gui/filebrowser.h @@ -38,7 +38,7 @@ #endif #include -#include +#include #include diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index 3f318bd16..ab30d5423 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -35,7 +35,7 @@ #include -#include +#include #include #include #include diff --git a/src/gui/mediaplayer.h b/src/gui/mediaplayer.h index 1da9612e8..11ff58e67 100644 --- a/src/gui/mediaplayer.h +++ b/src/gui/mediaplayer.h @@ -31,10 +31,10 @@ #include #include -#include #include +class CPersonalizeGui; class CMediaPlayerMenu : public CMenuTarget { private: diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index d43e225ff..d4a56490e 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -43,6 +43,7 @@ #endif #include +#include #include "user_menue.h" #include "user_menue_setup.h" #include "subchannel_select.h" diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index 40fb269f2..0ebb45539 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -35,6 +35,7 @@ #include #endif +#include #include "user_menue_setup.h" #include diff --git a/src/gui/widget/keychooser.h b/src/gui/widget/keychooser.h index d6211dc04..bb6050523 100644 --- a/src/gui/widget/keychooser.h +++ b/src/gui/widget/keychooser.h @@ -24,7 +24,7 @@ #include -#include +#include #include "menue.h" diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 67dc42440..8e0c46d92 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -36,7 +36,7 @@ #ifndef __MENU__ #define __MENU__ -#include +#include #include #include #include @@ -141,7 +141,7 @@ class CMenuItem : public CComponentsSignals std::string hintText; neutrino_locale_t hint; - CMenuItem(bool Active = true, neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName= NULL, const char * const IconName_Info_right = NULL, bool IsStatic = false); + CMenuItem(bool Active = true, neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName= NULL, const char * const IconName_Info_right = NULL, bool IsStatic = false); virtual ~CMenuItem(){} @@ -256,16 +256,16 @@ class CMenuForwarder : public CMenuItem public: CMenuForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option, - CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, + CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const char * const IconName_Info_right = NULL, bool IsStatic = false); CMenuForwarder(const std::string & Text, const bool Active, const std::string &Option, - CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, + CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const char * const IconName_Info_right = NULL, bool IsStatic = false); CMenuForwarder(const neutrino_locale_t Text, const bool Active = true, const char * const Option=NULL, - CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, + CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const char * const IconName_Info_right = NULL, bool IsStatic = false); CMenuForwarder(const std::string & Text, const bool Active = true, const char * const Option=NULL, - CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, + CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const char * const IconName_Info_right = NULL, bool IsStatic = false); virtual ~CMenuForwarder(){} @@ -284,19 +284,19 @@ class CMenuDForwarder : public CMenuForwarder { public: CMenuDForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option, - CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, + CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const char * const IconName_Info_right = NULL) : CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { }; CMenuDForwarder(const std::string & Text, const bool Active, const std::string &Option, - CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, + CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const char * const IconName_Info_right = NULL) : CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { }; CMenuDForwarder(const neutrino_locale_t Text, const bool Active=true, const char * const Option=NULL, - CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, + CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const char * const IconName_Info_right = NULL) : CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { }; CMenuDForwarder(const std::string & Text, const bool Active=true, const char * const Option=NULL, - CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, + CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const char * const IconName_Info_right = NULL) : CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { }; @@ -347,12 +347,12 @@ private: public: CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, CChangeObserver * const Observ = NULL, - const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, + const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const int print_offset = 0, const int special_value = 0, const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE, bool sliderOn = false ); CMenuOptionNumberChooser(const std::string &name, int * const OptionValue, const bool Active, const int min_value, const int max_value, CChangeObserver * const Observ = NULL, - const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, + const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const int print_offset = 0, const int special_value = 0, const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE, bool sliderOn = false ); @@ -435,27 +435,27 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser public: CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, const struct keyval * const Options, const size_t Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, - const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, + const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, bool Pulldown = false, bool OptionsSort = false); CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, const struct keyval_ext * const Options, const size_t Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, - const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, + const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, bool Pulldown = false, bool OptionsSort = false); CMenuOptionChooser(const std::string &Name, int * const OptionValue, const struct keyval * const Options, const size_t Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, - const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, + const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, bool size_t = false, bool OptionsSort = false); CMenuOptionChooser(const std::string &Name, int * const OptionValue, const struct keyval_ext * const Options, const size_t Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, - const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, + const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, bool Pulldown = false, bool OptionsSort = false); CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, std::vector &Options, const bool Active = false, CChangeObserver * const Observ = NULL, - const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, + const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, bool Pulldown = false, bool OptionsSort = false); CMenuOptionChooser(const std::string &Name, int * const OptionValue, std::vector &Options, const bool Active = false, CChangeObserver * const Observ = NULL, - const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, + const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, bool Pulldown = false, bool OptionsSort = false); ~CMenuOptionChooser(); @@ -488,10 +488,10 @@ class CMenuOptionStringChooser : public CMenuItem public: CMenuOptionStringChooser(const neutrino_locale_t Name, std::string* OptionValue, bool Active = false, - CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, + CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, bool Pulldown = false); CMenuOptionStringChooser(const std::string &Name, std::string* OptionValue, bool Active = false, - CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, + CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, bool Pulldown = false); ~CMenuOptionStringChooser(); @@ -621,7 +621,7 @@ class CMenuWidget : public CMenuTarget, public CComponentsSignals virtual void hide(); virtual int exec(CMenuTarget* parent, const std::string & actionKey); virtual const char *getName(); - virtual void integratePlugins(int integration, const unsigned int shortcut=CRCInput::RC_nokey, bool enabled=true); + virtual void integratePlugins(int integration, const unsigned int shortcut=RC_NOKEY, bool enabled=true); void setSelected(const int &Preselected){ selected = Preselected; }; void initSelectable(); int getSelected()const { return selected; }; @@ -691,7 +691,7 @@ class CLockedMenuForwarder : public CMenuForwarder, public CPINProtection public: CLockedMenuForwarder(const neutrino_locale_t Text, std::string &_validPIN, bool ask=true, const bool Active=true, const char * const Option = NULL, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, - neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, const char * const IconName_Info_right = NULL) + neutrino_msg_t DirectKey = RC_NOKEY, const char * const IconName = NULL, const char * const IconName_Info_right = NULL) : CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) ,CPINProtection(_validPIN) { diff --git a/src/system/settings.cpp b/src/system/settings.cpp index 0c352cf5a..7649a91de 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -26,6 +26,7 @@ #include #include +#include #include //enum PERSONALIZE_SETTINGS to find in settings.h