Browse Source

add disable_all_sync_channels(), see ENGINE-890

IOSAD-201
Volker Birk 8 months ago
parent
commit
15362005bd
2 changed files with 35 additions and 0 deletions
  1. +22
    -0
      src/sync_api.c
  2. +13
    -0
      src/sync_api.h

+ 22
- 0
src/sync_api.c View File

@ -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;
}

+ 13
- 0
src/sync_api.h View File

@ -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