UPnP-MediaServer 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ @�;c�1�h���o�<����d���Sl��3n�zqk���V'�Gb��h���W3R��|�uB�����#`��x��0� :+�7��JuqǸUv.��NͅI����D��YtK��ux��k�Wh#��u·����� ܒ� �
@@ -0,0 +1,5 @@
1
+ === 1.0.0 / 2008-07-23
2
+
3
+ * 1 major enhancement
4
+ * Birthday!
5
+
@@ -0,0 +1,6 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ bin/upnp_media_server
6
+ lib/UPnP/device/media_server.rb
@@ -0,0 +1,61 @@
1
+ = UPnP-MediaServer
2
+
3
+ * http://seattlerb.org/UPnP-MediaServer
4
+ * http://upnp.org
5
+ * Bugs: http://rubyforge.org/tracker/?func=add&group_id=1513&atid=5921
6
+
7
+ == DESCRIPTION:
8
+
9
+ A UPnP MediaServer. Currently a work in progress. Only tested on a
10
+ PlayStation 3.
11
+
12
+ == FEATURES/PROBLEMS:
13
+
14
+ * Uses incomplete UPnP::Service::ContentDirectory
15
+ * Uses stub UPnP::Service::ConnectionManager
16
+ * Only tested on PlayStation 3
17
+
18
+ == SYNOPSIS:
19
+
20
+ upnp_media_server --help
21
+
22
+ upnp_media_server --name="My Awesome Media" --directory=/my/awesome/media
23
+
24
+ == REQUIREMENTS:
25
+
26
+ * A UPnP MediaServer control point
27
+ * Media to serve
28
+
29
+ == INSTALL:
30
+
31
+ sudo gem install UPnP-MediaServer
32
+
33
+ == LICENSE:
34
+
35
+ Copyright 2008 Eric Hodel. All rights reserved.
36
+
37
+ Redistribution and use in source and binary forms, with or without
38
+ modification, are permitted provided that the following conditions
39
+ are met:
40
+
41
+ 1. Redistributions of source code must retain the above copyright
42
+ notice, this list of conditions and the following disclaimer.
43
+ 2. Redistributions in binary form must reproduce the above copyright
44
+ notice, this list of conditions and the following disclaimer in the
45
+ documentation and/or other materials provided with the distribution.
46
+ 3. Neither the names of the authors nor the names of their contributors
47
+ may be used to endorse or promote products derived from this software
48
+ without specific prior written permission.
49
+
50
+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
51
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
52
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
53
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
54
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
55
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
56
+ OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
57
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
58
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
59
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
60
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61
+
@@ -0,0 +1,16 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+ require './lib/UPnP/device/media_server'
6
+
7
+ Hoe.new 'UPnP-MediaServer', UPnP::Device::MediaServer::VERSION do |p|
8
+ p.rubyforge_name = 'seattlerb'
9
+ p.developer 'Eric Hodel', 'drbrain@segment7.net'
10
+
11
+ p.extra_deps << ['UPnP', '>= 1.1.0']
12
+ p.extra_deps << ['UPnP-ContentDirectory', '>= 1.0.0']
13
+ p.extra_deps << ['UPnP-ConnectionManager', '>= 1.0.0']
14
+ end
15
+
16
+ # vim: syntax=Ruby
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ Thread.abort_on_exception = true
4
+
5
+ require 'rubygems'
6
+ require 'UPnP/device/media_server'
7
+
8
+ UPnP::Device::MediaServer.run
9
+
@@ -0,0 +1,76 @@
1
+ require 'rubygems'
2
+ require 'UPnP/device'
3
+ require 'UPnP/service/content_directory'
4
+ require 'UPnP/service/connection_manager'
5
+
6
+ ##
7
+ # A UPnP MediaServer. See upnp.org for specifications.
8
+
9
+ class UPnP::Device::MediaServer < UPnP::Device
10
+
11
+ VERSION = '1.0.0'
12
+
13
+ add_service_id UPnP::Service::ContentDirectory, 'ContentDirectory'
14
+ add_service_id UPnP::Service::ConnectionManager, 'ConnectorManager'
15
+
16
+ ##
17
+ # Adds directory and name options.
18
+
19
+ def self.option_parser
20
+ super do |option_parser, options|
21
+ options[:directories] = []
22
+ options[:name] = Socket.gethostname.split('.', 2).first
23
+
24
+ option_parser.banner = <<-EOF
25
+ Usage: #{option_parser.program_name} [options]
26
+
27
+ Starts a UPnP media server. If no directories are given, serves content in
28
+ the current directory.
29
+ EOF
30
+
31
+ option_parser.separator ''
32
+
33
+ option_parser.on('-d', '--directory=DIRECTORY',
34
+ 'Expose a directory to the media server') do |value|
35
+ options[:directories] << File.expand_path(value)
36
+ end
37
+
38
+ option_parser.on('-n', '--name=NAME',
39
+ 'Set the MediaServer\'s name') do |value|
40
+ options[:name] = value
41
+ end
42
+ end
43
+ end
44
+
45
+ ##
46
+ # Runs a MediaServer. Automatically adds the current directory if no
47
+ # directories were specified.
48
+
49
+ def self.run(argv = ARGV)
50
+ super
51
+
52
+ @options[:directories] << Dir.pwd if @options[:directories].empty?
53
+
54
+ device = create 'MediaServer', @options[:name] do |ms|
55
+ ms.manufacturer = 'Seattle Ruby Brigade'
56
+ ms.manufacturer_url = 'http://seattlerb.org'
57
+
58
+ ms.model_description = "Ruby Media Server version #{ms.class::VERSION}"
59
+ ms.model_name = 'Ruby Media Server'
60
+ ms.model_url = 'http://seattlerb.org/UPnP-MediaServer'
61
+ ms.model_number = UPnP::Device::MediaServer::VERSION
62
+
63
+ ms.add_service 'ContentDirectory' do |cd|
64
+ @options[:directories].each do |directory|
65
+ cd.add_directory directory
66
+ end
67
+ end
68
+
69
+ ms.add_service 'ConnectionManager'
70
+ end
71
+
72
+ device.run
73
+ end
74
+
75
+ end
76
+
metadata ADDED
@@ -0,0 +1,122 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: UPnP-MediaServer
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Eric Hodel
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDNjCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBBMRAwDgYDVQQDDAdkcmJy
14
+ YWluMRgwFgYKCZImiZPyLGQBGRYIc2VnbWVudDcxEzARBgoJkiaJk/IsZAEZFgNu
15
+ ZXQwHhcNMDcxMjIxMDIwNDE0WhcNMDgxMjIwMDIwNDE0WjBBMRAwDgYDVQQDDAdk
16
+ cmJyYWluMRgwFgYKCZImiZPyLGQBGRYIc2VnbWVudDcxEzARBgoJkiaJk/IsZAEZ
17
+ FgNuZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCbbgLrGLGIDE76
18
+ LV/cvxdEzCuYuS3oG9PrSZnuDweySUfdp/so0cDq+j8bqy6OzZSw07gdjwFMSd6J
19
+ U5ddZCVywn5nnAQ+Ui7jMW54CYt5/H6f2US6U0hQOjJR6cpfiymgxGdfyTiVcvTm
20
+ Gj/okWrQl0NjYOYBpDi+9PPmaH2RmLJu0dB/NylsDnW5j6yN1BEI8MfJRR+HRKZY
21
+ mUtgzBwF1V4KIZQ8EuL6I/nHVu07i6IkrpAgxpXUfdJQJi0oZAqXurAV3yTxkFwd
22
+ g62YrrW26mDe+pZBzR6bpLE+PmXCzz7UxUq3AE0gPHbiMXie3EFE0oxnsU3lIduh
23
+ sCANiQ8BAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
24
+ BBS5k4Z75VSpdM0AclG2UvzFA/VW5DANBgkqhkiG9w0BAQUFAAOCAQEAHagT4lfX
25
+ kP/hDaiwGct7XPuVGbrOsKRVD59FF5kETBxEc9UQ1clKWngf8JoVuEoKD774dW19
26
+ bU0GOVWO+J6FMmT/Cp7nuFJ79egMf/gy4gfUfQMuvfcr6DvZUPIs9P/TlK59iMYF
27
+ DIOQ3DxdF3rMzztNUCizN4taVscEsjCcgW6WkUJnGdqlu3OHWpQxZBJkBTjPCoc6
28
+ UW6on70SFPmAy/5Cq0OJNGEWBfgD9q7rrs/X8GGwUWqXb85RXnUVi/P8Up75E0ag
29
+ 14jEc90kN+C7oI/AGCBN0j6JnEtYIEJZibjjDJTSMWlUKKkj30kq7hlUC2CepJ4v
30
+ x52qPcexcYZR7w==
31
+ -----END CERTIFICATE-----
32
+
33
+ date: 2008-07-23 00:00:00 -07:00
34
+ default_executable:
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: UPnP
38
+ type: :runtime
39
+ version_requirement:
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 1.1.0
45
+ version:
46
+ - !ruby/object:Gem::Dependency
47
+ name: UPnP-ContentDirectory
48
+ type: :runtime
49
+ version_requirement:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.0
55
+ version:
56
+ - !ruby/object:Gem::Dependency
57
+ name: UPnP-ConnectionManager
58
+ type: :runtime
59
+ version_requirement:
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 1.0.0
65
+ version:
66
+ - !ruby/object:Gem::Dependency
67
+ name: hoe
68
+ type: :development
69
+ version_requirement:
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 1.7.0
75
+ version:
76
+ description: A UPnP MediaServer. Currently a work in progress. Only tested on a PlayStation 3.
77
+ email:
78
+ - drbrain@segment7.net
79
+ executables:
80
+ - upnp_media_server
81
+ extensions: []
82
+
83
+ extra_rdoc_files:
84
+ - History.txt
85
+ - Manifest.txt
86
+ - README.txt
87
+ files:
88
+ - History.txt
89
+ - Manifest.txt
90
+ - README.txt
91
+ - Rakefile
92
+ - bin/upnp_media_server
93
+ - lib/UPnP/device/media_server.rb
94
+ has_rdoc: true
95
+ homepage: http://seattlerb.org/UPnP-MediaServer
96
+ post_install_message:
97
+ rdoc_options:
98
+ - --main
99
+ - README.txt
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: "0"
107
+ version:
108
+ required_rubygems_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: "0"
113
+ version:
114
+ requirements: []
115
+
116
+ rubyforge_project: seattlerb
117
+ rubygems_version: 1.2.0
118
+ signing_key:
119
+ specification_version: 2
120
+ summary: A UPnP MediaServer
121
+ test_files: []
122
+
@@ -0,0 +1,3 @@
1
+ ���[Qj�Ae�x�!������l����4W<kL�~�G�;�J��=۱J ����=I�5И2��w�G S%DvңI�3)��G�˿>�L��*�00.n ��T��M)�����]��X) )B��`�4y�Q-�_�\ ���%���Nk��W��+
2
+ ��ٴ ��-�v�~�
3
+ �ŕ,�G�z=(u}@K���;T %�`6AB7�6x~��8l[0�Q�kg�2ƣ����:^��B1��