Нет описания

AWSCognitoHandlers.h 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // Copyright 2014-2016 Amazon.com,
  3. // Inc. or its affiliates. All Rights Reserved.
  4. //
  5. // Licensed under the Amazon Software License (the "License").
  6. // You may not use this file except in compliance with the
  7. // License. A copy of the License is located at
  8. //
  9. // http://aws.amazon.com/asl/
  10. //
  11. // or in the "license" file accompanying this file. This file is
  12. // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  13. // CONDITIONS OF ANY KIND, express or implied. See the License
  14. // for the specific language governing permissions and
  15. // limitations under the License.
  16. //
  17. #import <Foundation/Foundation.h>
  18. @class AWSCognitoResolvedConflict;
  19. @class AWSCognitoConflict;
  20. /**
  21. DatasetDeletedHandler
  22. @param datasetName The name of the dataset that was deleted
  23. @return YES if Cognito should recreate the dataset, NO if Cognito should delete
  24. the local copy of the dataset.
  25. */
  26. typedef BOOL (^AWSCognitoDatasetDeletedHandler)(NSString *datasetName);
  27. /**
  28. DatasetMergedHandler
  29. @param datasetName The name of the local dataset that is the destination of the merge
  30. @param datasets The list of dataset names that should be merged into the destination
  31. */
  32. typedef void (^AWSCognitoDatasetMergedHandler)(NSString *datasetName, NSArray *datasets);
  33. /**
  34. ConflictHandler
  35. @param conflict The AWSCognitoConflict for this record. Conflict contains
  36. both local and remote data as properties.
  37. @return An instance of AWSCognitoResolvedConflict which indicates what data should be
  38. stored and syncronized. Returning nil will cancel synchronization.
  39. */
  40. typedef AWSCognitoResolvedConflict* (^AWSCognitoRecordConflictHandler)(NSString *datasetName, AWSCognitoConflict *conflict);