aboutsummaryrefslogtreecommitdiffstats
path: root/libcontacts_contact_destroy.c
blob: ef208d58c1e962fdd251366d78b6b0cf0f79d498 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* See LICENSE file for copyright and license details. */
#include "common.h"


void
libcontacts_contact_destroy(struct libcontacts_contact *this)
{
	free(this->id);
	free(this->name);
	free(this->first_name);
	free(this->last_name);
	free(this->nickname);
	DESTROY_ALL(this->photos, free);
	DESTROY_ALL(this->groups, free);
	free(this->notes);
	DESTROY_ALL(this->organisations, libcontacts_organisation_destroy);
	DESTROY_ALL(this->emails,        libcontacts_email_destroy);
	DESTROY_ALL(this->pgpkeys,       libcontacts_pgpkey_destroy);
	DESTROY_ALL(this->numbers,       libcontacts_number_destroy);
	DESTROY_ALL(this->addresses,     libcontacts_address_destroy);
	DESTROY_ALL(this->sites,         libcontacts_site_destroy);
	DESTROY_ALL(this->chats,         libcontacts_chat_destroy);
	libcontacts_birthday_destroy(this->birthday);
	DESTROY_ALL(this->unrecognised_data, free);
}