KBlog Client Library
#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.
Definition at line 48 of file blogmedia.h.
Member Enumeration Documentation
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
|
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.
|
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.
Overloaded for QList handling.
- Parameters
-
media The 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
-
data This 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
-
error This 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
-
mimetype This 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
-
name The 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
-
status This 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
-
url The 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.
|
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:
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.