KDAV 5.109.0
Classes | Public Types | Public Member Functions | List of all members
KDAV::DavPrincipalSearchJob

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

#include <KDAV/DavPrincipalSearchJob>

Classes

struct  Result
 Simple struct to hold the search job results. More...
 

Public Types

enum  FilterType { DisplayName , EmailAddress }
 Types of search that are supported by this job. More...
 

Public Member Functions

 DavPrincipalSearchJob (const DavUrl &url, FilterType type, const QString &filter, QObject *parent=nullptr)
 Creates a new DAV principal search job.
 
DavUrl davUrl () const
 Return the DavUrl used by this job.
 
void fetchProperty (const QString &name, const QString &ns=QString())
 Add a new property to fetch from the server.
 
QVector< Resultresults () const
 Get the job results.
 
void start () override
 Starts the job.
 
- Public Member Functions inherited from KDAV::DavJobBase
 DavJobBase (QObject *parent=nullptr)
 
bool canRetryLater () const
 Check if the job can be retried later.
 
Error davError () const
 Returns a instance of the KDAV:Error to be able to translate the error.
 
bool hasConflict () const
 Check if the job failed because of a conflict.
 
int latestResponseCode () const
 Get the latest response code.
 

Additional Inherited Members

- Protected Member Functions inherited from KDAV::DavJobBase
 DavJobBase (DavJobBasePrivate *dd, QObject *parent=nullptr)
 
- Protected Attributes inherited from KDAV::DavJobBase
std::unique_ptr< DavJobBasePrivate > d_ptr
 

Detailed Description

A job that search a DAV principal on a server.

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 fetchProperty().

Member Enumeration Documentation

◆ FilterType

Types of search that are supported by this job.

DisplayName will match on the DAV displayname property. EmailAddress will match on the CalDav calendar-user-address-set property.

Constructor & Destructor Documentation

◆ DavPrincipalSearchJob()

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

Creates a new DAV principal search job.

Parameters
urlThe URL to use in the REPORT query.
typeThe type that the filter will match.
filterThe filter that will be used to match the displayname attribute.
parentThe parent object.

Member Function Documentation

◆ davUrl()

DavUrl KDAV::DavPrincipalSearchJob::davUrl ( ) const

Return the DavUrl used by this job.

◆ fetchProperty()

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

Add a new property to fetch from the server.

Parameters
nameThe name of the property.
nsThe namespace of this property, defaults to 'DAV:'.

◆ results()

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

Get the job results.

◆ start()

void KDAV::DavPrincipalSearchJob::start ( )
override

Starts the job.