summaryrefslogtreecommitdiff
path: root/libmpd/status.rb
blob: ee14b5f0878730d86d39365472435815d19a1d49 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env ruby
#
#--
# Copyright 2009 David Vazgenovich Shakaryan <dvshakaryan@gmail.com>
# Distributed under the terms of the GNU General Public License v3.
# See http://www.gnu.org/licenses/gpl.txt for the full license text.
#++
#
# *Author*:: David Vazgenovich Shakaryan
# *License*:: GNU General Public License v3

# Collection of methods related to the status.
module MPDStatus
  # Clears the current error message in the status.
  def clearerror
    return send_request('clearerror')
  end

  # Returns information about the current song.
  def current
    return generate_hash(send_request('currentsong'))
  end

  # Returns the status.
  def status
    return generate_hash(send_request('status'))
  end

  # Returns statistics.
  def stats
    return generate_hash(send_request('stats'))
  end
end