Class: ItunesController::BaseITunesController Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/itunesController/itunescontroller.rb

Overview

This class is abstract.

This class should be overridden to implement the class that talks to iTunes.

This is the base class of all itunes controller.

Instance Method Summary collapse

Constructor Details

#initializeBaseITunesController

The constructor



29
30
# File 'lib/itunesController/itunescontroller.rb', line 29

def initialize()
end

Instance Method Details

#addFilesToLibrary(files) ⇒ Array[ItunesController::Track]

This method is abstract.

Must be overridden

Used to add a list of files to the itunes library

Parameters:

  • A (Array[String])

    list of files to add to the itunes library

Returns:



50
51
52
# File 'lib/itunesController/itunescontroller.rb', line 50

def addFilesToLibrary(files)
    raise "ERROR: Your trying to instantiate an abstract class"
end

#getTrackCountNumber

This method is abstract.

Must be overridden

Used to find the number of tracks in the library

Returns:

  • (Number)

    The number of tracks



77
78
79
# File 'lib/itunesController/itunescontroller.rb', line 77

def getTrackCount()
    raise "ERROR: Your trying to instantiate an abstract class"
end

#getTrackDatabaseId(track) ⇒ Object

This method is abstract.

Must be overridden

Used to get the database of a itunes track

Parameters:

  • track

    the track

Returns:

  • The database id



85
86
87
# File 'lib/itunesController/itunescontroller.rb', line 85

def getTrackDatabaseId(track)
    raise "ERROR: Your trying to instantiate an abstract class"
end

#getTracks(&b) ⇒ Object

This method is abstract.

Must be overridden



62
63
64
# File 'lib/itunesController/itunescontroller.rb', line 62

def getTracks(&b)
    raise "ERROR: Your trying to instantiate an abstract class"
end

#refreshTracks(tracks) ⇒ Object

This method is abstract.

Must be overridden

Used to tell iTunes to refresh a list of tracks data from the info stored in the files

Parameters:

  • tracks (Array)

    A list of tracks to fresh



57
58
59
# File 'lib/itunesController/itunescontroller.rb', line 57

def refreshTracks(tracks)
    raise "ERROR: Your trying to instantiate an abstract class"
end

#removeTracksFromLibrary(tracks) ⇒ Object

This method is abstract.

Must be overridden

Used to remove tracks from the libaray

Parameters:

  • tracks (Array)

    A list of tracks to remove from the itunes libaray



42
43
44
# File 'lib/itunesController/itunescontroller.rb', line 42

def removeTracksFromLibrary(tracks)
    raise "ERROR: Your trying to instantiate an abstract class"
end

#searchLibrary(term) ⇒ Array

This method is abstract.

Must be overridden

Used to search the itunes library

Parameters:

  • term

    The search term

Returns:

  • (Array)

    a list of iTunes track that match the search term



70
71
72
# File 'lib/itunesController/itunescontroller.rb', line 70

def searchLibrary(term)
    raise "ERROR: Your trying to instantiate an abstract class"
end

#versionString

This method is abstract.

Must be overridden

Used to get the iTunes version

Returns:

  • (String)

    The itunes version



35
36
37
# File 'lib/itunesController/itunescontroller.rb', line 35

def version
    raise "ERROR: Your trying to instantiate an abstract class"
end