summaryrefslogtreecommitdiffstats
blob: 288f28f2d48b5e8ff54aa8340a87d834b6963414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 * Copyright (c) 2018 Isode Limited.
 * All rights reserved.
 * See the COPYING file for more information.
 */

#include <Swiften/Elements/ReferencePayload.h>

namespace Swift {

ReferencePayload::ReferencePayload()
    : type_(Type::Data) {
}

const ReferencePayload::Type& ReferencePayload::getType() const {
    return type_;
}

void ReferencePayload::setType(const ReferencePayload::Type& type) {
    type_ = type;
}

const boost::optional<std::string>& ReferencePayload::getUri() const {
    return uri_;
}

void ReferencePayload::setUri(const boost::optional<std::string>& uri) {
    uri_ = uri;
}

const boost::optional<std::string>& ReferencePayload::getBegin() const {
    return begin_;
}

void ReferencePayload::setBegin(const boost::optional<std::string>& begin) {
    begin_ = begin;
}

const boost::optional<std::string>& ReferencePayload::getEnd() const {
    return end_;
}

void ReferencePayload::setEnd(const boost::optional<std::string>& end) {
    end_ = end;
}

const boost::optional<std::string>& ReferencePayload::getAnchor() const {
    return anchor_;
}

void ReferencePayload::setAnchor(const boost::optional<std::string>& anchor) {
    anchor_ = anchor;
}

const std::vector<std::shared_ptr<Payload>>& ReferencePayload::getPayloads() const {
    return payloads_;
}

void ReferencePayload::addPayload(const std::shared_ptr<Payload>& payload) {
    payloads_.push_back(payload);
}

}