Brak opisu

AWSCognitoConflict.h 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 AWSCognitoRecord;
  19. /**
  20. An object that encapsulates a resolved conflict in Amazon Cognito.
  21. */
  22. @interface AWSCognitoResolvedConflict : NSObject
  23. @end
  24. /**
  25. An object that encapsulates a tuple of Amazon Cognito records.
  26. */
  27. @interface AWSCognitoRecordTuple : NSObject
  28. /**
  29. The local copy of the record.
  30. */
  31. @property (nonatomic, readonly) AWSCognitoRecord *localRecord;
  32. /**
  33. The remote (cloud) copy of the record.
  34. */
  35. @property (nonatomic, readonly) AWSCognitoRecord *remoteRecord;
  36. @end
  37. /**
  38. An object that encapsulates a conflicting record where both
  39. the local and remote have been modified since the last synchronization.
  40. */
  41. @interface AWSCognitoConflict : AWSCognitoRecordTuple
  42. /**
  43. Create a AWSCognitoResolvedConflict object with the value of the
  44. local record.
  45. @return AWSCognitoResolvedConflict object using local value
  46. */
  47. -(AWSCognitoResolvedConflict *) resolveWithLocalRecord;
  48. /**
  49. Create a AWSCognitoResolvedConflict object with the value of the
  50. remote (cloud) record.
  51. @return AWSCognitoResolvedConflict object using remote (cloud) value
  52. */
  53. -(AWSCognitoResolvedConflict *) resolveWithRemoteRecord;
  54. /**
  55. Create a AWSCognitoResolvedConflict object with a custom value that
  56. is neither the local nor remote value.
  57. @param value the value to use to resolve the conflict
  58. @return AWSCognitoResolvedConflict object using passed value
  59. */
  60. -(AWSCognitoResolvedConflict *) resolveWithValue:(NSString *)value;
  61. @end