IOSAD-164 Let mySelf wrap myself, and that's it

IOSAD-164
Dirk Zimmermann 3 years ago
parent b221aadc62
commit fc51947597

@ -536,23 +536,9 @@ typedef PEP_STATUS (* rating_function_type)(PEP_SESSION session, message *msg, P
}
- (BOOL)mySelf:(PEPIdentity * _Nonnull)identity
error:(NSError * _Nullable * _Nullable)error
{
// The default for pEpSyncEnabled is YES, that means the adapter
// will not change the engine identity in that regard after new_identity
// (called by PEP_identityToStruct).
return [self mySelf:identity pEpSyncEnabled:YES error:error];
}
- (BOOL)mySelf:(PEPIdentity * _Nonnull)identity
pEpSyncEnabled:(BOOL)pEpSyncEnabled
error:(NSError * _Nullable * _Nullable)error {
pEp_identity *ident = PEP_identityToStruct(identity);
if (!pEpSyncEnabled) {
ident->flags |= PEP_idf_not_for_sync;
}
PEPStatus status = (PEPStatus) myself(_session, ident);
if ([NSError setError:error fromPEPStatus:status]) {

@ -179,14 +179,6 @@
return [session mySelf:identity error:error];
}
- (BOOL)mySelf:(PEPIdentity * _Nonnull)identity
pEpSyncEnabled:(BOOL)pEpSyncEnabled
error:(NSError * _Nullable * _Nullable)error {
PEPInternalSession *session = [PEPSessionProvider session];
RETURN_ON_ERROR(session, error, NO);
return [session mySelf:identity pEpSyncEnabled:pEpSyncEnabled error:error];
}
- (BOOL)updateIdentity:(PEPIdentity * _Nonnull)identity
error:(NSError * _Nullable * _Nullable)error
{

@ -97,22 +97,6 @@
- (BOOL)mySelf:(PEPIdentity * _Nonnull)identity
error:(NSError * _Nullable * _Nullable)error;
/// Marks an identity as an own identity, and decides about participation in pEp sync.
///
/// @return Returns YES on success, NO on error, setting `*error` accordingly if possible.
///
/// @note See the engine's myself function for details.
///
/// @param identity The identity to mark as own.
///
/// @param pEpSyncEnabled Whether to enable sync, or not. Will set PEP_idf_not_for_sync
/// accordingly.
///
/// @param error Standard cocoa error handling.
- (BOOL)mySelf:(PEPIdentity * _Nonnull)identity
pEpSyncEnabled:(BOOL)pEpSyncEnabled
error:(NSError * _Nullable * _Nullable)error;
/// Calls the engine's update_identity on the given identity.
///
/// @note Prior this was invoking myself if the identity was identified as being an own

Loading…
Cancel
Save