Commit Graph

13 Commits

Author SHA1 Message Date
Bryan Schumaker 5bc357be18 libsaria: Remove operator[] for strings
Public member variables is easier.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker d79eefc8b2 libsaria: Remove operator[] for uint values
Public access to variables is easier.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 29718ceb12 libsaria: Remove operator[] for int values
Public access to these variables is easier.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 56dd54f114 libsaria: Remove operator[] for Track.banned
Public access to this variable is simpler and probably more efficient.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 36e9995bb9 libsaria: Use vectors to store the track list
For each library path, I replace the linked list with a vector allowing
me to easily index into the list to find tracks.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 0a4e4d9085 libsaria: Use [] to access track string properties
This finishes the job I started in the last commit.  Once again, I use
an enum of string properties to determine the right field to return.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-10-31 17:42:57 -04:00
Bryan Schumaker a606830f7b libsaria: Use [] to access track properties (not string)
Rathen than using a bunch of get_PROPERTY_NAME() functions, I think it's
cleaner to use dictionary-like indexing to access properties.  This
patch converts most track access functions, but I haven't gotten around
to strings yet.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-10-31 17:29:12 -04:00
Bryan Schumaker 258875bdb8 libsaria: Move header files out of include/libsaria/
Ocarina no longer has a header file subdirectory so there is no reason
to have a libsaria subdirectory anymore.  Putting header files directly
in the include/ directory is a bit simpler.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-09-12 08:15:31 -04:00
Bryan Schumaker 6bb3cd38a4 libsaria: Notify playlist renderers when new tracks are added
For sets, I keep a sorted list and merge-sort the new songs.  I also
created insert_prepare() and insert_done() functions to tell the UI that
we are about to insert (this gives me a chance to call the
freeze_child_notify() and thaw_child_notify() in GTK).

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:16 -04:00
Bryan Schumaker 6d709e3a18 libsaria: Add sorted songs to the Set playlist
I sort the subset of tracks to be added, and then use insertion sort to
add them to the playlist object.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:16 -04:00
Bryan Schumaker a944869093 libsaria: Clean out the Track class for re-implementation
This also removed the other `typedef sid_t` left in the header file.
I'll re-add in functions and variables as I need them, and hopefully
keep things working more efficiently.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:16 -04:00
Bryan Schumaker 1933689d4f Added copyright lines to everything
I probably should have done this earlier... oh well

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-19 17:17:24 -05:00
Bryan Schumaker 336f188686 libsaria: Sort list using comparison operator
It makes sense to define a function for sorting tracks as part of the
track class, rather than having to implement it externally.
2011-12-28 22:03:43 -05:00