carddav: add AddressBook.Info

This commit is contained in:
emersion 2017-09-09 16:45:05 +02:00
parent 0ed7542d17
commit 907e88f759
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 8 additions and 0 deletions

View File

@ -89,6 +89,14 @@ type addressBook struct {
total int
}
func (ab *addressBook) Info() (*carddav.AddressBookInfo, error) {
return &carddav.AddressBookInfo{
Name: "ProtonMail",
Description: "ProtonMail contacts",
MaxResourceSize: 100 * 1024,
}, nil
}
func (ab *addressBook) cacheComplete() bool {
return ab.total >= 0 && len(ab.cache) == ab.total
}