From b1c2ba9a2ae316c691830f5387046ead54d263aa Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Tue, 10 May 2016 19:32:45 +0200 Subject: [PATCH] Add docstrings --- include/analysis.h | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/include/analysis.h b/include/analysis.h index f8b5bfb..741591c 100644 --- a/include/analysis.h +++ b/include/analysis.h @@ -4,13 +4,26 @@ #include /** - * 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); /** - * 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( sqlite3* dbh, @@ -21,15 +34,20 @@ int _parse_music_helper( /** * Rescan errored files * - * @param db_path Path to the db file to use. - * @param base_path Root directory of the MPD library. + * @param[in] db_path Path to the db file to use. + * @param[in] base_path Root directory of the MPD library. + * * @return 0 on success. Non-zero otherwise. */ 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);