daapclient 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/README +9 -1
  2. data/lib/itunes_sync.rb +19 -0
  3. data/lib/net/CVS/Entries +1 -1
  4. data/lib/net/daap/CVS/Entries +1 -1
  5. data/lib/net/daap/dmap.rb +42 -13
  6. data/lib/net/daap.rb +13 -9
  7. metadata +61 -123
  8. data/doc/classes/Net/DAAP/Client.html +0 -251
  9. data/doc/classes/Net/DAAP/Client.src/M000003.html +0 -20
  10. data/doc/classes/Net/DAAP/Client.src/M000004.html +0 -25
  11. data/doc/classes/Net/DAAP/Client.src/M000005.html +0 -33
  12. data/doc/classes/Net/DAAP/Client.src/M000006.html +0 -37
  13. data/doc/classes/Net/DAAP/Client.src/M000007.html +0 -20
  14. data/doc/classes/Net/DAAP/Client.src/M000008.html +0 -24
  15. data/doc/classes/Net/DAAP/DAAPv2.html +0 -165
  16. data/doc/classes/Net/DAAP/DAAPv2.src/M000015.html +0 -30
  17. data/doc/classes/Net/DAAP/DAAPv2.src/M000016.html +0 -21
  18. data/doc/classes/Net/DAAP/DAAPv3.html +0 -178
  19. data/doc/classes/Net/DAAP/DAAPv3.src/M000017.html +0 -30
  20. data/doc/classes/Net/DAAP/DAAPv3.src/M000018.html +0 -23
  21. data/doc/classes/Net/DAAP/DMAP.html +0 -189
  22. data/doc/classes/Net/DAAP/DMAP.src/M000012.html +0 -20
  23. data/doc/classes/Net/DAAP/DMAP.src/M000013.html +0 -18
  24. data/doc/classes/Net/DAAP/DMAP.src/M000014.html +0 -24
  25. data/doc/classes/Net/DAAP/Database.html +0 -224
  26. data/doc/classes/Net/DAAP/Database.src/M000009.html +0 -25
  27. data/doc/classes/Net/DAAP/Database.src/M000010.html +0 -21
  28. data/doc/classes/Net/DAAP/Database.src/M000011.html +0 -35
  29. data/doc/classes/Net/DAAP/Playlist.html +0 -192
  30. data/doc/classes/Net/DAAP/Playlist.src/M000001.html +0 -24
  31. data/doc/classes/Net/DAAP/Playlist.src/M000002.html +0 -30
  32. data/doc/classes/Net/DAAP/Song.html +0 -208
  33. data/doc/classes/Net/DAAP/Song.src/M000019.html +0 -27
  34. data/doc/classes/Net/DAAP/Song.src/M000020.html +0 -19
  35. data/doc/classes/Net/DAAP.html +0 -168
  36. data/doc/classes/Net.html +0 -127
  37. data/doc/created.rid +0 -1
  38. data/doc/files/CHANGELOG.html +0 -110
  39. data/doc/files/LICENSE.html +0 -531
  40. data/doc/files/README.html +0 -176
  41. data/doc/files/lib/net/daap/database_rb.html +0 -101
  42. data/doc/files/lib/net/daap/dmap_rb.html +0 -101
  43. data/doc/files/lib/net/daap/playlist_rb.html +0 -101
  44. data/doc/files/lib/net/daap/song_rb.html +0 -101
  45. data/doc/files/lib/net/daap_rb.html +0 -114
  46. data/doc/fr_class_index.html +0 -35
  47. data/doc/fr_file_index.html +0 -34
  48. data/doc/fr_method_index.html +0 -46
  49. data/doc/index.html +0 -24
  50. data/doc/rdoc-style.css +0 -208
data/README CHANGED
@@ -24,6 +24,10 @@ After that, just install the gem:
24
24
 
25
25
  sudo gem install daapclient
26
26
 
27
+ Also, check out the project page:
28
+
29
+ http://rubyforge.org/projects/daapclient
30
+
27
31
  == Example Usage
28
32
 
29
33
  require 'net/daap'
@@ -41,6 +45,9 @@ After that, just install the gem:
41
45
  puts "Playlist name: #{pl.name}"
42
46
  pl.songs do |song|
43
47
  puts "#{song.artist} - #{song.name}"
48
+ File::open("db/#{song.artist} - #{song.name}.#{song.format}", "w") do |f|
49
+ f << song.get
50
+ end
44
51
  end
45
52
  end
46
53
  end
@@ -54,10 +61,11 @@ communication logic to the original Perl version by Richard Clamp.
54
61
  == Author
55
62
 
56
63
  This Ruby version is Copyright (c) Aaron Patterson 2005
64
+
57
65
  It also comes with a shameless plug for employment coding Ruby, my most
58
66
  favorite language! ;-)
59
67
 
60
68
  == License
61
69
 
62
- This library is distributed un the GPL. Please see the LICENSE file.
70
+ This library is distributed under the GPL. Please see the LICENSE file.
63
71
 
@@ -0,0 +1,19 @@
1
+ require 'net/daap'
2
+
3
+ daap = Net::DAAP::Client.new('localhost')
4
+ daap.connect do |dsn|
5
+ daap.databases do |db|
6
+ puts "All songs in the database"
7
+ db.songs do |song|
8
+ puts "#{song.artist} - #{song.name}"
9
+ end
10
+
11
+ puts "Songs for each playlist"
12
+ db.playlists do |pl|
13
+ puts "Playlist name: #{pl.name}"
14
+ pl.songs do |song|
15
+ puts "#{song.artist} - #{song.name}"
16
+ end
17
+ end
18
+ end
19
+ end
data/lib/net/CVS/Entries CHANGED
@@ -1,2 +1,2 @@
1
- /daap.rb/1.1.1.1/Wed Dec 7 23:25:52 2005//
1
+ /daap.rb/1.2/Thu Dec 8 18:09:42 2005//
2
2
  D/daap////
@@ -1,5 +1,5 @@
1
1
  /database.rb/1.1.1.1/Wed Dec 7 23:25:52 2005//
2
- /dmap.rb/1.1.1.1/Wed Dec 7 23:25:52 2005//
3
2
  /playlist.rb/1.1.1.1/Wed Dec 7 23:25:52 2005//
4
3
  /song.rb/1.1.1.1/Wed Dec 7 23:25:52 2005//
4
+ /dmap.rb/1.2/Fri Dec 9 22:45:05 2005//
5
5
  D
data/lib/net/daap/dmap.rb CHANGED
@@ -24,16 +24,38 @@ module Net
24
24
  end
25
25
 
26
26
  private
27
- TYPE_TO_UNPACK = {
28
- 1 => 'c',
29
- 3 => 'n',
30
- 5 => 'N',
31
- 7 => 'Q',
32
- 9 => 'a*',
33
- 10 => 'N',
34
- 11 => 'nn',
35
- 42 => 'a*'
36
- }
27
+ def type_to_unpack
28
+ types = nil
29
+ if big_endian?
30
+ types = {
31
+ 1 => 'c',
32
+ 3 => 'S',
33
+ 5 => 'L',
34
+ 7 => 'Q',
35
+ 9 => 'a*',
36
+ 10 => 'L',
37
+ 11 => 'SS',
38
+ 42 => 'a*'
39
+ }
40
+ else
41
+ types = {
42
+ 1 => 'c',
43
+ 3 => 'n',
44
+ 5 => 'N',
45
+ 7 => 'Q',
46
+ 9 => 'a*',
47
+ 10 => 'N',
48
+ 11 => 'nn',
49
+ 42 => 'a*'
50
+ }
51
+ end
52
+ types
53
+ end
54
+
55
+ def big_endian?
56
+ return @big_endian if @big_endian
57
+ @big_endian = "Ruby".unpack("i")[0] != 2036495698 ? true : false
58
+ end
37
59
 
38
60
  def update_content_codes
39
61
  content_codes = unpack(@daap.do_get("content-codes"))
@@ -75,7 +97,14 @@ module Net
75
97
  buffer = @code unless buffer
76
98
 
77
99
  while(buffer.length > 0)
78
- tag, len = buffer.unpack("a4N")
100
+ tag, len = nil, nil
101
+
102
+ if big_endian?
103
+ tag, len = buffer.unpack("a4L")
104
+ else
105
+ tag, len = buffer.unpack("a4N")
106
+ end
107
+
79
108
  data = buffer[8...8+len]
80
109
 
81
110
  buffer[0...8+len] = ''
@@ -85,11 +114,11 @@ module Net
85
114
  if type == 12
86
115
  data = unpack(data)
87
116
  elsif type == 7
88
- n1, n2 = data.unpack("N2")
117
+ n1, n2 = big_endian? ? data.unpack("L2") : data.unpack("N2")
89
118
  data = n1 << 32
90
119
  data += n2
91
120
  else
