Pass primitive types by value (#935)

This commit is contained in:
Murat Seker
2020-08-08 13:09:15 +02:00
committed by GitHub
parent 5758b19cbc
commit c00d8e62fb
146 changed files with 505 additions and 505 deletions

View File

@@ -46,14 +46,14 @@ public:
/// @param localConnection Is this a local network connection? Use utils/NetOrigin to check that
/// @param parent Parent QObject
///
API(Logger *log, const bool &localConnection, QObject *parent);
API(Logger *log, bool localConnection, QObject *parent);
protected:
///
/// @brief Initialize the API
/// This call is REQUIRED!
///
void init(void);
void init();
///
/// @brief Set a single color
@@ -62,7 +62,7 @@ protected:
/// @param[in] timeout_ms The time the leds are set to the given color [ms]
/// @param[in] origin The setter
///
void setColor(const int &priority, const std::vector<uint8_t> &ledColors, const int &timeout_ms = -1, const QString &origin = "API", const hyperion::Components &callerComp = hyperion::COMP_INVALID);
void setColor(int priority, const std::vector<uint8_t> &ledColors, int timeout_ms = -1, const QString &origin = "API", hyperion::Components callerComp = hyperion::COMP_INVALID);
///
/// @brief Set a image
@@ -72,7 +72,7 @@ protected:
/// @param callerComp The HYPERION COMPONENT that calls this function! e.g. PROT/FLATBUF
/// @return True on success
///
bool setImage(ImageCmdData &data, hyperion::Components comp, QString &replyMsg, const hyperion::Components &callerComp = hyperion::COMP_INVALID);
bool setImage(ImageCmdData &data, hyperion::Components comp, QString &replyMsg, hyperion::Components callerComp = hyperion::COMP_INVALID);
///
/// @brief Clear a priority in the Muxer, if -1 all priorities are cleared
@@ -81,7 +81,7 @@ protected:
/// @param callerComp The HYPERION COMPONENT that calls this function! e.g. PROT/FLATBUF
/// @return True on success
///
bool clearPriority(const int &priority, QString &replyMsg, const hyperion::Components &callerComp = hyperion::COMP_INVALID);
bool clearPriority(int priority, QString &replyMsg, hyperion::Components callerComp = hyperion::COMP_INVALID);
///
/// @brief Set a new component state
@@ -91,21 +91,21 @@ protected:
/// @param callerComp The HYPERION COMPONENT that calls this function! e.g. PROT/FLATBUF
/// @ return True on success
///
bool setComponentState(const QString &comp, bool &compState, QString &replyMsg, const hyperion::Components &callerComp = hyperion::COMP_INVALID);
bool setComponentState(const QString &comp, bool &compState, QString &replyMsg, hyperion::Components callerComp = hyperion::COMP_INVALID);
///
/// @brief Set a ledToImageMapping type
/// @param type mapping type string
/// @param callerComp The HYPERION COMPONENT that calls this function! e.g. PROT/FLATBUF
///
void setLedMappingType(const int &type, const hyperion::Components &callerComp = hyperion::COMP_INVALID);
void setLedMappingType(int type, hyperion::Components callerComp = hyperion::COMP_INVALID);
///
/// @brief Set the 2D/3D modes type
/// @param mode The VideoMode
/// @param callerComp The HYPERION COMPONENT that calls this function! e.g. PROT/FLATBUF
///
void setVideoMode(const VideoMode &mode, const hyperion::Components &callerComp = hyperion::COMP_INVALID);
void setVideoMode(VideoMode mode, hyperion::Components callerComp = hyperion::COMP_INVALID);
///
/// @brief Set an effect
@@ -113,21 +113,21 @@ protected:
/// @param callerComp The HYPERION COMPONENT that calls this function! e.g. PROT/FLATBUF
/// REQUIRED dat fields: effectName, priority, duration, origin
///
void setEffect(const EffectCmdData &dat, const hyperion::Components &callerComp = hyperion::COMP_INVALID);
void setEffect(const EffectCmdData &dat, hyperion::Components callerComp = hyperion::COMP_INVALID);
///
/// @brief Set source auto select enabled or disabled
/// @param sate The new state
/// @param callerComp The HYPERION COMPONENT that calls this function! e.g. PROT/FLATBUF
///
void setSourceAutoSelect(const bool state, const hyperion::Components &callerComp = hyperion::COMP_INVALID);
void setSourceAutoSelect(bool state, hyperion::Components callerComp = hyperion::COMP_INVALID);
///
/// @brief Set the visible priority to given priority
/// @param priority The priority to set
/// @param callerComp The HYPERION COMPONENT that calls this function! e.g. PROT/FLATBUF
///
void setVisiblePriority(const int &priority, const hyperion::Components &callerComp = hyperion::COMP_INVALID);
void setVisiblePriority(int priority, hyperion::Components callerComp = hyperion::COMP_INVALID);
///
/// @brief Register a input or update the meta data of a previous register call
@@ -138,21 +138,21 @@ protected:
/// @param[in] owner Specific owner string, might be empty
/// @param[in] callerComp The component that call this (e.g. PROTO/FLAT)
///
void registerInput(const int &priority, const hyperion::Components &component, const QString &origin, const QString &owner, const hyperion::Components &callerComp);
void registerInput(int priority, hyperion::Components component, const QString &origin, const QString &owner, hyperion::Components callerComp);
///
/// @brief Revoke a registerInput() call by priority. We maintain all registered priorities in this scope
/// ATTENTION: This is MANDATORY if you change (priority change) or stop(clear/timeout) DURING lifetime. If this class destructs it's not needed
/// @param priority The priority to unregister
///
void unregisterInput(const int &priority);
void unregisterInput(int priority);
///
/// @brief Handle the instance switching
/// @param inst The requested instance
/// @return True on success else false
///
bool setHyperionInstance(const quint8 &inst);
bool setHyperionInstance(quint8 inst);
///
/// @brief Get all contrable components and their state
@@ -169,19 +169,19 @@ protected:
/// @brief Get all instances data
/// @return The instance data
///
QVector<QVariantMap> getAllInstanceData(void);
QVector<QVariantMap> getAllInstanceData();
///
/// @brief Start instance
/// @param index The instance index
///
void startInstance(const quint8 &index);
void startInstance(quint8 index);
///
/// @brief Stop instance
/// @param index The instance index
///
void stopInstance(const quint8 &index);
void stopInstance(quint8 index);
//////////////////////////////////
/// AUTH / ADMINISTRATION METHODS
@@ -193,7 +193,7 @@ protected:
/// @param replyMsg The reply Msg
/// @return False with reply
///
bool deleteInstance(const quint8 &index, QString &replyMsg);
bool deleteInstance(quint8 index, QString &replyMsg);
///
/// @brief Create instance. Requires ADMIN ACCESS
@@ -208,7 +208,7 @@ protected:
/// @param name With given name
/// @return False with reply
///
QString setInstanceName(const quint8 &index, const QString &name);
QString setInstanceName(quint8 index, const QString &name);
///
/// @brief Delete an effect. Requires ADMIN ACCESS
@@ -292,7 +292,7 @@ protected:
/// @param id The id fo the request
/// @param accept True when it should be accepted, else false
/// @return True on success
bool handlePendingTokenRequest(const QString &id, const bool accept);
bool handlePendingTokenRequest(const QString &id, bool accept);
///
/// @brief Get the current List of Tokens. Requires ADMIN ACCESS
@@ -379,7 +379,7 @@ signals:
/// @param comment The comment that was part of the request
/// @param id The id that was part of the request
///
void onTokenResponse(const bool &success, const QString &token, const QString &comment, const QString &id);
void onTokenResponse(bool success, const QString &token, const QString &comment, const QString &id);
private slots:
///
@@ -396,7 +396,7 @@ private slots:
/// @param comment The comment that was part of the request
/// @param id The id that was part of the request
///
void checkTokenResponse(const bool &success, QObject *caller, const QString &token, const QString &comment, const QString &id);
void checkTokenResponse(bool success, QObject *caller, const QString &token, const QString &comment, const QString &id);
private:
void stopDataConnectionss();

View File

@@ -30,7 +30,7 @@ public:
/// @param localConnection True when the sender has origin home network
/// @param noListener if true, this instance won't listen for hyperion push events
///
JsonAPI(QString peerAddress, Logger *log, const bool &localConnection, QObject *parent, bool noListener = false);
JsonAPI(QString peerAddress, Logger *log, bool localConnection, QObject *parent, bool noListener = false);
///
/// Handle an incoming JSON message
@@ -42,7 +42,7 @@ public:
///
/// @brief Initialization steps
///
void initialize(void);
void initialize();
public slots:
///
@@ -77,7 +77,7 @@ private slots:
/// @param comment The comment that was part of the request
/// @param id The id that was part of the request
///
void handleTokenResponse(const bool &success, const QString &token, const QString &comment, const QString &id);
void handleTokenResponse(bool success, const QString &token, const QString &comment, const QString &id);
///
/// @brief Handle whenever the state of a instance (HyperionIManager) changes according to enum instanceState
@@ -85,7 +85,7 @@ private slots:
/// @param instance The index of instance
/// @param name The name of the instance, just available with H_CREATED
///
void handleInstanceStateChange(const InstanceState &state, const quint8 &instance, const QString &name = QString());
void handleInstanceStateChange(InstanceState state, quint8 instance, const QString &name = QString());
signals:
///
@@ -131,151 +131,151 @@ private:
/// @param forced indicate if it was a forced switch by system
/// @return true on success. false if not found
///
bool handleInstanceSwitch(const quint8 &instance = 0, const bool &forced = false);
bool handleInstanceSwitch(quint8 instance = 0, bool forced = false);
///
/// Handle an incoming JSON Color message
///
/// @param message the incoming message
///
void handleColorCommand(const QJsonObject &message, const QString &command, const int tan);
void handleColorCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON Image message
///
/// @param message the incoming message
///
void handleImageCommand(const QJsonObject &message, const QString &command, const int tan);
void handleImageCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON Effect message
///
/// @param message the incoming message
///
void handleEffectCommand(const QJsonObject &message, const QString &command, const int tan);
void handleEffectCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON Effect message (Write JSON Effect)
///
/// @param message the incoming message
///
void handleCreateEffectCommand(const QJsonObject &message, const QString &command, const int tan);
void handleCreateEffectCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON Effect message (Delete JSON Effect)
///
/// @param message the incoming message
///
void handleDeleteEffectCommand(const QJsonObject &message, const QString &command, const int tan);
void handleDeleteEffectCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON System info message
///
/// @param message the incoming message
///
void handleSysInfoCommand(const QJsonObject &message, const QString &command, const int tan);
void handleSysInfoCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON Server info message
///
/// @param message the incoming message
///
void handleServerInfoCommand(const QJsonObject &message, const QString &command, const int tan);
void handleServerInfoCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON Clear message
///
/// @param message the incoming message
///
void handleClearCommand(const QJsonObject &message, const QString &command, const int tan);
void handleClearCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON Clearall message
///
/// @param message the incoming message
///
void handleClearallCommand(const QJsonObject &message, const QString &command, const int tan);
void handleClearallCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON Adjustment message
///
/// @param message the incoming message
///
void handleAdjustmentCommand(const QJsonObject &message, const QString &command, const int tan);
void handleAdjustmentCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON SourceSelect message
///
/// @param message the incoming message
///
void handleSourceSelectCommand(const QJsonObject &message, const QString &command, const int tan);
void handleSourceSelectCommand(const QJsonObject &message, const QString &command, int tan);
/// Handle an incoming JSON GetConfig message and check subcommand
///
/// @param message the incoming message
///
void handleConfigCommand(const QJsonObject &message, const QString &command, const int tan);
void handleConfigCommand(const QJsonObject &message, const QString &command, int tan);
/// Handle an incoming JSON GetSchema message from handleConfigCommand()
///
/// @param message the incoming message
///
void handleSchemaGetCommand(const QJsonObject &message, const QString &command, const int tan);
void handleSchemaGetCommand(const QJsonObject &message, const QString &command, int tan);
/// Handle an incoming JSON SetConfig message from handleConfigCommand()
///
/// @param message the incoming message
///
void handleConfigSetCommand(const QJsonObject &message, const QString &command, const int tan);
void handleConfigSetCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON Component State message
///
/// @param message the incoming message
///
void handleComponentStateCommand(const QJsonObject &message, const QString &command, const int tan);
void handleComponentStateCommand(const QJsonObject &message, const QString &command, int tan);
/// Handle an incoming JSON Led Colors message
///
/// @param message the incoming message
///
void handleLedColorsCommand(const QJsonObject &message, const QString &command, const int tan);
void handleLedColorsCommand(const QJsonObject &message, const QString &command, int tan);
/// Handle an incoming JSON Logging message
///
/// @param message the incoming message
///
void handleLoggingCommand(const QJsonObject &message, const QString &command, const int tan);
void handleLoggingCommand(const QJsonObject &message, const QString &command, int tan);
/// Handle an incoming JSON Processing message
///
/// @param message the incoming message
///
void handleProcessingCommand(const QJsonObject &message, const QString &command, const int tan);
void handleProcessingCommand(const QJsonObject &message, const QString &command, int tan);
/// Handle an incoming JSON VideoMode message
///
/// @param message the incoming message
///
void handleVideoModeCommand(const QJsonObject &message, const QString &command, const int tan);
void handleVideoModeCommand(const QJsonObject &message, const QString &command, int tan);
/// Handle an incoming JSON plugin message
///
/// @param message the incoming message
///
void handleAuthorizeCommand(const QJsonObject &message, const QString &command, const int tan);
void handleAuthorizeCommand(const QJsonObject &message, const QString &command, int tan);
/// Handle an incoming JSON instance message
///
/// @param message the incoming message
///
void handleInstanceCommand(const QJsonObject &message, const QString &command, const int tan);
void handleInstanceCommand(const QJsonObject &message, const QString &command, int tan);
/// Handle an incoming JSON Led Device message
///
/// @param message the incoming message
///
void handleLedDeviceCommand(const QJsonObject &message, const QString &command, const int tan);
void handleLedDeviceCommand(const QJsonObject &message, const QString &command, int tan);
///
/// Handle an incoming JSON message of unknown type
@@ -285,22 +285,22 @@ private:
///
/// Send a standard reply indicating success
///
void sendSuccessReply(const QString &command = "", const int tan = 0);
void sendSuccessReply(const QString &command = "", int tan = 0);
///
/// Send a standard reply indicating success with data
///
void sendSuccessDataReply(const QJsonDocument &doc, const QString &command = "", const int &tan = 0);
void sendSuccessDataReply(const QJsonDocument &doc, const QString &command = "", int tan = 0);
///
/// Send an error message back to the client
///
/// @param error String describing the error
///
void sendErrorReply(const QString &error, const QString &command = "", const int tan = 0);
void sendErrorReply(const QString &error, const QString &command = "", int tan = 0);
///
/// @brief Kill all signal/slot connections to stop possible data emitter
///
void stopDataConnections(void);
void stopDataConnections();
};

