KDAV::DavPrincipalSearchJob Class

class KDAV::DavPrincipalSearchJob

A job that search a DAV principal on a server. More...

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

Public Types

struct Result
enum FilterType { DisplayName, EmailAddress }

Public Functions

DavPrincipalSearchJob(const KDAV::DavUrl &url, KDAV::DavPrincipalSearchJob::FilterType type, const QString &filter, QObject *parent = nullptr)
KDAV::DavUrl davUrl() const
void fetchProperty(const QString &name, const QString &ns = QString())
QList<KDAV::DavPrincipalSearchJob::Result> results() const

Reimplemented Public Functions

virtual void start() override

Detailed Description

This job is used to search a principal on a server that implement the dav-property-search REPORT (RFC3744).

The properties to fetch are set with @ref fetchProperty().

Member Type Documentation

enum DavPrincipalSearchJob::FilterType

Types of search that are supported by this job.

ConstantValueDescription
KDAV::DavPrincipalSearchJob::DisplayName0Will match on the DAV displayname property.
KDAV::DavPrincipalSearchJob::EmailAddress1Will match on the CalDav calendar-user-address-set property.

Member Function Documentation

[explicit] DavPrincipalSearchJob::DavPrincipalSearchJob(const KDAV::DavUrl &url, KDAV::DavPrincipalSearchJob::FilterType type, const QString &filter, QObject *parent = nullptr)

Creates a new DAV principal search job

url The URL to use in the REPORT query.

type The type that the filter will match.

filter The filter that will be used to match the displayname attribute.

parent The parent object.

KDAV::DavUrl DavPrincipalSearchJob::davUrl() const

Return the DavUrl used by this job

void DavPrincipalSearchJob::fetchProperty(const QString &name, const QString &ns = QString())

Add a new property to fetch from the server.

name The name of the property.

ns The namespace of this property, defaults to 'DAV:'.

QList<KDAV::DavPrincipalSearchJob::Result> DavPrincipalSearchJob::results() const

Get the job results.

[override virtual] void DavPrincipalSearchJob::start()

Reimplements: KJob::start().

Starts the job