diff options
author | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2018-10-24 16:07:05 +0200 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2018-10-25 06:05:24 +0000 |
commit | d59d4b183c3484a978f197ad27e2491138775c92 (patch) | |
tree | 212d9a4d6e7a5264ab5ff14f18ecb531257eda9b /tradeshow/iot-sensortag/mqttdataproviderpool.h | |
parent | c0917669684e051f79f6afb557bb491828346a47 (diff) |
SensorTag: Prefer loading MQTT configuration from file
To avoid accidently pushing credentials, they should not be patched into
the header, but rather be placed in to a file co-located to the
executable.
Change-Id: I03950107f39a88b0f1c7deb49ff16d25ddf9df4d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/mqttdataproviderpool.h')
-rw-r--r-- | tradeshow/iot-sensortag/mqttdataproviderpool.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tradeshow/iot-sensortag/mqttdataproviderpool.h b/tradeshow/iot-sensortag/mqttdataproviderpool.h index 1ba33ff..3004757 100644 --- a/tradeshow/iot-sensortag/mqttdataproviderpool.h +++ b/tradeshow/iot-sensortag/mqttdataproviderpool.h @@ -55,15 +55,18 @@ class MqttDataProvider; -#define MQTT_BROKER "" -#define MQTT_PORT 1883 -#define MQTT_USERNAME "" -#define MQTT_PASSWORD "" +namespace MqttCredentials +{ + QString getBroker(); + int getPort(); + QString getUsername(); + QString getPassword(); +} class MqttDataProviderPool : public DataProviderPool { public: - explicit MqttDataProviderPool(QObject *parent = 0); + explicit MqttDataProviderPool(QObject *parent = nullptr); void startScanning() override; |