92
- data = data.unpack(TYPE_TO_UNPACK[type])
121
+ data = data.unpack(type_to_unpack()[type])
93
122
  end
94
123
 
95
124
  if data.class == Array && data.length == 1 && data[0].class != Array || type == 11
data/lib/net/daap.rb CHANGED
@@ -57,15 +57,18 @@ module Net
57
57
 
58
58
  # Connects to the iTunes server. This method should be called right after
59
59
  # construction. See DAAP for an example.
60
- def connect(&connection)
60
+ def connect
61
61
  @http_client = Net::HTTP.start(@server_host, @server_port)
62
62
  find_validator
63
63
  @dmap = Net::DAAP::DMAP.new(:daap => self)
64
64
  load_server_info
65
65
  @connected = 1
66
- yield @dsn
67
- disconnect
68
- @connected = 0
66
+ if block_given?
67
+ yield @dsn
68
+ disconnect
69
+ @connected = 0
70
+ end
71
+ @dsn
69
72
  end
70
73
 
71
74
  # Returns the databases found on the iTunes server.
@@ -77,12 +80,12 @@ module Net
77
80
  # FIXME check the value of listing
78
81
  @databases = []
79
82
  unpack_listing(listings) do |value|
83
+ db = Database.new( :db_info => value,
84
+ :daap => self )
80
85
  if block_given?
81
- yield Database.new( :db_info => value,
82
- :daap => self )
86
+ yield db
83
87
  else
84
- @databases << Database.new( :db_info => value,
85
- :daap => self )
88
+ @databases << db
86
89
  end
87
90
  end
88
91
  @databases
@@ -127,10 +130,11 @@ module Net
127
130
  end
128
131
  end
129
132
 
130
- private
133
+ # Disconnects from the DAAP server
131
134
  def disconnect
132
135
  do_get("logout")
133
136
  end
137
+ private
134
138
  def load_server_info
135
139
  flat_list = @dmap.flat_list(do_get("server-info"))
136
140
  @dsn = flat_list['/dmap.serverinforesponse/dmap.itemname']
metadata CHANGED
@@ -1,13 +1,13 @@
1
- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.10
3
3
  specification_version: 1
4
4
  name: daapclient
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.1
7
- date: 2005-12-07 00:00:00 -08:00
6
+ version: 0.0.2
7
+ date: 2005-12-09
8
8
  summary: Net::DAAP::Client is an iTunes share client.
9
9
  require_paths:
10
- - lib
10
+ - lib
11
11
  email: aaronp@rubyforge.org
12
12
  homepage: daapclient.rubyforge.org
13
13
  rubyforge_project: daapclient
@@ -18,131 +18,69 @@ bindir: bin
18
18
  has_rdoc: true
19
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
20
20
  requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
21
+ -
22
+ - ">"
23
+ - !ruby/object:Gem::Version
24
+ version: 0.0.0
24
25
  version:
25
26
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
27
  authors:
29
- - Aaron Patterson
28
+ - Aaron Patterson
30
29
  files:
