Add docstrings

This commit is contained in:
Lucas Verney 2016-05-10 19:32:45 +02:00
parent 9eb748fd60
commit b1c2ba9a2a
1 changed files with 23 additions and 5 deletions

View File

@ -4,13 +4,26 @@
#include <sqlite3.h> #include <sqlite3.h>
/** /**
* TODO * Initialize the SQLite3 database used to store songs data and distances.
*
* @param[out] data_folder Folder in which the data will be
* stored.
* @param[out] db_path Full path to the database.
*
* @return 0 on success. Non-zero otherwise.
*/ */
int _init_db(char* data_folder, char* db_path); int _init_db(char* data_folder, char* db_path);
/** /**
* TODO * Analyze a song and store result in database.
*
* @param[in] dbh SQLite3 database handler.
* @param[in] base_path Base path of your music library.
* @param[in] song_uri Relative path of the song to
* analyze, from the base_path.
*
* @return 0 on success. Non-zero otherwise.
*/ */
int _parse_music_helper( int _parse_music_helper(
sqlite3* dbh, sqlite3* dbh,
@ -21,15 +34,20 @@ int _parse_music_helper(
/** /**
* Rescan errored files * Rescan errored files
* *
* @param db_path Path to the db file to use. * @param[in] db_path Path to the db file to use.
* @param base_path Root directory of the MPD library. * @param[in] base_path Root directory of the MPD library.
*
* @return 0 on success. Non-zero otherwise. * @return 0 on success. Non-zero otherwise.
*/ */
int _rescan_errored(const char *db_path, const char *base_path); int _rescan_errored(const char *db_path, const char *base_path);
/** /**
* TODO * Purge everything from the database.
*
* @param[in] db_path Path to the db file to use.
*
* @return 0 on success. Non-zero otherwise.
*/ */
int _purge_db(const char* db_path); int _purge_db(const char* db_path);