Skip to content

Commit

Permalink
Merge pull request #1622 from meganz/release/v3.6.3
Browse files Browse the repository at this point in the history
Release/v3.6.3
  • Loading branch information
sergiohs84 authored Oct 10, 2019
2 parents 529437a + 49df2e3 commit d6bcd74
Show file tree
Hide file tree
Showing 42 changed files with 3,186 additions and 903 deletions.
41 changes: 41 additions & 0 deletions bindings/ios/MEGACancelToken.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* @file MEGACancelToken.h
* @brief Cancel MEGASdk methods.
*
* (c) 2019- by Mega Limited, Auckland, New Zealand
*
* This file is part of the MEGA SDK - Client Access Engine.
*
* Applications using the MEGA API must present a valid application key
* and comply with the the rules set forth in the Terms of Service.
*
* The MEGA SDK is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Simplified (2-clause) BSD License.
*
* You should have received a copy of the license along with this
* program.
*/

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface MEGACancelToken : NSObject

/**
* @brief The state of the flag
*/
@property (nonatomic, readonly, getter=isCancelled) BOOL cancelled;

/**
* @brief Allows to set the value of the flag
* @param newValue YES to force the cancelation of the processing. NO to reset.
*/
- (void)cancelWithNewValue:(BOOL)newValue;

@end

NS_ASSUME_NONNULL_END
60 changes: 60 additions & 0 deletions bindings/ios/MEGACancelToken.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
* @file MEGACancelToken.m
* @brief Cancel MEGASdk methods.
*
* (c) 2019- by Mega Limited, Auckland, New Zealand
*
* This file is part of the MEGA SDK - Client Access Engine.
*
* Applications using the MEGA API must present a valid application key
* and comply with the the rules set forth in the Terms of Service.
*
* The MEGA SDK is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Simplified (2-clause) BSD License.
*
* You should have received a copy of the license along with this
* program.
*/

#import "MEGACancelToken.h"
#import "megaapi.h"
#import "MEGACancelToken+init.h"

@interface MEGACancelToken ()

@property (nonatomic) mega::MegaCancelToken *megaCancelToken;

@end

@implementation MEGACancelToken

- (instancetype)init {
self = [super init];

if (self) {
_megaCancelToken = mega::MegaCancelToken::createInstance();
}

return self;
}

- (void)dealloc {
delete _megaCancelToken;
}

- (mega::MegaCancelToken *)getCPtr {
return self.megaCancelToken;
}

- (BOOL)isCancelled {
return self.megaCancelToken->isCancelled();
}

- (void)cancelWithNewValue:(BOOL)newValue {
self.megaCancelToken->cancel(newValue);
}

@end
4 changes: 4 additions & 0 deletions bindings/ios/MEGADelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#import "MEGAContactRequestList.h"
#import "MEGAEvent.h"

NS_ASSUME_NONNULL_BEGIN

@class MEGASdk;

