diff options
author | ConfuSomu | 2023-07-18 00:12:58 +0200 |
---|---|---|
committer | ConfuSomu | 2023-07-18 00:12:58 +0200 |
commit | cdd08523b9af7afda906766d22197a066c9264f3 (patch) | |
tree | 4944566510ad446d49dbab8cb34d95a820d03881 | |
parent | 5ed7d9b53a65aec1f4793f62ac15195c44224b39 (diff) | |
download | ActorViewer-cdd08523b9af7afda906766d22197a066c9264f3.tar ActorViewer-cdd08523b9af7afda906766d22197a066c9264f3.tar.gz ActorViewer-cdd08523b9af7afda906766d22197a066c9264f3.zip |
Move APAttachmentFields to fields.h
Finish consolidating every AP…Field in one file to avoid circular
include dependencies which are very hard/impossible to work with.
-rw-r--r-- | src/activitypub/apattachment.h | 8 | ||||
-rw-r--r-- | src/activitypub/fields.h | 8 | ||||
-rw-r--r-- | src/archive_parser.cpp | 1 | ||||
-rw-r--r-- | src/archive_parser.h | 2 |
4 files changed, 10 insertions, 9 deletions
diff --git a/src/activitypub/apattachment.h b/src/activitypub/apattachment.h index c8cdda0..ff40dc3 100644 --- a/src/activitypub/apattachment.h +++ b/src/activitypub/apattachment.h @@ -1,16 +1,10 @@ #pragma once #include "apbase.h" +#include "fields.h" #include <array> #include <vector> -struct APAttachmentFields { - QString path; - QString filename; // "nicer" filename - QString media_type; - QString name; -}; - class APAttachment : APBase { public: APAttachment(); diff --git a/src/activitypub/fields.h b/src/activitypub/fields.h index 25ed246..59d3858 100644 --- a/src/activitypub/fields.h +++ b/src/activitypub/fields.h @@ -2,6 +2,7 @@ #include "src/types.h" #include <QString> +#include <QStringList> #include <vector> enum struct APObjectType {NOTE, QUESTION, UNKNOWN}; @@ -20,6 +21,13 @@ struct APQuestionFields { std::vector<Option> poll_options; }; +struct APAttachmentFields { + QString path; + QString filename; // "nicer" filename + QString media_type; + QString name; +}; + struct APObjectFields { QStringList to_actors; // Start APObject QStringList cc_actors; diff --git a/src/archive_parser.cpp b/src/archive_parser.cpp index 8b2289e..ab7f67d 100644 --- a/src/archive_parser.cpp +++ b/src/archive_parser.cpp @@ -2,7 +2,6 @@ #include "src/list_item.h" #include "src/types.h" #include "activitypub/apactivity.h" -#include "activitypub/apattachment.h" #include "activitypub/apobject.h" #include "activitypub/apreblog.h" #include "activitypub/appost.h" diff --git a/src/archive_parser.h b/src/archive_parser.h index 7f41878..162787e 100644 --- a/src/archive_parser.h +++ b/src/archive_parser.h @@ -8,7 +8,7 @@ #include <QDir> #include "types.h" -#include "activitypub/apattachment.h" +#include "activitypub/fields.h" enum ArchiveType { MASTODON |