<commit_before>//
//  CDASyncedSpace.h
//  ContentfulSDK
//
//  Created by <NAME> on 25/03/14.
//
//

#import <ContentfulDeliveryAPI/CDAClient.h>

@class CDAAsset;
@class CDAEntry;
@class CDASyncedSpace;

/**
 The delegate of a `CDASyncedSpace` object must adopt the `CDASyncedSpaceDelegate`
 protocol. The optional methods will inform the delegate about updates on the contents of the target
 `CDASyncedSpace`.
 */
@protocol CDASyncedSpaceDelegate <NSObject>

@optional

/** @name Information on Created Resources */

/**
 *  This method is called once a new Asset is created.
 *
 *  @param space The relevant Space.
 *  @param asset The newly created Asset.
 */
-(void)syncedArray:(CDASyncedSpace*)space didCreateAsset:(CDAAsset*)asset;

/**
 *  This method is called once a new Entry is created.
 *
 *  @param space The relevant Space.
 *  @param entry The newly created Entry.
 */
-(void)syncedArray:(CDASyncedSpace*)space didCreateEntry:(CDAEntry*)entry;

/** @name Information on Deleted Resources */

/**
 *  This method is called once an existing Asset is deleted.
 *
 *  @param space The relevant Space.
 *  @param asset The deleted Asset.
 */
-(void)syncedArray:(CDASyncedSpace*)space didDeleteAsset:(CDAAsset*)asset;

/**
 *  This method is called once an existing Entry is deleted.
 *
 *  @param space The relevant Space.
 *  @param entry The deleted Entry.
 */
-(void)syncedArray:(CDASyncedSpace*)space didDeleteEntry:(CDAEntry*)entry;

/** @name Information on Updated Resources */

/**
 *  This method is called once an existing Asset is updated.
 *
 *  @param space The relevant Space.
 *  @param asset The updated Asset.
 */
-(void)syncedArray:(CDASyncedSpace*)space didUpdateAsset:(CDAAsset*)asset;

/**
 *  This method is called once an existing Entry is updated.
 *
 *  @param space The relevant Space.
 *  @param entry The updated Entry.
 */
-(void)syncedArray:(CDASyncedSpace*)space didUpdateEntry:(CDAEntry*)entry;

@end

#pragma mark -

/**
 *  A `CDASyncedSpace` represents the complete contents of a Space. It can be synchronized via 
 *  delta updates at any time.
 */
@interface CDASyncedSpace : NSObject

/** @name Accessing Space Contents */

/** All published Assets in the given Space. */
@property (nonatomic, readonly) NSArray* assets;
/** All published Entries in the given Space. */
@property (nonatomic, readonly) NSArray* entries;

/** @name Managing the Delegate */

/** The object acts as a delegate on the receiving synchronized Space. */
@property (nonatomic) id<CDASyncedSpaceDelegate> delegate;
<commit_msg>Fixed naming of delegate methods for CDASyncedSpace.<commit_after>//
//  CDASyncedSpace.h
//  ContentfulSDK
//
//  Created by <NAME> on 25/03/14.
//
//

#import <ContentfulDeliveryAPI/CDAClient.h>

@class CDAAsset;
@class CDAEntry;
@class CDASyncedSpace;

/**
 The delegate of a `CDASyncedSpace` object must adopt the `CDASyncedSpaceDelegate`
 protocol. The optional methods will inform the delegate about updates on the contents of the target
 `CDASyncedSpace`.
 */
@protocol CDASyncedSpaceDelegate <NSObject>

@optional

/** @name Information on Created Resources */

/**
 *  This method is called once a new Asset is created.
 *
 *  @param space The relevant Space.
 *  @param asset The newly created Asset.
 */
-(void)syncedSpace:(CDASyncedSpace*)space didCreateAsset:(CDAAsset*)asset;

/**
 *  This method is called once a new Entry is created.
 *
 *  @param space The relevant Space.
 *  @param entry The newly created Entry.
 */
-(void)syncedSpace:(CDASyncedSpace*)space didCreateEntry:(CDAEntry*)entry;

/** @name Information on Deleted Resources */

/**
 *  This method is called once an existing Asset is deleted.
 *
 *  @param space The relevant Space.
 *  @param asset The deleted Asset.
 */
-(void)syncedSpace:(CDASyncedSpace*)space didDeleteAsset:(CDAAsset*)asset;

/**
 *  This method is called once an existing Entry is deleted.
 *
 *  @param space The relevant Space.
 *  @param entry The deleted Entry.
 */
-(void)syncedSpace:(CDASyncedSpace*)space didDeleteEntry:(CDAEntry*)entry;

/** @name Information on Updated Resources */

/**
 *  This method is called once an existing Asset is updated.
 *
 *  @param space The relevant Space.
 *  @param asset The updated Asset.
 */
-(void)syncedSpace:(CDASyncedSpace*)space didUpdateAsset:(CDAAsset*)asset;

/**
 *  This method is called once an existing Entry is updated.
 *
 *  @param space The relevant Space.
 *  @param entry The updated Entry.
 */
-(void)syncedSpace:(CDASyncedSpace*)space didUpdateEntry:(CDAEntry*)entry;

@end

#pragma mark -

/**
 *  A `CDASyncedSpace` represents the complete contents of a Space. It can be synchronized via 
 *  delta updates at any time.
 */
@interface CDASyncedSpace : NSObject

/** @name Accessing Space Contents */

/** All published Assets in the given Space. */
@property (nonatomic, readonly) NSArray* assets;
/** All published Entries in the given Space. */
@property (nonatomic, readonly) NSArray* entries;

/** @name Managing the Delegate */

/** The object acts as a delegate on the receiving synchronized Space. */
@property (nonatomic) id<CDASyncedSpaceDelegate> delegate;

{'fraction_non_alphanumeric': 0.11262400311223497, 'fraction_numerical': 0.002334176230305388, 'mean_word_length': 4.111332007952286, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2090612', 'n_tokens_mistral': 1576, 'n_tokens_neox': 1524, 'n_words': 542}