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
e57e89b9
Commit
e57e89b9
authored
Jan 26, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upnp/discovery: use a plain UpnpClient_Handle instead of class LibUPnP
parent
bcc1f933
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
UpnpDatabasePlugin.cxx
src/db/plugins/UpnpDatabasePlugin.cxx
+1
-1
Discovery.cxx
src/lib/upnp/Discovery.cxx
+4
-5
Discovery.hxx
src/lib/upnp/Discovery.hxx
+2
-3
No files found.
src/db/plugins/UpnpDatabasePlugin.cxx
View file @
e57e89b9
...
...
@@ -182,7 +182,7 @@ UpnpDatabase::Open(Error &error)
return
false
;
}
discovery
=
new
UPnPDeviceDirectory
(
lib
);
discovery
=
new
UPnPDeviceDirectory
(
lib
->
getclh
()
);
if
(
!
discovery
->
Start
(
error
))
{
delete
discovery
;
delete
lib
;
...
...
src/lib/upnp/Discovery.cxx
View file @
e57e89b9
...
...
@@ -21,7 +21,6 @@
#include "Discovery.hxx"
#include "Domain.hxx"
#include "ContentDirectoryService.hxx"
#include "upnpplib.hxx"
#include "system/Clock.hxx"
#include "Log.hxx"
...
...
@@ -232,9 +231,9 @@ UPnPDeviceDirectory::expireDevices(Error &error)
return
true
;
}
UPnPDeviceDirectory
::
UPnPDeviceDirectory
(
LibUPnP
*
_lib
,
UPnPDeviceDirectory
::
UPnPDeviceDirectory
(
UpnpClient_Handle
_handle
,
UPnPDiscoveryListener
*
_listener
)
:
lib
(
_lib
),
:
handle
(
_handle
),
listener
(
_listener
),
discoveredQueue
(
"DiscoveredQueue"
),
m_searchTimeout
(
2
),
m_lastSearch
(
0
)
...
...
@@ -266,7 +265,7 @@ UPnPDeviceDirectory::search(Error &error)
m_lastSearch
=
now
;
// We search both for device and service just in case.
int
code
=
UpnpSearchAsync
(
lib
->
getclh
()
,
m_searchTimeout
,
int
code
=
UpnpSearchAsync
(
handle
,
m_searchTimeout
,
ContentDirectorySType
,
GetUpnpCookie
());
if
(
code
!=
UPNP_E_SUCCESS
)
{
error
.
Format
(
upnp_domain
,
code
,
...
...
@@ -275,7 +274,7 @@ UPnPDeviceDirectory::search(Error &error)
return
false
;
}
code
=
UpnpSearchAsync
(
lib
->
getclh
()
,
m_searchTimeout
,
code
=
UpnpSearchAsync
(
handle
,
m_searchTimeout
,
MediaServerDType
,
GetUpnpCookie
());
if
(
code
!=
UPNP_E_SUCCESS
)
{
error
.
Format
(
upnp_domain
,
code
,
...
...
src/lib/upnp/Discovery.hxx
View file @
e57e89b9
...
...
@@ -32,7 +32,6 @@
#include <vector>
#include <string>
class
LibUPnP
;
class
ContentDirectoryService
;
class
UPnPDiscoveryListener
{
...
...
@@ -92,7 +91,7 @@ class UPnPDeviceDirectory final : UpnpCallback {
}
};
LibUPnP
*
const
lib
;
const
UpnpClient_Handle
handle
;
UPnPDiscoveryListener
*
const
listener
;
Mutex
mutex
;
...
...
@@ -112,7 +111,7 @@ class UPnPDeviceDirectory final : UpnpCallback {
unsigned
m_lastSearch
;
public
:
UPnPDeviceDirectory
(
LibUPnP
*
_lib
,
UPnPDeviceDirectory
(
UpnpClient_Handle
_handle
,
UPnPDiscoveryListener
*
_listener
=
nullptr
);
~
UPnPDeviceDirectory
();
...
...
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