• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KBlog Client Library

  • KBlog
  • BlogMedia
Public Types | Public Member Functions | List of all members
KBlog::BlogMedia Class Reference

#include <blogmedia.h>

Public Types

enum  Status { New, Created, Error }
 

Public Member Functions

 BlogMedia ()
 
 BlogMedia (const BlogMedia &media)
 
virtual ~BlogMedia ()
 
QByteArray data () const
 
QString error () const
 
QString mimetype () const
 
QString name () const
 
BlogMedia & operator= (const BlogMedia &media)
 
void setData (const QByteArray &data)
 
void setError (const QString &error)
 
void setMimetype (const QString &mimetype)
 
void setName (const QString &name)
 
void setStatus (Status status)
 
void setUrl (const KUrl &url)
 
Status status () const
 
void swap (BlogMedia &other)
 
KUrl url () const
 

Detailed Description

A class that represents a media object on the server.

KBlog::BlogMedia *media = new BlogMedia();
post->setMimetype( "some_mimetype" );
post->setData( some_qbytestream );
Author
Christian Weilbach <christian_weilbach@web.de>

Definition at line 48 of file blogmedia.h.

Member Enumeration Documentation

enum KBlog::BlogMedia::Status

The different possible status.

At the moment you cannot do much with media objects.

Enumerator
New 

Status of freshly constructed media object on the client side.

Created 

Status of a media object successfully created on the server.

Error 

Status when an error on uploading has occurred.

Definition at line 138 of file blogmedia.h.

Constructor & Destructor Documentation

KBlog::BlogMedia::BlogMedia ( )
explicit

Default constructor.

Creates an empty BlogMedia object.

Definition at line 43 of file blogmedia.cpp.

KBlog::BlogMedia::BlogMedia ( const BlogMedia &  media)

Copy Constructor needed for list handling.

Definition at line 48 of file blogmedia.cpp.

KBlog::BlogMedia::~BlogMedia ( )
virtual

Virtual default destructor.

Definition at line 60 of file blogmedia.cpp.

Member Function Documentation

QByteArray KBlog::BlogMedia::data ( ) const

Returns the data of the file.

Returns
The data.
See also
setData( const QByteArray& )

Definition at line 95 of file blogmedia.cpp.

QString KBlog::BlogMedia::error ( ) const

Returns the error string.

Returns
The error string.
See also
setError( const QString& )

Definition at line 115 of file blogmedia.cpp.

QString KBlog::BlogMedia::mimetype ( ) const

Returns the mimetype.

Returns
The mimetype of the object
See also
setMimetype( const QString& )

Definition at line 85 of file blogmedia.cpp.

QString KBlog::BlogMedia::name ( ) const

Returns the wished name.

This is most likely the filename on the server side (at least with wordpress).

Returns
The wished name on the server.
See also
setName( const QString& )

Definition at line 65 of file blogmedia.cpp.

BlogMedia & KBlog::BlogMedia::operator= ( const BlogMedia &  media)

Overloaded for QList handling.

Parameters
mediaThe media file to copy.

Definition at line 125 of file blogmedia.cpp.

void KBlog::BlogMedia::setData ( const QByteArray &  data)

Set the data of the file.

Parameters
dataThis is the data stream.
See also
data()

Definition at line 100 of file blogmedia.cpp.

void KBlog::BlogMedia::setError ( const QString &  error)

Set the error of the object.

Parameters
errorThis is the error string.
See also
error()

Definition at line 120 of file blogmedia.cpp.

void KBlog::BlogMedia::setMimetype ( const QString &  mimetype)

Set the mimtype.

Parameters
mimetypeThis is the mimetype.
See also
mimetype()

Definition at line 90 of file blogmedia.cpp.

void KBlog::BlogMedia::setName ( const QString &  name)

Sets the name.

This will most likely be the filename on the server side (at least with wordpress).

Parameters
nameThe whished name for the object.
See also
name()

Definition at line 70 of file blogmedia.cpp.

void KBlog::BlogMedia::setStatus ( BlogMedia::Status  status)

Set the status.

Note: You should not set this on your own it is used mostly internally.

Parameters
statusThis is the status.
See also
status()

Definition at line 110 of file blogmedia.cpp.

void KBlog::BlogMedia::setUrl ( const KUrl &  url)

Sets the url of the server side object.

Note: You should not set this on your own normally. It is used internally in MetaWeblog.

Parameters
urlThe whished name for the object.
See also
url()

Definition at line 80 of file blogmedia.cpp.

BlogMedia::Status KBlog::BlogMedia::status ( ) const

Returns the status.

Returns
This is the status.
See also
setStatus( Status )

Definition at line 105 of file blogmedia.cpp.

void KBlog::BlogMedia::swap ( BlogMedia &  other)
inline

The swap operator.

Definition at line 188 of file blogmedia.h.

KUrl KBlog::BlogMedia::url ( ) const

Returns the server side url.

Returns
The url on the server.
See also
setUrl( const KUrl& )

Definition at line 75 of file blogmedia.cpp.


The documentation for this class was generated from the following files:
  • blogmedia.h
  • blogmedia.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KBlog Client Library

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal