r69973 - in /branches/upstream/libaudio-rpld-perl/current: ChangeLog MANIFEST META.yml debian/ debian/changelog debian/compat debian/control debian/copyright debian/libaudio-rpld-perl.install debian/rules lib/Audio/RPLD.pm

chrisb at users.alioth.debian.org chrisb at users.alioth.debian.org
Sun Feb 27 19:37:12 UTC 2011


Author: chrisb
Date: Sun Feb 27 19:36:59 2011
New Revision: 69973

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=69973
Log:
[svn-upgrade] new version libaudio-rpld-perl (0.003)

Added:
    branches/upstream/libaudio-rpld-perl/current/debian/
    branches/upstream/libaudio-rpld-perl/current/debian/changelog
    branches/upstream/libaudio-rpld-perl/current/debian/compat
    branches/upstream/libaudio-rpld-perl/current/debian/control
    branches/upstream/libaudio-rpld-perl/current/debian/copyright
    branches/upstream/libaudio-rpld-perl/current/debian/libaudio-rpld-perl.install
    branches/upstream/libaudio-rpld-perl/current/debian/rules   (with props)
Modified:
    branches/upstream/libaudio-rpld-perl/current/ChangeLog
    branches/upstream/libaudio-rpld-perl/current/MANIFEST
    branches/upstream/libaudio-rpld-perl/current/META.yml
    branches/upstream/libaudio-rpld-perl/current/lib/Audio/RPLD.pm

Modified: branches/upstream/libaudio-rpld-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-rpld-perl/current/ChangeLog?rev=69973&op=diff
==============================================================================
--- branches/upstream/libaudio-rpld-perl/current/ChangeLog (original)
+++ branches/upstream/libaudio-rpld-perl/current/ChangeLog Sun Feb 27 19:36:59 2011
@@ -1,3 +1,11 @@
+v. 0.1beta2 (0.003) - ?
+	* Fixed typos
+	* Added support for envvar $RPLD_SERVER.
+	* Added info on new EIs (num:, likeness:, random: and randomlike:)
+	* Added support for likeness.
+	* Added support for SETPARENTLIST.
+	* Added support for already connected sockets.
+
 v. 0.1beta1 (0.002) - thu Sep 30 2010 20:56 CEST
 	* fixed small bug in PLE parser
 	* Added support to connect to default server

Modified: branches/upstream/libaudio-rpld-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-rpld-perl/current/MANIFEST?rev=69973&op=diff
==============================================================================
--- branches/upstream/libaudio-rpld-perl/current/MANIFEST (original)
+++ branches/upstream/libaudio-rpld-perl/current/MANIFEST Sun Feb 27 19:36:59 2011
@@ -1,6 +1,12 @@
 AUTHORS
 ChangeLog
 COPYING.gplv3
+debian/changelog
+debian/compat
+debian/control
+debian/copyright
+debian/libaudio-rpld-perl.install
+debian/rules
 inc/Module/Install.pm
 inc/Module/Install/Base.pm
 inc/Module/Install/Can.pm

Modified: branches/upstream/libaudio-rpld-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-rpld-perl/current/META.yml?rev=69973&op=diff
==============================================================================
--- branches/upstream/libaudio-rpld-perl/current/META.yml (original)
+++ branches/upstream/libaudio-rpld-perl/current/META.yml Sun Feb 27 19:36:59 2011
@@ -18,4 +18,4 @@
     - inc
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 0.002
+version: 0.003

