/* free the response buffer. The Buffer has a type to handle the buffer allocated in other ways than through malloc.  */
void vcard_response_delete(VCardResponse *response)
/* free the response buffer. The Buffer has a type to handle the buffer allocated in other ways than through malloc.  */
void vcard_response_delete(VCardResponse *response)
{
    if (response == NULL) {
        return;
    }
    switch (response->b_type) {
    case VCARD_MALLOC:
        if (response->b_data) {
            g_free(response->b_data);
        }
        g_free(response);
        break;
    case VCARD_MALLOC_DATA:
        if (response->b_data) {
            g_free(response->b_data);
        }
        break;
    case VCARD_MALLOC_STRUCT:
        g_free(response);
        break;
    case VCARD_STATIC:
        break;
    }
}