[clang-tidy] use override instead of virtual
Found with modernize-use-override Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
0b2444450f
commit
b64fdae938
|
@ -47,7 +47,7 @@ public:
|
||||||
name.erase(len - 4);
|
name.erase(len - 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Visit(ArchiveVisitor &visitor) override {
|
void Visit(ArchiveVisitor &visitor) override {
|
||||||
visitor.VisitArchiveEntry(name.c_str());
|
visitor.VisitArchiveEntry(name.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public:
|
||||||
Bzip2InputStream(const std::shared_ptr<InputStream> &_input,
|
Bzip2InputStream(const std::shared_ptr<InputStream> &_input,
|
||||||
const char *uri,
|
const char *uri,
|
||||||
Mutex &mutex);
|
Mutex &mutex);
|
||||||
~Bzip2InputStream();
|
~Bzip2InputStream() override;
|
||||||
|
|
||||||
/* virtual methods from InputStream */
|
/* virtual methods from InputStream */
|
||||||
bool IsEOF() const noexcept override;
|
bool IsEOF() const noexcept override;
|
||||||
|
|
|
@ -71,7 +71,7 @@ public:
|
||||||
void Visit(char *path, size_t length, size_t capacity,
|
void Visit(char *path, size_t length, size_t capacity,
|
||||||
ArchiveVisitor &visitor);
|
ArchiveVisitor &visitor);
|
||||||
|
|
||||||
virtual void Visit(ArchiveVisitor &visitor) override;
|
void Visit(ArchiveVisitor &visitor) override;
|
||||||
|
|
||||||
InputStreamPtr OpenStream(const char *path,
|
InputStreamPtr OpenStream(const char *path,
|
||||||
Mutex &mutex) override;
|
Mutex &mutex) override;
|
||||||
|
@ -152,7 +152,7 @@ public:
|
||||||
SetReady();
|
SetReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
~Iso9660InputStream() {
|
~Iso9660InputStream() override {
|
||||||
free(statbuf);
|
free(statbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
ZzipArchiveFile(std::shared_ptr<ZzipDir> &&_dir)
|
ZzipArchiveFile(std::shared_ptr<ZzipDir> &&_dir)
|
||||||
:dir(std::move(_dir)) {}
|
:dir(std::move(_dir)) {}
|
||||||
|
|
||||||
virtual void Visit(ArchiveVisitor &visitor) override;
|
void Visit(ArchiveVisitor &visitor) override;
|
||||||
|
|
||||||
InputStreamPtr OpenStream(const char *path,
|
InputStreamPtr OpenStream(const char *path,
|
||||||
Mutex &mutex) override;
|
Mutex &mutex) override;
|
||||||
|
@ -106,7 +106,7 @@ public:
|
||||||
SetReady();
|
SetReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
~ZzipInputStream() {
|
~ZzipInputStream() override {
|
||||||
zzip_file_close(file);
|
zzip_file_close(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ class UpdateArchiveVisitor final : public ArchiveVisitor {
|
||||||
Directory &_directory) noexcept
|
Directory &_directory) noexcept
|
||||||
:walk(_walk), archive(_archive), directory(_directory) {}
|
:walk(_walk), archive(_archive), directory(_directory) {}
|
||||||
|
|
||||||
virtual void VisitArchiveEntry(const char *path_utf8) override {
|
void VisitArchiveEntry(const char *path_utf8) override {
|
||||||
FormatDebug(update_domain,
|
FormatDebug(update_domain,
|
||||||
"adding archive file: %s", path_utf8);
|
"adding archive file: %s", path_utf8);
|
||||||
walk.UpdateArchiveTree(archive, directory, path_utf8);
|
walk.UpdateArchiveTree(archive, directory, path_utf8);
|
||||||
|
|
|
@ -69,7 +69,7 @@ protected:
|
||||||
/* virtual methods from class SocketMonitor */
|
/* virtual methods from class SocketMonitor */
|
||||||
bool OnSocketReady(unsigned flags) noexcept override;
|
bool OnSocketReady(unsigned flags) noexcept override;
|
||||||
|
|
||||||
virtual void OnIdle() noexcept override;
|
void OnIdle() noexcept override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,7 +27,7 @@ class NullFilter final : public Filter {
|
||||||
public:
|
public:
|
||||||
explicit NullFilter(const AudioFormat &af):Filter(af) {}
|
explicit NullFilter(const AudioFormat &af):Filter(af) {}
|
||||||
|
|
||||||
virtual ConstBuffer<void> FilterPCM(ConstBuffer<void> src) override {
|
ConstBuffer<void> FilterPCM(ConstBuffer<void> src) override {
|
||||||
return src;
|
return src;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
:observer(_observer),
|
:observer(_observer),
|
||||||
prepared_filter(std::move(_prepared_filter)) {}
|
prepared_filter(std::move(_prepared_filter)) {}
|
||||||
|
|
||||||
~PreparedProxy() noexcept {
|
~PreparedProxy() noexcept override {
|
||||||
assert(child == nullptr);
|
assert(child == nullptr);
|
||||||
assert(observer.proxy == this);
|
assert(observer.proxy == this);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ public:
|
||||||
:Filter(_filter->GetOutAudioFormat()),
|
:Filter(_filter->GetOutAudioFormat()),
|
||||||
parent(_parent), filter(std::move(_filter)) {}
|
parent(_parent), filter(std::move(_filter)) {}
|
||||||
|
|
||||||
~Proxy() noexcept {
|
~Proxy() noexcept override {
|
||||||
parent.Clear(this);
|
parent.Clear(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
:Filter(audio_format), compressor(Compressor_new(0)) {
|
:Filter(audio_format), compressor(Compressor_new(0)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
~NormalizeFilter() {
|
~NormalizeFilter() override {
|
||||||
Compressor_delete(compressor);
|
Compressor_delete(compressor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
class PreparedNullFilter final : public PreparedFilter {
|
class PreparedNullFilter final : public PreparedFilter {
|
||||||
public:
|
public:
|
||||||
virtual std::unique_ptr<Filter> Open(AudioFormat &af) override {
|
std::unique_ptr<Filter> Open(AudioFormat &af) override {
|
||||||
return std::make_unique<NullFilter>(af);
|
return std::make_unique<NullFilter>(af);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
~AutoGunzipReader() noexcept;
|
~AutoGunzipReader() noexcept;
|
||||||
|
|
||||||
/* virtual methods from class Reader */
|
/* virtual methods from class Reader */
|
||||||
virtual size_t Read(void *data, size_t size) override;
|
size_t Read(void *data, size_t size) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Detect();
|
void Detect();
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
const void *Peek(size_t size);
|
const void *Peek(size_t size);
|
||||||
|
|
||||||
/* virtual methods from class Reader */
|
/* virtual methods from class Reader */
|
||||||
virtual size_t Read(void *data, size_t size) override;
|
size_t Read(void *data, size_t size) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
size_t _buffer_size,
|
size_t _buffer_size,
|
||||||
size_t _resume_at) noexcept;
|
size_t _resume_at) noexcept;
|
||||||
|
|
||||||
virtual ~AsyncInputStream() noexcept;
|
~AsyncInputStream() noexcept override;
|
||||||
|
|
||||||
auto &GetEventLoop() const noexcept {
|
auto &GetEventLoop() const noexcept {
|
||||||
return deferred_resume.GetEventLoop();
|
return deferred_resume.GetEventLoop();
|
||||||
|
|
|
@ -89,7 +89,7 @@ public:
|
||||||
Mutex &_mutex,
|
Mutex &_mutex,
|
||||||
const SourceSpec &spec);
|
const SourceSpec &spec);
|
||||||
|
|
||||||
~AlsaInputStream() {
|
~AlsaInputStream() override {
|
||||||
BlockingCall(MultiSocketMonitor::GetEventLoop(), [this](){
|
BlockingCall(MultiSocketMonitor::GetEventLoop(), [this](){
|
||||||
MultiSocketMonitor::Reset();
|
MultiSocketMonitor::Reset();
|
||||||
defer_invalidate_sockets.Cancel();
|
defer_invalidate_sockets.Cancel();
|
||||||
|
@ -103,13 +103,13 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* virtual methods from AsyncInputStream */
|
/* virtual methods from AsyncInputStream */
|
||||||
virtual void DoResume() override {
|
void DoResume() override {
|
||||||
snd_pcm_resume(capture_handle);
|
snd_pcm_resume(capture_handle);
|
||||||
|
|
||||||
InvalidateSockets();
|
InvalidateSockets();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void DoSeek(gcc_unused offset_type new_offset) override {
|
void DoSeek(gcc_unused offset_type new_offset) override {
|
||||||
/* unreachable because seekable==false */
|
/* unreachable because seekable==false */
|
||||||
SeekDone();
|
SeekDone();
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ class CdioParanoiaInputStream final : public InputStream {
|
||||||
SetReady();
|
SetReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
~CdioParanoiaInputStream() {
|
~CdioParanoiaInputStream() override {
|
||||||
para = {};
|
para = {};
|
||||||
cdio_cddap_close_no_free_cdio(drv);
|
cdio_cddap_close_no_free_cdio(drv);
|
||||||
cdio_destroy(cdio);
|
cdio_destroy(cdio);
|
||||||
|
|
|
@ -85,7 +85,7 @@ public:
|
||||||
I &&_icy,
|
I &&_icy,
|
||||||
Mutex &_mutex);
|
Mutex &_mutex);
|
||||||
|
|
||||||
~CurlInputStream() noexcept;
|
~CurlInputStream() noexcept override;
|
||||||
|
|
||||||
CurlInputStream(const CurlInputStream &) = delete;
|
CurlInputStream(const CurlInputStream &) = delete;
|
||||||
CurlInputStream &operator=(const CurlInputStream &) = delete;
|
CurlInputStream &operator=(const CurlInputStream &) = delete;
|
||||||
|
@ -137,8 +137,8 @@ private:
|
||||||
void OnError(std::exception_ptr e) noexcept override;
|
void OnError(std::exception_ptr e) noexcept override;
|
||||||
|
|
||||||
/* virtual methods from AsyncInputStream */
|
/* virtual methods from AsyncInputStream */
|
||||||
virtual void DoResume() override;
|
void DoResume() override;
|
||||||
virtual void DoSeek(offset_type new_offset) override;
|
void DoSeek(offset_type new_offset) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** libcurl should accept "ICY 200 OK" */
|
/** libcurl should accept "ICY 200 OK" */
|
||||||
|
|
|
@ -42,8 +42,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void Open() override;
|
void Open() override;
|
||||||
virtual size_t ThreadRead(void *ptr, size_t size) override;
|
size_t ThreadRead(void *ptr, size_t size) override;
|
||||||
|
|
||||||
void Close() noexcept override {
|
void Close() noexcept override {
|
||||||
mmsx_close(mms);
|
mmsx_close(mms);
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
NFS_MAX_BUFFERED,
|
NFS_MAX_BUFFERED,
|
||||||
NFS_RESUME_AT) {}
|
NFS_RESUME_AT) {}
|
||||||
|
|
||||||
virtual ~NfsInputStream() {
|
~NfsInputStream() override {
|
||||||
DeferClose();
|
DeferClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* virtual methods from AsyncInputStream */
|
/* virtual methods from AsyncInputStream */
|
||||||
virtual void DoResume() override;
|
void DoResume() override;
|
||||||
virtual void DoSeek(offset_type new_offset) override;
|
void DoSeek(offset_type new_offset) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* virtual methods from NfsFileReader */
|
/* virtual methods from NfsFileReader */
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
qobuz_client->AddLoginHandler(*this);
|
qobuz_client->AddLoginHandler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~QobuzInputStream() {
|
~QobuzInputStream() override {
|
||||||
qobuz_client->RemoveLoginHandler(*this);
|
qobuz_client->RemoveLoginHandler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
SetReady();
|
SetReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
~SmbclientInputStream() {
|
~SmbclientInputStream() override {
|
||||||
const std::lock_guard<Mutex> lock(smbclient_mutex);
|
const std::lock_guard<Mutex> lock(smbclient_mutex);
|
||||||
smbc_close(fd);
|
smbc_close(fd);
|
||||||
smbc_free_context(ctx, 1);
|
smbc_free_context(ctx, 1);
|
||||||
|
|
|
@ -65,7 +65,7 @@ public:
|
||||||
tidal_session->AddLoginHandler(*this);
|
tidal_session->AddLoginHandler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~TidalInputStream() {
|
~TidalInputStream() override {
|
||||||
tidal_session->RemoveLoginHandler(*this);
|
tidal_session->RemoveLoginHandler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
value(nullptr) {}
|
value(nullptr) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void StartElement(const XML_Char *name, const XML_Char **) {
|
void StartElement(const XML_Char *name, const XML_Char **) override {
|
||||||
value = nullptr;
|
value = nullptr;
|
||||||
|
|
||||||
switch (name[0]) {
|
switch (name[0]) {
|
||||||
|
@ -80,7 +80,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void EndElement(const XML_Char *name) {
|
void EndElement(const XML_Char *name) override {
|
||||||
if (value != nullptr) {
|
if (value != nullptr) {
|
||||||
trimstring(*value);
|
trimstring(*value);
|
||||||
value = nullptr;
|
value = nullptr;
|
||||||
|
@ -90,7 +90,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void CharacterData(const XML_Char *s, int len) {
|
void CharacterData(const XML_Char *s, int len) override {
|
||||||
if (value != nullptr)
|
if (value != nullptr)
|
||||||
value->append(s, len);
|
value->append(s, len);
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ public:
|
||||||
:Mixer(alsa_mixer_plugin, _listener),
|
:Mixer(alsa_mixer_plugin, _listener),
|
||||||
event_loop(_event_loop) {}
|
event_loop(_event_loop) {}
|
||||||
|
|
||||||
virtual ~AlsaMixer();
|
~AlsaMixer() override;
|
||||||
|
|
||||||
void Configure(const ConfigBlock &block);
|
void Configure(const ConfigBlock &block);
|
||||||
void Setup();
|
void Setup();
|
||||||
|
|
|
@ -36,14 +36,14 @@ public:
|
||||||
self(_output) {}
|
self(_output) {}
|
||||||
|
|
||||||
/* virtual methods from class Mixer */
|
/* virtual methods from class Mixer */
|
||||||
virtual void Open() override {
|
void Open() override {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Close() noexcept override {
|
void Close() noexcept override {
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int GetVolume() override;
|
int GetVolume() override;
|
||||||
virtual void SetVolume(unsigned volume) override;
|
void SetVolume(unsigned volume) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
static Mixer *
|
static Mixer *
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~PulseMixer();
|
~PulseMixer() override;
|
||||||
|
|
||||||
void Offline();
|
void Offline();
|
||||||
void VolumeCallback(const pa_sink_input_info *i, int eol);
|
void VolumeCallback(const pa_sink_input_info *i, int eol);
|
||||||
|
|
|
@ -210,7 +210,7 @@ class AlsaOutput final
|
||||||
public:
|
public:
|
||||||
AlsaOutput(EventLoop &loop, const ConfigBlock &block);
|
AlsaOutput(EventLoop &loop, const ConfigBlock &block);
|
||||||
|
|
||||||
~AlsaOutput() noexcept {
|
~AlsaOutput() noexcept override {
|
||||||
/* free libasound's config cache */
|
/* free libasound's config cache */
|
||||||
snd_config_update_free_global();
|
snd_config_update_free_global();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ class AoOutput final : AudioOutput, SafeSingleton<AoInit> {
|
||||||
size_t frame_size;
|
size_t frame_size;
|
||||||
|
|
||||||
AoOutput(const ConfigBlock &block);
|
AoOutput(const ConfigBlock &block);
|
||||||
~AoOutput();
|
~AoOutput() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static AudioOutput *Create(EventLoop &, const ConfigBlock &block) {
|
static AudioOutput *Create(EventLoop &, const ConfigBlock &block) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ class FifoOutput final : AudioOutput {
|
||||||
public:
|
public:
|
||||||
FifoOutput(const ConfigBlock &block);
|
FifoOutput(const ConfigBlock &block);
|
||||||
|
|
||||||
~FifoOutput() {
|
~FifoOutput() override {
|
||||||
CloseFifo();
|
CloseFifo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ struct ShoutOutput final : AudioOutput {
|
||||||
uint8_t buffer[32768];
|
uint8_t buffer[32768];
|
||||||
|
|
||||||
explicit ShoutOutput(const ConfigBlock &block);
|
explicit ShoutOutput(const ConfigBlock &block);
|
||||||
~ShoutOutput();
|
~ShoutOutput() override;
|
||||||
|
|
||||||
static AudioOutput *Create(EventLoop &event_loop,
|
static AudioOutput *Create(EventLoop &event_loop,
|
||||||
const ConfigBlock &block);
|
const ConfigBlock &block);
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
MemorySongEnumerator(std::forward_list<DetachedSong> &&_songs)
|
MemorySongEnumerator(std::forward_list<DetachedSong> &&_songs)
|
||||||
:songs(std::move(_songs)) {}
|
:songs(std::move(_songs)) {}
|
||||||
|
|
||||||
virtual std::unique_ptr<DetachedSong> NextSong() override;
|
std::unique_ptr<DetachedSong> NextSong() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,7 +32,7 @@ class CuePlaylist final : public SongEnumerator {
|
||||||
:tis(std::move(is)) {
|
:tis(std::move(is)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::unique_ptr<DetachedSong> NextSong() override;
|
std::unique_ptr<DetachedSong> NextSong() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::unique_ptr<SongEnumerator>
|
static std::unique_ptr<SongEnumerator>
|
||||||
|
|
|
@ -55,7 +55,7 @@ public:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::unique_ptr<DetachedSong> NextSong() override;
|
std::unique_ptr<DetachedSong> NextSong() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::unique_ptr<SongEnumerator>
|
static std::unique_ptr<SongEnumerator>
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
:tis(std::move(is)) {
|
:tis(std::move(is)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::unique_ptr<DetachedSong> NextSong() override;
|
std::unique_ptr<DetachedSong> NextSong() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::unique_ptr<SongEnumerator>
|
static std::unique_ptr<SongEnumerator>
|
||||||
|
|
|
@ -80,7 +80,7 @@ public:
|
||||||
nfs_init(_loop);
|
nfs_init(_loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
~NfsStorage() {
|
~NfsStorage() override {
|
||||||
BlockingCall(GetEventLoop(), [this](){ Disconnect(); });
|
BlockingCall(GetEventLoop(), [this](){ Disconnect(); });
|
||||||
nfs_finish();
|
nfs_finish();
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
SmbclientDirectoryReader(std::string &&_base, unsigned _handle)
|
SmbclientDirectoryReader(std::string &&_base, unsigned _handle)
|
||||||
:base(std::move(_base)), handle(_handle) {}
|
:base(std::move(_base)), handle(_handle) {}
|
||||||
|
|
||||||
virtual ~SmbclientDirectoryReader();
|
~SmbclientDirectoryReader() override;
|
||||||
|
|
||||||
/* virtual methods from class StorageDirectoryReader */
|
/* virtual methods from class StorageDirectoryReader */
|
||||||
const char *Read() noexcept override;
|
const char *Read() noexcept override;
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
SmbclientStorage(const char *_base, SMBCCTX *_ctx)
|
SmbclientStorage(const char *_base, SMBCCTX *_ctx)
|
||||||
:base(_base), ctx(_ctx) {}
|
:base(_base), ctx(_ctx) {}
|
||||||
|
|
||||||
virtual ~SmbclientStorage() {
|
~SmbclientStorage() override {
|
||||||
const std::lock_guard<Mutex> lock(smbclient_mutex);
|
const std::lock_guard<Mutex> lock(smbclient_mutex);
|
||||||
smbc_free_context(ctx, 1);
|
smbc_free_context(ctx, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* virtual methods from class SocketMonitor */
|
/* virtual methods from class SocketMonitor */
|
||||||
bool OnSocketReady(unsigned flags) noexcept {
|
bool OnSocketReady(unsigned flags) noexcept override {
|
||||||
received = ToAvahiWatchEvent(flags);
|
received = ToAvahiWatchEvent(flags);
|
||||||
callback(this, GetSocket().Get(), received, userdata);
|
callback(this, GetSocket().Get(), received, userdata);
|
||||||
received = AvahiWatchEvent(0);
|
received = AvahiWatchEvent(0);
|
||||||
|
|
|
@ -68,11 +68,11 @@ InputStream::LockRead(void *, size_t)
|
||||||
|
|
||||||
class MyDatabaseListener final : public DatabaseListener {
|
class MyDatabaseListener final : public DatabaseListener {
|
||||||
public:
|
public:
|
||||||
virtual void OnDatabaseModified() noexcept override {
|
void OnDatabaseModified() noexcept override {
|
||||||
cout << "DatabaseModified" << endl;
|
cout << "DatabaseModified" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnDatabaseSongRemoved(const char *uri) noexcept override {
|
void OnDatabaseSongRemoved(const char *uri) noexcept override {
|
||||||
cout << "SongRemoved " << uri << endl;
|
cout << "SongRemoved " << uri << endl;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,12 +32,12 @@
|
||||||
class MyNeighborListener final : public NeighborListener {
|
class MyNeighborListener final : public NeighborListener {
|
||||||
public:
|
public:
|
||||||
/* virtual methods from class NeighborListener */
|
/* virtual methods from class NeighborListener */
|
||||||
virtual void FoundNeighbor(const NeighborInfo &info) noexcept override {
|
void FoundNeighbor(const NeighborInfo &info) noexcept override {
|
||||||
printf("found '%s' (%s)\n",
|
printf("found '%s' (%s)\n",
|
||||||
info.display_name.c_str(), info.uri.c_str());
|
info.display_name.c_str(), info.uri.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void LostNeighbor(const NeighborInfo &info) noexcept override {
|
void LostNeighbor(const NeighborInfo &info) noexcept override {
|
||||||
printf("lost '%s' (%s)\n",
|
printf("lost '%s' (%s)\n",
|
||||||
info.display_name.c_str(), info.uri.c_str());
|
info.display_name.c_str(), info.uri.c_str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
|
|
||||||
class MyArchiveVisitor final : public ArchiveVisitor {
|
class MyArchiveVisitor final : public ArchiveVisitor {
|
||||||
public:
|
public:
|
||||||
virtual void VisitArchiveEntry(const char *path_utf8) override {
|
void VisitArchiveEntry(const char *path_utf8) override {
|
||||||
printf("%s\n", path_utf8);
|
printf("%s\n", path_utf8);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue