mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Rename MasterlistInfo to FileRevision
To reflect that it will soon be used to provide info for other version-controlled files. Also rename its revision_id and revision_date fields to remove the revision_ prefixes.
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#include "loot/metadata/group.h"
|
||||
#include "loot/metadata/message.h"
|
||||
#include "loot/metadata/plugin_metadata.h"
|
||||
#include "loot/struct/masterlist_info.h"
|
||||
#include "loot/struct/file_revision.h"
|
||||
#include "loot/struct/simple_message.h"
|
||||
|
||||
namespace loot {
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
* character hash will be outputted.
|
||||
* @returns The revision data.
|
||||
*/
|
||||
virtual MasterlistInfo GetMasterlistRevision(
|
||||
virtual FileRevision GetMasterlistRevision(
|
||||
const std::filesystem::path& masterlist_path,
|
||||
const bool get_short_id) const = 0;
|
||||
|
||||
|
||||
@@ -21,33 +21,32 @@
|
||||
along with LOOT. If not, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef LOOT_MASTERLIST_INFO
|
||||
#define LOOT_MASTERLIST_INFO
|
||||
#ifndef LOOT_FILE_REVISION
|
||||
#define LOOT_FILE_REVISION
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace loot {
|
||||
/**
|
||||
* @brief A structure that holds data about a masterlist's source control
|
||||
* revision.
|
||||
* @brief A structure that holds data about a file's source control revision.
|
||||
*/
|
||||
struct MasterlistInfo {
|
||||
inline explicit MasterlistInfo() : is_modified(false) {}
|
||||
struct FileRevision {
|
||||
inline explicit FileRevision() : is_modified(false) {}
|
||||
|
||||
/**
|
||||
* @brief The revision hash for the masterlist.
|
||||
* @brief The revision hash for the file.
|
||||
*/
|
||||
std::string revision_id;
|
||||
std::string id;
|
||||
|
||||
/**
|
||||
* @brief A pointer to a string containing the ISO 8601 formatted revision
|
||||
* date, ie. YYYY-MM-DD.
|
||||
* @brief A string containing the ISO 8601 formatted revision date, ie.
|
||||
* YYYY-MM-DD.
|
||||
*/
|
||||
std::string revision_date;
|
||||
std::string date;
|
||||
|
||||
/**
|
||||
* @brief `true` if the masterlist has been edited since the outputted
|
||||
* revision, or `false` if it is at exactly the revision given.
|
||||
* @brief `true` if the file has been edited since the revision identified by
|
||||
* `id`, or `false` if it is at exactly the revision given.
|
||||
*/
|
||||
bool is_modified;
|
||||
};
|
||||
Reference in New Issue
Block a user