From 80a658f062328ab8b47dc6b2557d274f51278b3a Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Tue, 12 Sep 2023 10:08:19 -0400 Subject: Define archive item ref type for Archive classes This type allows extension and the implementation of a more complete archive item reference system in the future as it allows going beyond ints. --- src/archive/base_archive.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/archive/base_archive.h') diff --git a/src/archive/base_archive.h b/src/archive/base_archive.h index a6bf98f..7d52cd5 100644 --- a/src/archive/base_archive.h +++ b/src/archive/base_archive.h @@ -22,6 +22,8 @@ public: JsonNotActivityStream // for ActivityPub archives }; + typedef int ArchiveItemRef; + struct Hinting_t { StatusType status_type = UNKNOWN; }; @@ -32,9 +34,8 @@ public: static Archive* create_archive(ArchiveType archive_type, const QString& main_filename); virtual void update_status_list(ViewStatusTypes allowed_types, QListWidget *parent) = 0; - // TODO: use a index type instead of a bare int as the former can be extended - virtual APActivity* get_activity(int index, Hinting_t hinting) = 0; - virtual const QString get_html_status_text(int status_index) = 0; + virtual APActivity* get_activity(ArchiveItemRef index, Hinting_t hinting) = 0; + virtual const QString get_html_status_text(ArchiveItemRef status_index) = 0; virtual const QString get_instance_address(); protected: -- cgit v1.2.3-54-g00ecf