31
- - test/data
32
- - test/ts_daap.rb
33
- - test/tc_client.rb
34
- - test/CVS
35
- - test/tc_protocol.rb
36
- - test/data/mt-daapd
37
- - test/data/CVS
38
- - test/data/mt-daapd/079aca35773150da9fd98db10c7fd0c0.txt
39
- - test/data/mt-daapd/b3e894b87111bdba88e4765967f4b45a.txt
40
- - test/data/mt-daapd/d56b699830e77ba53855679cb1d252da.txt
41
- - test/data/mt-daapd/440c2217e6207c54c317c296f71f9769.txt
42
- - test/data/mt-daapd/e61ce3062cb76770658896b778ad06cd.txt
43
- - test/data/mt-daapd/7bded8b540fd082f102d25e181b47bc4.txt
44
- - test/data/mt-daapd/e9a8e709c2116651157182f130207048.txt
45
- - test/data/mt-daapd/f9073959a0afacebfab7e3bf19c2714a.txt
46
- - test/data/mt-daapd/CVS
47
- - test/data/mt-daapd/2972f65088b42a06b5d3ca089d71791d.txt
48
- - test/data/mt-daapd/4d1ce9f941cbd823ed06f1f1baa5a3b9.txt
49
- - test/data/mt-daapd/CVS/Entries
50
- - test/data/mt-daapd/CVS/Root
51
- - test/data/mt-daapd/CVS/Repository
52
- - test/data/CVS/Entries
53
- - test/data/CVS/Root
54
- - test/data/CVS/Repository
55
- - test/CVS/Entries
56
- - test/CVS/Root
57
- - test/CVS/Repository
58
- - lib/net
59
- - lib/CVS
60
- - lib/net/daap
61
- - lib/net/CVS
62
- - lib/net/daap.rb
63
- - lib/net/daap/database.rb
64
- - lib/net/daap/dmap.rb
65
- - lib/net/daap/song.rb
66
- - lib/net/daap/CVS
67
- - lib/net/daap/playlist.rb
68
- - lib/net/daap/CVS/Entries
69
- - lib/net/daap/CVS/Root
70
- - lib/net/daap/CVS/Repository
71
- - lib/net/CVS/Entries
72
- - lib/net/CVS/Root
73
- - lib/net/CVS/Repository
74
- - lib/CVS/Entries
75
- - lib/CVS/Root
76
- - lib/CVS/Repository
77
- - doc/rdoc-style.css
78
- - doc/created.rid
79
- - doc/fr_class_index.html
80
- - doc/classes
81
- - doc/index.html
82
- - doc/fr_method_index.html
83
- - doc/fr_file_index.html
84
- - doc/files
85
- - doc/classes/Net
86
- - doc/classes/Net.html
87
- - doc/classes/Net/DAAP
88
- - doc/classes/Net/DAAP.html
89
- - doc/classes/Net/DAAP/DAAPv3.html
90
- - doc/classes/Net/DAAP/DAAPv2.html
91
- - doc/classes/Net/DAAP/Database.src
92
- - doc/classes/Net/DAAP/DAAPv2.src
93
- - doc/classes/Net/DAAP/Playlist.html
94
- - doc/classes/Net/DAAP/DAAPv3.src
95
- - doc/classes/Net/DAAP/Database.html
96
- - doc/classes/Net/DAAP/DMAP.src
97
- - doc/classes/Net/DAAP/Song.src
98
- - doc/classes/Net/DAAP/Song.html
99
- - doc/classes/Net/DAAP/Client.src
100
- - doc/classes/Net/DAAP/Playlist.src
101
- - doc/classes/Net/DAAP/DMAP.html
102
- - doc/classes/Net/DAAP/Client.html
103
- - doc/classes/Net/DAAP/Database.src/M000011.html
104
- - doc/classes/Net/DAAP/Database.src/M000010.html
105
- - doc/classes/Net/DAAP/Database.src/M000009.html
106
- - doc/classes/Net/DAAP/DAAPv2.src/M000016.html
107
- - doc/classes/Net/DAAP/DAAPv2.src/M000015.html
108
- - doc/classes/Net/DAAP/DAAPv3.src/M000017.html
109
- - doc/classes/Net/DAAP/DAAPv3.src/M000018.html
110
- - doc/classes/Net/DAAP/DMAP.src/M000014.html
111
- - doc/classes/Net/DAAP/DMAP.src/M000012.html
112
- - doc/classes/Net/DAAP/DMAP.src/M000013.html
113
- - doc/classes/Net/DAAP/Song.src/M000019.html
114
- - doc/classes/Net/DAAP/Song.src/M000020.html
115
- - doc/classes/Net/DAAP/Client.src/M000004.html
116
- - doc/classes/Net/DAAP/Client.src/M000008.html
117
- - doc/classes/Net/DAAP/Client.src/M000007.html
118
- - doc/classes/Net/DAAP/Client.src/M000003.html
119
- - doc/classes/Net/DAAP/Client.src/M000006.html
120
- - doc/classes/Net/DAAP/Client.src/M000005.html
121
- - doc/classes/Net/DAAP/Playlist.src/M000001.html
122
- - doc/classes/Net/DAAP/Playlist.src/M000002.html
123
- - doc/files/CHANGELOG.html
124
- - doc/files/lib
125
- - doc/files/README.html
126
- - doc/files/LICENSE.html
127
- - doc/files/lib/net
128
- - doc/files/lib/net/daap_rb.html
129
- - doc/files/lib/net/daap
130
- - doc/files/lib/net/daap/playlist_rb.html
131
- - doc/files/lib/net/daap/song_rb.html
132
- - doc/files/lib/net/daap/dmap_rb.html
133
- - doc/files/lib/net/daap/database_rb.html
134
- - README
30
+ - test/CVS
31
+ - test/data
32
+ - test/tc_client.rb
33
+ - test/tc_protocol.rb
34
+ - test/ts_daap.rb
35
+ - test/CVS/Entries
36
+ - test/CVS/Repository
37
+ - test/CVS/Root
38
+ - test/data/CVS
39
+ - test/data/mt-daapd
40
+ - test/data/CVS/Entries
41
+ - test/data/CVS/Repository
42
+ - test/data/CVS/Root
43
+ - test/data/mt-daapd/079aca35773150da9fd98db10c7fd0c0.txt
44
+ - test/data/mt-daapd/2972f65088b42a06b5d3ca089d71791d.txt
45
+ - test/data/mt-daapd/440c2217e6207c54c317c296f71f9769.txt
46
+ - test/data/mt-daapd/4d1ce9f941cbd823ed06f1f1baa5a3b9.txt
47
+ - test/data/mt-daapd/7bded8b540fd082f102d25e181b47bc4.txt
48
+ - test/data/mt-daapd/b3e894b87111bdba88e4765967f4b45a.txt
49
+ - test/data/mt-daapd/CVS
50
+ - test/data/mt-daapd/d56b699830e77ba53855679cb1d252da.txt
51
+ - test/data/mt-daapd/e61ce3062cb76770658896b778ad06cd.txt
52
+ - test/data/mt-daapd/e9a8e709c2116651157182f130207048.txt
53
+ - test/data/mt-daapd/f9073959a0afacebfab7e3bf19c2714a.txt
54
+ - test/data/mt-daapd/CVS/Entries
55
+ - test/data/mt-daapd/CVS/Repository
56
+ - test/data/mt-daapd/CVS/Root
57
+ - lib/CVS
58
+ - lib/itunes_sync.rb
59
+ - lib/net
60
+ - lib/CVS/Entries
61
+ - lib/CVS/Repository
62
+ - lib/CVS/Root
63
+ - lib/net/CVS
64
+ - lib/net/daap
65
+ - lib/net/daap.rb
66
+ - lib/net/CVS/Entries
67
+ - lib/net/CVS/Repository
68
+ - lib/net/CVS/Root
69
+ - lib/net/daap/CVS
70
+ - lib/net/daap/database.rb
71
+ - lib/net/daap/dmap.rb
72
+ - lib/net/daap/playlist.rb
73
+ - lib/net/daap/song.rb
74
+ - lib/net/daap/CVS/Entries
75
+ - lib/net/daap/CVS/Repository
76
+ - lib/net/daap/CVS/Root
77
+ - README
135
78
  test_files:
136
- - test/ts_daap.rb
79
+ - test/ts_daap.rb
137
80
  rdoc_options: []
138
-
139
81
  extra_rdoc_files:
140
- - README
82
+ - README
141
83
  executables: []
142
-
143
84
  extensions: []
144
-
145
85
  requirements: []
146
-
147
- dependencies: []
148
-
86
+ dependencies: []
@@ -1,251 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Net::DAAP::Client</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Net::DAAP::Client</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/net/daap_rb.html">
59
- lib/net/daap.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <h1>Synopsis</h1>
83
- <p>
84
- The <a href="Client.html">Client</a> class interacts with the iTunes server
85
- to fetch lists of songs, databases, and playlists. Each <a
86
- href="Client.html">Client</a> class can have many <a
87
- href="Database.html">Database</a>, and each <a
88
- href="Database.html">Database</a> can have many <a
89
- href="Playlist.html">Playlist</a>, and many <a href="Song.html">Song</a>.
90
- See <a href="../DAAP.html">DAAP</a> for a code example.
91
- </p>
92
-
93
- </div>
94
-
95
-
96
- </div>
97
-
98
- <div id="method-list">
99
- <h3 class="section-bar">Methods</h3>
100
-
101
- <div class="name-list">
102
- <a href="#M000004">connect</a>&nbsp;&nbsp;
103
- <a href="#M000005">databases</a>&nbsp;&nbsp;
104
- <a href="#M000006">do_get</a>&nbsp;&nbsp;
105
- <a href="#M000007">get_song</a>&nbsp;&nbsp;
106
- <a href="#M000003">new</a>&nbsp;&nbsp;
107
- <a href="#M000008">unpack_listing</a>&nbsp;&nbsp;
108
- </div>
109
- </div>
110
-
111
- </div>
112
-
113
-
114
- <!-- if includes -->
115
-
116
- <div id="section">
117
-
118
-
119
-
120
-
121
-
122
- <div id="attribute-list">
123
- <h3 class="section-bar">Attributes</h3>
124
-
125
- <div class="name-list">
126
- <table>
127
- <tr class="top-aligned-row context-row">
128
- <td class="context-item-name">dmap</td>
129
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
130
- <td class="context-item-desc"></td>
131
- </tr>
132
- </table>
133
- </div>
134
- </div>
135
-
136
-
137
-
138
- <!-- if method_list -->
139
- <div id="methods">
140
- <h3 class="section-bar">Public Class methods</h3>
141
-
142
- <div id="method-M000003" class="method-detail">
143
- <a name="M000003"></a>
144
-
145
- <div class="method-heading">
146
- <a href="Client.src/M000003.html" target="Code" class="method-signature"
147
- onclick="popupCode('Client.src/M000003.html');return false;">
148
- <span class="method-name">new</span><span class="method-args">(server_host)</span>
149
- </a>
150
- </div>
151
-
152
- <div class="method-description">
153
- <p>
154
- Create a new <a href="Client.html">Client</a> and pass in the host where
155
- the client will connect.
156
- </p>
157
- </div>
158
- </div>
159
-
160
- <h3 class="section-bar">Public Instance methods</h3>
161
-
162
- <div id="method-M000004" class="method-detail">
163
- <a name="M000004"></a>
164
-
165
- <div class="method-heading">
166
- <a href="Client.src/M000004.html" target="Code" class="method-signature"
167
- onclick="popupCode('Client.src/M000004.html');return false;">
168
- <span class="method-name">connect</span><span class="method-args">() {|@dsn| ...}</span>
169
- </a>
170
- </div>
171
-
172
- <div class="method-description">
173
- <p>
174
- Connects to the iTunes server. This method should be called right after
175
- construction. See <a href="../DAAP.html">DAAP</a> for an example.
176
- </p>
177
- </div>
178
- </div>
179
-
180
- <div id="method-M000005" class="method-detail">
181
- <a name="M000005"></a>
182
-
183
- <div class="method-heading">
184
- <a href="Client.src/M000005.html" target="Code" class="method-signature"
185
- onclick="popupCode('Client.src/M000005.html');return false;">
186
- <span class="method-name">databases</span><span class="method-args">() {|Database.new( :db_info =&gt; value, :daap =&gt; self )| ...}</span>
187
- </a>
188
- </div>
189
-
190
- <div class="method-description">
191
- <p>
192
- Returns the databases found on the iTunes server.
193
- </p>
194
- </div>
195
- </div>
196
-
197
- <div id="method-M000006" class="method-detail">
198
- <a name="M000006"></a>
199
-
200
- <div class="method-heading">
201
- <a href="Client.src/M000006.html" target="Code" class="method-signature"
202
- onclick="popupCode('Client.src/M000006.html');return false;">
203
- <span class="method-name">do_get</span><span class="method-args">(request)</span>
204
- </a>
205
- </div>
206
-
207
- <div class="method-description">
208
- </div>
209
- </div>
210
-
211
- <div id="method-M000007" class="method-detail">
212
- <a name="M000007"></a>
213
-
214
- <div class="method-heading">
215
- <a href="Client.src/M000007.html" target="Code" class="method-signature"
216
- onclick="popupCode('Client.src/M000007.html');return false;">
217
- <span class="method-name">get_song</span><span class="method-args">(request)</span>
218
- </a>
219
- </div>
220
-
221
- <div class="method-description">
222
- </div>
223
- </div>
224
-
225
- <div id="method-M000008" class="method-detail">
226
- <a name="M000008"></a>
227
-
228
- <div class="method-heading">
229
- <a href="Client.src/M000008.html" target="Code" class="method-signature"
230
- onclick="popupCode('Client.src/M000008.html');return false;">
231
- <span class="method-name">unpack_listing</span><span class="method-args">(listing) {|record| ...}</span>
232
- </a>
233
- </div>
234
-
235
- <div class="method-description">
236
- </div>
237
- </div>
238
-
239
-
240
- </div>
241
-
242
-
243
- </div>
244
-
245
-
246
- <div id="validator-badges">
247
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
248
- </div>
249
-
250
- </body>
251
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>new (Net::DAAP::Client)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/net/daap.rb, line 52</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">server_host</span>)
15
- <span class="ruby-ivar">@server_host</span> = <span class="ruby-identifier">server_host</span>
16
- <span class="ruby-ivar">@server_port</span> = <span class="ruby-value">3689</span>
17
- <span class="ruby-ivar">@debug</span> = <span class="ruby-value">0</span>
18
- <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>