Syndication Library
documentsource.h
00001 /* 00002 * This file is part of the syndication library 00003 * 00004 * Copyright (C) 2005 Frank Osterfeld <osterfeld@kde.org> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public License 00017 * along with this library; see the file COPYING.LIB. If not, write to 00018 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 * Boston, MA 02110-1301, USA. 00020 * 00021 */ 00022 00023 #ifndef SYNDICATION_DOCUMENTSOURCE_H 00024 #define SYNDICATION_DOCUMENTSOURCE_H 00025 00026 #include <QString> 00027 #include <boost/shared_ptr.hpp> 00028 00029 #include "ksyndication_export.h" 00030 00031 class QByteArray; 00032 class QDomDocument; 00033 00034 namespace Syndication { 00035 00050 class SYNDICATION_EXPORT DocumentSource 00051 { 00052 public: 00053 00058 DocumentSource(); 00059 00066 DocumentSource(const QByteArray& source, const QString& url); 00067 00074 DocumentSource(const DocumentSource& other); 00075 00079 ~DocumentSource(); 00080 00088 DocumentSource& operator=(const DocumentSource& other); 00089 00095 QByteArray asByteArray() const; 00096 00103 unsigned int size() const; 00104 00114 unsigned int hash() const; 00115 00127 QDomDocument asDomDocument() const; 00128 00132 QString url() const; 00133 00134 private: 00135 00136 class DocumentSourcePrivate; 00137 boost::shared_ptr<DocumentSourcePrivate> d; 00138 }; 00139 00140 } // namespace Syndication 00141 00142 #endif // SYNDICATION_DOCUMENTSOURCE_H