aboutsummaryrefslogtreecommitdiffstats
path: root/src/activitypub/apobject.cpp
blob: 28d01b4377a009d1a9e5927d8f69e91bab6292e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "apobject.h"
#include "apbase.h"

APObject::APObject() {}

APObject::APObject(const QString& url) {
    load_object_url(url);
}

void APObject::load_object_url(const QString& url) {
    object_url = url;
    // TODO: retrieve URL to build APObject.
    // is it possible to change an object/class from one class type to another? (yeah, i can find a way with a member pointer of type APObject* that points to the right child class and have get_html_render call its get_html_render method when it's time to render)
    // retriveving would have to be done async and disk/memory cache will have to be checked
}

const QString APObject::get_object_url() {
    return object_url;
}

QString APObject::get_html_render(HtmlRenderDetails render_info) {
    return QString("<i>Note:</i> object (%1) isn't ready to be rendered as it hasn't been retrieved and built.").arg(object_url);
}