aboutsummaryrefslogtreecommitdiffstats
path: root/src/archive/base_archive.h
diff options
context:
space:
mode:
authorConfuSomu2023-09-12 10:08:19 -0400
committerConfuSomu2023-09-12 10:08:19 -0400
commit80a658f062328ab8b47dc6b2557d274f51278b3a (patch)
treeca590656dd14c80bd467031bac4b5d6749006708 /src/archive/base_archive.h
parent40fd76d5b992fb868b44a6f76152655a0408e37b (diff)
downloadActorViewer-80a658f062328ab8b47dc6b2557d274f51278b3a.tar
ActorViewer-80a658f062328ab8b47dc6b2557d274f51278b3a.tar.gz
ActorViewer-80a658f062328ab8b47dc6b2557d274f51278b3a.zip
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.
Diffstat (limited to 'src/archive/base_archive.h')
-rw-r--r--src/archive/base_archive.h7
1 files changed, 4 insertions, 3 deletions
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: