int contact_id = common::stol(FromJson<JsonString>(args, "id"));
- int err = CONTACTS_ERROR_NONE;
contacts_record_h contacts_record = nullptr;
- err = contacts_db_get_record(_contacts_contact._uri, contact_id,
- &contacts_record);
+ int err = contacts_db_get_record(_contacts_contact._uri, contact_id,
+ &contacts_record);
if (CONTACTS_ERROR_NONE != err) {
LoggerW("Contacts record get error, error code: %d", err);
return PlatformResult(ErrorCode::NOT_FOUND_ERR,
"Contact is not saved in database");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h to_update = nullptr;
- err = contacts_db_get_record(_contacts_contact._uri, contactId, &to_update);
+ int err = contacts_db_get_record(_contacts_contact._uri, contactId, &to_update);
if (CONTACTS_ERROR_NONE != err) {
LoggerW("Problem with getting contact. Error: %d", err);
return PlatformResult(ErrorCode::NOT_FOUND_ERR,
"Group object is previously added");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h contacts_record = nullptr;
- err = contacts_record_create(_contacts_group._uri, &contacts_record);
+ int err = contacts_record_create(_contacts_group._uri, &contacts_record);
status = ContactUtil::ErrorChecker(
err, "Error during executing contacts_record_create()");
if (status.IsError()) return status;
return PlatformResult(ErrorCode::INVALID_VALUES_ERR, "Incorrect group id");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h contacts_record = nullptr;
- err = contacts_db_get_record(_contacts_group._uri, id, &contacts_record);
+ int err = contacts_db_get_record(_contacts_group._uri, id, &contacts_record);
if (CONTACTS_ERROR_NONE != err || nullptr == contacts_record) {
LoggerE("Group not exist");
return PlatformResult(ErrorCode::NOT_FOUND_ERR, "Group not exist");
LoggerD("Enter");
Assert(child_count);
- int err = CONTACTS_ERROR_NONE;
- err = contacts_record_get_child_record_count(contacts_record, property_id,
- child_count);
+ int err = contacts_record_get_child_record_count(contacts_record, property_id,
+ child_count);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
return PlatformResult(ErrorCode::UNKNOWN_ERR,
"Problem during getting child count");
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
int count = 0;
- int err = CONTACTS_ERROR_NONE;
- err = contacts_record_get_child_record_count(contacts_record,
- _contacts_contact.name, &count);
+ int err = contacts_record_get_child_record_count(contacts_record,
+ _contacts_contact.name, &count);
PlatformResult status =
ContactUtil::ErrorChecker(err, "Contacts child record get count error");
if (status.IsError()) {
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h contact_name = nullptr;
- err = contacts_record_get_child_record_at_p(
+ int err = contacts_record_get_child_record_at_p(
contacts_record, _contacts_contact.name, 0, &contact_name);
bool update = true;
if (CONTACTS_ERROR_NONE != err && nullptr == contact_name) {
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h child_record = nullptr;
- err = contacts_record_get_child_record_at_p(
+ int err = contacts_record_get_child_record_at_p(
contacts_record, _contacts_contact.email, index, &child_record);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
return PlatformResult(ErrorCode::NO_ERROR);
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
- err = contacts_record_create(_contacts_email._uri, &c_email_record_h);
+ int err = contacts_record_create(_contacts_email._uri, &c_email_record_h);
PlatformResult status = ContactUtil::ErrorChecker(
err, "Failed to create email record in database");
if (status.IsError()) {
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h child_record = nullptr;
- err = contacts_record_get_child_record_at_p(
+ int err = contacts_record_get_child_record_at_p(
contacts_record, _contacts_contact.company, index, &child_record);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
return PlatformResult(ErrorCode::NO_ERROR);
}
contacts_record_h organization_record = nullptr;
- int err = CONTACTS_ERROR_NONE;
- err = contacts_record_create(_contacts_company._uri, &organization_record);
+ int err = contacts_record_create(_contacts_company._uri, &organization_record);
PlatformResult status = ContactUtil::ErrorChecker(
err, "Failed to create organization record in database");
if (status.IsError()) {
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h child_record = nullptr;
- err = contacts_record_get_child_record_at_p(
+ int err = contacts_record_get_child_record_at_p(
contacts_record, _contacts_contact.url, index, &child_record);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
return PlatformResult(ErrorCode::NO_ERROR);
return PlatformResult(ErrorCode::NO_ERROR);
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h website_record_h = nullptr;
- err = contacts_record_create(_contacts_url._uri, &website_record_h);
+ int err = contacts_record_create(_contacts_url._uri, &website_record_h);
PlatformResult status = ContactUtil::ErrorChecker(
err, "Fail to create website record in database.");
if (status.IsError()) {
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h child_record = nullptr;
- err = contacts_record_get_child_record_at_p(
+ int err = contacts_record_get_child_record_at_p(
contacts_record, _contacts_contact.event, index, &child_record);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
*ret = false;
return PlatformResult(ErrorCode::NO_ERROR);
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h anniversary_record = nullptr;
- err = contacts_record_create(_contacts_event._uri, &anniversary_record);
+ int err = contacts_record_create(_contacts_event._uri, &anniversary_record);
PlatformResult status = ContactUtil::ErrorChecker(
err, "Failed to create anniversary record in database");
if (status.IsError()) {
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h child_record = nullptr;
- err = contacts_record_get_child_record_at_p(
+ int err = contacts_record_get_child_record_at_p(
contacts_record, _contacts_contact.relationship, index, &child_record);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
return PlatformResult(ErrorCode::NO_ERROR);
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h child_record = nullptr;
- err = contacts_record_create(_contacts_relationship._uri, &child_record);
+ int err = contacts_record_create(_contacts_relationship._uri, &child_record);
PlatformResult status =
ContactUtil::ErrorChecker(err, "Fail to create child_record in database");
if (status.IsError()) {
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h child_record = nullptr;
- err = contacts_record_get_child_record_at_p(
+ int err = contacts_record_get_child_record_at_p(
contacts_record, _contacts_contact.messenger, index, &child_record);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
LoggerW("Skipping message with index %i. error code: %i", index, err);
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h child_record = nullptr;
- err = contacts_record_create(_contacts_messenger._uri, &child_record);
+ int err = contacts_record_create(_contacts_messenger._uri, &child_record);
PlatformResult status =
ContactUtil::ErrorChecker(err, "Fail to create child_record in database");
if (status.IsError()) {
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h child_record = nullptr;
- err = contacts_record_get_child_record_at_p(
+ int err = contacts_record_get_child_record_at_p(
contacts_record, _contacts_contact.address, index, &child_record);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
return PlatformResult(ErrorCode::NO_ERROR);
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h address_record = nullptr;
- err = contacts_record_create(_contacts_address._uri, &address_record);
+ int err = contacts_record_create(_contacts_address._uri, &address_record);
PlatformResult status = ContactUtil::ErrorChecker(
err, "Failed to create address record in database");
if (status.IsError()) {
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
contacts_record_h notes_record = nullptr;
- err = contacts_record_get_child_record_at_p(
+ int err = contacts_record_get_child_record_at_p(
contacts_record, _contacts_contact.note, index, ¬es_record);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
return PlatformResult(ErrorCode::NO_ERROR);
return PlatformResult(ErrorCode::UNKNOWN_ERR, "Contacts record is null");
}
- int err = CONTACTS_ERROR_NONE;
- err = contacts_record_create(_contacts_note._uri, ¬es_record);
+ int err = contacts_record_create(_contacts_note._uri, ¬es_record);
PlatformResult status =
ContactUtil::ErrorChecker(err, "Fail to create note record in database");
if (status.IsError()) {