ContactPersonNumberRef ContactManager::getContactPersonNumber(int phoneNumId)
{
contacts_filter_h filter = nullptr;
- contacts_filter_create(_contacts_contact_number._uri, &filter);
+ contacts_filter_create(_contacts_person_number._uri, &filter);
contacts_filter_add_int(filter, _contacts_person_number.number_id, CONTACTS_MATCH_EQUAL, phoneNumId);
return filter ? getContactPersonNumber(filter) : nullptr;
}
ContactPersonEmailRef ContactManager::getContactPersonEmail(int emailId)
{
contacts_filter_h filter = nullptr;
- contacts_filter_create(_contacts_contact_email._uri, &filter);
+ contacts_filter_create(_contacts_person_email._uri, &filter);
contacts_filter_add_int(filter, _contacts_person_email.email_id, CONTACTS_MATCH_EQUAL, emailId);
return filter ? getContactPersonEmail(filter) : nullptr;
}
ContactPersonNumberRef ContactManager::getContactPersonNumber(const std::string &number)
{
contacts_filter_h filter = nullptr;
- contacts_filter_create(_contacts_contact_number._uri, &filter);
+ contacts_filter_create(_contacts_person_number._uri, &filter);
contacts_filter_add_str(filter, _contacts_person_number.number_filter, CONTACTS_MATCH_EXACTLY, number.c_str());
return filter ? getContactPersonNumber(filter) : nullptr;
}