/* * Copyright (C) 2009-2012 Geometer Plus * * 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 id, const std::string &title, shared_ptr updated) : ATOMEntry(id, title, updated) { } OPDSFeedMetadata::OPDSFeedMetadata() : myOpensearchTotalResults(0), myOpensearchItemsPerPage(0), myOpensearchStartIndex(1) { } OPDSFeedMetadata::OPDSFeedMetadata(shared_ptr id, const std::string &title, shared_ptr updated) : ATOMFeedMetadata(id, title, updated), myOpensearchTotalResults(0), myOpensearchItemsPerPage(0), myOpensearchStartIndex(1) { }