summaryrefslogtreecommitdiffstats
path: root/fbreader/src/network/opds/OPDSMetadata.cpp
blob: 6595e050567ce6ac53ee6e66d8a9a34b064b4c1b (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
 * Copyright (C) 2009-2012 Geometer Plus <[email protected]>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA.
 */

#include "OPDSMetadata.h"

// Feed level
const std::string OPDSConstants::REL_BOOKSHELF = "http://data.fbreader.org/rel/bookshelf";
const std::string OPDSConstants::REL_RECOMMENDATIONS = "http://data.fbreader.org/rel/recommendations";

//const std::string OPDSConstants::REL_SUBSCRIPTIONS = "http://opds-spec.org/subscriptions";

const std::string OPDSConstants::REL_CATALOG_AUTHOR = "http://data.fbreader.org/catalog/author";
const std::string OPDSConstants::REL_ACQUISITION  = "http://opds-spec.org/acquisition";
const std::string OPDSConstants::REL_ACQUISITION_OPEN = "http://opds-spec.org/acquisition/open-access";
const std::string OPDSConstants::REL_ACQUISITION_BUY = "http://opds-spec.org/acquisition/buy";
//const std::string OPDSConstants::REL_ACQUISITION_BORROW = "http://opds-spec.org/acquisition/borrow";
//const std::string OPDSConstants::REL_ACQUISITION_SUBSCRIBE = "http://opds-spec.org/acquisition/subscribe";
const std::string OPDSConstants::REL_ACQUISITION_SAMPLE = "http://opds-spec.org/acquisition/sample";
const std::string OPDSConstants::REL_ACQUISITION_CONDITIONAL = "http://data.fbreader.org/acquisition/conditional";
const std::string OPDSConstants::REL_ACQUISITION_SAMPLE_OR_FULL = "http://data.fbreader.org/acquisition/sampleOrFull";

// Entry level / other
const std::string OPDSConstants::REL_IMAGE_PREFIX = "http://opds-spec.org/image";
//const std::string OPDSConstants::REL_IMAGE = "http://opds-spec.org/image";
const std::string OPDSConstants::REL_IMAGE_THUMBNAIL = "http://opds-spec.org/image/thumbnail";
// FIXME: This relations have been removed from OPDS-1.0 standard. Use RelationAlias instead???
const std::string OPDSConstants::REL_COVER = "http://opds-spec.org/cover";
const std::string OPDSConstants::REL_THUMBNAIL = "http://opds-spec.org/thumbnail";

// Entry level / OPDS Link Relations
const std::string OPDSConstants::REL_LINK_SIGN_IN = "http://data.fbreader.org/catalog/sign-in";
const std::string OPDSConstants::REL_LINK_SIGN_OUT = "http://data.fbreader.org/catalog/sign-out";
const std::string OPDSConstants::REL_LINK_SIGN_UP = "http://data.fbreader.org/catalog/sign-up";
const std::string OPDSConstants::REL_LINK_TOPUP = "http://data.fbreader.org/catalog/refill-account";
const std::string OPDSConstants::REL_LINK_RECOVER_PASSWORD = "http://data.fbreader.org/catalog/recover-password";

DCDate::DCDate() :
	ATOMDateConstruct(0) {
}

DCDate::DCDate(int year) :
	ATOMDateConstruct(year) {
}

DCDate::DCDate(int year, int month, int day) :
	ATOMDateConstruct(year, month, day) {
}

DCDate::DCDate(int year, int month, int day, int hour, int minutes, int seconds) :
	ATOMDateConstruct(year, month, day, hour, minutes, seconds) {
}

DCDate::DCDate(int year, int month, int day, int hour, int minutes, int seconds, float sfract) :
	ATOMDateConstruct(year, month, day, hour, minutes, seconds, sfract) {
}

DCDate::DCDate(int year, int month, int day, int hour, int minutes, int seconds, float sfract, int tzhour, int tzminutes) :
	ATOMDateConstruct(year, month, day, hour, minutes, seconds, sfract, tzhour, tzminutes) {
}

OPDSEntry::OPDSEntry() {
}

OPDSEntry::OPDSEntry(shared_ptr<ATOMId> id, const std::string &title, shared_ptr<ATOMUpdated> updated) :
	ATOMEntry(id, title, updated) {
}

OPDSFeedMetadata::OPDSFeedMetadata() : myOpensearchTotalResults(0), myOpensearchItemsPerPage(0), myOpensearchStartIndex(1) {
}

OPDSFeedMetadata::OPDSFeedMetadata(shared_ptr<ATOMId> id, const std::string &title, shared_ptr<ATOMUpdated> updated) :
	ATOMFeedMetadata(id, title, updated), myOpensearchTotalResults(0), myOpensearchItemsPerPage(0), myOpensearchStartIndex(1) {
}