/**
Expand Down Expand Up @@ -280,3 +282,5 @@
- (void)onEvent:(MEGASdk *)api event:(MEGAEvent *)event;

@end

NS_ASSUME_NONNULL_END
4 changes: 3 additions & 1 deletion bindings/ios/MEGAEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ typedef NS_ENUM(NSUInteger, Event) {
EventNodesCurrent = 6,
EventMediaInfoReady = 7,
EventStorageSumChanged = 8,
EventBusinessStatus = 9
EventBusinessStatus = 9,
EventKeyModified = 10,
EventMiscFlagsReady = 11
};

/**
Expand Down
4 changes: 4 additions & 0 deletions bindings/ios/MEGAGlobalDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*/
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/**
* @brief Protocol to get information about global events.
*
Expand Down Expand Up @@ -182,3 +184,5 @@
- (void)onEvent:(MEGASdk *)api event:(MEGAEvent *)event;

@end

NS_ASSUME_NONNULL_END
3 changes: 3 additions & 0 deletions bindings/ios/MEGALoggerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/**
* @brief Protocol to receive information about SDK logs
Expand Down Expand Up @@ -59,3 +60,5 @@
- (void)logWithTime:(NSString*)time logLevel:(NSInteger)logLevel source:(NSString *)source message:(NSString *)message;

@end

NS_ASSUME_NONNULL_END
3 changes: 3 additions & 0 deletions bindings/ios/MEGARequestDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#import "MEGARequest.h"
#import "MEGAError.h"

NS_ASSUME_NONNULL_BEGIN

@class MEGASdk;

/**
Expand Down Expand Up @@ -88,3 +90,4 @@

@end

NS_ASSUME_NONNULL_END
8 changes: 8 additions & 0 deletions bindings/ios/MEGASDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
A8827A5C1F178A0D0097B5DE /* DelegateMEGATreeProcessorListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8827A5B1F178A0D0097B5DE /* DelegateMEGATreeProcessorListener.mm */; };
A88722DC1FFE6A8B00E3F443 /* mediafileattribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A88722DB1FFE6A8A00E3F443 /* mediafileattribute.cpp */; };
A8A86BD51F559EDA00C214DA /* mega_zxcvbn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A86BD41F559EDA00C214DA /* mega_zxcvbn.cpp */; };
A8FD7334230ABA400070A5E8 /* MEGACancelToken.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8FD7333230ABA400070A5E8 /* MEGACancelToken.mm */; };
A8FD7B641E93B40E0031FC50 /* osxutils.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8FD7B631E93B40E0031FC50 /* osxutils.mm */; };
B6657E9C225C2B6200EF8D91 /* raid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6657E9B225C2B6200EF8D91 /* raid.cpp */; };
B698890D2198CCE300D0EE89 /* MEGAFileInputStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = B698890B2198CCE300D0EE89 /* MEGAFileInputStream.mm */; };
Expand Down Expand Up @@ -306,6 +307,9 @@
A8A86BD31F559C0100C214DA /* mega_zxcvbn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mega_zxcvbn.h; sourceTree = "<group>"; };
A8A86BD41F559EDA00C214DA /* mega_zxcvbn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mega_zxcvbn.cpp; path = ../../src/mega_zxcvbn.cpp; sourceTree = "<group>"; };
A8EBFDD21EFAE14C00DF89DA /* MEGAEvent+init.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MEGAEvent+init.h"; sourceTree = "<group>"; };
A8FD7332230ABA400070A5E8 /* MEGACancelToken.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MEGACancelToken.h; sourceTree = "<group>"; };
A8FD7333230ABA400070A5E8 /* MEGACancelToken.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MEGACancelToken.mm; sourceTree = "<group>"; };
A8FD7335230AC42B0070A5E8 /* MEGACancelToken+init.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MEGACancelToken+init.h"; sourceTree = "<group>"; };
A8FD7B611E93B3ED0031FC50 /* osxutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = osxutils.h; path = osx/osxutils.h; sourceTree = "<group>"; };
A8FD7B631E93B40E0031FC50 /* osxutils.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = osxutils.mm; path = ../../src/osx/osxutils.mm; sourceTree = "<group>"; };
B622FC762174261F00CF707C /* MEGABackgroundMediaUpload+init.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MEGABackgroundMediaUpload+init.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -495,6 +499,8 @@
5B1D7CE121F1E07200B0215E /* MEGARecentActionBucket.mm */,
B6A6CB642170125A009032C9 /* MEGABackgroundMediaUpload.h */,
B6A6CB652170125A009032C9 /* MEGABackgroundMediaUpload.mm */,
A8FD7332230ABA400070A5E8 /* MEGACancelToken.h */,
A8FD7333230ABA400070A5E8 /* MEGACancelToken.mm */,
);
name = bindings;
sourceTree = "<group>";
Expand Down Expand Up @@ -654,6 +660,7 @@
A808E4862158DAC400BDCE82 /* MEGATimeZoneDetails+init.h */,
5B0670CD21F5BABD00AD9F99 /* MEGARecentActionBucket+init.h */,
B622FC762174261F00CF707C /* MEGABackgroundMediaUpload+init.h */,
A8FD7335230AC42B0070A5E8 /* MEGACancelToken+init.h */,
);
path = Private;
sourceTree = "<group>";
Expand Down Expand Up @@ -805,6 +812,7 @@
940BEFBA19ED92C2007E7FA2 /* command.cpp in Sources */,
940BEFD019ED92C2007E7FA2 /* transfer.cpp in Sources */,
5B72A14D20D3B3FB007FE4FD /* mega_ccronexpr.cpp in Sources */,
A8FD7334230ABA400070A5E8 /* MEGACancelToken.mm in Sources */,
41AD7A7E1A1E10F900D66856 /* DelegateMEGALoggerListener.mm in Sources */,
41A990731A5D305700B2094A /* mega_utf8proc.cpp in Sources */,
A81790101EFACE6400110E91 /* MEGAHandleList.mm in Sources */,
Expand Down
Loading

0 comments on commit d6bcd74

Please sign in to comment.