• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KBlog Client Library

blogmedia.cpp

00001 /*
00002   This file is part of the kblog library.
00003 
00004   Copyright (c) 2006-2007 Christian Weilbach <christian_weilbach@web.de>
00005   Copyright (c) 2007 Mike Arthur <mike@mikearthur.co.uk>
00006 
00007   This library is free software; you can redistribute it and/or
00008   modify it under the terms of the GNU Library General Public
00009   License as published by the Free Software Foundation; either
00010   version 2 of the License, or (at your option) any later version.
00011 
00012   This library is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015   Library General Public License for more details.
00016 
00017   You should have received a copy of the GNU Library General Public License
00018   along with this library; see the file COPYING.LIB.  If not, write to
00019   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020   Boston, MA 02110-1301, USA.
00021 */
00022 
00023 #include "blogmedia.h"
00024 
00025 #include <QByteArray>
00026 #include <QString>
00027 #include <kurl.h>
00028 
00029 namespace KBlog {
00030 
00031 class BlogMediaPrivate
00032 {
00033   public:
00034     BlogMedia *q_ptr;
00035     QString mName;
00036     KUrl mUrl;
00037     QString mMimetype;
00038     QString mError;
00039     QByteArray mData;
00040     BlogMedia::Status mStatus;
00041 };
00042 
00043 BlogMedia::BlogMedia(): d_ptr( new BlogMediaPrivate )
00044 {
00045   d_ptr->q_ptr=this;
00046 }
00047 
00048 BlogMedia::BlogMedia( const BlogMedia &m )
00049   : d_ptr( new BlogMediaPrivate )
00050 {
00051   d_ptr->q_ptr = this;
00052   d_ptr->mName = m.name();
00053   d_ptr->mUrl = m.url();
00054   d_ptr->mMimetype = m.mimetype();
00055   d_ptr->mData = m.data();
00056   d_ptr->mStatus = m.status();
00057   d_ptr->mError = m.error();
00058 }
00059 
00060 BlogMedia::~BlogMedia()
00061 {
00062   delete d_ptr;
00063 }
00064 
00065 QString BlogMedia::name() const
00066 {
00067   return d_ptr->mName;
00068 }
00069 
00070 void BlogMedia::setName( const QString &name )
00071 {
00072   d_ptr->mName = name;
00073 }
00074 
00075 KUrl BlogMedia::url() const
00076 {
00077   return d_ptr->mUrl;
00078 }
00079 
00080 void BlogMedia::setUrl( const KUrl &url )
00081 {
00082   d_ptr->mUrl = url;
00083 }
00084 
00085 QString BlogMedia::mimetype() const
00086 {
00087   return d_ptr->mMimetype;
00088 }
00089 
00090 void BlogMedia::setMimetype( const QString &mimetype )
00091 {
00092   d_ptr->mMimetype = mimetype;
00093 }
00094 
00095 QByteArray BlogMedia::data() const
00096 {
00097   return d_ptr->mData;
00098 }
00099 
00100 void BlogMedia::setData( const QByteArray &data )
00101 {
00102   d_ptr->mData = data;
00103 }
00104 
00105 BlogMedia::Status BlogMedia::status() const
00106 {
00107   return d_ptr->mStatus;
00108 }
00109 
00110 void BlogMedia::setStatus( BlogMedia::Status status )
00111 {
00112   d_ptr->mStatus = status;
00113 }
00114 
00115 QString BlogMedia::error() const
00116 {
00117   return d_ptr->mError;
00118 }
00119 
00120 void BlogMedia::setError( const QString &error )
00121 {
00122   d_ptr->mError = error;
00123 }
00124 
00125 BlogMedia &BlogMedia::operator=( const BlogMedia &m )
00126 {
00127   BlogMedia copy( m );
00128   swap( copy );
00129   return *this;
00130 }
00131 
00132 } //namespace KBlog
00133 

KBlog Client Library

Skip menu "KBlog Client Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.6
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal