Peter d153fe0f21 Add 'submodules/LegacyComponents/' from commit 'd5594346161c1b7f203d1e87068bbe77bcaac019'
git-subtree-dir: submodules/LegacyComponents
git-subtree-mainline: 608630530451e02e5aec48389d144dbf7a3625b9
git-subtree-split: d5594346161c1b7f203d1e87068bbe77bcaac019
2019-06-11 18:51:15 +01:00

37 lines
1.1 KiB
Objective-C
Executable File

//
// CBLibrary.h
// Coub
//
// Created by Konstantin Anoshkin on 26.06.12.
// Copyright 2012 Coub. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CBCoubAsset.h"
#if TARGET_IPHONE_SIMULATOR
// On iPhone Simulator NSTemporaryDirectory() returns a Mac OS X temporary directory which is outside our application sandbox.
// For consistency's sake we want to make it behave as on an honest-to-goodness iPhone device.
NSString *CBTemporaryDirectory (void);
#define NSTemporaryDirectory() CBTemporaryDirectory()
#endif
NSString *CBDocumentsDirectory (void);
NSString *CBCachesDirectory (void);
@interface CBLibrary : NSObject
+ (CBLibrary *)sharedLibrary;
- (void)markCoubAsset:(id<CBCoubAsset>)coub asDownloaded:(BOOL)downloaded;
- (BOOL)isCoubDownloadedByPermalink:(NSString *)permalink;
- (void)markCoubChunk:(id<CBCoubAsset>)coub idx:(NSInteger)idx asDownloaded:(BOOL)downloaded;
- (BOOL)isCoubChunkDownloadedByPermalink:(NSString *)permalink idx:(NSInteger)idx;
- (void)cleanUpMediaCache;
@property (strong, nonatomic) NSURL *mediaDirectory;
@end