View File

@@ -35,7 +35,7 @@ public:
/// @param unsubscribe Revert subscription
/// @return True on success, false if not found
///
bool subscribeFor(const QString& cmd, const bool & unsubscribe = false);
bool subscribeFor(const QString& cmd, bool unsubscribe = false);
///
/// @brief Get all possible commands to subscribe for
@@ -52,7 +52,7 @@ public:
///
/// @brief Reset subscriptions, disconnect all signals
///
void resetSubscriptions(void);
void resetSubscriptions();
///
/// @brief Re-apply all current subs to a new Hyperion instance, the connections to the old instance will be dropped
@@ -70,7 +70,7 @@ private slots:
///
/// @brief handle component state changes
///
void handleComponentState(const hyperion::Components comp, const bool state);
void handleComponentState(hyperion::Components comp, bool state);
#ifdef ENABLE_AVAHI
///
/// @brief handle emits from bonjour wrapper
@@ -86,7 +86,7 @@ private slots:
///
/// @brief Handle imageToLedsMapping updates
///
void handleImageToLedsMappingChange(const int& mappingType);
void handleImageToLedsMappingChange(int mappingType);
///
/// @brief Handle the adjustment update
@@ -97,7 +97,7 @@ private slots:
/// @brief Handle video mode change
/// @param mode The new videoMode
///
void handleVideoModeChange(const VideoMode& mode);
void handleVideoModeChange(VideoMode mode);
///
/// @brief Handle effect list change
@@ -109,14 +109,14 @@ private slots:
/// @param type The settings type from enum
/// @param data The data as QJsonDocument
///
void handleSettingsChange(const settings::type& type, const QJsonDocument& data);
void handleSettingsChange(settings::type type, const QJsonDocument& data);
///
/// @brief Handle led config specific updates (required for led color streaming with positional display)
/// @param type The settings type from enum
/// @param data The data as QJsonDocument
///
void handleLedsConfigChange(const settings::type& type, const QJsonDocument& data);
void handleLedsConfigChange(settings::type type, const QJsonDocument& data);
///
/// @brief Handle Hyperion instance manager change

