KCal Library
KCal::Attachment Class Reference
#include <attachment.h>
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 57 of file attachment.h.
Public Types | |
typedef ListBase< Attachment > | List |
Public Member Functions | |
Attachment (const Attachment &attachment) | |
Attachment (const char *base64, const QString &mime=QString()) | |
Attachment (const QString &uri, const QString &mime=QString()) | |
char * | data () const |
QByteArray & | decodedData () const |
bool | isBinary () const |
bool | isLocal () const |
bool | isUri () const |
QString | label () const |
QString | mimeType () const |
void | setData (const char *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 |
~Attachment () |
Member Typedef Documentation
typedef ListBase<Attachment> KCal::Attachment::List |
Constructor & Destructor Documentation
Attachment::Attachment | ( | const QString & | uri, | |
const QString & | mime = QString() | |||
) | [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 86 of file attachment.cpp.
Attachment::Attachment | ( | const char * | base64, | |
const QString & | mime = QString() | |||
) | [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 92 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.
For internal use only.
Definition at line 81 of file attachment.cpp.
Attachment::~Attachment | ( | ) |
Member Function Documentation
char * Attachment::data | ( | ) | const |
Returns a pointer to a character string containing the base64 encoded binary data of the attachment.
- See also:
- setData(), setDecodedData()
Definition at line 128 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 137 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 123 of file attachment.cpp.
bool Attachment::isLocal | ( | ) | const |
bool Attachment::isUri | ( | ) | const |
Returns true if the attachment has a URI; false otherwise.
- See also:
- uri(), setUri(I), isBinary()
Definition at line 103 of file attachment.cpp.
QString Attachment::label | ( | ) | const |
QString Attachment::mimeType | ( | ) | const |
Returns the MIME-type of the attachment.
- See also:
- setMimeType()
Definition at line 174 of file attachment.cpp.
void Attachment::setData | ( | const char * | base64 | ) |
Sets the base64 encoded binary blob data of the attachment.
- Parameters:
-
base64 is a character string containing base64 encoded binary data.
- See also:
- data(), decodedData()
Definition at line 153 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 146 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 199 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 209 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 179 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 189 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 117 of file attachment.cpp.
bool Attachment::showInline | ( | ) | const |
Returns the attachment "show in-line" flag.
- See also:
- setShowInline()
Definition at line 184 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 162 of file attachment.cpp.
QString Attachment::uri | ( | ) | const |
The documentation for this class was generated from the following files: