Skip to content

Commit

Permalink
Merge pull request #1304 from meganz/release/v3.4.5
Browse files Browse the repository at this point in the history
Release v3.4.5
  • Loading branch information
sergiohs84 authored Jan 4, 2019
2 parents 0878468 + b11f351 commit a01c429
Show file tree
Hide file tree
Showing 64 changed files with 1,687 additions and 361 deletions.
6 changes: 6 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ if ANDROID
AM_LIBTOOLFLAGS="--tag=CXX"
endif

if LINUX
AM_LIBTOOLFLAGS="--tag=CXX"
endif

VERSION_INFO=$(LT_CURRENT):$(LT_REVISION):$(LT_AGE)

CLEANFILES=
Expand Down Expand Up @@ -84,6 +88,7 @@ else
platform_includes=$(top_srcdir)/include/mega/posix
endif

if CPPCHECK
CPPCHECK_CMD = cppcheck \
--template='{file};{line};{severity};{id};{message}' \
--enable=warning,portability,information,missingInclude \
Expand All @@ -98,6 +103,7 @@ CPPCHECK_DIRS = \

cppcheck:
$(CPPCHECK_CMD) $(CPPCHECK_DIRS)
endif

MOSTLYCLEANFILES = $(DX_CLEANFILES)

Expand Down
1 change: 1 addition & 0 deletions Makefile.win32
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ LDFLAGS=

COMMON_SRC=\
src/attrmap.cpp \
src/autocomplete.cpp \
src/backofftimer.cpp \
src/base64.cpp \
src/command.cpp \
Expand Down
39 changes: 39 additions & 0 deletions bindings/ios/MEGADelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@
* The details about the event, like the type of event and optionally any
* additional parameter, is received in the \c params parameter.
*
* You can check the type of event by calling [MEGAEvent type]
*
* Currently, the following type of events are notified:
*
* - EventCommitDB: when the SDK commits the ongoing DB transaction.
Expand All @@ -221,6 +223,43 @@
* automatically enable HTTPS on next executions of the app to not force the SDK to detect the problem
* and automatically switch to HTTPS every time that the application starts.
*
* - EventDisconnect: when the SDK performs a disconnect to reset all the
* existing open-connections, since they have become unusable. It's recommended that the app
* receiving this event reset its connections with other servers, since the disconnect
* performed by the SDK is due to a network change or IP addresses becoming invalid.
*
* - EventAccountBlocked: when the account get blocked, typically because of
* infringement of the Mega's terms of service repeatedly. This event is followed by an automatic
* logout.
*
* Valid data in the MegaEvent object received in the callback:
* - [MEGAEvent text]: message to show to the user.
* - [MEGAEvent number]: code representing the reason for being blocked.
* 200: suspension message for any type of suspension, but copyright suspension.
* 300: suspension only for multiple copyright violations.
*
* - EventStorage: when the status of the storage changes.
*
* For this event type, MegaEvent::getNumber provides the current status of the storage
*
* There are three possible storage states:
* - StorageStateGreen = 0
* There are no storage problems
*
* - StorageStateOrange = 1
* The account is almost full
*
* - StorageStateRed = 2
* The account is full. Uploads have been stopped
*
* - StorageStateChange = 3
* There is a possible significant change in the storage state.
* It's needed to call [MEGASdk getAccountDetails] to check the storage status.
* After calling it, this callback will be called again with the corresponding
* state if there is really a change.
*
* - EventNodesCurrent: when all external changes have been received
*
* You can check the type of event by calling [MEGAEvent type]
*
* @param api MEGASdk object connected to the account
Expand Down
10 changes: 9 additions & 1 deletion bindings/ios/MEGAEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ typedef NS_ENUM(NSUInteger, Event) {
EventAccountConfirmation = 1,
EventChangeToHttps = 2,
EventDisconnect = 3,
EventAccountBlocked = 4
EventAccountBlocked = 4,
EventStorage = 5,
EventNodesCurrent = 6
};

/**
Expand All @@ -47,6 +49,12 @@ typedef NS_ENUM(NSUInteger, Event) {
*/
@property (nonatomic, readonly) NSString *text;

/**
* @brief A number relative to this event
*
*/
@property (nonatomic, readonly) NSInteger number;

/**
* @brief Creates a copy of this MEGAEvent object
*
Expand Down
4 changes: 4 additions & 0 deletions bindings/ios/MEGAEvent.mm
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,9 @@ - (NSString *)text {
return self.megaEvent ? [[NSString alloc] initWithUTF8String:self.megaEvent->getText()] : nil;
}

- (NSInteger)number {
return self.megaEvent ? self.megaEvent->getNumber() : -1;
}


@end
39 changes: 39 additions & 0 deletions bindings/ios/MEGAGlobalDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
* The details about the event, like the type of event and optionally any
* additional parameter, is received in the \c params parameter.
*
* You can check the type of event by calling [MEGAEvent type]
*
* Currently, the following type of events are notified:
*
* - EventCommitDB: when the SDK commits the ongoing DB transaction.
Expand All @@ -122,6 +124,43 @@
* automatically enable HTTPS on next executions of the app to not force the SDK to detect the problem
* and automatically switch to HTTPS every time that the application starts.
*
* - EventDisconnect: when the SDK performs a disconnect to reset all the
* existing open-connections, since they have become unusable. It's recommended that the app
* receiving this event reset its connections with other servers, since the disconnect
* performed by the SDK is due to a network change or IP addresses becoming invalid.
*
* - EventAccountBlocked: when the account get blocked, typically because of
* infringement of the Mega's terms of service repeatedly. This event is followed by an automatic
* logout.
*
* Valid data in the MegaEvent object received in the callback:
* - [MEGAEvent text]: message to show to the user.
* - [MEGAEvent number]: code representing the reason for being blocked.
* 200: suspension message for any type of suspension, but copyright suspension.
* 300: suspension only for multiple copyright violations.
*
* - EventStorage: when the status of the storage changes.
*
* For this event type, MegaEvent::getNumber provides the current status of the storage
*
* There are three possible storage states:
* - StorageStateGreen = 0
* There are no storage problems
*
* - StorageStateOrange = 1
* The account is almost full
*
* - StorageStateRed = 2
* The account is full. Uploads have been stopped
*
* - StorageStateChange = 3
* There is a possible significant change in the storage state.
* It's needed to call [MEGASdk getAccountDetails] to check the storage status.
* After calling it, this callback will be called again with the corresponding
* state if there is really a change.
*
* - EventNodesCurrent: when all external changes have been received
*
* You can check the type of event by calling [MEGAEvent type]
*
* @param api MEGASdk object connected to the account
Expand Down
4 changes: 3 additions & 1 deletion bindings/ios/MEGANode.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ typedef NS_ENUM(NSUInteger, MEGANodeChangeType) {
MEGANodeChangeTypeInShare = 0x20,
MEGANodeChangeTypeOutShare = 0x40,
MEGANodeChangeTypeParent = 0x80,
MEGANodeChangeTypePendingShare = 0x100
MEGANodeChangeTypePendingShare = 0x100,
MEGANodeChangeTypePublicLink = 0x200,
MEGANodeChangeTypeNew = 0x400
};

/**
Expand Down
81 changes: 71 additions & 10 deletions bindings/ios/MEGASdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ typedef NS_ENUM(NSInteger, MEGAUserAttribute) {
MEGAUserAttributeDisableVersions = 16, // private - byte array
MEGAUserAttributeContactLinkVerification = 17, // private - byte array
MEGAUserAttributeRichPreviews = 18, // private - byte array
MEGAUserAttributeRubbishTime = 19, // private - byte array
MEGAUserAttributeLastPSA = 20 // private - char array
MEGAUserAttributeRubbishTime = 19, // private - byte array
MEGAUserAttributeLastPSA = 20, // private - char array
MEGAUserAttributeStorageState = 21 // private - char array
};

typedef NS_ENUM(NSInteger, MEGANodeAttribute) {
Expand Down Expand Up @@ -151,6 +152,13 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
KeepMeAliveCameraUploads = 0
};

typedef NS_ENUM(NSUInteger, StorageState) {
StorageStateGreen = 0,
StorageStateOrange = 1,
StorageStateRed = 2,
StorageStateChange = 3
};

/**
* @brief Allows to control a MEGA account or a public folder.
*
Expand Down Expand Up @@ -327,6 +335,11 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
*/
@property (readonly, nonatomic) NSInteger numUnreadUserAlerts;

/**
* @brief The time (in seconds) during which transfers will be stopped due to a bandwidth overquota, otherwise 0
*/
@property (readonly, nonatomic) long long bandwidthOverquotaDelay;

#pragma mark - Init

/**
Expand Down Expand Up @@ -3036,6 +3049,8 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
* Get whether user generates rich-link messages or not (private)
* MEGAUserAttributeRubbishTime = 19
* Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted)
* MEGAUserAttributeStorageState = 21
* Get the state of the storage (private non-encrypted)
*
*/
- (void)getUserAttributeForUser:(MEGAUser *)user type:(MEGAUserAttribute)type;
Expand Down Expand Up @@ -3085,6 +3100,8 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
* Get whether user generates rich-link messages or not (private)
* MEGAUserAttributeRubbishTime = 19
* Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted)
* MEGAUserAttributeStorageState = 21
* Get the state of the storage (private non-encrypted)
*
* @param delegate MEGARequestDelegate to track this request
*/
Expand Down Expand Up @@ -3136,6 +3153,10 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
* Get whether user has versions disabled or enabled (private, non-encrypted)
* MEGAUserAttributeRichPreviews = 18
* Get whether user generates rich-link messages or not (private)
* MEGAUserAttributeRubbishTime = 19
* Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted)
* MEGAUserAttributeStorageState = 21
* Get the state of the storage (private non-encrypted)
*
*/
- (void)getUserAttributeForEmailOrHandle:(NSString *)emailOrHandle type:(MEGAUserAttribute)type;
Expand Down Expand Up @@ -3186,6 +3207,10 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
* Get whether user has versions disabled or enabled (private, non-encrypted)
* MEGAUserAttributeRichPreviews = 18
* Get whether user generates rich-link messages or not (private)
* MEGAUserAttributeRubbishTime = 19
* Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted)
* MEGAUserAttributeStorageState = 21
* Get the state of the storage (private non-encrypted)
*
* @param delegate MEGARequestDelegate to track this request
*/
Expand Down Expand Up @@ -3213,14 +3238,32 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
* Get the firstname of the user (public)
* MEGAUserAttributeLastname = 2
* Get the lastname of the user (public)
* MEGAUserAttributeAuthRing = 3
* Get the authentication ring of the user (private)
* MEGAUserAttributeLastInteraction = 4
* Get the last interaction of the contacts of the user (private)
* MEGAUserAttributeED25519PublicKey = 5
* Get the public key Ed25519 of the user (public)
* MEGAUserAttributeCU25519PublicKey = 6
* Get the public key Cu25519 of the user (public)
* MEGAUserAttributeKeyring = 7
* Get the key ring of the user: private keys for Cu25519 and Ed25519 (private)
* MEGAUserAttributeSigRsaPublicKey = 8
* Get the signature of RSA public key of the user (public)
* MEGAUserAttributeSigCU255PublicKey = 9
* Get the signature of Cu25519 public key of the user (public)
* MEGAUserAttributeLanguage = 14
* Get the preferred language of the user (private, non-encrypted)
* MEGAUserAttributePwdReminder = 15
* Get the password-reminder-dialog information (private, non-encrypted)
* MEGAUserAttributeDisableVersions = 16
* Get whether user has versions disabled or enabled (private, non-encrypted)
* MEGAUserAttributeRichPreviews = 18
* Get whether user generates rich-link messages or not (private)
* MEGAUserAttributeRubbishTime = 19
* Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted)
* MEGAUserAttributeStorageState = 21
* Get the state of the storage (private non-encrypted)
*
*/
- (void)getUserAttributeType:(MEGAUserAttribute)type;
Expand All @@ -3247,14 +3290,32 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
* Get the firstname of the user (public)
* MEGAUserAttributeLastname = 2
* Get the lastname of the user (public)
* MEGAUserAttributeAuthRing = 3
* Get the authentication ring of the user (private)
* MEGAUserAttributeLastInteraction = 4
* Get the last interaction of the contacts of the user (private)
* MEGAUserAttributeED25519PublicKey = 5
* Get the public key Ed25519 of the user (public)
* MEGAUserAttributeCU25519PublicKey = 6
* Get the public key Cu25519 of the user (public)
* MEGAUserAttributeKeyring = 7
* Get the key ring of the user: private keys for Cu25519 and Ed25519 (private)
* MEGAUserAttributeSigRsaPublicKey = 8
* Get the signature of RSA public key of the user (public)
* MEGAUserAttributeSigCU255PublicKey = 9
* Get the signature of Cu25519 public key of the user (public)
* MEGAUserAttributeLanguage = 14
* Get the preferred language of the user (private, non-encrypted)
* MEGAUserAttributePwdReminder = 15
* Get the password-reminder-dialog information (private, non-encrypted)
* MEGAUserAttributeDisableVersions = 16
* Get whether user has versions disabled or enabled (private, non-encrypted)
* MEGAUserAttributeRichPreviews = 18
* Get whether user generates rich-link messages or not (private)
* MEGAUserAttributeRubbishTime = 19
* Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted)
* MEGAUserAttributeStorageState = 21
* Get the state of the storage (private non-encrypted)
*
* @param delegate MEGARequestDelegate to track this request
*/
Expand Down Expand Up @@ -3869,11 +3930,11 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
*
* The associated request type with this request is MEGARequestTypeGetAttrUser
* Valid data in the MEGARequest object received on callbacks:
* - [MEGARequest getParamType] - Returns the attribute type MEGAUserAttributeRubbishTime
* - [MEGARequest paramType] - Returns the attribute type MEGAUserAttributeRubbishTime
*
* Valid data in the MEGARequest object received in onRequestFinish when the error code
* is MEGAErrorTypeApiOk:
* - [MEGARequest getNumber] - Returns the days for rubbish-bin cleaning scheduler.
* - [MEGARequest number] - Returns the days for rubbish-bin cleaning scheduler.
* Zero means that the rubbish-bin cleaning scheduler is disabled (only if the account is PRO)
* Any negative value means that the configured value is invalid.
*
Expand All @@ -3886,11 +3947,11 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
*
* The associated request type with this request is MEGARequestTypeGetAttrUser
* Valid data in the MEGARequest object received on callbacks:
* - [MEGARequest getParamType] - Returns the attribute type MEGAUserAttributeRubbishTime
* - [MEGARequest paramType] - Returns the attribute type MEGAUserAttributeRubbishTime
*
* Valid data in the MEGARequest object received in onRequestFinish when the error code
* is MEGAErrorTypeApiOk:
* - [MEGARequest getNumber] - Returns the days for rubbish-bin cleaning scheduler.
* - [MEGARequest number] - Returns the days for rubbish-bin cleaning scheduler.
* Zero means that the rubbish-bin cleaning scheduler is disabled (only if the account is PRO)
* Any negative value means that the configured value is invalid.
*
Expand All @@ -3902,8 +3963,8 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
*
* The associated request type with this request is MEGARequestTypeSetAttrUser
* Valid data in the MEGARequest object received on callbacks:
* - [MEGARequest getParamType] - Returns the attribute type MEGAUserAttributeRubbishTime
* - [MEGARequest getNumber] - Returns the days for rubbish-bin cleaning scheduler passed as parameter
* - [MEGARequest paramType] - Returns the attribute type MEGAUserAttributeRubbishTime
* - [MEGARequest number] - Returns the days for rubbish-bin cleaning scheduler passed as parameter
*
* @param days Number of days for rubbish-bin cleaning scheduler. It must be >= 0.
* The value zero disables the rubbish-bin cleaning scheduler (only for PRO accounts).
Expand All @@ -3917,8 +3978,8 @@ typedef NS_ENUM(NSInteger, KeepMeAlive) {
*
* The associated request type with this request is MEGARequestTypeSetAttrUser
* Valid data in the MEGARequest object received on callbacks:
* - [MEGARequest getParamType] - Returns the attribute type MEGAUserAttributeRubbishTime
* - [MEGARequest getNumber] - Returns the days for rubbish-bin cleaning scheduler passed as parameter
* - [MEGARequest paramType] - Returns the attribute type MEGAUserAttributeRubbishTime
* - [MEGARequest number] - Returns the days for rubbish-bin cleaning scheduler passed as parameter
*
* @param days Number of days for rubbish-bin cleaning scheduler. It must be >= 0.
* The value zero disables the rubbish-bin cleaning scheduler (only for PRO accounts).
Expand Down
4 changes: 4 additions & 0 deletions bindings/ios/MEGASdk.mm
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ - (NSInteger)numUnreadUserAlerts {
return self.megaApi->getNumUnreadUserAlerts();
}

- (long long)bandwidthOverquotaDelay {
return self.megaApi->getBandwidthOverquotaDelay();
}

#pragma mark - Init

- (instancetype)initWithAppKey:(NSString *)appKey userAgent:(NSString *)userAgent {
Expand Down
Loading

0 comments on commit a01c429

Please sign in to comment.