Added: branches/upstream/libaudio-rpld-perl/current/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-rpld-perl/current/debian/changelog?rev=69973&op=file
==============================================================================
--- branches/upstream/libaudio-rpld-perl/current/debian/changelog (added)
+++ branches/upstream/libaudio-rpld-perl/current/debian/changelog Sun Feb 27 19:36:59 2011
@@ -1,0 +1,5 @@
+libaudio-rpld-perl (0.1~beta0-1) UNRELEASED; urgency=low
+
+  * Initial release. (Closes: #XXXXXX)
+
+ -- Philipp Schafft <lion at lion.leolix.org>  Fri, 10 Sep 2010 03:05:42 +0200

Added: branches/upstream/libaudio-rpld-perl/current/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-rpld-perl/current/debian/compat?rev=69973&op=file
==============================================================================
--- branches/upstream/libaudio-rpld-perl/current/debian/compat (added)
+++ branches/upstream/libaudio-rpld-perl/current/debian/compat Sun Feb 27 19:36:59 2011
@@ -1,0 +1,1 @@
+4

Added: branches/upstream/libaudio-rpld-perl/current/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-rpld-perl/current/debian/control?rev=69973&op=file
==============================================================================
--- branches/upstream/libaudio-rpld-perl/current/debian/control (added)
+++ branches/upstream/libaudio-rpld-perl/current/debian/control Sun Feb 27 19:36:59 2011
@@ -1,0 +1,20 @@
+Source: libaudio-rpld-perl
+Priority: optional
+Maintainer: Philipp Schafft <lion at lion.leolix.org>
+Uploaders: Patrick Matthäi <pmatthaei at debian.org>
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.9.0
+Section: libs
+Homepage: http://roaraudio.keep-cool.org/
+
+Package: libaudio-rpld-perl
+Architecture: all
+Suggests: roaraudio | roaraudio-server
+Recommends: roarplaylistd
+Depends: ${perl:Depends}, ${misc:Depends}
+Description: Perl module to access the RoarAudio PlayList Daemon
+ This Perl module is to control the RoarAudio PlayList Daemon.
+ The RoarAudio PlayList Daemon is a daemon to manage playlists
+ and play them back using RoarAudio as backend.
+ This module is used to control this daemon from Perl.
+ It provides a simple and clean Object oriented interface.

Added: branches/upstream/libaudio-rpld-perl/current/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-rpld-perl/current/debian/copyright?rev=69973&op=file
==============================================================================
--- branches/upstream/libaudio-rpld-perl/current/debian/copyright (added)
+++ branches/upstream/libaudio-rpld-perl/current/debian/copyright Sun Feb 27 19:36:59 2011
@@ -1,0 +1,1 @@
+FIXME

Added: branches/upstream/libaudio-rpld-perl/current/debian/libaudio-rpld-perl.install
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-rpld-perl/current/debian/libaudio-rpld-perl.install?rev=69973&op=file
==============================================================================
--- branches/upstream/libaudio-rpld-perl/current/debian/libaudio-rpld-perl.install (added)
+++ branches/upstream/libaudio-rpld-perl/current/debian/libaudio-rpld-perl.install Sun Feb 27 19:36:59 2011
@@ -1,0 +1,1 @@
+usr/share/perl5/Audio/RPLD.pm

Added: branches/upstream/libaudio-rpld-perl/current/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-rpld-perl/current/debian/rules?rev=69973&op=file
==============================================================================
--- branches/upstream/libaudio-rpld-perl/current/debian/rules (added)
+++ branches/upstream/libaudio-rpld-perl/current/debian/rules Sun Feb 27 19:36:59 2011
@@ -1,0 +1,55 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	dh_clean
+	rm -rf $(CURDIR)/debian/tmp
+
+install: build
+	dh_testdir
+	dh_testroot
+	#dh_prep
+	mkdir -p $(CURDIR)/debian/tmp/usr/share/perl5/Audio
+	cp lib/Audio/RPLD.pm $(CURDIR)/debian/tmp/usr/share/perl5/Audio/
+
+binary-arch: build install
+
+binary-indep: build install
+	dh_testdir -i
+	dh_testroot -i
+	dh_link -i
+	dh_install -i --list-missing --sourcedir=debian/tmp
+	dh_installdocs -i
+	dh_installchangelogs -i
+	dh_link -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_perl -i
+	dh_shlibdeps -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@uscan --force-download --destdir ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary

Propchange: branches/upstream/libaudio-rpld-perl/current/debian/rules
------------------------------------------------------------------------------
    svn:executable = *

Modified: branches/upstream/libaudio-rpld-perl/current/lib/Audio/RPLD.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-rpld-perl/current/lib/Audio/RPLD.pm?rev=69973&op=diff
==============================================================================
--- branches/upstream/libaudio-rpld-perl/current/lib/Audio/RPLD.pm (original)
+++ branches/upstream/libaudio-rpld-perl/current/lib/Audio/RPLD.pm Sun Feb 27 19:36:59 2011
@@ -1,4 +1,4 @@
-#      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2010
+#      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2011
 #
 #  This file is part of Audio::RPLD,
 #  a library to access the RoarAudio PlayList Daemon from Perl.
@@ -24,7 +24,7 @@
 use strict;
 use vars qw($VERSION @ISA);
 
-$VERSION     = 0.002;
+$VERSION     = 0.003;
 @ISA         = qw();
 
 #use IO::Socket::UNIX;
@@ -95,6 +95,12 @@
 
 Use a INET (IPv4) socket to connect to the server.
 
+=item #SOCKET
+
+Use a already connected socket as connection to the server. This can for example be a object opened
+with a SSL/TLS or proxy module or any other bidirectional IO object. Object is passed
+as $addr parameter.
+
 =item a value of undef
 
 Use Autodetection.
@@ -114,6 +120,10 @@
 
 A volume. If this is an integer the volume is in range 0 to 65535 (recommended). If it's a string and suffixed by a '%' it is in range 0 to 100. A value of zero always means total silence.
 
+=item $likeness
+
+A floating point describing how much the user likes a song.
+
 =item $name
 
 A string of a name of some object.
@@ -164,6 +174,22 @@
 The temp pointer is a pointer for user defined jobs. It is the only pointer which is not global (shared with all clients) but a client local pointer. The application can use it for whatever it wants to use it for.
 
 =back
+
+=item Numerical Index
+
+This is a numerical index of the entry. It's format is num:N where N is the index starting with zero. For example num:0 is the first entry in playlist, num:15 is the 16th entry.
+
+=item Likeness Index
+
+This is like the normal numerical index just uses the likeness values of the entrys. This is hardly of use to the user and mainly for internal use. Syntax is likeness:F with F the floating point index.
+
+=item Random Entry
+
+A Random entry can be selected by using random:[PLI]. PLI is a optional parameter. It musst be the ID of the playlist to select entry from. If no playlist is given the current one is used.
+
+=item Random liked Entry
+
+This is like normal random entry but prioritized by the value set with LIKE and DISLIKE commands. Syntax is: randomlike:[PLI].
 
 =back
 
@@ -224,7 +250,7 @@
 
 =head3 $rpld = Audio::RPLD-E<gt>new([$addr[, $type[, $port]]])
 
-This method creates a new Audio::RPLD object. If arguments are passed they are directly passed to a call to the connect method (see below) in oder to connect to the server. If this fails undef is returned. If no arguments are given you need to connect the object to the server via the connect method later on your own.
+This method creates a new Audio::RPLD object. If arguments are passed they are directly passed to a call to the connect method (see below) in order to connect to the server. If this fails undef is returned. If no arguments are given you need to connect the object to the server via the connect method later on your own.
 
 =cut
 
@@ -237,7 +263,9 @@
  }
 
  unless ( $type ) {
-  if ( $addr =~ m#/# ) {
+  if ( ref($addr) ne '' ) {
+   $type = '#SOCKET';
+  } elsif ( $addr =~ m#/# ) {
    $type = 'UNIX';
   } elsif ( $addr =~ m#::# ) {
    $type = 'DECnet';
@@ -248,7 +276,9 @@
 
  $type = uc($type);
 
- if ( $type eq 'UNIX' ) {
+ if ( $type eq '#SOCKET' ) {
+  $sock = $addr;
+ } elsif ( $type eq 'UNIX' ) {
   require IO::Socket::UNIX;
   import IO::Socket::UNIX;
   $sock = IO::Socket::UNIX->new($addr);
@@ -278,10 +308,17 @@
 sub connect_default {
  my ($e) = @_;
  my $home = $ENV{'HOME'} || $ENV{'HOMEDRIVE'}.$ENV{'HOMEPATH'} || '/NXHOMEDIR';
- my @locations = ($home.'/.rpld', qw(/tmp/.rpld /tmp/rpld /var/run/rpld.sock), '.rpld', 'localhost', '::rpld');
+ my @locations = ($home.'/.rpld', qw(/tmp/.rpld /tmp/rpld /var/run/rpld.sock .rpld localhost ::rpld));
+ my $server;
 
  if ( defined($e->[0]) ) {
   return undef;
+ }
+
+ $server = $ENV{'RPLD_SERVER'};
+
+ if ( defined($server) && length($server) ) {
+  return $e->connect($server);
  }
 
  while (!defined($e->[0]) && scalar(@locations)) {
@@ -554,7 +591,7 @@
  local $_;
 
  #0       1        2     3     4      5         6       7    8                                                                                  9           10
- #unknown=00:00:00=ALBUM=TITLE=ARTIST=PERFORMER=VERSION=FILE=long:0xBED9000000000373/short:0xBE0003AA/uuid:0c26ea9c-5f37-48e3-b338-8895b1a84dfe=0xDISCID/TN=GENRE(GID)
+ #unknown=00:00:00=ALBUM=TITLE=ARTIST=PERFORMER=VERSION=FILE=long:0xBED9000000000373/short:0xBE0003AA/uuid:0c26ea9c-5f37-48e3-b338-8895b1a84dfe=0xDISCID/TN=GENRE(GID)=LIKENESS
 
 # $r->{'raw'} = {'data' => $ple, 'splited' => \@p};
 
@@ -604,6 +641,10 @@
    $r->{'meta'}->{'genre'}       = $1      if $1;
    $r->{'meta'}->{'genreid'}     = hex($2) if $2;
   }
+ }
+
+ if ( defined($p[11]) ) {
+  $r->{'likeness'} = $p[11]+0;
  }
 
  return $r;
@@ -1203,6 +1244,24 @@
 
 =cut
 
+sub setparentlist {
+ my ($e, $pl) = @_;
+ my $r = $_[0]->cmd('SETPARENTLIST', $e->q_pli($pl));
+
+ return undef unless defined($r);
+
+ return $_[0]->is_ok($r);
+}
+
+=pod
+
+=head3 $res = $rpld-E<gt>setparentlist($playlist)
+
+Set the parent playlist of the current playlist.
+Setting parent playlist of a list the current one is currently not supported.
+
+=cut
+
 # -- PLE:
 
 =pod
@@ -1483,7 +1542,57 @@
 
 The UUID for the entry.
 
+=item likeness (optional)
+
+The likeness value stored by the server.
+This is a float in rage from zero to infinity.
+The bigger the value is the more the song is liked.
+
 =back
+
+=cut
+
+sub like {
+ my ($e, $ple, $likeness) = @_;
+ my @q = ('LIKE', $e->q_ple($ple), ($likeness+0 || 1));
+ my $r = $e->cmd(@q);
+
+ return undef unless defined($r);
+
+ return $_[0]->is_ok($r);
+}
+
+=pod
+
+=head3 $res = $rpld-E<gt>like($ple[, $likeness])
+
+Tells the server that the user likes this entry.
+Optionally tells the server how much. A value of +1.0 is the default if no value is given.
+This is added to the likeness value stored by the server.
+A value of zero has no effect. A negative value indecates dislikeness.
+See dislike() for more information about dislikeness.
+
+=cut
+
+sub dislike {
+ my ($e, $ple, $likeness) = @_;
+ my @q = ('DISLIKE', $e->q_ple($ple), $likeness+0 || 1);
+ my $r = $e->cmd(@q);
+
+ return undef unless defined($r);
+
+ return $_[0]->is_ok($r);
+}
+
+=pod
+
+=head3 $res = $rpld-E<gt>dislike($ple[, $likeness])
+
+This is the same as like() just markes a the given entry as disliked.
+Optionally tells the server how much. A value of +1.0 is the default if no value is given.
+The value is subtracted from server's value.
+A value of zero has no effect. A negative value indecates likeness.
+See like() for more information about likeness.
 
 =cut
 




More information about the Pkg-perl-cvs-commits mailing list