Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
ab9d9541
Commit
ab9d9541
authored
7 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/tidal: pass std::string by value
Don't keep any references to the owner, as the handler method may delete the owner.
parent
c3b85685
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
TidalInputPlugin.cxx
src/input/plugins/TidalInputPlugin.cxx
+2
-2
TidalLoginRequest.hxx
src/input/plugins/TidalLoginRequest.hxx
+1
-1
TidalSessionManager.cxx
src/input/plugins/TidalSessionManager.cxx
+1
-1
TidalSessionManager.hxx
src/input/plugins/TidalSessionManager.hxx
+1
-1
TidalTrackRequest.hxx
src/input/plugins/TidalTrackRequest.hxx
+1
-1
No files found.
src/input/plugins/TidalInputPlugin.cxx
View file @
ab9d9541
...
@@ -74,7 +74,7 @@ private:
...
@@ -74,7 +74,7 @@ private:
void
OnTidalSession
()
noexcept
override
;
void
OnTidalSession
()
noexcept
override
;
/* virtual methods from TidalTrackHandler */
/* virtual methods from TidalTrackHandler */
void
OnTidalTrackSuccess
(
std
::
string
&&
url
)
noexcept
override
;
void
OnTidalTrackSuccess
(
std
::
string
url
)
noexcept
override
;
void
OnTidalTrackError
(
std
::
exception_ptr
error
)
noexcept
override
;
void
OnTidalTrackError
(
std
::
exception_ptr
error
)
noexcept
override
;
};
};
...
@@ -98,7 +98,7 @@ TidalInputStream::OnTidalSession() noexcept
...
@@ -98,7 +98,7 @@ TidalInputStream::OnTidalSession() noexcept
}
}
void
void
TidalInputStream
::
OnTidalTrackSuccess
(
std
::
string
&&
url
)
noexcept
TidalInputStream
::
OnTidalTrackSuccess
(
std
::
string
url
)
noexcept
{
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
...
...
This diff is collapsed.
Click to expand it.
src/input/plugins/TidalLoginRequest.hxx
View file @
ab9d9541
...
@@ -38,7 +38,7 @@ class CurlRequest;
...
@@ -38,7 +38,7 @@ class CurlRequest;
*/
*/
class
TidalLoginHandler
{
class
TidalLoginHandler
{
public
:
public
:
virtual
void
OnTidalLoginSuccess
(
std
::
string
&&
session
)
noexcept
=
0
;
virtual
void
OnTidalLoginSuccess
(
std
::
string
session
)
noexcept
=
0
;
virtual
void
OnTidalLoginError
(
std
::
exception_ptr
error
)
noexcept
=
0
;
virtual
void
OnTidalLoginError
(
std
::
exception_ptr
error
)
noexcept
=
0
;
};
};
...
...
This diff is collapsed.
Click to expand it.
src/input/plugins/TidalSessionManager.cxx
View file @
ab9d9541
...
@@ -70,7 +70,7 @@ TidalSessionManager::AddLoginHandler(TidalSessionHandler &h) noexcept
...
@@ -70,7 +70,7 @@ TidalSessionManager::AddLoginHandler(TidalSessionHandler &h) noexcept
}
}
void
void
TidalSessionManager
::
OnTidalLoginSuccess
(
std
::
string
&&
_session
)
noexcept
TidalSessionManager
::
OnTidalLoginSuccess
(
std
::
string
_session
)
noexcept
{
{
{
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
...
...
This diff is collapsed.
Click to expand it.
src/input/plugins/TidalSessionManager.hxx
View file @
ab9d9541
...
@@ -158,7 +158,7 @@ private:
...
@@ -158,7 +158,7 @@ private:
}
}
/* virtual methods from TidalLoginHandler */
/* virtual methods from TidalLoginHandler */
void
OnTidalLoginSuccess
(
std
::
string
&&
session
)
noexcept
override
;
void
OnTidalLoginSuccess
(
std
::
string
session
)
noexcept
override
;
void
OnTidalLoginError
(
std
::
exception_ptr
error
)
noexcept
override
;
void
OnTidalLoginError
(
std
::
exception_ptr
error
)
noexcept
override
;
};
};
...
...
This diff is collapsed.
Click to expand it.
src/input/plugins/TidalTrackRequest.hxx
View file @
ab9d9541
...
@@ -40,7 +40,7 @@ class TidalTrackHandler
...
@@ -40,7 +40,7 @@ class TidalTrackHandler
:
public
boost
::
intrusive
::
list_base_hook
<
boost
::
intrusive
::
link_mode
<
boost
::
intrusive
::
safe_link
>>
:
public
boost
::
intrusive
::
list_base_hook
<
boost
::
intrusive
::
link_mode
<
boost
::
intrusive
::
safe_link
>>
{
{
public
:
public
:
virtual
void
OnTidalTrackSuccess
(
std
::
string
&&
url
)
noexcept
=
0
;
virtual
void
OnTidalTrackSuccess
(
std
::
string
url
)
noexcept
=
0
;
virtual
void
OnTidalTrackError
(
std
::
exception_ptr
error
)
noexcept
=
0
;
virtual
void
OnTidalTrackError
(
std
::
exception_ptr
error
)
noexcept
=
0
;
};
};
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment