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

KCal Library

  • KCal
  • Attachment
Public Types | Public Member Functions | List of all members
KCal::Attachment Class Reference

#include <attachment.h>

Public Types

typedef ListBase< Attachment > List
 

Public Member Functions

 Attachment (const QString &uri, const QString &mime=QString())
 
 Attachment (const char *base64, const QString &mime=QString())
 
 Attachment (const Attachment &attachment)
 
 ~Attachment ()
 
char * data () const
 
QByteArray & decodedData () const
 
bool isBinary () const
 
bool isLocal () const
 
bool isUri () const
 
QString label () const
 
QString mimeType () const
 
bool operator!= (const Attachment &a2) const
 
bool operator== (const Attachment &a2) 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
 

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.

Member Typedef Documentation

typedef ListBase<Attachment> KCal::Attachment::List

List of attachments.

Definition at line 63 of file attachment.h.

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
uriis the URI referred to by this attachment.
mimeis 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
base64is the binary data in base64 format for the attachment.
mimeis 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
attachmentis the attachment to be copied.

Definition at line 81 of file attachment.cpp.

Attachment::~Attachment ( )

Destroys the attachment.

Definition at line 98 of file attachment.cpp.

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

Returns the attachment "local" flag.

Definition at line 204 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 103 of file attachment.cpp.

QString Attachment::label ( ) const

Returns the attachment label string.

Definition at line 194 of file attachment.cpp.

QString Attachment::mimeType ( ) const

Returns the MIME-type of the attachment.

See also
setMimeType()

Definition at line 174 of file attachment.cpp.

bool Attachment::operator!= ( const Attachment &  a2) const

Returns true if two attachments aren't equal.

Since
4.3

Definition at line 225 of file attachment.cpp.

bool Attachment::operator== ( const Attachment &  a2) const

Returns true if two attachments are equal.

Since
4.3

Definition at line 214 of file attachment.cpp.

void Attachment::setData ( const char *  base64)

Sets the base64 encoded binary blob data of the attachment.

Parameters
base64is 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
datais 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
labelis 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
localis 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
mimeis 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
showinlineis 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
uriis the URI to use for the attachment.
See also
uri(), isUri()

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

Returns the URI of the attachment.

See also
setUri(), isUri()

Definition at line 108 of file attachment.cpp.


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

KDE's Doxygen guidelines are available online.

KCal Library

Skip menu "KCal Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • 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