KCalCore Library
#include <attachment.h>
Public Types | |
typedef QVector< Ptr > | List |
typedef QSharedPointer < Attachment > | Ptr |
Public Member Functions | |
Attachment (const QString &uri, const QString &mime=QString()) | |
Attachment (const QByteArray &base64, const QString &mime=QString()) | |
Attachment (const Attachment &attachment) | |
~Attachment () | |
QByteArray | data () const |
QByteArray | decodedData () const |
bool | isBinary () const |
bool | isLocal () const |
bool | isUri () const |
QString | label () const |
QString | mimeType () const |
bool | operator!= (const Attachment &attachment) const |
Attachment & | operator= (const Attachment &attachment) |
bool | operator== (const Attachment &attachment) const |
void | setData (const QByteArray &base64) |
void | setDecodedData (const QByteArray &data) |
void | setLabel (const QString &label) |
void | setLocal (bool local) |
void | setMimeType (const QString &mime) |
void | setShowInline (bool showinline) |
void | setUri (const QString &uri) |
bool | showInline () const |
uint | size () const |
QString | uri () const |
Friends | |
KCALCORE_EXPORT QDataStream & | operator<< (QDataStream &s, const KCalCore::Attachment::Ptr &) |
KCALCORE_EXPORT QDataStream & | operator>> (QDataStream &s, const KCalCore::Attachment::Ptr &) |
Detailed Description
Represents information related to an attachment for a Calendar Incidence.
This is not an email message attachment.
Calendar Incidence attachments consist of:
- A Uniform Resource Identifier (URI) or a base64 encoded binary blob.
- A Multipurpose Internet Mail Extensions (MIME) type.
This class is used to associate files (local or remote) or other resources with a Calendar Incidence.
Definition at line 59 of file attachment.h.
Member Typedef Documentation
typedef QVector<Ptr> KCalCore::Attachment::List |
List of attachments.
Definition at line 70 of file attachment.h.
typedef QSharedPointer<Attachment> KCalCore::Attachment::Ptr |
A shared pointer to an Attachment object.
Definition at line 65 of file attachment.h.
Constructor & Destructor Documentation
|
explicit |
Constructs an attachment consisting of a uri
and a mime
type.
- Parameters
-
uri is the URI referred to by this attachment. mime is the (optional) MIME type of the uri
Definition at line 83 of file attachment.cpp.
|
explicit |
Constructs an attachment consisting of a binary blob of data and a mime
type.
- Parameters
-
base64 is the binary data in base64 format for the attachment. mime is the (optional) MIME type of the attachment
Definition at line 89 of file attachment.cpp.
Attachment::Attachment | ( | const Attachment & | attachment | ) |
Constructs an attachment by copying another attachment.
Private class that helps to provide binary compatibility between releases.
- Parameters
-
attachment is the attachment to be copied.
Definition at line 78 of file attachment.cpp.
Attachment::~Attachment | ( | ) |
Destroys the attachment.
Definition at line 95 of file attachment.cpp.
Member Function Documentation
QByteArray Attachment::data | ( | ) | const |
Returns a pointer to a QByteArray containing the base64 encoded binary data of the attachment.
- See also
- setData(), setDecodedData()
Definition at line 125 of file attachment.cpp.
QByteArray Attachment::decodedData | ( | ) | const |
Returns a QByteArray containing the decoded base64 binary data of the attachment.
- See also
- setDecodedData(), setData()
Definition at line 134 of file attachment.cpp.
bool Attachment::isBinary | ( | ) | const |
Returns true if the attachment has a binary blob; false otherwise.
- See also
- isUri()
Definition at line 120 of file attachment.cpp.
bool Attachment::isLocal | ( | ) | const |
Returns the attachment "local" flag.
Definition at line 200 of file attachment.cpp.
bool Attachment::isUri | ( | ) | const |
Returns true if the attachment has a URI; false otherwise.
- See also
- uri(), setUri(I), isBinary()
Definition at line 100 of file attachment.cpp.
QString Attachment::label | ( | ) | const |
Returns the attachment label string.
Definition at line 190 of file attachment.cpp.
QString Attachment::mimeType | ( | ) | const |
Returns the MIME-type of the attachment.
- See also
- setMimeType()
Definition at line 170 of file attachment.cpp.
bool Attachment::operator!= | ( | const Attachment & | attachment | ) | const |
Compare this with attachment
for inequality.
- Parameters
-
attachment is the attachment to compare.
- Returns
- true if the attachments are /not/ equal; false otherwise.
Definition at line 237 of file attachment.cpp.
Attachment & Attachment::operator= | ( | const Attachment & | attachment | ) |
Assignment operator.
- Parameters
-
attachment is the attachment to assign.
Definition at line 210 of file attachment.cpp.
bool Attachment::operator== | ( | const Attachment & | attachment | ) | const |
Compare this with attachment
for equality.
- Parameters
-
attachment is the attachment to compare.
- Returns
- true if the attachments are equal; false otherwise.
Definition at line 226 of file attachment.cpp.
void Attachment::setData | ( | const QByteArray & | base64 | ) |
Sets the base64 encoded binary blob data of the attachment.
- Parameters
-
base64 contains the base64 encoded binary data.
- See also
- data(), decodedData()
Definition at line 150 of file attachment.cpp.
void Attachment::setDecodedData | ( | const QByteArray & | data | ) |
Sets the decoded attachment data.
- Parameters
-
data is the decoded base64 binary data.
- See also
- decodedData(), data()
Definition at line 143 of file attachment.cpp.
void Attachment::setLabel | ( | const QString & | label | ) |
Sets the attachment label to label
, which is derived from the Calendar Incidence X-LABEL parameter.
- Parameters
-
label is the string to use for the attachment label.
- See also
- label()
Definition at line 195 of file attachment.cpp.
void Attachment::setLocal | ( | bool | local | ) |
Sets the attachment "local" option, which is derived from the Calendar Incidence X-KONTACT-TYPE parameter.
- Parameters
-
local is the flag to set (true) or unset (false) for the attachment "local" option.
- See also
- local()
Definition at line 205 of file attachment.cpp.
void Attachment::setMimeType | ( | const QString & | mime | ) |
Sets the MIME-type of the attachment to mime
.
- Parameters
-
mime is the string to use for the attachment MIME-type.
- See also
- mimeType()
Definition at line 175 of file attachment.cpp.
void Attachment::setShowInline | ( | bool | showinline | ) |
Sets the attachment "show in-line" option, which is derived from the Calendar Incidence X-CONTENT-DISPOSITION parameter.
- Parameters
-
showinline is the flag to set (true) or unset (false) for the attachment "show in-line" option.
- See also
- showInline()
Definition at line 185 of file attachment.cpp.
void Attachment::setUri | ( | const QString & | uri | ) |
Sets the URI for this attachment to uri
.
- Parameters
-
uri is the URI to use for the attachment.
Definition at line 114 of file attachment.cpp.
bool Attachment::showInline | ( | ) | const |
Returns the attachment "show in-line" flag.
- See also
- setShowInline()
Definition at line 180 of file attachment.cpp.
uint Attachment::size | ( | ) | const |
Returns the size of the attachment, in bytes.
If the attachment is binary (i.e, there is no URI associated with the attachment) then a value of 0 is returned.
Definition at line 158 of file attachment.cpp.
QString Attachment::uri | ( | ) | const |
Returns the URI of the attachment.
Definition at line 105 of file attachment.cpp.
Friends And Related Function Documentation
|
friend |
Attachment serializer.
- Since
- 4.12
|
friend |
Attachment deserializer.
- Since
- 4.12
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:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.