add disable_all_sync_channels(), see ENGINE-890

master
Volker Birk 2 years ago
parent 7b3e6642d9
commit 15362005bd
  1. 22
      src/sync_api.c
  2. 13
      src/sync_api.h

@ -378,3 +378,25 @@ DYNAMIC_API PEP_STATUS disable_identity_for_sync(PEP_SESSION session,
status = key_reset_identity(session, ident, NULL);
return status;
}
DYNAMIC_API PEP_STATUS disable_all_sync_channels(PEP_SESSION session)
{
assert(session);
if (!session)
return PEP_ILLEGAL_VALUE;
identity_list *own_identities = NULL;
PEP_STATUS status = own_identities_retrieve(session, &own_identities);
if (status)
return status;
for (identity_list *oi = own_identities; oi && oi->ident; oi = oi->next) {
status = set_identity_flags(session, oi->ident, PEP_idf_not_for_sync);
if (status)
break;
}
free_identity_list(own_identities);
return status;
}

@ -306,6 +306,19 @@ DYNAMIC_API PEP_STATUS disable_identity_for_sync(PEP_SESSION session,
pEp_identity *ident);
/**
* <!-- disable_all_sync_channels() -->
*
* @brief Disable sync for all identities; use this function to reset
* the state which identities will be synced and which not
* This function is intended to be used at app init
*
*
*/
DYNAMIC_API PEP_STATUS disable_all_sync_channels(PEP_SESSION session);
#ifdef __cplusplus
}
#endif

Loading…
Cancel
Save