Module Carddavz.Report

CardDAV REPORT handling.

Supports the two report types from RFC 6352:

Types

type text_match = {
  1. collation : string;
  2. match_type : string;
  3. value : string;
}
type prop_filter = {
  1. name : string;
  2. text_match : text_match option;
}
type address_filter = {
  1. prop_filters : prop_filter list;
}
type report =
  1. | Addressbook_query of {
    1. filter : address_filter;
    2. props : Webdavz.Xml.fqname list;
    }
  2. | Addressbook_multiget of {
    1. hrefs : string list;
    2. props : Webdavz.Xml.fqname list;
    }

Parsing

val parse_report : string -> report option

parse_report xml parses a REPORT request body.

Filtering

val vcard_matches_filter : address_filter -> Carddavz__.Carddavz_vcard.t -> bool

vcard_matches_filter filter vcard returns true if the vCard matches all prop-filters.