diff options
-rw-r--r-- | src/archive_parser.cpp | 8 | ||||
-rw-r--r-- | src/archive_parser.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/archive_parser.cpp b/src/archive_parser.cpp index f8b9179..77d3ec0 100644 --- a/src/archive_parser.cpp +++ b/src/archive_parser.cpp @@ -59,7 +59,7 @@ Archive::~Archive() { delete outbox_items; outbox_items = nullptr; } -bool is_status_type_allowed(StatusType status_type, ViewStatusTypes allowed_types) { +bool Archive::is_status_type_allowed(StatusType status_type, ViewStatusTypes allowed_types) { switch (status_type) { case PUBLIC: return allowed_types.includePublic; case UNLISTED: return allowed_types.includeUnlisted; @@ -71,7 +71,7 @@ bool is_status_type_allowed(StatusType status_type, ViewStatusTypes allowed_type } // specific to Mastodon ActivityStreams archives -StatusType get_status_type(QJsonObject obj) { +StatusType Archive::get_status_type(QJsonObject obj) { /* * public: * to: #Public @@ -173,7 +173,7 @@ void Archive::update_status_list(ViewStatusTypes allowed_types, QListWidget *par } } -QStringList get_status_object_list(QJsonObject obj, QString element_name) { +QStringList Archive::get_status_object_list(QJsonObject obj, QString element_name) { QStringList list; if (obj.contains(element_name)) { @@ -186,7 +186,7 @@ QStringList get_status_object_list(QJsonObject obj, QString element_name) { return list; } -QStringList get_status_object_language_list(QJsonObject obj, QString element_name = "contentMap") { +QStringList Archive::get_status_object_language_list(QJsonObject obj, QString element_name = "contentMap") { QStringList list; if (obj.contains(element_name) and obj.value(element_name).isObject()) { diff --git a/src/archive_parser.h b/src/archive_parser.h index d9313ee..c206087 100644 --- a/src/archive_parser.h +++ b/src/archive_parser.h @@ -43,6 +43,10 @@ private: QJsonObject *outbox_json = nullptr; QJsonArray *outbox_items = nullptr; + bool is_status_type_allowed(StatusType status_type, ViewStatusTypes allowed_types); + StatusType get_status_type(QJsonObject obj); + QStringList get_status_object_list(QJsonObject obj, QString element_name) ; + QStringList get_status_object_language_list(QJsonObject obj, QString element_name); std::vector<APAttachmentFields> get_status_attachments_list(QJsonValueRef attachments_ref); void find_attachment_dir(QString example_attachment); }; |