Skip to content

Commit

Permalink
Try to fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
sgallou committed Aug 30, 2024
1 parent ca22733 commit b1b8069
Show file tree
Hide file tree
Showing 29 changed files with 145 additions and 134 deletions.
1 change: 1 addition & 0 deletions projects/Yadoms.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=prerelease/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=prereleases/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=protobuf/@EntryIndexedValue">True</s:Boolean>

<s:Boolean x:Key="/Default/UserDictionary/Words/=Sqlite/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ssdp/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=stackable/@EntryIndexedValue">True</s:Boolean>
Expand Down
4 changes: 3 additions & 1 deletion sources/plugins/PhilipsHue/Entities/Hsv.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "Hsv.h"

CHsv::CHsv(unsigned long& hue, unsigned long& saturation, unsigned long& value)
CHsv::CHsv(const unsigned long& hue,
const unsigned long& saturation,
const unsigned long& value)
: m_hue(hue),
m_saturation(saturation),
m_value(value)
Expand Down
5 changes: 3 additions & 2 deletions sources/plugins/PhilipsHue/Entities/Hsv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
class CHsv
{
public:
CHsv(unsigned long& hue, unsigned long& saturation, unsigned long& value);
CHsv(const unsigned long& hue,
const unsigned long& saturation,
const unsigned long& value);
virtual ~CHsv() = default;

const unsigned long& getHue() const;
Expand All @@ -14,4 +16,3 @@ class CHsv
unsigned long m_saturation;
unsigned long m_value;
};

8 changes: 5 additions & 3 deletions sources/plugins/PhilipsHue/Entities/HueCapabilities.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "HueCapabilities.h"

CHueCapabilities::CHueCapabilities(bool& certified, const CHueControl& control, const CHueStreaming& streaming)
CHueCapabilities::CHueCapabilities(const bool& certified,
const CHueControl& control,
const CHueStreaming& streaming)
: m_certified(certified),
m_control(control),
m_streaming(streaming)
Expand All @@ -22,7 +24,7 @@ const CHueControl& CHueCapabilities::getControl() const
return m_control;
}

void CHueCapabilities::setControl(CHueControl control)
void CHueCapabilities::setControl(const CHueControl& control)
{
m_control = control;
}
Expand All @@ -32,7 +34,7 @@ const CHueStreaming& CHueCapabilities::getStreaming() const
return m_streaming;
}

void CHueCapabilities::setStreaming(CHueStreaming& streaming)
void CHueCapabilities::setStreaming(const CHueStreaming& streaming)
{
m_streaming = streaming;
}
11 changes: 6 additions & 5 deletions sources/plugins/PhilipsHue/Entities/HueCapabilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
class CHueCapabilities
{
public:

CHueCapabilities() = default;
CHueCapabilities(bool& certified, const CHueControl& control, const CHueStreaming& streaming);
CHueCapabilities(const bool& certified,
const CHueControl& control,
const CHueStreaming& streaming);
virtual ~CHueCapabilities() = default;

const bool& isCertified() const;
void setCertified(bool certified);
const CHueControl& getControl() const;
void setControl(CHueControl control);
void setControl(const CHueControl& control);
const CHueStreaming& getStreaming() const;
void setStreaming(CHueStreaming& streaming);
void setStreaming(const CHueStreaming& streaming);

private:
bool m_certified;
bool m_certified = false;
CHueControl m_control;
CHueStreaming m_streaming;
};
10 changes: 6 additions & 4 deletions sources/plugins/PhilipsHue/Entities/HueControl.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "HueControl.h"

CHueControl::CHueControl(int minDimLevel, int maxLumen, const std::string& colorGamutType,
CHueControl::CHueControl(int minDimLevel,
int maxLumen,
const std::string& colorGamutType,
const CHueColorGamut& colorGamut,
const CHueCt& ct)
: m_minDimLevel(minDimLevel),
Expand Down Expand Up @@ -36,7 +38,7 @@ const std::string& CHueControl::getColorGamutType() const
return m_colorGamutType;
}

void CHueControl::setColorGamutType(std::string colorGamutType)
void CHueControl::setColorGamutType(const std::string& colorGamutType)
{
m_colorGamutType = colorGamutType;
}
Expand All @@ -46,7 +48,7 @@ const CHueColorGamut& CHueControl::getColorGamut() const
return m_colorGamut;
}

void CHueControl::setColorGamut(CHueColorGamut& colorGamut)
void CHueControl::setColorGamut(const CHueColorGamut& colorGamut)
{
m_colorGamut = colorGamut;
}
Expand All @@ -56,7 +58,7 @@ const CHueCt& CHueControl::getCt() const
return m_ct;
}

void CHueControl::setCt(CHueCt& ct)
void CHueControl::setCt(const CHueCt& ct)
{
m_ct = ct;
}
17 changes: 9 additions & 8 deletions sources/plugins/PhilipsHue/Entities/HueControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
class CHueControl
{
public:

CHueControl() = default;

CHueControl(int minDimLevel, int maxLumen, const std::string& colorGamutType, const CHueColorGamut& colorGamut,
CHueControl(int minDimLevel,
int maxLumen,
const std::string& colorGamutType,
const CHueColorGamut& colorGamut,
const CHueCt& ct);
virtual ~CHueControl() = default;

Expand All @@ -17,16 +19,15 @@ class CHueControl
const int& getMaxLumen() const;
void setMaxLumen(int maxLumen);
const std::string& getColorGamutType() const;
void setColorGamutType(std::string colorGamutType);
void setColorGamutType(const std::string& colorGamutType);
const CHueColorGamut& getColorGamut() const;
void setColorGamut(CHueColorGamut& colorGamut);
void setColorGamut(const CHueColorGamut& colorGamut);
const CHueCt& getCt() const;
void setCt(CHueCt& ct);
void setCt(const CHueCt& ct);

private:

int m_minDimLevel;
int m_maxLumen;
int m_minDimLevel = 0;
int m_maxLumen = 0;
std::string m_colorGamutType;
CHueColorGamut m_colorGamut;
CHueCt m_ct;
Expand Down
2 changes: 1 addition & 1 deletion sources/plugins/PhilipsHue/Entities/HueCt.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "HueCt.h"

CHueCt::CHueCt(int& min, int& max)
CHueCt::CHueCt(const int& min, const int& max)
: m_min(min),
m_max(max)
{
Expand Down
8 changes: 4 additions & 4 deletions sources/plugins/PhilipsHue/Entities/HueCt.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
class CHueCt
{
public:

CHueCt() = default;
CHueCt(int& min, int& max);
CHueCt(const int& min, const int& max);
virtual ~CHueCt() = default;

const int& getMin() const;
void setMin(int min);
const int& getMax() const;
void setMax(int max);

private:
int m_min;
int m_max;
int m_min = 0;
int m_max = 0;
};
6 changes: 4 additions & 2 deletions sources/plugins/PhilipsHue/Entities/HueInformations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ CHueInformations::CHueInformations()
{
}

CHueInformations::CHueInformations(std::string& ip, std::string& friendlyName, std::string& modelName,
std::string& modelNumber)
CHueInformations::CHueInformations(const std::string& ip,
const std::string& friendlyName,
const std::string& modelName,
const std::string& modelNumber)
: m_ip(ip),
m_friendlyName(friendlyName),
m_modelName(modelName),
Expand Down
8 changes: 6 additions & 2 deletions sources/plugins/PhilipsHue/Entities/HueInformations.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#pragma once

class CHueInformations final
{
public:
CHueInformations();
CHueInformations(std::string& ip, std::string& friendlyName, std::string& modelName, std::string& modelNumber);
CHueInformations(const std::string& ip,
const std::string& friendlyName,
const std::string& modelName,
const std::string& modelNumber);
virtual ~CHueInformations() = default;

const std::string& getIp() const;
Expand All @@ -15,10 +19,10 @@ class CHueInformations final
void setFriendlyName(const std::string& friendlyName);
void setModelName(const std::string& modelName);
void setModelNumber(const std::string& modelNumber);

private:
std::string m_ip;
std::string m_friendlyName;
std::string m_modelName;
std::string m_modelNumber;
};

4 changes: 2 additions & 2 deletions sources/plugins/PhilipsHue/Entities/HueStartUp.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "HueStartUp.h"

CHueStartUp::CHueStartUp(const std::string& mode, bool& configured)
: m_mode(mode),
CHueStartUp::CHueStartUp(std::string mode, const bool& configured)
: m_mode(std::move(mode)),
m_configured(configured)
{
}
Expand Down
8 changes: 4 additions & 4 deletions sources/plugins/PhilipsHue/Entities/HueStartUp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
class CHueStartUp final
{
public:

CHueStartUp() = default;
CHueStartUp(const std::string& mode, bool& configured);
virtual ~CHueStartUp() = default;
CHueStartUp(std::string mode, const bool& configured);
~CHueStartUp() = default;

const std::string& getMode() const;
void setMode(const std::string& mode);
bool isConfigured() const;
void setConfigured(bool configured);

private:
std::string m_mode;
bool m_configured;
bool m_configured = false;
};
13 changes: 6 additions & 7 deletions sources/plugins/PhilipsHue/Entities/HueState.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,15 @@ class CHueState
void setReachable(bool reachable);

private:

bool m_on;
int m_bri;
int m_hue;
int m_sat;
bool m_on = false;
int m_bri = 0;
int m_hue = 0;
int m_sat = 0;
std::string m_effect;
CXy m_xy;
int m_ct;
int m_ct = 0;
std::string m_alert;
std::string m_colorMode;
std::string m_mode;
bool m_reachable;
bool m_reachable = false;
};
2 changes: 1 addition & 1 deletion sources/plugins/PhilipsHue/Entities/HueStreaming.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "HueStreaming.h"

CHueStreaming::CHueStreaming(bool& renderer, bool& proxy)
CHueStreaming::CHueStreaming(const bool& renderer, const bool& proxy)
: m_renderer(renderer),
m_proxy(proxy)
{
Expand Down
8 changes: 3 additions & 5 deletions sources/plugins/PhilipsHue/Entities/HueStreaming.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
class CHueStreaming
{
public:

CHueStreaming() = default;
CHueStreaming(bool& renderer, bool& proxy);
CHueStreaming(const bool& renderer, const bool& proxy);
virtual ~CHueStreaming() = default;

bool isRenderer() const;
Expand All @@ -14,7 +13,6 @@ class CHueStreaming
void setProxy(bool proxy);

private:

bool m_renderer;
bool m_proxy;
bool m_renderer = false;
bool m_proxy = false;
};
4 changes: 2 additions & 2 deletions sources/plugins/PhilipsHue/Entities/HueSwUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const std::string& CHueSwUpdate::getState() const
return m_state;
}

void CHueSwUpdate::setState(std::string state)
void CHueSwUpdate::setState(const std::string& state)
{
m_state = state;
}
Expand All @@ -21,7 +21,7 @@ const std::string& CHueSwUpdate::getLastInstall() const
return m_lastInstall;
}

void CHueSwUpdate::setLastInstall(std::string lastInstall)
void CHueSwUpdate::setLastInstall(const std::string& lastInstall)
{
m_lastInstall = lastInstall;
}
6 changes: 3 additions & 3 deletions sources/plugins/PhilipsHue/Entities/HueSwUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
class CHueSwUpdate
{
public:

CHueSwUpdate() = default;

CHueSwUpdate(const std::string& state, const std::string& lastInstall);
virtual ~CHueSwUpdate() = default;

const std::string& getState() const;
void setState(std::string state);
void setState(const std::string& state);
const std::string& getLastInstall() const;
void setLastInstall(std::string lastInstall);
void setLastInstall(const std::string& lastInstall);

private :
std::string m_state;
std::string m_lastInstall;
Expand Down
2 changes: 1 addition & 1 deletion sources/plugins/PhilipsHue/Entities/Rgb.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Rgb.h"

CRgb::CRgb(unsigned long& r, unsigned long& g, unsigned long& b)
CRgb::CRgb(const unsigned long& r, const unsigned long& g, const unsigned long& b)
: m_r(r),
m_g(g),
m_b(b)
Expand Down
3 changes: 1 addition & 2 deletions sources/plugins/PhilipsHue/Entities/Rgb.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class CRgb
{
public:
CRgb(unsigned long& r, unsigned long& g, unsigned long& b);
CRgb(const unsigned long& r, const unsigned long& g, const unsigned long& b);
virtual ~CRgb() = default;

const unsigned long& getR() const;
Expand All @@ -14,4 +14,3 @@ class CRgb
unsigned long m_g;
unsigned long m_b;
};

2 changes: 1 addition & 1 deletion sources/plugins/PhilipsHue/Entities/Xy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CXy::CXy()
{
}

CXy::CXy(float& x, float& y)
CXy::CXy(const float& x, const float& y)
: m_x(x),
m_y(y)
{
Expand Down
Loading

0 comments on commit b1b8069

Please sign in to comment.