<commit_before>// The MIT License (MIT)
//
// Copyright (c) 2014 <NAME> (github.com/kean).
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import "DFImageManagerProtocol.h"
#import <UIKit/UIKit.h>

@class DFImageRequestOptions;

typedef NS_ENUM(NSUInteger, DFImageViewAnimation) {
   DFImageViewAnimationNone,
   DFImageViewAnimationFade,
   DFImageViewAnimationCrossDissolve
};


/*! Implements most of the basic functionality required to fetch images and then display them with animation.
 */
@interface DFImageView : UIView

@property (nonatomic) id<DFImageManager> imageManager;
@property (nonatomic, readonly) UIImageView *imageView;
@property (nonatomic) DFImageViewAnimation animation;

/*! Placeholder color is displayed when the image is being loaded. It doesn't interfere with the background color of the view so that the images that has transparency are displayed properly.
 */
@property (nonatomic) UIColor *placeholderColor;

/*! Automatically changes image request priorities when image view gets added/removed from the window. Default value is YES.
 */
@property (nonatomic) BOOL managesRequestPriorities;

/*! Image that gets displayed when either the request failes or when a given asset is nil.
 */
@property (nonatomic) UIImage *failureImage;

- (void)setImageWithAsset:(id)asset;
- (void)setImageWithAsset:(id)asset options:(DFImageRequestOptions *)options;

- (void)prepareForReuse;

@end


/*! Subclassing hooks are method intended to be overrided in case you want to extend/or change default behavior of DFImageView. You don't have to call super if you override one of this methods.
 */
@interface DFImageView (SubclassingHooks)

- (void)requestDidFinishWithImage:(UIImage *)image source:(DFImageSource)source info:(NSDictionary *)info;
- (void)requestDidFailWithError:(NSError *)error info:(NSDictionary *)info;

@end
<commit_msg>DFImageView: failureImageView is made public<commit_after>// The MIT License (MIT)
//
// Copyright (c) 2014 <NAME> (github.com/kean).
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import "DFImageManagerProtocol.h"
#import <UIKit/UIKit.h>

@class DFImageRequestOptions;

typedef NS_ENUM(NSUInteger, DFImageViewAnimation) {
   DFImageViewAnimationNone,
   DFImageViewAnimationFade,
   DFImageViewAnimationCrossDissolve
};


/*! Implements most of the basic functionality required to fetch images and then display them with animation.
 */
@interface DFImageView : UIView

@property (nonatomic) id<DFImageManager> imageManager;
@property (nonatomic) DFImageViewAnimation animation;

/*! Placeholder color is displayed when the image is being loaded. It doesn't interfere with the background color of the view so that the images that has transparency are displayed properly.
 */
@property (nonatomic) UIColor *placeholderColor;

/*! Automatically changes image request priorities when image view gets added/removed from the window. Default value is YES.
 */
@property (nonatomic) BOOL managesRequestPriorities;

/*! Image that gets displayed when either the request failes or when a given asset is nil.
 */
@property (nonatomic) UIImage *failureImage;

@property (nonatomic, readonly) UIImageView *imageView;

/*! Lazily creates and returns failure image view. The property is made public so that you can modify view's behavior. For example, you might want to change it's layout or content mode.
 */
@property (nonatomic, readonly) UIImageView *failureImageView;

- (void)setImageWithAsset:(id)asset;
- (void)setImageWithAsset:(id)asset options:(DFImageRequestOptions *)options;

- (void)prepareForReuse;

@end


/*! Subclassing hooks are method intended to be overrided in case you want to extend/or change default behavior of DFImageView. You don't have to call super if you override one of this methods.
 */
@interface DFImageView (SubclassingHooks)

- (void)requestDidFinishWithImage:(UIImage *)image source:(DFImageSource)source info:(NSDictionary *)info;
- (void)requestDidFailWithError:(NSError *)error info:(NSDictionary *)info;

@end

{'fraction_non_alphanumeric': 0.07931262392597488, 'fraction_numerical': 0.0013218770654329147, 'mean_word_length': 4.9053658536585365, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5893646', 'n_tokens_mistral': 1638, 'n_tokens_neox': 1503, 'n_words': 724}