View File

@@ -49,7 +49,7 @@ namespace hyperion
/// It's not possible to enable bb from this method, if the user requsted a disable!
/// @param disable The new state
///
void setHardDisable(const bool& disable);
void setHardDisable(bool disable);
///
/// Processes the image. This performs detecion of black-border on the given image and
@@ -100,12 +100,12 @@ namespace hyperion
/// @param type settingyType from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
///
/// @brief Handle component state changes, it's not possible for BB to be enabled, when a hardDisable is active
///
void handleCompStateChangeRequest(const hyperion::Components component, bool enable);
void handleCompStateChangeRequest(hyperion::Components component, bool enable);
private:
/// Hyperion instance

View File

@@ -54,14 +54,14 @@ public slots:
///
void stop();
void compStateChangeRequest(const hyperion::Components component, bool enable);
void compStateChangeRequest(hyperion::Components component, bool enable);
///
/// @brief Handle settings update from Hyperion Settingsmanager emit or this constructor
/// @param type settingyType from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
private slots:
///

View File

@@ -47,11 +47,11 @@ public:
BonjourServiceRegister(QObject *parent = 0);
~BonjourServiceRegister();
void registerService(const QString& service, const int& port);
void registerService(const QString& service, int port);
void registerService(const BonjourRecord &record, quint16 servicePort, std::vector<std::pair<std::string, std::string>> txt = std::vector<std::pair<std::string, std::string>>());
inline BonjourRecord registeredRecord() const {return finalRecord; }
const quint16 & getPort() { return _port; };
quint16 getPort() const { return _port; };
signals:
void error(DNSServiceErrorType error);

View File

