//
//  CloudStorageBar.h
//  zhuxun
//
//  Created by winsoft on 17/6/20.
//
//

#import <UIKit/UIKit.h>
//#define SegmentControllH 40
#define SearchBarH 44.0f
#define CloudStorageBarHeight SearchBarH //+ SegmentControllH

typedef enum {

    SortTypeFileName,
    SortTypeFileTime
    
}SortType;

typedef enum {

    FileTypeAll         = 0,
    FileTypePic         = 1,
    FileTypeDoc         = 2,
    FileTypeVideo       = 3,
    FileTypeAudio       = 4,
    FileTypeAudioOther  = 5
    
}CloudStorageBarFileType;

typedef void(^BarNewFolderBlock)();
typedef void(^BarSortBlock)(SortType sortType);
typedef void(^FileClassBlock)(CloudStorageBarFileType fileType);
@protocol CSSearchBarDelegate <NSObject>
@optional
- (void)searchBarPrepareToSearch;
- (void)searchBarStartSearch:(UISearchBar *)searchBar withSearchContent:(NSString *)searchContent;
- (void)searchBarCancerSearch;
@end

@interface CloudStorageBar : UIView
@property (nonatomic , strong) BarNewFolderBlock barNewFolderBlock;
@property (nonatomic , strong) BarSortBlock barSortBlock;
@property (nonatomic , strong) FileClassBlock fileClassBlock;
@property (nonatomic , assign) id<CSSearchBarDelegate> delegate;

- (void)giveUpSearch;
//是否进入搜索模式:屏蔽文件夹创建按钮.
- (void)beSearchModel:(BOOL)searchModel;
@end
