druzy-protocol-plugin-upnp 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/druzy/protocol/plugin/upnp.rb +40 -0
- data/lib/druzy/protocol/plugin/upnp/version.rb +9 -0
- metadata +88 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b263bad510f87505c2172efee315409fe7a817e9
|
4
|
+
data.tar.gz: a55c0eabf5780e2f1e0fc780c7ffb16c1609fa67
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 41f95e6c2f3cc204d7c8fe738fd199480d5801ba8b7b83ed90b5e9991e09d113482d8ba7766a75f5441070abae6bfcca70321f39ce9d5623714e68a81ae51fc1
|
7
|
+
data.tar.gz: 0e15091291663fab7d733fd476ad1f435cdab0e3273dc9b3dbbc54bda93805b85036272e35b942d6ca1b50c07f755d99e4f30d92c6775b30e55c795330cb68c2
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'druzy/protocol/plugin/upnp/version'
|
2
|
+
|
3
|
+
require 'druzy/protocol'
|
4
|
+
require 'easy_upnp/ssdp_searcher'
|
5
|
+
|
6
|
+
module Druzy
|
7
|
+
module Protocol
|
8
|
+
module Plugin
|
9
|
+
module Upnp
|
10
|
+
|
11
|
+
class UpnpDiscoverer < Druzy::Protocol::Discoverer
|
12
|
+
|
13
|
+
@@urn_connection_manager='urn:schemas-upnp-org:service:ConnectionManager:1'
|
14
|
+
@@urn_rendering_control='urn:schemas-upnp-org:service:RenderingControl:1'
|
15
|
+
|
16
|
+
def start_discoverer(delay=10, identifier=nil, &discovery_listener)
|
17
|
+
searcher = EasyUpnp::SsdpSearcher.new
|
18
|
+
devices = searcher.search('upnp:rootdevice')
|
19
|
+
for device in devices
|
20
|
+
begin
|
21
|
+
if device.all_services.include?(@@urn_connection_manager) && device.all_services.include?(@@urn_rendering_control)
|
22
|
+
puts device.device_name
|
23
|
+
end
|
24
|
+
rescue
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def stop_discoverer
|
31
|
+
end
|
32
|
+
|
33
|
+
def restart_discoverer
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: druzy-protocol-plugin-upnp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jonathan Le Greneur
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-03-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: druzy-protocol
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description: Plugin to discover a upnp media renderer, just install it
|
56
|
+
email:
|
57
|
+
- jonathan.legreneur@free.fr
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- lib/druzy/protocol/plugin/upnp.rb
|
63
|
+
- lib/druzy/protocol/plugin/upnp/version.rb
|
64
|
+
homepage: https://github.com/druzy/ruby-druzy-protocol-plugin-upnp
|
65
|
+
licenses:
|
66
|
+
- MIT
|
67
|
+
metadata: {}
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
requirements: []
|
83
|
+
rubyforge_project:
|
84
|
+
rubygems_version: 2.2.2
|
85
|
+
signing_key:
|
86
|
+
specification_version: 4
|
87
|
+
summary: Plugin to discover a upnp media renderer
|
88
|
+
test_files: []
|