@@ -71,7 +71,7 @@ public:
/// @param inst The id that has been assigned
/// @return True on success else false
///
inline bool deleteInstance(const quint8& inst)
inline bool deleteInstance(quint8 inst)
{
VectorPair cond;
cond.append(CPair("instance",inst));
@@ -91,7 +91,7 @@ public:
/// @param name The new name of the instance
/// @return True on success else false (instance not found)
///
inline bool saveName(const quint8& inst, const QString& name)
inline bool saveName(quint8 inst, const QString& name)
{
VectorPair fcond;
fcond.append(CPair("friendly_name",name));
@@ -119,7 +119,7 @@ public:
/// @param justEnabled return just enabled instances if true
/// @return The found instances
///
inline QVector<QVariantMap> getAllInstances(const bool& justEnabled = false)
inline QVector<QVariantMap> getAllInstances(bool justEnabled = false)
{
QVector<QVariantMap> results;
getRecords(results, QStringList(), QStringList() << "instance ASC");
@@ -143,7 +143,7 @@ public:
/// @param[in] user The user id
/// @return true on success else false
///
inline bool instanceExist(const quint8& inst)
inline bool instanceExist(quint8 inst)
{
VectorPair cond;
cond.append(CPair("instance",inst));
@@ -155,7 +155,7 @@ public:
/// @param index The index to search for
/// @return The name of this index, may return NOT FOUND if not found
///
inline const QString getNamebyIndex(const quint8 index)
inline const QString getNamebyIndex(quint8 index)
{
QVariantMap results;
VectorPair cond;
@@ -170,7 +170,7 @@ public:
/// @brief Update 'last_use' timestamp
/// @param inst The instance to update
///
inline void setLastUse(const quint8& inst)
inline void setLastUse(quint8 inst)
{
VectorPair cond;
cond.append(CPair("instance", inst));
@@ -184,7 +184,7 @@ public:
/// @param inst The instance to update
/// @param newState True when enabled else false
///
inline void setEnable(const quint8& inst, const bool& newState)
inline void setEnable(quint8 inst, bool newState)
{
VectorPair cond;
cond.append(CPair("instance", inst));
@@ -198,7 +198,7 @@ public:
/// @param inst The instance to get
/// @return True when enabled else false
///
inline bool isEnabled(const quint8& inst)
inline bool isEnabled(quint8 inst)
{
VectorPair cond;
cond.append(CPair("instance", inst));

View File

@@ -15,7 +15,7 @@ class SettingsTable : public DBManager
public:
/// construct wrapper with settings table
SettingsTable(const quint8& instance, QObject* parent = nullptr)
SettingsTable(quint8 instance, QObject* parent = nullptr)
: DBManager(parent)
, _hyperion_inst(instance)
{

View File

@@ -64,8 +64,8 @@ public:
QJsonObject getArgs() const { return _args; }
signals:
void setInput(const int priority, const std::vector<ColorRgb> &ledColors, const int timeout_ms, const bool &clearEffect);
void setInputImage(const int priority, const Image<ColorRgb> &image, const int timeout_ms, const bool &clearEffect);
void setInput(int priority, const std::vector<ColorRgb> &ledColors, int timeout_ms, bool clearEffect);
void setInputImage(int priority, const Image<ColorRgb> &image, int timeout_ms, bool clearEffect);
private:

View File

@@ -47,7 +47,7 @@ public slots:
/// @param type settingyType from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
signals:
///

View File

@@ -35,7 +35,7 @@ public:
/// @param address The address of the Hyperion server (for example "192.168.0.32:19444)
/// @param skipReply If true skip reply
///
FlatBufferConnection(const QString& origin, const QString & address, const int& priority, const bool& skipReply);
FlatBufferConnection(const QString& origin, const QString & address, int priority, bool skipReply);
///
/// @brief Destructor
@@ -43,7 +43,7 @@ public:
~FlatBufferConnection();
/// @brief Do not read reply messages from Hyperion if set to true
void setSkipReply(const bool& skip);
void setSkipReply(bool skip);
///
/// @brief Register a new priority with given origin
@@ -100,7 +100,7 @@ signals:
///
/// @brief emits when a new videoMode was requested from flatbuf client
///
void setVideoMode(const VideoMode videoMode);
void setVideoMode(VideoMode videoMode);
private:

View File

@@ -29,7 +29,7 @@ public slots:
/// @param type The type from enum
/// @param config The configuration
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
void initServer();

View File

@@ -17,7 +17,7 @@ public:
/// @param[in] width The width of the captured screenshot
/// @param[in] height The heigth of the captured screenshot
///
AmlogicGrabber(const unsigned width, const unsigned height);
AmlogicGrabber(unsigned width, unsigned height);
~AmlogicGrabber() override;
///

View File

@@ -18,7 +18,7 @@ public:
/// @param[in] grabWidth The width of the grabbed image [pixels]
/// @param[in] grabHeight The height of the grabbed images [pixels]
///
AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight);
AmlogicWrapper(unsigned grabWidth, unsigned grabHeight);
public slots:
///

View File

@@ -26,7 +26,7 @@ public:
/// @param[in] width The width of the captured screenshot
/// @param[in] height The heigth of the captured screenshot
///
DispmanxFrameGrabber(const unsigned width, const unsigned height);
DispmanxFrameGrabber(unsigned width, unsigned height);
~DispmanxFrameGrabber() override;
@@ -50,7 +50,7 @@ private:
///
/// @param vc_flags The snapshot grabbing mask
///
void setFlags(const int vc_flags);
void setFlags(int vc_flags);
///
/// @brief free _vc_resource and captureBuffer

View File

@@ -20,7 +20,7 @@ public:
/// @param[in] grabHeight The height of the grabbed images [pixels]
/// @param[in] updateRate_Hz The image grab rate [Hz]
///
DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
DispmanxWrapper(unsigned grabWidth, unsigned grabHeight, unsigned updateRate_Hz);
public slots:
///

View File

@@ -17,7 +17,7 @@ public:
/// @param[in] width The width of the captured screenshot
/// @param[in] height The heigth of the captured screenshot
///
FramebufferFrameGrabber(const QString & device, const unsigned width, const unsigned height);
FramebufferFrameGrabber(const QString & device, unsigned width, unsigned height);
///
/// Captures a single snapshot of the display and writes the data to the given image. The

View File

@@ -20,7 +20,7 @@ public:
/// @param[in] grabHeight The height of the grabbed images [pixels]
/// @param[in] updateRate_Hz The image grab rate [Hz]
///
FramebufferWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
FramebufferWrapper(const QString & device, unsigned grabWidth, unsigned grabHeight, unsigned updateRate_Hz);
public slots:
///

View File

@@ -24,7 +24,7 @@ public:
/// @param[in] width The width of the captured screenshot
/// @param[in] height The heigth of the captured screenshot
///
OsxFrameGrabber(const unsigned display, const unsigned width, const unsigned height);
OsxFrameGrabber(unsigned display, unsigned width, unsigned height);
~OsxFrameGrabber() override;
///

View File

@@ -20,7 +20,7 @@ public:
/// @param[in] grabHeight The height of the grabbed images [pixels]
/// @param[in] updateRate_Hz The image grab rate [Hz]
///
OsxWrapper(const unsigned display, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
OsxWrapper(unsigned display, unsigned grabWidth, unsigned grabHeight, unsigned updateRate_Hz);
public slots:
///

View File

@@ -75,7 +75,7 @@ private:
///
/// @brief Is called whenever we need new screen dimension calculations based on window geometry
///
int updateScreenDimensions(const bool& force);
int updateScreenDimensions(bool force);
///
/// @brief free the _screen pointer

View File

@@ -19,7 +19,7 @@ public:
/// @param[in] pixelDecimation Decimation factor for image [pixels]
/// @param[in] updateRate_Hz The image grab rate [Hz]
///
QtWrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, int display, const unsigned updateRate_Hz);
QtWrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, int display, unsigned updateRate_Hz);
public slots:
///

View File

@@ -32,7 +32,7 @@ public slots:
void setCecDetectionEnable(bool enable);
void setDeviceVideoStandard(QString device, VideoStandard videoStandard);
void handleCecEvent(CECEvent event);
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config) override;
void handleSettingsUpdate(settings::type type, const QJsonDocument& config) override;
private slots:
void newFrame(const Image<ColorRgb> & image);

View File

@@ -24,7 +24,7 @@ public:
/// @param[in] grabHeight The height of the grabbed images [pixels]
/// @param[in] updateRate_Hz The image grab rate [Hz]
///
X11Wrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, const unsigned updateRate_Hz);
X11Wrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, unsigned updateRate_Hz);
///
/// Destructor of this framebuffer frame grabber. Releases any claimed resources.

View File

@@ -38,25 +38,25 @@ public:
/// @brief Get the unique id (imported from removed class 'Stats')
/// @return The unique id
///
const QString &getID() { return _uuid; };
const QString &getID() const { return _uuid; };
///
/// @brief Check authorization is required according to the user setting
/// @return True if authorization required else false
///
const bool &isAuthRequired() { return _authRequired; };
bool isAuthRequired() const { return _authRequired; };
///
/// @brief Check if authorization is required for local network connections
/// @return True if authorization required else false
///
const bool &isLocalAuthRequired() { return _localAuthRequired; };
bool isLocalAuthRequired() const { return _localAuthRequired; };
///
/// @brief Check if authorization is required for local network connections for admin access
/// @return True if authorization required else false
///
const bool &isLocalAdminAuthRequired() { return _localAdminAuthRequired; };
bool isLocalAdminAuthRequired() const { return _localAdminAuthRequired; };
///
/// @brief Reset Hyperion user
@@ -158,7 +158,7 @@ public slots:
/// @param id The id of the request
/// @param accept The accept or deny the request
///
void handlePendingTokenRequest(const QString &id, const bool &accept);
void handlePendingTokenRequest(const QString &id, bool accept);
///
/// @brief Get pending requests
@@ -183,7 +183,7 @@ public slots:
/// @param type settings type from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type &type, const QJsonDocument &config);
void handleSettingsUpdate(settings::type type, const QJsonDocument &config);
signals:
///
@@ -201,7 +201,7 @@ signals:
/// @param comment The comment that was part of the request
/// @param id The id that was part of the request
///
void tokenResponse(const bool &success, QObject *caller, const QString &token, const QString &comment, const QString &id);
void tokenResponse(bool success, QObject *caller, const QString &token, const QString &comment, const QString &id);
///
/// @brief Emits whenever the token list changes
@@ -214,7 +214,7 @@ private:
/// @brief Increment counter for token/user auth
/// @param user If true we increment USER auth instead of token
///
void setAuthBlock(const bool &user = false);
void setAuthBlock(bool user = false);
/// Database interface for auth table
AuthTable *_authTable;

View File

@@ -29,7 +29,7 @@ private slots:
/// @param type settingyType from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config)
void handleSettingsUpdate(settings::type type, const QJsonDocument& config)
{
if(type == settings::BGEFFECT)
{

View File

@@ -18,8 +18,8 @@ class CaptureCont : public QObject
public:
CaptureCont(Hyperion* hyperion);
void setSystemCaptureEnable(const bool& enable);
void setV4LCaptureEnable(const bool& enable);
void setSystemCaptureEnable(bool enable);
void setV4LCaptureEnable(bool enable);
private slots:
///
@@ -27,14 +27,14 @@ private slots:
/// @param component The component from enum
/// @param enable The new state
///
void handleCompStateChangeRequest(const hyperion::Components component, bool enable);
void handleCompStateChangeRequest(hyperion::Components component, bool enable);
///
/// @brief Handle settings update from Hyperion Settingsmanager emit or this constructor
/// @param type settingyType from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
///
/// @brief forward system image

View File

@@ -27,7 +27,7 @@ public:
/// @param comp The component from enum
/// @return True if component is running else false. Not found is -1
///
int isComponentEnabled(const hyperion::Components& comp) const;
int isComponentEnabled(hyperion::Components comp) const;
/// contains all components and their state
std::map<hyperion::Components, bool> getRegister() const { return _componentStates; };
@@ -38,7 +38,7 @@ signals:
/// @param comp The component
/// @param state The new state of the component
///
void updatedComponentState(const hyperion::Components comp, const bool state);
void updatedComponentState(hyperion::Components comp, bool state);
public slots:
///
@@ -46,13 +46,13 @@ public slots:
/// @param comp The component
/// @param state The new state of the component
///
void setNewComponentState(const hyperion::Components comp, const bool activated);
void setNewComponentState(hyperion::Components comp, bool activated);
private slots:
///
/// @brief Handle COMP_ALL changes from Hyperion->compStateChangeRequest
///
void handleCompStateChangeRequest(const hyperion::Components comps, const bool activated);
void handleCompStateChangeRequest(hyperion::Components comps, bool activated);
private:
/// Hyperion instance

View File

@@ -29,7 +29,7 @@ class GrabberWrapper : public QObject
{
Q_OBJECT
public:
GrabberWrapper(QString grabberName, Grabber * ggrabber, unsigned width, unsigned height, const unsigned updateRate_Hz = 0);
GrabberWrapper(QString grabberName, Grabber * ggrabber, unsigned width, unsigned height, unsigned updateRate_Hz = 0);
virtual ~GrabberWrapper();
@@ -122,7 +122,7 @@ public slots:
/// Set the video mode (2D/3D)
/// @param[in] mode The new video mode
///
virtual void setVideoMode(const VideoMode& videoMode);
virtual void setVideoMode(VideoMode videoMode);
///
/// Set the crop values
@@ -138,7 +138,7 @@ public slots:
/// @param type settingyType from enum
/// @param config configuration object
///
virtual void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
virtual void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
signals:
///
@@ -149,7 +149,7 @@ signals:
private slots:
/// @brief Handle a source request event from Hyperion.
/// Will start and stop grabber based on active listeners count
void handleSourceRequest(const hyperion::Components& component, const int hyperionInd, const bool listen);
void handleSourceRequest(hyperion::Components component, int hyperionInd, bool listen);
///
/// @brief Update Update capture rate

View File

@@ -120,7 +120,7 @@ public slots:
/// @param[in] owner Specific owner string, might be empty
/// @param[in] smooth_cfg The smooth id to use
///
void registerInput(const int priority, const hyperion::Components& component, const QString& origin = "System", const QString& owner = "", unsigned smooth_cfg = 0);
void registerInput(int priority, hyperion::Components component, const QString& origin = "System", const QString& owner = "", unsigned smooth_cfg = 0);
///
/// @brief Update the current color of a priority (prev registered with registerInput())
@@ -131,7 +131,7 @@ public slots:
/// @param clearEffect Should be true when NOT called from an effect
/// @return True on success, false when priority is not found
///
bool setInput(const int priority, const std::vector<ColorRgb>& ledColors, const int timeout_ms = -1, const bool& clearEffect = true);
bool setInput(int priority, const std::vector<ColorRgb>& ledColors, int timeout_ms = -1, bool clearEffect = true);
///
/// @brief Update the current image of a priority (prev registered with registerInput())
@@ -142,7 +142,7 @@ public slots:
/// @param clearEffect Should be true when NOT called from an effect
/// @return True on success, false when priority is not found
///
bool setInputImage(const int priority, const Image<ColorRgb>& image, const int64_t timeout_ms = -1, const bool& clearEffect = true);
bool setInputImage(int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1, bool clearEffect = true);
///
/// Writes a single color to all the leds for the given time and priority
@@ -155,14 +155,14 @@ public slots:
/// @param[in] origin The setter
/// @param clearEffect Should be true when NOT called from an effect
///
void setColor(const int priority, const std::vector<ColorRgb> &ledColors, const int timeout_ms = -1, const QString& origin = "System" ,bool clearEffects = true);
void setColor(int priority, const std::vector<ColorRgb> &ledColors, int timeout_ms = -1, const QString& origin = "System" ,bool clearEffects = true);
///
/// @brief Set the given priority to inactive
/// @param priority The priority
/// @return True on success false if not found
///
bool setInputInactive(const quint8& priority);
bool setInputInactive(quint8 priority);
///
/// Returns the list with unique adjustment identifiers
@@ -187,7 +187,7 @@ public slots:
/// @param[in] forceClearAll Force the clear
/// @return True on success else false (not found)
///
bool clear(const int priority, bool forceClearAll=false);
bool clear(int priority, bool forceClearAll=false);
/// #############
// EFFECTENGINE
@@ -255,14 +255,14 @@ public slots:
/// @brief enable/disable automatic/priorized source selection
/// @param state The new state
///
void setSourceAutoSelect(const bool state);
void setSourceAutoSelect(bool state);
///
/// @brief set current input source to visible
/// @param priority the priority channel which should be vidible
/// @return true if success, false on error
///
bool setVisiblePriority(const int& priority);
bool setVisiblePriority(int priority);
/// gets current state of automatic/priorized source selection
/// @return the state
@@ -280,7 +280,7 @@ public slots:
///
/// @return bool
///
bool isCurrentPriority(const int priority) const;
bool isCurrentPriority(int priority) const;
///
/// Returns a list of all registered priorities
@@ -296,7 +296,7 @@ public slots:
///
/// @return The information of the given, a not found priority will return lowest priority as fallback
///
InputInfo getPriorityInfo(const int priority) const;
InputInfo getPriorityInfo(int priority) const;
/// #############
/// SETTINGSMANAGER
@@ -305,7 +305,7 @@ public slots:
/// @param type The settingsType from enum
/// @return Data Document
///
QJsonDocument getSetting(const settings::type& type) const;
QJsonDocument getSetting(settings::type type) const;
/// gets the current json config object from SettingsManager
/// @return json config
@@ -317,7 +317,7 @@ public slots:
/// @param correct If true will correct json against schema before save
/// @return True on success else false
///
bool saveSettings(QJsonObject config, const bool& correct = false);
bool saveSettings(QJsonObject config, bool correct = false);
/// ############
/// COMPONENTREGISTER
@@ -332,7 +332,7 @@ public slots:
/// @param[in] component The component from enum
/// @param[in] state The state of the component [true | false]
///
void setNewComponentState(const hyperion::Components& component, const bool& state);
void setNewComponentState(hyperion::Components component, bool state);
///
/// @brief Get a list of all contrable components and their current state
@@ -345,16 +345,16 @@ public slots:
/// @param The component to test
/// @return Component state
///
int isComponentEnabled(const hyperion::Components& comp);
int isComponentEnabled(hyperion::Components comp);
/// sets the methode how image is maped to leds at ImageProcessor
void setLedMappingType(const int& mappingType);
void setLedMappingType(int mappingType);
///
/// Set the video mode (2D/3D)
/// @param[in] mode The new video mode
///
void setVideoMode(const VideoMode& mode);
void setVideoMode(VideoMode mode);
///
/// @brief Init after thread start
@@ -383,13 +383,13 @@ signals:
/// @param component The component from enum
/// @param enabled The new state of the component
///
void compStateChangeRequest(const hyperion::Components component, bool enabled);
void compStateChangeRequest(hyperion::Components component, bool enabled);
///
/// @brief Emits whenever the imageToLedsMapping has changed
/// @param mappingType The new mapping type
///
void imageToLedsMappingChanged(const int& mappingType);
void imageToLedsMappingChanged(int mappingType);
///
/// @brief Emits whenever the visible priority delivers a image which is applied in update()
@@ -410,19 +410,19 @@ signals:
///
/// @brief Is emitted from clients who request a videoMode change
///
void videoMode(const VideoMode& mode);
void videoMode(VideoMode mode);
///
/// @brief A new videoMode was requested (called from Daemon!)
///
void newVideoMode(const VideoMode& mode);
void newVideoMode(VideoMode mode);
///
/// @brief Emits whenever a config part changed. SIGNAL PIPE helper for SettingsManager -> HyperionDaemon
/// @param type The settings type from enum
/// @param data The data as QJsonDocument
///
void settingsChanged(const settings::type& type, const QJsonDocument& data);
void settingsChanged(settings::type type, const QJsonDocument& data);
///
/// @brief Emits whenever the adjustments have been updated
@@ -459,19 +459,19 @@ private slots:
/// @brief Handle whenever the visible component changed
/// @param comp The new component
///
void handleVisibleComponentChanged(const hyperion::Components& comp);
void handleVisibleComponentChanged(hyperion::Components comp);
///
/// @brief Apply settings updates for LEDS and COLOR
/// @param type The type from enum
/// @param config The configuration
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
///
/// @brief Apply new videoMode from Daemon to _currVideoMode
///
void handleNewVideoMode(const VideoMode& mode) { _currVideoMode = mode; }
void handleNewVideoMode(VideoMode mode) { _currVideoMode = mode; }
private:
friend class HyperionDaemon;
@@ -481,7 +481,7 @@ private:
/// @brief Constructs the Hyperion instance, just accessible for HyperionIManager
/// @param instance The instance index
///
Hyperion(const quint8& instance);
Hyperion(quint8 instance);
/// instance index
const quint8 _instIndex;

View File

@@ -38,14 +38,14 @@ public slots:
/// @param inst The instance to check
/// @return True when running else false
///
bool IsInstanceRunning(const quint8& inst) { return _runningInstances.contains(inst); }
bool IsInstanceRunning(quint8 inst) { return _runningInstances.contains(inst); }
///
/// @brief Get a Hyperion instance by index
/// @param intance the index
/// @return Hyperion instance, if index is not found returns instance 0
///
Hyperion* getHyperionInstance(const quint8& instance = 0);
Hyperion* getHyperionInstance(quint8 instance = 0);
///
/// @brief Get instance data of all instaces in db + running state
@@ -58,20 +58,20 @@ public slots:
/// @param block If true return when thread has been started
/// @return Return true on success, false if not found in db
///
bool startInstance(const quint8& inst, const bool& block = false);
bool startInstance(quint8 inst, bool block = false);
///
/// @brief Stop a Hyperion instance
/// @param instance Instance index
/// @return Return true on success, false if not found in db
///
bool stopInstance(const quint8& inst);
bool stopInstance(quint8 inst);
///
/// @brief Toggle the state of all Hyperion instances
/// @param pause If true all instances toggle to pause, else to resume
///
void toggleStateAllInstances(const bool& pause = false);
void toggleStateAllInstances(bool pause = false);
///
/// @brief Create a new Hyperion instance entry in db
@@ -79,14 +79,14 @@ public slots:
/// @param start If true it will be started after creation (async)
/// @return Return true on success false if name is already in use or a db error occurred
///
bool createInstance(const QString& name, const bool& start = false);
bool createInstance(const QString& name, bool start = false);
///
/// @brief Delete Hyperion instance entry in db. Cleanup also all associated table data for this instance
/// @param inst The instance index
/// @return Return true on success, false if not found or not allowed
///
bool deleteInstance(const quint8& inst);
bool deleteInstance(quint8 inst);
///
/// @brief Assign a new name to the given instance
@@ -94,7 +94,7 @@ public slots:
/// @param name The instance name index
/// @return Return true on success, false if not found
///
bool saveName(const quint8& inst, const QString& name);
bool saveName(quint8 inst, const QString& name);
signals:
///
@@ -103,7 +103,7 @@ signals:
/// @param instance The index of instance
/// @param name The name of the instance, just available with H_CREATED
///
void instanceStateChanged(const InstanceState& state, const quint8& instance, const QString& name = QString());
void instanceStateChanged(InstanceState state, quint8 instance, const QString& name = QString());
///
/// @brief Emits whenever something changes, the lazy version of instanceStateChanged (- H_ON_STOP) + saveName() emit
@@ -118,7 +118,7 @@ signals:
///
/// @brief PIPE videoMode back to Hyperion
///
void newVideoMode(const VideoMode& mode);
void newVideoMode(VideoMode mode);
///////////////////////////////////////
/// FROM HYPERION TO HYPERIONDAEMON ///
@@ -127,17 +127,17 @@ signals:
///
/// @brief PIPE settings events from Hyperion
///
void settingsChanged(const settings::type& type, const QJsonDocument& data);
void settingsChanged(settings::type type, const QJsonDocument& data);
///
/// @brief PIPE videoMode request changes from Hyperion to HyperionDaemon
///
void requestVideoMode(const VideoMode& mode);
void requestVideoMode(VideoMode mode);
///
/// @brief PIPE component state changes from Hyperion to HyperionDaemon
///
void compStateChangeRequest(const hyperion::Components component, bool enable);
void compStateChangeRequest(hyperion::Components component, bool enable);
private slots:
///
@@ -172,7 +172,7 @@ private:
/// @brief check if a instance is allowed for management. Instance 0 represents the root instance
/// @apram inst The instance to check
///
bool isInstAllowed(const quint8& inst) { return (inst > 0); }
bool isInstAllowed(quint8 inst) { return (inst > 0); }
private:
Logger* _log;

View File

@@ -46,7 +46,7 @@ public:
/// @param[in] width The new width of the buffer-image
/// @param[in] height The new height of the buffer-image
///
void setSize(const unsigned width, const unsigned height);
void setSize(unsigned width, unsigned height);
///
/// @brief Update the led string (eg on settings change)
@@ -57,10 +57,10 @@ public:
bool blackBorderDetectorEnabled();
/// Returns the current _userMappingType, this may not be the current applied type!
const int & getUserLedMappingType() { return _userMappingType; };
int getUserLedMappingType() { return _userMappingType; };
/// Returns the current _mappingType
const int & ledMappingType() { return _mappingType; };
int ledMappingType() { return _mappingType; };
static int mappingTypeToInt(QString mappingType);
static QString mappingTypeToStr(int mappingType);
@@ -215,7 +215,7 @@ private:
}
private slots:
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
private:
Logger * _log;

View File

@@ -45,20 +45,20 @@ private slots:
/// @param type settingyType from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type &type, const QJsonDocument &config);
void handleSettingsUpdate(settings::type type, const QJsonDocument &config);
///
/// @brief Handle component state change MessageForwarder
/// @param component The component from enum
/// @param enable The new state
///
void handleCompStateChangeRequest(const hyperion::Components component, bool enable);
void handleCompStateChangeRequest(hyperion::Components component, bool enable);
///
/// @brief Handle priority updates from Priority Muxer
/// @param priority The new visible priority
///
void handlePriorityChanges(const quint8 &priority);
void handlePriorityChanges(quint8 priority);
///
/// @brief Forward message to all json slaves

View File

@@ -16,7 +16,7 @@
class MultiColorAdjustment
{
public:
MultiColorAdjustment(const unsigned ledCnt);
MultiColorAdjustment(unsigned ledCnt);
~MultiColorAdjustment();
/**

View File

@@ -74,14 +74,14 @@ public:
/// @brief Start/Stop the PriorityMuxer update timer; On disabled no priority and timeout updates will be performend
/// @param enable The new state
///
void setEnable(const bool& enable);
void setEnable(bool enable);
/// @brief Enable or disable auto source selection
/// @param enable True if it should be enabled else false
/// @param update True to update _currentPriority - INTERNAL usage.
/// @return True if changed has been applied, false if the state is unchanged
///
bool setSourceAutoSelectEnabled(const bool& enabel, const bool& update = true);
bool setSourceAutoSelectEnabled(bool enabel, bool update = true);
///
/// @brief Get the state of source auto selection
@@ -94,13 +94,13 @@ public:
/// @param priority The
/// @return True on success, false if priority not found
///
bool setPriority(const uint8_t priority);
bool setPriority(uint8_t priority);
///
/// @brief Update all ledColos with min length of >= 1 to fit the new led length
/// @param[in] ledCount The count of leds
///
void updateLedColorsLength(const int& ledCount);
void updateLedColorsLength(int ledCount);
///
/// Returns the current priority
@@ -114,7 +114,7 @@ public:
/// @param priority The priority channel
/// @return True if the priority channel exists else false
///
bool hasPriority(const int priority) const;
bool hasPriority(int priority) const;
///
/// Returns the number of active priorities
@@ -131,7 +131,7 @@ public:
///
/// @return The information for the specified priority channel
///
const InputInfo getInputInfo(const int priority) const;
InputInfo getInputInfo(int priority) const;
///
/// @brief Register a new input by priority, the priority is not active (timeout -100 isn't muxer recognized) until you start to update the data with setInput()
@@ -142,7 +142,7 @@ public:
/// @param[in] owner Speicifc owner string, might be empty
/// @param[in] smooth_cfg The smooth id to use
///
void registerInput(const int priority, const hyperion::Components& component, const QString& origin = "System", const QString& owner = "", unsigned smooth_cfg = SMOOTHING_MODE_DEFAULT);
void registerInput(int priority, hyperion::Components component, const QString& origin = "System", const QString& owner = "", unsigned smooth_cfg = SMOOTHING_MODE_DEFAULT);
///
/// @brief Update the current color of a priority (prev registered with registerInput())
@@ -151,7 +151,7 @@ public:
/// @param timeout_ms The new timeout (defaults to -1 endless)
/// @return True on success, false when priority is not found
///
bool setInput(const int priority, const std::vector<ColorRgb>& ledColors, int64_t timeout_ms = -1);
bool setInput(int priority, const std::vector<ColorRgb>& ledColors, int64_t timeout_ms = -1);
///
/// @brief Update the current image of a priority (prev registered with registerInput())
@@ -160,14 +160,14 @@ public:
/// @param timeout_ms The new timeout (defaults to -1 endless)
/// @return True on success, false when priority is not found
///
bool setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1);
bool setInputImage(int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1);
///
/// @brief Set the given priority to inactive
/// @param priority The priority
/// @return True on success false if not found
///
bool setInputInactive(const quint8& priority);
bool setInputInactive(quint8 priority);
///
/// Clears the specified priority channel and update _currentPriority on success
@@ -175,7 +175,7 @@ public:
/// @param[in] priority The priority of the channel to clear
/// @return True if priority has been cleared else false (not found)
///
bool clearInput(const uint8_t priority);
bool clearInput(uint8_t priority);
///
/// Clears all priority channels
@@ -185,7 +185,7 @@ public:
///
/// @brief Queue a manual push where muxer doesn't recognize them (e.g. continous single color pushes)
///
void queuePush(void){ emit timeRunner(); };
void queuePush(){ emit timeRunner(); };
signals:
///
@@ -198,38 +198,38 @@ signals:
/// @param priority The priority which has changed
/// @param state If true it was added else it was removed!
///
void priorityChanged(const quint8& priority, const bool& state);
void priorityChanged(quint8 priority, bool state);
///
/// @brief Emits whenever the visible priority has changed
/// @param priority The new visible priority
///
void visiblePriorityChanged(const quint8& priority);
void visiblePriorityChanged(quint8 priority);
///
/// @brief Emits whenever the current visible component changed
/// @param comp The new component
///
void visibleComponentChanged(const hyperion::Components& comp);
void visibleComponentChanged(hyperion::Components comp);
///
/// @brief Emits whenever a priority changes active state
/// @param priority The priority who changed the active state
/// @param state The new state, state true = active else false
///
void activeStateChanged(const quint8& priority, const bool& state);
void activeStateChanged(quint8 priority, bool state);
///
/// @brief Emits whenever the auto selection state has been changed
/// @param state The new state of auto selection; True enabled else false
///
void autoSelectChanged(const bool& state);
void autoSelectChanged(bool state);
///
/// @brief Emits whenever something changes which influences the priorities listing
/// Emits also in 1s interval when a COLOR or EFFECT is running with a timeout > -1
///
void prioritiesChanged(void);
void prioritiesChanged();
///
/// internal used signal to resolve treading issues with timer
@@ -246,14 +246,14 @@ private slots:
/// Updates the current time. Channels with a configured time out will be checked and cleared if
/// required.
///
void setCurrentTime(void);
void setCurrentTime();
private:
///
/// @brief Get the component of the given priority
/// @return The component
///
hyperion::Components getComponentOfPriority(const int& priority);
hyperion::Components getComponentOfPriority(int priority);
/// Logger instance
Logger* _log;

View File

@@ -21,7 +21,7 @@ public:
/// @params instance Instance index of HyperionInstanceManager
/// @params parent The parent hyperion instance
///
SettingsManager(const quint8& instance, QObject* parent = nullptr);
SettingsManager(quint8 instance, QObject* parent = nullptr);
///
/// @brief Save a complete json config
@@ -29,20 +29,20 @@ public:
/// @param correct If true will correct json against schema before save
/// @return True on success else false
///
bool saveSettings(QJsonObject config, const bool& correct = false);
bool saveSettings(QJsonObject config, bool correct = false);
///
/// @brief get a single setting json from config
/// @param type The settings::type from enum
/// @return The requested json data as QJsonDocument
///
const QJsonDocument getSetting(const settings::type& type);
QJsonDocument getSetting(settings::type type) const;
///
/// @brief get the full settings object of this instance (with global settings)
/// @return The requested json
///
const QJsonObject & getSettings() { return _qconfig; };
const QJsonObject & getSettings() const { return _qconfig; };
signals:
///
@@ -50,7 +50,7 @@ signals:
/// @param type The settings type from enum
/// @param data The data as QJsonDocument
///
void settingsChanged(const settings::type& type, const QJsonDocument& data);
void settingsChanged(settings::type type, const QJsonDocument& data);
private:
///

View File

@@ -46,7 +46,7 @@ private slots:
///
/// Slot which is called when a client closes a connection
///
void closedConnection(void);
void closedConnection();
public slots:
///
@@ -54,7 +54,7 @@ public slots:
/// @param type settings type from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
private:
/// The TCP server object

View File

@@ -78,7 +78,7 @@ public slots:
/// @param component The comp from enum
/// @param state The new state
///
void handleComponentState(const hyperion::Components component, const bool state);
void handleComponentState(hyperion::Components component, bool state);
signals:
///

View File

@@ -30,7 +30,7 @@ public slots:
/// @param type The type from enum
/// @param config The configuration
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
void initServer();

View File

@@ -58,7 +58,7 @@ public:
/// @param timeout_ms The timeout in ms
/// @return The address+port of web-server or empty if timed out
///
const QString getFirstService(const searchType &type = searchType::STY_WEBSERVER,const QString &st = "urn:hyperion-project.org:device:basic:1", const int &timeout_ms = 3000);
const QString getFirstService(const searchType &type = searchType::STY_WEBSERVER,const QString &st = "urn:hyperion-project.org:device:basic:1", int timeout_ms = 3000);
///
/// @brief Discover services via ssdp.

View File

@@ -19,7 +19,7 @@ class QNetworkConfigurationManager;
class SSDPHandler : public SSDPServer{
Q_OBJECT
public:
SSDPHandler(WebServer* webserver, const quint16& flatBufPort, const quint16& jsonServerPort, const QString &name, QObject * parent = nullptr);
SSDPHandler(WebServer* webserver, quint16 flatBufPort, quint16 jsonServerPort, const QString &name, QObject * parent = nullptr);
~SSDPHandler();
///
@@ -37,14 +37,14 @@ public slots:
/// @brief get state changes from webserver
/// @param newState true for started and false for stopped
///
void handleWebServerStateChange(const bool newState);
void handleWebServerStateChange(bool newState);
///
/// @brief Handle settings update from Hyperion Settingsmanager emit
/// @param type settingyType from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
private:
///
@@ -72,7 +72,7 @@ private:
/// @brief Send alive/byebye message based on _deviceList
/// @param alive When true send alive, else byebye
///
void sendAnnounceList(const bool alive);
void sendAnnounceList(bool alive);
private slots:
///
@@ -82,7 +82,7 @@ private slots:
/// @param address The ip of the caller
/// @param port The port of the caller
///
void handleMSearchRequest(const QString& target, const QString& mx, const QString address, const quint16 & port);
void handleMSearchRequest(const QString& target, const QString& mx, const QString address, quint16 port);
///
/// @brief Handle changes in the network configuration

View File

@@ -41,7 +41,7 @@ public:
/// @param senderIp Ip address of the sender
/// @param senderPort The port of the sender
///
void sendMSearchResponse(const QString& st, const QString& senderIp, const quint16& senderPort);
void sendMSearchResponse(const QString& st, const QString& senderIp, quint16 senderPort);
///
/// @brief Send ByeBye notification (on SSDP stop) (repeated 3 times)
@@ -76,7 +76,7 @@ public:
///
/// @brief set new flatbuffer server port
///
void setFlatBufPort(const quint16& port) { _fbsPort = QString::number(port); };
void setFlatBufPort(quint16 port) { _fbsPort = QString::number(port); };
///
/// @brief Get current flatbuffer server port
@@ -86,7 +86,7 @@ public:
///
/// @brief set new jsonserver server port
///
void setJsonServerPort(const quint16& port) { _jssPort = QString::number(port); };
void setJsonServerPort(quint16 port) { _jssPort = QString::number(port); };
///
/// @brief get new jsonserver server port
@@ -112,7 +112,7 @@ signals:
/// @param address The ip of the caller
/// @param port The port of the caller
///
void msearchRequestReceived(const QString& target, const QString& mx, const QString address, const quint16 & port);
void msearchRequestReceived(const QString& target, const QString& mx, const QString address, quint16 port);
private:
Logger* _log;

View File

@@ -54,7 +54,7 @@ signals:
/// @param[in] owner Specific owner string, might be empty
/// @param[in] smooth_cfg The smooth id to use
///
void registerGlobalInput(const int priority, const hyperion::Components& component, const QString& origin = "External", const QString& owner = "", unsigned smooth_cfg = 0);
void registerGlobalInput(int priority, hyperion::Components component, const QString& origin = "External", const QString& owner = "", unsigned smooth_cfg = 0);
///
/// @brief PIPE the clear command for the global priority channel over HyperionDaemon to Hyperion class
@@ -70,7 +70,7 @@ signals:
/// @param[in] timeout_ms The timeout in milliseconds
/// @param clearEffect Should be true when NOT called from an effect
///
void setGlobalImage(const int priority, const Image<ColorRgb>& image, const int timeout_ms, const bool& clearEffect = true);
void setGlobalImage(int priority, const Image<ColorRgb>& image, int timeout_ms, bool clearEffect = true);
///
/// @brief PIPE external color message over HyperionDaemon to Hyperion class
@@ -80,7 +80,7 @@ signals:
/// @param[in] origin The setter
/// @param clearEffect Should be true when NOT called from an effect
///
void setGlobalColor(const int priority, const std::vector<ColorRgb> &ledColor, const int timeout_ms, const QString& origin = "External" ,bool clearEffects = true);
void setGlobalColor(int priority, const std::vector<ColorRgb> &ledColor, int timeout_ms, const QString& origin = "External" ,bool clearEffects = true);
///////////////////////////////////////
//////////// FROM HYPERION ////////////
@@ -98,6 +98,6 @@ signals:
/// @param hyperionInd The Hyperion instance index as identifier
/// @param listen True when listening, else false
///
void requestSource(const hyperion::Components& component, const int hyperionInd, const bool listen);
void requestSource(hyperion::Components component, int hyperionInd, bool listen);
};

View File

@@ -15,7 +15,7 @@ public:
{
}
Image(const unsigned width, const unsigned height) :
Image(unsigned width, unsigned height) :
Image(width, height, Pixel_T())
{
@@ -28,7 +28,7 @@ public:
/// @param height The height of the image
/// @param background The color of the image
///
Image(const unsigned width, const unsigned height, const Pixel_T background) :
Image(unsigned width, unsigned height, const Pixel_T background) :
_d_ptr(new ImageData<Pixel_T>(width, height, background))
{
}
@@ -93,12 +93,12 @@ public:
return _d_ptr->height();
}
uint8_t red(const unsigned pixel) const
uint8_t red(unsigned pixel) const
{
return _d_ptr->red(pixel);
}
uint8_t green(const unsigned pixel) const
uint8_t green(unsigned pixel) const
{
return _d_ptr->green(pixel);
}
@@ -111,7 +111,7 @@ public:
///
/// @return const reference to specified pixel
///
uint8_t blue(const unsigned pixel) const
uint8_t blue(unsigned pixel) const
{
return _d_ptr->blue(pixel);
}
@@ -121,7 +121,7 @@ public:
///
/// @param x The x index
/// @param y The y index
const Pixel_T& operator()(const unsigned x, const unsigned y) const
const Pixel_T& operator()(unsigned x, unsigned y) const
{
return _d_ptr->operator()(x, y);
}
@@ -129,7 +129,7 @@ public:
///
/// @return reference to specified pixel
///
Pixel_T& operator()(const unsigned x, const unsigned y)
Pixel_T& operator()(unsigned x, unsigned y)
{
return _d_ptr->operator()(x, y);
}
@@ -137,7 +137,7 @@ public:
/// Resize the image
/// @param width The width of the image
/// @param height The height of the image
void resize(const unsigned width, const unsigned height)
void resize(unsigned width, unsigned height)
{
_d_ptr->resize(width, height);
}
@@ -198,7 +198,7 @@ private:
///
/// @return The index into the underlying data-vector
///
inline unsigned toIndex(const unsigned x, const unsigned y) const
inline unsigned toIndex(unsigned x, unsigned y) const
{
return _d_ptr->toIndex(x, y);
}

View File

@@ -24,7 +24,7 @@ class ImageData : public QSharedData
public:
typedef Pixel_T pixel_type;
ImageData(const unsigned width, const unsigned height, const Pixel_T background) :
ImageData(unsigned width, unsigned height, const Pixel_T background) :
_width(width),
_height(height),
_pixels(new Pixel_T[width * height + 1])
@@ -84,32 +84,32 @@ public:
return _height;
}
uint8_t red(const unsigned pixel) const
uint8_t red(unsigned pixel) const
{
return (_pixels + pixel)->red;
}
uint8_t green(const unsigned pixel) const
uint8_t green(unsigned pixel) const
{
return (_pixels + pixel)->green;
}
uint8_t blue(const unsigned pixel) const
uint8_t blue(unsigned pixel) const
{
return (_pixels + pixel)->blue;
}
const Pixel_T& operator()(const unsigned x, const unsigned y) const
const Pixel_T& operator()(unsigned x, unsigned y) const
{
return _pixels[toIndex(x,y)];
}
Pixel_T& operator()(const unsigned x, const unsigned y)
Pixel_T& operator()(unsigned x, unsigned y)
{
return _pixels[toIndex(x,y)];
}
void resize(const unsigned width, const unsigned height)
void resize(unsigned width, unsigned height)
{
if (width == _width && height == _height)
return;
@@ -167,7 +167,7 @@ public:
}
private:
inline unsigned toIndex(const unsigned x, const unsigned y) const
inline unsigned toIndex(unsigned x, unsigned y) const
{
return y * _width + x;
}

View File

@@ -42,7 +42,7 @@ private slots:
/// @param type settingyType from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
private:
Logger* _log;

View File

@@ -71,7 +71,7 @@ namespace hyperion {
return RgbTransform(gammaR, gammaG, gammaB, backlightThreshold, backlightColored, brightness, brightnessComp);
}
RgbChannelAdjustment createRgbChannelAdjustment(const QJsonObject& colorConfig, const QString& channelName, const int defaultR, const int defaultG, const int defaultB)
RgbChannelAdjustment createRgbChannelAdjustment(const QJsonObject& colorConfig, const QString& channelName, int defaultR, int defaultG, int defaultB)
{
const QJsonArray& channelConfig = colorConfig[channelName].toArray();
return RgbChannelAdjustment(
@@ -101,7 +101,7 @@ namespace hyperion {
return adjustment;
}
MultiColorAdjustment * createLedColorsAdjustment(const unsigned ledCnt, const QJsonObject & colorConfig)
MultiColorAdjustment * createLedColorsAdjustment(unsigned ledCnt, const QJsonObject & colorConfig)
{
// Create the result, the transforms are added to this
MultiColorAdjustment * adjustment = new MultiColorAdjustment(ledCnt);

View File

@@ -32,7 +32,7 @@ class WebServer : public QObject {
Q_OBJECT
public:
WebServer (const QJsonDocument& config, const bool& useSsl, QObject * parent = 0);
WebServer (const QJsonDocument& config, bool useSsl, QObject * parent = 0);
~WebServer () override;
@@ -44,12 +44,12 @@ signals:
/// @emits whenever server is started or stopped (to sync with SSDPHandler)
/// @param newState True when started, false when stopped
///
void stateChange(const bool newState);
void stateChange(bool newState);
///
/// @brief Emits whenever the port changes (doesn't compare prev <> now)
///
void portChanged(const quint16& port);
void portChanged(quint16 port);
public slots:
///
@@ -57,7 +57,7 @@ public slots:
///
void initServer();
void onServerStopped (void);
void onServerStopped ();
void onServerStarted (quint16 port);
void onServerError (QString msg);
@@ -66,7 +66,7 @@ public slots:
/// @param type settingyType from enum
/// @param config configuration object
///
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
///
/// @brief Set a new description, if empty the description is NotFound for clients