Ampache
[ class tree: Ampache ] [ index: Ampache ] [ all elements ]

Class: Localplay

Source Location: /lib/class/localplay.class.php

Class Overview




Variables

Methods



Class Details

[line 22]


[ Top ]


Class Variables

$type =

[line 25]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


static method get_controllers [line 140]

static void get_controllers( )

get_controllers

This returns the controllers that are currently loaded into this instance




Tags:

access:  public


[ Top ]

static method is_enabled [line 173]

static void is_enabled( $controller)

is_enabled

This returns true or false depending on if the specified controller is currently enabled




Tags:

access:  public


Parameters:

   $controller  

[ Top ]

constructor __construct [line 39]

Localplay __construct( $type)

Constructor

This must be called with a localplay type, it then loads the config file for the specified type and attempts to load in the function map, the preferences and the template




Tags:

access:  public


Parameters:

   $type  

[ Top ]

method add [line 270]

void add( $object)

add This function takes a single object and then passes it to to the player, this is a required function.



Tags:

access:  public


Parameters:

   $object  

[ Top ]

method add_instance [line 558]

void add_instance( $data)

add_instance

This adds a new instance for the current controller type




Tags:

access:  public


Parameters:

   $data  

[ Top ]

method add_url [line 286]

void add_url( $urls)

add_url

This directly adds an array of URLs to the localplay module. This is really how I should have done add, will migrate to this eventually




Tags:

access:  public


Parameters:

   $urls  

[ Top ]

method connect [line 222]

void connect( )

connect

This function attempts to connect to the localplay player that we are using




Tags:

access:  public


[ Top ]

method current_instance [line 522]

void current_instance( )

current_instance

This returns the UID of the current Instance




Tags:

access:  public


[ Top ]

method delete_all [line 606]

void delete_all( )

delete_all

This removes every song from the players playlist as defined by the delete_all function map




Tags:

access:  public


[ Top ]

method delete_instance [line 568]

void delete_instance( $instance_uid)

delete_instance

This removes an instance (it actually calls the players function)




Tags:

access:  public


Parameters:

   $instance_uid  

[ Top ]

method delete_track [line 589]

void delete_track( $object_id)

delete_track

This removes songs from the players playlist it takes a single ID as provided by the get command




Tags:

access:  public


Parameters:

   $object_id  

[ Top ]

method format [line 81]

void format( )

format

This makes the localplay/plugin information human readable




Tags:

access:  public


[ Top ]

method format_name [line 128]

void format_name( $name, $id)

format_name

This function takes the track name and checks to see if 'skip' is supported in the current player, if so it returns a 'skip to' link, otherwise it returns just the text




Tags:

access:  public


Parameters:

   $name  
   $id  

[ Top ]

method get [line 358]

void get( )

get

This calls the get function of the player and then returns the array of current songs for display or whatever an empty array is passed on failure




Tags:

access:  public


[ Top ]

method get_instance [line 534]

void get_instance( $uid)

get_instance

This returns the specified instance




Tags:

access:  public


Parameters:

   $uid  

[ Top ]

method get_instances [line 510]

void get_instances( )

get_instances

This returns the instances of the current type




Tags:

access:  public


[ Top ]

method get_instance_fields [line 622]

void get_instance_fields( )

get_instance_fields

This loads the fields from the localplay player and returns them




Tags:

access:  public


[ Top ]

method get_user_playing [line 659]

void get_user_playing( )

get_user_playing

This attempts to return a nice user friendly currently playing string




Tags:

access:  public


[ Top ]

method get_user_state [line 635]

void get_user_state( $state)

get_user_state

This function returns a user friendly version of the current player state




Tags:

access:  public


Parameters:

   $state  

[ Top ]

method install [line 189]

void install( )

install

This runs the install for the localplay controller we've currently got pimped out




Tags:

access:  public


[ Top ]

method next [line 462]

void next( )

next

This isn't a required function, it tells the daemon to go to the next song




Tags:

access:  public


[ Top ]

method pause [line 495]

void pause( )

pause

This isn't a required function, it tells the daemon to pause the song




Tags:

access:  public


[ Top ]

method play [line 238]

void play( )

play

This function passes NULL and calls the play function of the player object




Tags:

access:  public


[ Top ]

method player_loaded [line 65]

void player_loaded( )

player_loaded

This returns true / false if the player load failed / worked




Tags:

access:  public


[ Top ]

method prev [line 478]

void prev( )

prev

This isn't a required function, it tells the daemon to go the the previous song




Tags:

access:  public


[ Top ]

method random [line 322]

void random( $state)

random

This turns on the random feature of a localplay method It takes a 0/1 value




Tags:

access:  public


Parameters:

   $state  

[ Top ]

method repeat [line 305]

void repeat( $state)

repeat

This turns the repeat feature of a localplay method on or off, takes a 0/1 value




Tags:

access:  public


Parameters:

   $state  

[ Top ]

method set_active_instance [line 578]

void set_active_instance( $instance)

set_active_instance

This sets the active instance of the localplay controller




Tags:

access:  public


Parameters:

   $instance  

[ Top ]

method skip [line 446]

void skip( $track_id)

skip

This isn't a required function, it tells the daemon to skip to the specified song




Tags:

access:  public


Parameters:

   $track_id  

[ Top ]

method status [line 339]

void status( )

status

This returns current information about the state of the player There is an expected array format




Tags:

access:  public


[ Top ]

method stop [line 254]

void stop( )

stop

This functions passes NULl and calls the stop function of the player object, it should recieve a true/false boolean value




Tags:

access:  public


[ Top ]

method uninstall [line 203]

void uninstall( )

uninstall

This runs the uninstall for the localplay controller we've currently pimped out




Tags:

access:  public


[ Top ]

method update_instance [line 546]

void update_instance( $uid, $data)

update_instance

This updates the specified instance with a named array of data (_POST most likely)




Tags:

access:  public


Parameters:

   $uid  
   $data  

[ Top ]

method volume_down [line 415]

void volume_down( )

volume_down This function isn't required. It tells the daemon to decrese the volume by a pre-defined amount controlled by the controller.



Tags:

access:  public


[ Top ]

method volume_mute [line 431]

void volume_mute( )

volume_mute

This function isn't required, It tells the daemon to mute all output It's up to the controller to decide what that actually entails




Tags:

access:  public


[ Top ]

method volume_set [line 377]

void volume_set( $value)

volume_set

This isn't a required function, it sets the volume to a specified value as passed in the variable it is a 0 - 100 scale the controller is responsible for adjusting the scale if nessecary




Tags:

access:  public


Parameters:

   $value  

[ Top ]

method volume_up [line 399]

void volume_up( )

volume_up

This function isn't required. It tells the daemon to increase the volume by a pre-defined amount controlled by the controller




Tags:

access:  public


[ Top ]


Documentation generated on Thu, 12 Feb 2009 08:00:00 +0900 by phpDocumentor 1.4.2