Commit Graph

738 Commits

Author SHA1 Message Date
Anna Schumaker 2d9d87afc9 Album: Move Album tag into a new file
Also make it inherit from the GenericTag base class.  Also also, add a
unit test specific to Album tags.  Finally, I remove the corresponding
section of the DESIGN file since it is no longer needed.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:49 -05:00
Anna Schumaker a9fc53964c Artist: The ArtistTag should inherit from GenericTag
The GenericTag class provides most of the implementation, so use it!

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-03 13:03:11 -05:00
Anna Schumaker fb4f523206 GenericTag: Create a generic tag that other tag classes can use
This implements the basics so I don't need to keep reimplementing
everything.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-03 13:03:10 -05:00
Anna Schumaker b3d904c128 Artist: Move artist tag code into a new directory
core/tags.cpp was WAY too big, so I moved this code into a new file in
its own directory.  I also created a new unit test just for testing the
Artist tag.

This patch disables the "tags" test since it conflicts with the
tests/core/tags/ directory.  This is okay because the tagdb is gradually
being phased out!

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-03 13:02:49 -05:00
Anna Schumaker 2a65fe8db0 Filter: Add more detailed documentation
Also remove the corresponding section of the DESIGN file.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-11-08 11:26:04 -05:00
Anna Schumaker 158c0acf60 Index: Add more detailed documentation
This lets me remove this section of the DESIGN file.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-11-07 08:14:27 -05:00
Anna Schumaker 2b71ecbeca IndexEntry: Make _values private
I don't want anybody outside of the IndexEntry class to modify the
values in this container.  This patch makes it private and provides
iterator access instead.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-11-06 09:03:51 -05:00
Anna Schumaker e89941af31 IndexEntry: Write more detailed documentation
In addition to documentation updates, I also solve a few warnings that
Doxygen gives me.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-11-04 08:30:54 -05:00
Anna Schumaker 48b25945cc DatabaseEntry: Rename id to _index (and make it private)
This variable should only be set by the Database when a DatabaseItem is
first created.  This means I should hide _index from the rest of the
world to prevent accidental modifications.  I also add an accessor
function for other code that needs to read _index.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-11-02 10:25:41 -05:00
Anna Schumaker 47f6684923 file: Update documentation and various cleanups
I add more detailed documentation matching what was in my DESIGN file.
In addition, I also prefix private File members with an underscore like
I do in other Ocarina classes.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-11-01 21:56:59 -04:00
Anna Schumaker c19985fc7e tags: Add doxygen documentation
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-10-20 21:38:16 -04:00
Anna Schumaker 3d00a83b6a driver: Add doxygen documentation
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-10-20 21:38:09 -04:00
Anna Schumaker 9a5549a264 database: Add doxygen documentation
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-10-17 17:17:12 -04:00
Anna Schumaker 03e190149e index: Add doxygen documentation
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-10-17 16:49:17 -04:00
Anna Schumaker 59ffd5cbdf idle: Add doxygen documentation.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-10-17 09:56:54 -04:00
Anna Schumaker 5f56118c04 queue: Add doxygen documentation
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-10-17 09:42:45 -04:00
Anna Schumaker 7bde6d98aa file: Add doxygen documentation
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-16 08:22:44 -04:00
Anna Schumaker 0626141f7f filter: Add doxygen comments
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-16 08:09:40 -04:00
Anna Schumaker 73264e04ce playlist: Add doxygen comments.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-15 08:27:03 -04:00
Anna Schumaker d0fd103504 library: Add doxygen comments.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-13 10:39:30 -04:00
Anna Schumaker b68198028e deck: Add doxygen comments to deck.h
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-13 10:26:28 -04:00
Anna Schumaker ad48ac7d16 random: Add doxygen information
I updated the Doxyfile to extract static inline functions.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-13 10:00:03 -04:00
Anna Schumaker 97c6c836d3 Add doxygen documentation for callbacks.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-12 16:37:28 -04:00
Anna Schumaker 0a9c6d296b Add doxygen documentation for audio.h, core.h, and version.h
I want to have all of Ocarina documented in the code, rather than in a
difficult-to-maintain DESIGN file.  Let's get going on that!

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-12 16:36:46 -04:00
Anna Schumaker 5c2bd9231d core: Remove on_play() callback
It has no users anymore.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:01:08 -04:00
Anna Schumaker 1a6b6d9c54 audio: Remove the on_play() callback
There are no more users of this function.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-08 17:26:21 -04:00
Anna Schumaker 412dc67e1f Merge branch 'master' into Ocarina-next
Conflicts:
	Sconstruct
	gui/collection_mgr.cpp
2014-08-19 08:08:55 -04:00
Anna Schumaker 8fd5d8173e filter: Clear the result set before filtering
Ocarina was preserving the results set even if there were 0 search
results for the entire search string.  So a search for "walllllll" would
still return results for "wall".

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-08-12 10:23:33 -04:00
Anna Schumaker be72339b2d filter: Check for empty results when filtering
The user could search for a term that isn't stored in the filter index.
This is represented through a NULL pointer returned from the
Index.find() function.  Let's check this pointer before attempting to
dereference it ...

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-08-12 09:59:00 -04:00
Anna Schumaker b516afe832 core: Create a single init() function
Initialize everything from the core/ layer, that way lib/ doesn't need
to know the correct order.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-29 10:36:55 -04:00
Anna Schumaker e274d6399b tags: Fix when library->count is modified
Whenever a Track is destructed, library->count is decremented.  This
means that even if tagging fails we need to increment library->count to
keep this value consistent.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-22 12:59:27 -04:00
Anna Schumaker a74eaaffa6 tags: Check that a Track was tagged correctly
Without this check we could end up creating a Track for a .ini file or
some other non-audio file.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-22 12:35:08 -04:00
Anna Schumaker 5df79d3c08 callbacks: Remove unused queue callback
I now mimic the effects of the "changed" callback with inheritance.
This makes for a cleaner implementation.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-06 14:46:54 -04:00
Anna Schumaker 70254e7aa1 Remove error.h
It's not used by anything anymore.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-06 09:40:14 -04:00
Anna Schumaker bd11a320e3 tags: Correctly find the next iterator location
We need to use Database::next() rather than it++ to skip over deleted
tracks.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-06 09:21:30 -04:00
Anna Schumaker 00ff9cd08f playlist: Fix a null pointer dereference in init()
This happens if we try to use the Banned playlist before it exists in
the database.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-06 08:21:56 -04:00
Anna Schumaker 9e3399b619 deck: Reintroduce deck :: get()
This function turned out to be really useful for the gui.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-05 11:05:19 -04:00
Anna Schumaker 95064e4537 Rename lib/ -> core/
I plan to introduce a new lib/ that sits between the gui and the backend
files (similar to how glibc sits between the kernel and userspace).
This gets the rename out of the way before I change my mind again.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-05 10:21:32 -04:00