Skip to content

Commit 88a2ce6

Browse files
committed
Compile error ICYStream
1 parent 036645b commit 88a2ce6

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

src/AudioTools/CoreAudio/AudioHttp/ICYStreamT.h

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
2-
#include "AudioToolsConfig.h"
32
#include "AudioTools/CoreAudio/AudioHttp/AbstractURLStream.h"
43
#include "AudioTools/CoreAudio/AudioMetaData/MetaDataICY.h"
4+
#include "AudioToolsConfig.h"
55

66
namespace audio_tools {
77

@@ -22,27 +22,29 @@ namespace audio_tools {
2222
* @copyright GPLv3
2323
*/
2424

25-
template<class T>
26-
class ICYStreamT : public AbstractURLStream {
25+
template <class T>
26+
class ICYStreamT : public AbstractURLStream {
2727
public:
28-
ICYStreamT(int readBufferSize = DEFAULT_BUFFER_SIZE) {
28+
ICYStreamT(int readBufferSize = DEFAULT_BUFFER_SIZE) {
2929
TRACEI();
3030
setReadBufferSize(readBufferSize);
3131
}
3232

3333
/// Default constructor
3434
ICYStreamT(const char* ssid, const char* password,
35-
int readBufferSize = DEFAULT_BUFFER_SIZE) : ICYStreamT(readBufferSize) {
35+
int readBufferSize = DEFAULT_BUFFER_SIZE)
36+
: ICYStreamT(readBufferSize) {
3637
TRACEI();
3738
setSSID(ssid);
3839
setPassword(password);
3940
}
4041

41-
ICYStreamT(Client& clientPar, int readBufferSize = DEFAULT_BUFFER_SIZE) : ICYStreamT(readBufferSize) {
42+
ICYStreamT(Client& clientPar, int readBufferSize = DEFAULT_BUFFER_SIZE)
43+
: ICYStreamT(readBufferSize) {
4244
TRACEI();
4345
setClient(clientPar);
4446
}
45-
47+
4648
/// Defines the meta data callback function
4749
virtual bool setMetadataCallback(void (*fn)(MetaDataType info,
4850
const char* str,
@@ -141,12 +143,10 @@ namespace audio_tools {
141143

142144
/// if set to true, it activates the power save mode which comes at the cost
143145
/// of performance! - By default this is deactivated. ESP32 Only!
144-
void setPowerSave(bool active) { url.setPowerSave(active);}
146+
void setPowerSave(bool active) { url.setPowerSave(active); }
145147

146148
/// Define the Root PEM Certificate for SSL:
147-
void setCACert(const char* cert){
148-
url.setCACert(cert);
149-
}
149+
void setCACert(const char* cert) { url.setCACert(cert); }
150150
/// Adds/Updates a request header
151151
void addRequestHeader(const char* key, const char* value) override {
152152
url.addRequestHeader(key, value);
@@ -162,11 +162,16 @@ namespace audio_tools {
162162
/// (Re-)defines the client
163163
void setClient(Client& client) override { url.setClient(client); }
164164

165+
void setConnectionClose(bool flag) override { url.setConnectionClose(flag); }
166+
const char* urlStr() override { return url.urlStr(); }
167+
size_t totalRead() override { return url.totalRead(); };
168+
int contentLength() override { return url.contentLength(); };
169+
bool waitForData(int timeout) override { return url.waitForData(timeout); }
170+
165171
protected:
166172
T url;
167173
MetaDataICY icy; // icy state machine
168174
void (*callback)(MetaDataType info, const char* str, int len) = nullptr;
169175
};
170176

171-
}
172-
177+
} // namespace audio_tools

0 commit comments

Comments
 (0)