KDAV::DavItem Class

class KDAV::DavItem

A helper class to store information about DAV resources. More...

Header: #include <KDAV/DavItem>
CMake: find_package(KF6 REQUIRED COMPONENTS DAV)
target_link_libraries(mytarget PRIVATE KF6::DAV)

Public Types

Public Functions

DavItem()
DavItem(const KDAV::DavUrl &url, const QString &contentType, const QByteArray &data, const QString &etag)
QString contentType() const
QByteArray data() const
QString etag() const
void setContentType(const QString &type)
void setData(const QByteArray &data)
void setEtag(const QString &etag)
void setUrl(const KDAV::DavUrl &url)
KDAV::DavUrl url() const

Detailed Description

This class is used as container to transfer information about DAV resources between the Akonadi resource and the DAV jobs.

Note: While the DAV RFC names them DAV resource we call them items to comply to Akonadi terminology.

Member Type Documentation

DavItem::List

Defines a list of DAV item objects.

Member Function Documentation

DavItem::DavItem()

Creates an empty DAV item.

DavItem::DavItem(const KDAV::DavUrl &url, const QString &contentType, const QByteArray &data, const QString &etag)

Creates a new DAV item.

url The URL that identifies the item.

contentType The content type of the item.

data The actual raw content data of the item.

etag The ETag of the item.

QString DavItem::contentType() const

Returns the content type of the item.

See also setContentType().

QByteArray DavItem::data() const

Returns the raw content data of the item.

See also setData().

QString DavItem::etag() const

Returns the ETag of the item.

See also setEtag() and https://tools.ietf.org/html/rfc4918#section-8.6.

void DavItem::setContentType(const QString &type)

Sets the content type of the item.

See also contentType().

void DavItem::setData(const QByteArray &data)

Sets the raw content data of the item.

See also data().

void DavItem::setEtag(const QString &etag)

Sets the etag of the item.

See also etag() and https://tools.ietf.org/html/rfc4918#section-8.6.

void DavItem::setUrl(const KDAV::DavUrl &url)

Sets the url that identifies the item.

See also url().

KDAV::DavUrl DavItem::url() const

Returns the URL that identifies the item.

See also setUrl().