MXKMediaManager has been moved to SDK level

This commit is contained in:
giomfo 2016-12-01 14:55:29 +01:00
parent 946255e897
commit 61fd4320ca
6 changed files with 13 additions and 13 deletions

View file

@ -375,7 +375,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
[[AFNetworkReachabilityManager sharedManager] stopMonitoring];
// check if some media must be released to reduce the cache size
[MXKMediaManager reduceCacheSizeToInsert:0];
[MXMediaManager reduceCacheSizeToInsert:0];
// Hide potential notification
if (self.mxInAppNotification)
@ -1516,7 +1516,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
if (clearCache)
{
// clear the media cache
[MXKMediaManager clearCache];
[MXMediaManager clearCache];
}
}
@ -1526,7 +1526,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
isAPNSRegistered = NO;
// Clear cache
[MXKMediaManager clearCache];
[MXMediaManager clearCache];
#ifdef MX_CALL_STACK_ENDPOINT
// Erase all created certificates and private keys by MXEndpointCallStack

View file

@ -553,7 +553,7 @@
// cancel pending uploads/downloads
// they are useless by now
[MXKMediaManager cancelDownloadsInCacheFolder:room.state.roomId];
[MXMediaManager cancelDownloadsInCacheFolder:room.state.roomId];
// TODO GFO cancel pending uploads related to this room

View file

@ -121,7 +121,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
UITextField* addAddressTextField;
// The potential image loader
MXKMediaLoader *uploader;
MXMediaLoader *uploader;
// The pending http operation
MXHTTPOperation* pendingOperation;
@ -1044,7 +1044,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
UIImage *updatedPicture = [MXKTools forceImageOrientationUp:[updatedItemsDict objectForKey:kRoomSettingsAvatarKey]];
// Upload picture
uploader = [MXKMediaManager prepareUploaderWithMatrixSession:mxRoom.mxSession initialRange:0 andRange:1.0];
uploader = [MXMediaManager prepareUploaderWithMatrixSession:mxRoom.mxSession initialRange:0 andRange:1.0];
[uploader uploadData:UIImageJPEGRepresentation(updatedPicture, 0.5) filename:nil mimeType:@"image/jpeg" success:^(NSString *url) {

View file

@ -1789,7 +1789,7 @@
{
// Upload id is stored in attachment url (nasty trick)
NSString *uploadId = roomBubbleTableViewCell.bubbleData.attachment.actualURL;
if ([MXKMediaManager existingUploaderWithId:uploadId])
if ([MXMediaManager existingUploaderWithId:uploadId])
{
[currentAlert addActionWithTitle:NSLocalizedStringFromTable(@"room_event_action_cancel_upload", @"Vector", nil) style:MXKAlertActionStyleDefault handler:^(MXKAlert *alert) {
@ -1797,7 +1797,7 @@
[strongSelf cancelEventSelection];
// Get again the loader
MXKMediaLoader *loader = [MXKMediaManager existingUploaderWithId:uploadId];
MXMediaLoader *loader = [MXMediaManager existingUploaderWithId:uploadId];
if (loader)
{
[loader cancel];
@ -1815,7 +1815,7 @@
if (level == 0 && selectedEvent.isMediaAttachment)
{
NSString *cacheFilePath = roomBubbleTableViewCell.bubbleData.attachment.cacheFilePath;
if ([MXKMediaManager existingDownloaderWithOutputFilePath:cacheFilePath])
if ([MXMediaManager existingDownloaderWithOutputFilePath:cacheFilePath])
{
[currentAlert addActionWithTitle:NSLocalizedStringFromTable(@"room_event_action_cancel_download", @"Vector", nil) style:MXKAlertActionStyleDefault handler:^(MXKAlert *alert) {
@ -1823,7 +1823,7 @@
[strongSelf cancelEventSelection];
// Get again the loader
MXKMediaLoader *loader = [MXKMediaManager existingDownloaderWithOutputFilePath:cacheFilePath];
MXMediaLoader *loader = [MXMediaManager existingDownloaderWithOutputFilePath:cacheFilePath];
if (loader)
{
[loader cancel];

View file

@ -1897,7 +1897,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
UIImage *updatedPicture = [MXKTools forceImageOrientationUp:newAvatarImage];
// Upload picture
MXKMediaLoader *uploader = [MXKMediaManager prepareUploaderWithMatrixSession:account.mxSession initialRange:0 andRange:1.0];
MXMediaLoader *uploader = [MXMediaManager prepareUploaderWithMatrixSession:account.mxSession initialRange:0 andRange:1.0];
[uploader uploadData:UIImageJPEGRepresentation(updatedPicture, 0.5) filename:nil mimeType:@"image/jpeg" success:^(NSString *url) {

View file

@ -80,8 +80,8 @@
UIImage *preview = nil;
if (bubbleData.attachment.previewURL)
{
NSString *cacheFilePath = [MXKMediaManager cachePathForMediaWithURL:bubbleData.attachment.previewURL andType:mimetype inFolder:self.attachmentImageView.mediaFolder];
preview = [MXKMediaManager loadPictureFromFilePath:cacheFilePath];
NSString *cacheFilePath = [MXMediaManager cachePathForMediaWithURL:bubbleData.attachment.previewURL andType:mimetype inFolder:self.attachmentImageView.mediaFolder];
preview = [MXMediaManager loadPictureFromFilePath:cacheFilePath];
}
if (url.length || preview)