diff options
author | Michele Calgaro <[email protected]> | 2024-05-11 21:28:48 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-05-11 21:28:48 +0900 |
commit | 2462d03f322261bd616721c2b2065c4004b36c9c (patch) | |
tree | 239947a0737bb8386703a1497f12c09aebd3080a /fbreader/src/network/opds/OPDSMetadata.cpp | |
download | tde-ebook-reader-2462d03f322261bd616721c2b2065c4004b36c9c.tar.gz tde-ebook-reader-2462d03f322261bd616721c2b2065c4004b36c9c.zip |
Initial import (as is) from Debian Snapshot's 'fbreader' source code (https://snapshot.debian.org/package/fbreader/0.99.4%2Bdfsg-6).
The Debian code is provided under GPL2 license.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'fbreader/src/network/opds/OPDSMetadata.cpp')
-rw-r--r-- | fbreader/src/network/opds/OPDSMetadata.cpp | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/fbreader/src/network/opds/OPDSMetadata.cpp b/fbreader/src/network/opds/OPDSMetadata.cpp new file mode 100644 index 0000000..6595e05 --- /dev/null +++ b/fbreader/src/network/opds/OPDSMetadata.cpp @@ -0,0 +1,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) { +} |