From 4dc728c1042645d04134c0c3bf47d642874551f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Wed, 2 May 2018 19:19:23 +0200 Subject: [PATCH 01/53] Ignore ua packets based on ua version API will eventually start sending in user-attribute actionpackets the most recent version of the attribute, rather than every single update. That change will also remove the `i` in the APs, so clients will need to filter ua packets based on the version. If the version is known, then the ua was set by the client and can ignore the AP. --- src/commands.cpp | 6 ------ src/megaclient.cpp | 8 ++++++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/commands.cpp b/src/commands.cpp index c94f060e43..923942acf9 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -2337,8 +2337,6 @@ CommandPutMultipleUAVer::CommandPutMultipleUAVer(MegaClient *client, const usera endarray(); } - notself(client); - tag = ctag; } @@ -2467,8 +2465,6 @@ CommandPutUAVer::CommandPutUAVer(MegaClient* client, attr_t at, const byte* av, endarray(); - notself(client); - tag = ctag; } @@ -2533,8 +2529,6 @@ CommandPutUA::CommandPutUA(MegaClient* client, attr_t at, const byte* av, unsign arg(an.c_str(), av, avl); } - notself(client); - tag = ctag; } diff --git a/src/megaclient.cpp b/src/megaclient.cpp index 29fed1fa93..2afd39232e 100644 --- a/src/megaclient.cpp +++ b/src/megaclient.cpp @@ -4722,13 +4722,12 @@ void MegaClient::sc_userattr() else if (ualist.size() == uavlist.size()) { // invalidate only out-of-date attributes - const string *cacheduav; for (itua = ualist.begin(), ituav = uavlist.begin(); itua != ualist.end(); itua++, ituav++) { attr_t type = User::string2attr(itua->c_str()); - cacheduav = u->getattrversion(type); + const string *cacheduav = u->getattrversion(type); if (cacheduav) { if (*cacheduav != *ituav) @@ -4741,6 +4740,11 @@ void MegaClient::sc_userattr() } #endif } + else + { + LOG_info << "User attribute already up to date"; + return; + } } else { From 73fb592eee9be64c1249bd2255f0096fe954a882 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Tue, 27 Nov 2018 20:27:27 +0100 Subject: [PATCH 02/53] fix logic that hanged the backups after certain circumstances (pendingTags badly managed) fire different status when backup finished --- include/megaapi.h | 10 ++++++++++ src/megaapi_impl.cpp | 9 ++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/include/megaapi.h b/include/megaapi.h index 95b77f9434..ff13f346dc 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -3419,6 +3419,16 @@ class MegaTransfer */ virtual bool isSyncTransfer() const; + /** + * @brief Returns true if this transfer belongs to the backups engine + * + * This data is important to know if the transfer will resume when enableTransferResumption is called. + * Regular transfers are resumed, but backup transfers aren't. + * + * @return true if this transfer belongs to the backups engine, otherwise false + */ + virtual bool isBackupTransfer() const; + /** * @brief Returns true is this is a streaming transfer * @return true if this is a streaming transfer, false otherwise diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 83f98d50e9..127f14ebc8 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -21481,6 +21481,8 @@ MegaBackupController::MegaBackupController(MegaApiImpl *megaApi, int tag, int fo this->attendPastBackups = attendPastBackups; + this->pendingTags = 0; + clearCurrentBackupData(); lastbackuptime = getLastBackupTime(); @@ -21996,7 +21998,6 @@ void MegaBackupController::clearCurrentBackupData() { this->recursive = 0; this->pendingTransfers = 0; - this->pendingTags = 0; this->pendingFolders.clear(); for (std::list::iterator it = failedTransfers.begin(); it != failedTransfers.end(); it++) { @@ -22251,7 +22252,7 @@ void MegaBackupController::abortCurrent() if (node) { this->pendingTags++; - megaApi->setCustomNodeAttribute(node, "BACKST", "ABORTED"); + megaApi->setCustomNodeAttribute(node, "BACKST", "ABORTED", this); delete node; } else @@ -22287,7 +22288,8 @@ void MegaBackupController::onRequestFinish(MegaApi *, MegaRequest *request, Mega pendingremovals--; if (!pendingremovals) { - if (!pendingTags) + assert(pendingTags>=0); + if (pendingTags <= 0) { state = BACKUP_ACTIVE; } @@ -22297,6 +22299,7 @@ void MegaBackupController::onRequestFinish(MegaApi *, MegaRequest *request, Mega else if(type == MegaRequest::TYPE_SET_ATTR_NODE) { pendingTags--; + assert(pendingTags>=0); if (!pendingTags) { From bcca467162f9d4b01e9af7f295dd594ac60e2702 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Wed, 28 Nov 2018 11:35:21 +0100 Subject: [PATCH 03/53] do not store backup transfers in cache (to avoid resumption) & other adjusements improved docstrings return list of failed transfers onBackupFinish return INCOMPLETE/EXPIRED(skipped)/ENOENT(not found) now added TransferTemporaryError support for backups --- include/mega/megaclient.h | 2 +- include/mega/transfer.h | 2 ++ include/megaapi.h | 30 +++++++++++++++------ include/megaapi_impl.h | 10 +++++-- src/megaapi.cpp | 16 +++++++++--- src/megaapi_impl.cpp | 55 +++++++++++++++++++++++++++++++-------- src/megaclient.cpp | 10 ++++--- src/transfer.cpp | 2 ++ 8 files changed, 98 insertions(+), 29 deletions(-) diff --git a/include/mega/megaclient.h b/include/mega/megaclient.h index 87bc925cd6..2871f99351 100644 --- a/include/mega/megaclient.h +++ b/include/mega/megaclient.h @@ -361,7 +361,7 @@ class MEGA_API MegaClient error rename(Node*, Node*, syncdel_t = SYNCDEL_NONE, handle = UNDEF); // start/stop/pause file transfer - bool startxfer(direction_t, File*, bool skipdupes = false, bool startfirst = false); + bool startxfer(direction_t, File*, bool skipdupes = false, bool startfirst = false, bool donotpersist = false); void stopxfer(File* f); void pausexfers(direction_t, bool, bool = false); diff --git a/include/mega/transfer.h b/include/mega/transfer.h index 0680f8d50a..5bbdafb25a 100644 --- a/include/mega/transfer.h +++ b/include/mega/transfer.h @@ -131,6 +131,8 @@ struct MEGA_API Transfer : public FileFingerprint // state of the transfer transferstate_t state; + bool skipserialization; + Transfer(MegaClient*, direction_t); virtual ~Transfer(); diff --git a/include/megaapi.h b/include/megaapi.h index ff13f346dc..18af2a23c7 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -4119,7 +4119,7 @@ class MegaSync * @brief Get the path of the local folder that is being synced * * The SDK retains the ownership of the returned value. It will be valid until - * the MegaRequest object is deleted. + * the MegaSync object is deleted. * * @return Local folder that is being synced */ @@ -4218,8 +4218,13 @@ class MegaBackupListener * the application deletes it. * * There won't be more callbacks about this backup. - * The last parameter provides the result of the backup. If the backup finished without problems, - * the error code will be API_OK + * The last parameter provides the result of the backup: + * If the backup finished without problems, + * the error code will be API_OK. + * If some transfer failed, the error code will be API_EINCOMPLETE. + * If the backup has been skipped the error code will be API_EEXPIRED. + * If the backup folder cannot be found, the error will be API_ENOENT. + * * * @param api MegaApi object that started the backup * @param backup Information about the backup @@ -4303,7 +4308,7 @@ class MegaBackup * @brief Get the path of the local folder that is being backed up * * The SDK retains the ownership of the returned value. It will be valid until - * the MegaRequest object is deleted. + * the MegaBackup object is deleted. * * @return Local folder that is being backed up */ @@ -4434,25 +4439,25 @@ class MegaBackup virtual int64_t getCurrentBKStartTime() const; /** - * @brief Returns the number of transferred bytes during this request + * @brief Returns the number of transferred bytes during last backup * @return Transferred bytes during this backup */ virtual long long getTransferredBytes() const; /** - * @brief Returns the total bytes to be transferred to complete the backup + * @brief Returns the total bytes to be transferred to complete last backup * @return Total bytes to be transferred to complete the backup */ virtual long long getTotalBytes() const; /** - * @brief Returns the current speed of this backup + * @brief Returns the current speed of last backup * @return Current speed of this backup */ virtual long long getSpeed() const; /** - * @brief Returns the average speed of this backup + * @brief Returns the average speed of last backup * @return Average speed of this backup */ virtual long long getMeanSpeed() const; @@ -4468,6 +4473,15 @@ class MegaBackup */ virtual int64_t getUpdateTime() const; + /** + * @brief Returns the list with the transfers that have failed for during last backup + * + * You take the ownership of the returned value + * + * @return Names of the custom attributes of the node + * @see MegaApi::setCustomNodeAttribute + */ + virtual MegaTransferList *getFailedTransfers(); }; diff --git a/include/megaapi_impl.h b/include/megaapi_impl.h index 05ba3b90af..bf4e311d09 100644 --- a/include/megaapi_impl.h +++ b/include/megaapi_impl.h @@ -243,6 +243,8 @@ class MegaBackupController : public MegaBackup, public MegaRequestListener, publ int getState() const; long long getNextStartTime(long long oldStartTimeAbsolute = -1) const; bool getAttendPastBackups() const; + MegaTransferList *getFailedTransfers(); + // MegaBackup setters void setLocalFolder(const std::string &value); @@ -299,7 +301,7 @@ class MegaBackupController : public MegaBackup, public MegaRequestListener, publ handle currentHandle; std::string currentName; std::list pendingFolders; - std::list failedTransfers; + std::vector failedTransfers; int recursive; int pendingTransfers; int pendingTags; @@ -331,6 +333,7 @@ class MegaBackupController : public MegaBackup, public MegaRequestListener, publ virtual void onRequestFinish(MegaApi* api, MegaRequest *request, MegaError *e); virtual void onTransferStart(MegaApi *api, MegaTransfer *transfer); virtual void onTransferUpdate(MegaApi *api, MegaTransfer *transfer); + virtual void onTransferTemporaryError(MegaApi *, MegaTransfer *t, MegaError* e); virtual void onTransferFinish(MegaApi* api, MegaTransfer *transfer, MegaError *e); long long getNumberFolders() const; @@ -651,6 +654,7 @@ class MegaTransferPrivate : public MegaTransfer, public Cachable void setSyncTransfer(bool syncTransfer); void setSourceFileTemporary(bool temporary); void setStartFirst(bool startFirst); + void setBackupTransfer(bool backupTransfer); void setStreamingTransfer(bool streamingTransfer); void setLastBytes(char *lastBytes); void setLastError(MegaError e); @@ -689,6 +693,7 @@ class MegaTransferPrivate : public MegaTransfer, public Cachable virtual bool isFinished() const; virtual bool isSourceFileTemporary() const; virtual bool shouldStartFirst() const; + virtual bool isBackupTransfer() const; virtual char *getLastBytes() const; virtual MegaError getLastError() const; virtual bool isFolderTransfer() const; @@ -716,6 +721,7 @@ class MegaTransferPrivate : public MegaTransfer, public Cachable bool streamingTransfer : 1; bool temporarySourceFile : 1; bool startFirst : 1; + bool backupTransfer : 1; }; int64_t startTime; @@ -1922,7 +1928,7 @@ class MegaApiImpl : public MegaApp void startUpload(const char* localPath, MegaNode *parent, MegaTransferListener *listener=NULL); void startUpload(const char* localPath, MegaNode *parent, int64_t mtime, MegaTransferListener *listener=NULL); void startUpload(const char* localPath, MegaNode* parent, const char* fileName, MegaTransferListener *listener = NULL); - void startUpload(bool startFirst, const char* localPath, MegaNode* parent, const char* fileName, int64_t mtime, int folderTransferTag = 0, const char *appData = NULL, bool isSourceFileTemporary = false, MegaTransferListener *listener = NULL); + void startUpload(bool startFirst, const char* localPath, MegaNode* parent, const char* fileName, int64_t mtime, int folderTransferTag = 0, bool isBackup = false, const char *appData = NULL, bool isSourceFileTemporary = false, MegaTransferListener *listener = NULL); void startDownload(MegaNode* node, const char* localPath, MegaTransferListener *listener = NULL); void startDownload(bool startFirst, MegaNode *node, const char* target, int folderTransferTag, const char *appData, MegaTransferListener *listener); void startStreaming(MegaNode* node, m_off_t startPos, m_off_t size, MegaTransferListener *listener); diff --git a/src/megaapi.cpp b/src/megaapi.cpp index b2ec9d0a42..4c27eaaed2 100644 --- a/src/megaapi.cpp +++ b/src/megaapi.cpp @@ -994,6 +994,11 @@ bool MegaTransfer::isFinished() const return false; } +bool MegaTransfer::isBackupTransfer() const +{ + return false; +} + char *MegaTransfer::getLastBytes() const { return NULL; @@ -2502,12 +2507,12 @@ void MegaApi::startUploadWithData(const char *localPath, MegaNode *parent, const void MegaApi::startUploadWithData(const char *localPath, MegaNode *parent, const char *appData, bool isSourceTemporary, MegaTransferListener *listener) { - pImpl->startUpload(false, localPath, parent, (const char *)NULL, -1, 0, appData, isSourceTemporary, listener); + pImpl->startUpload(false, localPath, parent, (const char *)NULL, -1, 0, false, appData, isSourceTemporary, listener); } void MegaApi::startUploadWithTopPriority(const char *localPath, MegaNode *parent, const char *appData, bool isSourceTemporary, MegaTransferListener *listener) { - pImpl->startUpload(true, localPath, parent, (const char *)NULL, -1, 0, appData, isSourceTemporary, listener); + pImpl->startUpload(true, localPath, parent, (const char *)NULL, -1, 0, false, appData, isSourceTemporary, listener); } void MegaApi::startUpload(const char *localPath, MegaNode *parent, int64_t mtime, MegaTransferListener *listener) @@ -2517,7 +2522,7 @@ void MegaApi::startUpload(const char *localPath, MegaNode *parent, int64_t mtime void MegaApi::startUpload(const char *localPath, MegaNode *parent, int64_t mtime, bool isSourceTemporary, MegaTransferListener *listener) { - pImpl->startUpload(false, localPath, parent, (const char *)NULL, mtime, 0, NULL, isSourceTemporary, listener); + pImpl->startUpload(false, localPath, parent, (const char *)NULL, mtime, false, 0, NULL, isSourceTemporary, listener); } void MegaApi::startUpload(const char* localPath, MegaNode* parent, const char* fileName, MegaTransferListener *listener) @@ -5029,6 +5034,11 @@ int64_t MegaBackup::getUpdateTime() const return 0; } +MegaTransferList *MegaBackup::getFailedTransfers() +{ + return NULL; +} + MegaAccountBalance::~MegaAccountBalance() { diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 127f14ebc8..7fc13f0377 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -2005,6 +2005,7 @@ MegaTransferPrivate::MegaTransferPrivate(int type, MegaTransferListener *listene this->streamingTransfer = false; this->temporarySourceFile = false; this->startFirst = false; + this->backupTransfer = false; this->lastError = API_OK; this->folderTransferTag = 0; this->appData = NULL; @@ -2052,6 +2053,7 @@ MegaTransferPrivate::MegaTransferPrivate(const MegaTransferPrivate *transfer) this->setStreamingTransfer(transfer->isStreamingTransfer()); this->setSourceFileTemporary(transfer->isSourceFileTemporary()); this->setStartFirst(transfer->shouldStartFirst()); + this->setBackupTransfer(transfer->isBackupTransfer()); this->setLastError(transfer->getLastError()); this->setFolderTransferTag(transfer->getFolderTransferTag()); this->setAppData(transfer->getAppData()); @@ -2128,6 +2130,11 @@ bool MegaTransferPrivate::isFinished() const return state == STATE_COMPLETED || state == STATE_CANCELLED || state == STATE_FAILED; } +bool MegaTransferPrivate::isBackupTransfer() const +{ + return backupTransfer; +} + bool MegaTransferPrivate::isSourceFileTemporary() const { return temporarySourceFile; @@ -2523,6 +2530,11 @@ void MegaTransferPrivate::setStartFirst(bool startFirst) this->startFirst = startFirst; } +void MegaTransferPrivate::setBackupTransfer(bool backupTransfer) +{ + this->backupTransfer = backupTransfer; +} + void MegaTransferPrivate::setStreamingTransfer(bool streamingTransfer) { this->streamingTransfer = streamingTransfer; @@ -7168,7 +7180,7 @@ void MegaApiImpl::startTimer( int64_t period, MegaRequestListener *listener) -void MegaApiImpl::startUpload(bool startFirst, const char *localPath, MegaNode *parent, const char *fileName, int64_t mtime, int folderTransferTag, const char *appData, bool isSourceFileTemporary, MegaTransferListener *listener) +void MegaApiImpl::startUpload(bool startFirst, const char *localPath, MegaNode *parent, const char *fileName, int64_t mtime, int folderTransferTag, bool isBackup, const char *appData, bool isSourceFileTemporary, MegaTransferListener *listener) { MegaTransferPrivate* transfer = new MegaTransferPrivate(MegaTransfer::TYPE_UPLOAD, listener); if(localPath) @@ -7191,6 +7203,8 @@ void MegaApiImpl::startUpload(bool startFirst, const char *localPath, MegaNode * transfer->setSourceFileTemporary(isSourceFileTemporary); transfer->setStartFirst(startFirst); + transfer->setBackupTransfer(isBackup); + if(fileName) { transfer->setFileName(fileName); @@ -7208,13 +7222,13 @@ void MegaApiImpl::startUpload(bool startFirst, const char *localPath, MegaNode * } void MegaApiImpl::startUpload(const char* localPath, MegaNode* parent, MegaTransferListener *listener) -{ return startUpload(false, localPath, parent, (const char *)NULL, -1, 0, NULL, false, listener); } +{ return startUpload(false, localPath, parent, (const char *)NULL, -1, 0, false, NULL, false, listener); } void MegaApiImpl::startUpload(const char *localPath, MegaNode *parent, int64_t mtime, MegaTransferListener *listener) -{ return startUpload(false, localPath, parent, (const char *)NULL, mtime, 0, NULL, false, listener); } +{ return startUpload(false, localPath, parent, (const char *)NULL, mtime, 0, false, NULL, false, listener); } void MegaApiImpl::startUpload(const char* localPath, MegaNode* parent, const char* fileName, MegaTransferListener *listener) -{ return startUpload(false, localPath, parent, fileName, -1, 0, NULL, false, listener); } +{ return startUpload(false, localPath, parent, fileName, -1, 0, false, NULL, false, listener); } void MegaApiImpl::startDownload(bool startFirst, MegaNode *node, const char* localPath, int folderTransferTag, const char *appData, MegaTransferListener *listener) { @@ -7330,7 +7344,7 @@ void MegaApiImpl::retryTransfer(MegaTransfer *transfer, MegaTransferListener *li { MegaNode *parent = getNodeByHandle(t->getParentHandle()); startUpload(t->shouldStartFirst(), t->getPath(), parent, t->getFileName(), t->getTime(), 0, - t->getAppData(), t->isSourceFileTemporary(), listener); + t->isBackupTransfer(), t->getAppData(), t->isSourceFileTemporary(), listener); delete parent; } } @@ -16159,7 +16173,7 @@ void MegaApiImpl::sendPendingTransfers() string wFileName = fileName; MegaFilePut *f = new MegaFilePut(client, &wLocalPath, &wFileName, transfer->getParentHandle(), "", mtime, isSourceTemporary); f->setTransfer(transfer); - bool started = client->startxfer(PUT, f, true, startFirst); + bool started = client->startxfer(PUT, f, true, startFirst, transfer->isBackupTransfer()); if (!started) { transfer->setState(MegaTransfer::STATE_QUEUED); @@ -21542,7 +21556,7 @@ MegaBackupController::MegaBackupController(MegaBackupController *backup) this->pendingFolders.push_back(*it); } - for (std::list::iterator it = backup->failedTransfers.begin(); it != backup->failedTransfers.end(); it++) + for (std::vector::iterator it = backup->failedTransfers.begin(); it != backup->failedTransfers.end(); it++) { this->failedTransfers.push_back(((MegaTransfer *)*it)->copy()); } @@ -21806,6 +21820,12 @@ bool MegaBackupController::getAttendPastBackups() const return attendPastBackups; } +MegaTransferList *MegaBackupController::getFailedTransfers() +{ + MegaTransferList *result = new MegaTransferListPrivate(failedTransfers.data(), int(failedTransfers.size())); + return result; +} + void MegaBackupController::setAttendPastBackups(bool value) { attendPastBackups = value; @@ -21999,7 +22019,7 @@ void MegaBackupController::clearCurrentBackupData() this->recursive = 0; this->pendingTransfers = 0; this->pendingFolders.clear(); - for (std::list::iterator it = failedTransfers.begin(); it != failedTransfers.end(); it++) + for (std::vector::iterator it = failedTransfers.begin(); it != failedTransfers.end(); it++) { delete *it; } @@ -22139,7 +22159,7 @@ void MegaBackupController::onFolderAvailable(MegaHandle handle) client->fsaccess->local2path(&localPath, &utf8path); totalFiles++; - megaApi->startUpload(false, utf8path.c_str(), parent, (const char *)NULL, -1, folderTransferTag, NULL, false, this); + megaApi->startUpload(false, utf8path.c_str(), parent, (const char *)NULL, -1, folderTransferTag, true, NULL, false, this); } else { @@ -22184,6 +22204,7 @@ bool MegaBackupController::checkCompletion() { if(!recursive && !pendingFolders.size() && !pendingTransfers && !pendingTags) { + error e = API_OK; LOG_debug << "Folder transfer finished - " << this->getTransferredBytes() << " of " << this->getTotalBytes(); MegaNode *node = megaApi->getNodeByHandle(currentHandle); if (node) @@ -22192,21 +22213,27 @@ bool MegaBackupController::checkCompletion() { this->pendingTags++; megaApi->setCustomNodeAttribute(node, "BACKST", "INCOMPLETE", this); + e = API_EINCOMPLETE; } else if (state != BACKUP_SKIPPING) { this->pendingTags++; megaApi->setCustomNodeAttribute(node, "BACKST", "COMPLETE", this); } + else + { + e = API_EEXPIRED; + } delete node; } else { LOG_err << "Could not set backup attribute, node not found for: " << currentName; + e = API_ENOENT; } state = BACKUP_ACTIVE; - megaApi->fireOnBackupFinish(this, MegaError(API_OK)); + megaApi->fireOnBackupFinish(this, MegaError(e)); megaApi->fireOnBackupStateChanged(this); removeexceeding(); @@ -22342,6 +22369,12 @@ void MegaBackupController::onTransferUpdate(MegaApi *, MegaTransfer *t) megaApi->fireOnBackupUpdate(this); } +void MegaBackupController::onTransferTemporaryError(MegaApi *, MegaTransfer *t, MegaError *e) +{ + LOG_verbose << " at MegaBackupController::onTransferTemporaryError"; + megaApi->fireOnBackupTemporaryError(this, e->getErrorCode()); +} + void MegaBackupController::onTransferFinish(MegaApi *, MegaTransfer *t, MegaError *e) { LOG_verbose << " at MegaackupController::onTransferFinish"; @@ -22529,7 +22562,7 @@ MegaBackupController::~MegaBackupController() megaApi->removeRequestListener(this); megaApi->removeTransferListener(this); - for (std::list::iterator it = failedTransfers.begin(); it != failedTransfers.end(); it++) + for (std::vector::iterator it = failedTransfers.begin(); it != failedTransfers.end(); it++) { delete *it; } diff --git a/src/megaclient.cpp b/src/megaclient.cpp index efd379fa50..4d8a68a52d 100644 --- a/src/megaclient.cpp +++ b/src/megaclient.cpp @@ -8777,7 +8777,7 @@ void MegaClient::notifynode(Node* n) void MegaClient::transfercacheadd(Transfer *transfer) { - if (tctable) + if (tctable && !transfer->skipserialization) { LOG_debug << "Caching transfer"; tctable->put(MegaClient::CACHEDTRANSFER, transfer, &tckey); @@ -12561,7 +12561,7 @@ void MegaClient::putnodes_syncdebris_result(error, NewNode* nn) // inject file into transfer subsystem // if file's fingerprint is not valid, it will be obtained from the local file // (PUT) or the file's key (GET) -bool MegaClient::startxfer(direction_t d, File* f, bool skipdupes, bool startfirst) +bool MegaClient::startxfer(direction_t d, File* f, bool skipdupes, bool startfirst, bool donotpersist) { if (!f->transfer) { @@ -12625,7 +12625,7 @@ bool MegaClient::startxfer(direction_t d, File* f, bool skipdupes, bool startfir f->file_it = t->files.insert(t->files.end(), f); f->transfer = t; f->tag = reqtag; - if (!f->dbid) + if (!f->dbid && !donotpersist) { filecacheadd(f); } @@ -12723,6 +12723,8 @@ bool MegaClient::startxfer(direction_t d, File* f, bool skipdupes, bool startfir *(FileFingerprint*)t = *(FileFingerprint*)f; } + t->skipserialization = donotpersist; + t->lastaccesstime = m_time(); t->tag = reqtag; f->tag = reqtag; @@ -12730,7 +12732,7 @@ bool MegaClient::startxfer(direction_t d, File* f, bool skipdupes, bool startfir f->file_it = t->files.insert(t->files.end(), f); f->transfer = t; - if (!f->dbid) + if (!f->dbid && !donotpersist) { filecacheadd(f); } diff --git a/src/transfer.cpp b/src/transfer.cpp index ca3cb21ec2..f379c27722 100644 --- a/src/transfer.cpp +++ b/src/transfer.cpp @@ -56,6 +56,8 @@ Transfer::Transfer(MegaClient* cclient, direction_t ctype) priority = 0; state = TRANSFERSTATE_NONE; + skipserialization = false; + faputcompletion_it = client->faputcompletion.end(); transfers_it = client->transfers[type].end(); } From 36763cf78c0db7b3d05c0369c863121589eda043 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Wed, 28 Nov 2018 11:55:19 +0100 Subject: [PATCH 04/53] fix missing overloaded startUpload --- include/megaapi_impl.h | 3 ++- src/megaapi_impl.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/megaapi_impl.h b/include/megaapi_impl.h index bf4e311d09..e18f359968 100644 --- a/include/megaapi_impl.h +++ b/include/megaapi_impl.h @@ -1928,7 +1928,8 @@ class MegaApiImpl : public MegaApp void startUpload(const char* localPath, MegaNode *parent, MegaTransferListener *listener=NULL); void startUpload(const char* localPath, MegaNode *parent, int64_t mtime, MegaTransferListener *listener=NULL); void startUpload(const char* localPath, MegaNode* parent, const char* fileName, MegaTransferListener *listener = NULL); - void startUpload(bool startFirst, const char* localPath, MegaNode* parent, const char* fileName, int64_t mtime, int folderTransferTag = 0, bool isBackup = false, const char *appData = NULL, bool isSourceFileTemporary = false, MegaTransferListener *listener = NULL); + void startUpload(bool startFirst, const char *localPath, MegaNode *parent, const char *fileName, int64_t mtime, int folderTransferTag = 0, const char *appData = NULL, bool isSourceFileTemporary = false, MegaTransferListener *listener = NULL); + void startUpload(bool startFirst, const char* localPath, MegaNode* parent, const char* fileName, int64_t mtime, int folderTransferTag = 0, bool isBackup = false, const char *appData = NULL, bool isSourceFileTemporary = false, MegaTransferListener *listener = NULL); void startDownload(MegaNode* node, const char* localPath, MegaTransferListener *listener = NULL); void startDownload(bool startFirst, MegaNode *node, const char* target, int folderTransferTag, const char *appData, MegaTransferListener *listener); void startStreaming(MegaNode* node, m_off_t startPos, m_off_t size, MegaTransferListener *listener); diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 7fc13f0377..4685f8d8bb 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -7178,8 +7178,6 @@ void MegaApiImpl::startTimer( int64_t period, MegaRequestListener *listener) waiter->notify(); } - - void MegaApiImpl::startUpload(bool startFirst, const char *localPath, MegaNode *parent, const char *fileName, int64_t mtime, int folderTransferTag, bool isBackup, const char *appData, bool isSourceFileTemporary, MegaTransferListener *listener) { MegaTransferPrivate* transfer = new MegaTransferPrivate(MegaTransfer::TYPE_UPLOAD, listener); @@ -7230,6 +7228,11 @@ void MegaApiImpl::startUpload(const char *localPath, MegaNode *parent, int64_t m void MegaApiImpl::startUpload(const char* localPath, MegaNode* parent, const char* fileName, MegaTransferListener *listener) { return startUpload(false, localPath, parent, fileName, -1, 0, false, NULL, false, listener); } +void MegaApiImpl::startUpload(bool startFirst, const char *localPath, MegaNode *parent, const char *fileName, int64_t mtime, int folderTransferTag, const char *appData, bool isSourceFileTemporary, MegaTransferListener *listener) +{ + return startUpload(startFirst, localPath, parent, fileName, mtime, folderTransferTag, false, appData, isSourceFileTemporary, listener); +} + void MegaApiImpl::startDownload(bool startFirst, MegaNode *node, const char* localPath, int folderTransferTag, const char *appData, MegaTransferListener *listener) { MegaTransferPrivate* transfer = new MegaTransferPrivate(MegaTransfer::TYPE_DOWNLOAD, listener); From f0aee3e27df278c7411c987c7cc9a72c8c76900b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Rodr=C3=ADguez?= Date: Tue, 11 Dec 2018 12:55:38 +0100 Subject: [PATCH 05/53] Add new user attribute to enable geolocation messages --- include/mega/types.h | 3 +- include/mega/user.h | 1 + include/megaapi.h | 47 +++++++++++++++++- include/megaapi_impl.h | 10 ++-- src/megaapi.cpp | 12 +++++ src/megaapi_impl.cpp | 110 ++++++++++++++++++++++++++--------------- src/user.cpp | 14 ++++++ 7 files changed, 149 insertions(+), 48 deletions(-) diff --git a/include/mega/types.h b/include/mega/types.h index 73c6af7a7d..72cfbd995f 100644 --- a/include/mega/types.h +++ b/include/mega/types.h @@ -452,7 +452,8 @@ typedef enum { ATTR_RICH_PREVIEWS = 18, // private - byte array ATTR_RUBBISH_TIME = 19, // private, non-encrypted - char array in B64 - non-versioned ATTR_LAST_PSA = 20, // private - char array - ATTR_STORAGE_STATE = 21 // private - non-encrypted - char array in B64 - non-versioned + ATTR_STORAGE_STATE = 21, // private - non-encrypted - char array in B64 - non-versioned + ATTR_GEOLOCATION = 22 // private - byte array } attr_t; typedef map userattr_map; diff --git a/include/mega/user.h b/include/mega/user.h index af08aa06d5..51f99a76e4 100644 --- a/include/mega/user.h +++ b/include/mega/user.h @@ -70,6 +70,7 @@ struct MEGA_API User : public Cachable bool lastPsa : 1; bool rubbishTime : 1; // days to keep nodes in rubbish bin before auto clean bool storageState : 1; // state of the storage (0 = green, 1 = orange, 2 = red) + bool geolocation : 1; // enable send geolocations } changed; // user's public key diff --git a/include/megaapi.h b/include/megaapi.h index ce1db8b574..db8a292bbb 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -1171,7 +1171,8 @@ class MegaUser CHANGE_TYPE_CONTACT_LINK_VERIFICATION = 0x10000, CHANGE_TYPE_RICH_PREVIEWS = 0x20000, CHANGE_TYPE_RUBBISH_TIME = 0x40000, - CHANGE_TYPE_STORAGE_STATE = 0x80000 + CHANGE_TYPE_STORAGE_STATE = 0x80000, + CHANGE_TYPE_GEOLOCATION = 0x100000 }; /** @@ -1244,6 +1245,9 @@ class MegaUser * - MegaUser::CHANGE_TYPE_STORAGE_STATE = 0x80000 * Check if the state of the storage has changed * + * - MegaUser::CHANGE_TYPE_GEOLOCATION = 0x100000 + * Check if option for geolocation messages has changed + * * @return true if this user has an specific change */ virtual bool hasChanged(int changeType); @@ -1315,6 +1319,10 @@ class MegaUser * * - MegaUser::CHANGE_TYPE_STORAGE_STATE = 0x80000 * Check if the state of the storage has changed + * + * - MegaUser::CHANGE_TYPE_GEOLOCATION = 0x100000 + * Check if option for geolocation messages has changed + * */ virtual int getChanges(); @@ -5739,7 +5747,8 @@ class MegaApi USER_ATTR_RICH_PREVIEWS = 18, // private - byte array USER_ATTR_RUBBISH_TIME = 19, // private - byte array USER_ATTR_LAST_PSA = 20, // private - char array - USER_ATTR_STORAGE_STATE = 21 // private - char array + USER_ATTR_STORAGE_STATE = 21, // private - char array + USER_ATTR_GEOLOCATION = 22 // private - byte array }; enum { @@ -7940,6 +7949,8 @@ class MegaApi * Get number of days for rubbish-bin cleaning scheduler (private non-encrypted) * MegaApi::USER_ATTR_STORAGE_STATE = 21 * Get the state of the storage (private non-encrypted) + * MegaApi::USER_ATTR_GEOLOCATION = 22 + * Get whether the user has enabled send geolocation messages (private) * * @param listener MegaRequestListener to track this request */ @@ -8085,6 +8096,8 @@ class MegaApi * Get whether user generates rich-link messages or not (private) * MegaApi::USER_ATTR_RUBBISH_TIME = 19 * Set number of days for rubbish-bin cleaning scheduler (private non-encrypted) + * MegaApi::USER_ATTR_GEOLOCATION = 22 + * Set whether the user can send geolocation messages (private) * * @param value New attribute value * @param listener MegaRequestListener to track this request @@ -8592,6 +8605,7 @@ class MegaApi */ void isMasterKeyExported(MegaRequestListener *listener = NULL); +#ifdef ENABLE_CHAT /** * @brief Enable or disable the generation of rich previews * @@ -8659,6 +8673,35 @@ class MegaApi */ void setRichLinkWarningCounterValue(int value, MegaRequestListener *listener = NULL); + /** + * @brief Enable the sending of geolocation messages + * + * The associated request type with this request is MegaRequest::TYPE_SET_ATTR_USER + * Valid data in the MegaRequest object received on callbacks: + * - MegaRequest::getParamType - Returns the attribute type MegaApi::USER_ATTR_GEOLOCATION + * + * @param listener MegaRequestListener to track this request + */ + void enableGeolocation(MegaRequestListener *listener = NULL); + + /** + * @brief Check if the sending of geolocation messages is enabled + * + * The associated request type with this request is MegaRequest::TYPE_GET_ATTR_USER + * Valid data in the MegaRequest object received on callbacks: + * - MegaRequest::getParamType - Returns the attribute type MegaApi::USER_ATTR_GEOLOCATION + * + * Valid data in the MegaRequest object received in onRequestFinish when the error code + * is MegaError::API_OK: + * + * The error MegaError::API_ENOENT is a valid value returned by the request when the user attribute + * is not set yet. + * + * @param listener MegaRequestListener to track this request + */ + void isGeolocationEnabled(MegaRequestListener *listener = NULL); +#endif + /** * @brief Get the number of days for rubbish-bin cleaning scheduler * diff --git a/include/megaapi_impl.h b/include/megaapi_impl.h index ecbd0b6049..a0280ff57e 100644 --- a/include/megaapi_impl.h +++ b/include/megaapi_impl.h @@ -1863,10 +1863,6 @@ class MegaApiImpl : public MegaApp void getChatUserAttr(const char* email_or_handle, int type, const char *dstFilePath, const char *ph = NULL, int number = 0, MegaRequestListener *listener = NULL); void setUserAttribute(int type, const char* value, MegaRequestListener *listener = NULL); void setUserAttribute(int type, const MegaStringMap* value, MegaRequestListener *listener = NULL); - void enableRichPreviews(bool enable, MegaRequestListener *listener = NULL); - void isRichPreviewsEnabled(MegaRequestListener *listener = NULL); - void shouldShowRichLinkWarning(MegaRequestListener *listener = NULL); - void setRichLinkWarningCounterValue(int value, MegaRequestListener *listener = NULL); void getRubbishBinAutopurgePeriod(MegaRequestListener *listener = NULL); void setRubbishBinAutopurgePeriod(int days, MegaRequestListener *listener = NULL); void getStorageState(MegaRequestListener *listener = NULL); @@ -2259,6 +2255,12 @@ class MegaApiImpl : public MegaApp void getChatLinkURL(MegaHandle publichandle, MegaRequestListener *listener = NULL); void chatLinkClose(MegaHandle chatid, const char *title, MegaRequestListener *listener = NULL); void chatLinkJoin(MegaHandle publichandle, const char *unifiedkey, MegaRequestListener *listener = NULL); + void enableRichPreviews(bool enable, MegaRequestListener *listener = NULL); + void isRichPreviewsEnabled(MegaRequestListener *listener = NULL); + void shouldShowRichLinkWarning(MegaRequestListener *listener = NULL); + void setRichLinkWarningCounterValue(int value, MegaRequestListener *listener = NULL); + void enableGeolocation(MegaRequestListener *listener = NULL); + void isGeolocationEnabled(MegaRequestListener *listener = NULL); #endif void getAccountAchievements(MegaRequestListener *listener = NULL); diff --git a/src/megaapi.cpp b/src/megaapi.cpp index f0a2fd705f..023468e212 100644 --- a/src/megaapi.cpp +++ b/src/megaapi.cpp @@ -2213,6 +2213,7 @@ void MegaApi::isMasterKeyExported(MegaRequestListener *listener) pImpl->getUserAttr((const char*)NULL, MegaApi::USER_ATTR_PWD_REMINDER, NULL, 0, listener); } +#ifdef ENABLE_CHAT void MegaApi::enableRichPreviews(bool enable, MegaRequestListener *listener) { pImpl->enableRichPreviews(enable, listener); @@ -2233,6 +2234,17 @@ void MegaApi::setRichLinkWarningCounterValue(int value, MegaRequestListener *lis pImpl->setRichLinkWarningCounterValue(value, listener); } +void MegaApi::enableGeolocation(MegaRequestListener *listener) +{ + pImpl->enableGeolocation(listener); +} + +void MegaApi::isGeolocationEnabled(MegaRequestListener *listener) +{ + pImpl->isGeolocationEnabled(listener); +} +#endif + void MegaApi::getRubbishBinAutopurgePeriod(MegaRequestListener *listener) { pImpl->getRubbishBinAutopurgePeriod(listener); diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 63c6948722..303f5efb6c 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -1577,6 +1577,10 @@ MegaUserPrivate::MegaUserPrivate(User *user) : MegaUser() { changed |= MegaUser::CHANGE_TYPE_STORAGE_STATE; } + if(user->changed.geolocation) + { + changed |= MegaUser::CHANGE_TYPE_GEOLOCATION; + } } MegaUserPrivate::MegaUserPrivate(MegaUser *user) : MegaUser() @@ -5033,6 +5037,9 @@ string MegaApiImpl::userAttributeToString(int type) case MegaApi::USER_ATTR_STORAGE_STATE: attrname = "^!usl"; + + case MegaApi::USER_ATTR_GEOLOCATION: + attrname = "*!geo"; break; } @@ -5062,6 +5069,7 @@ char MegaApiImpl::userAttributeToScope(int type) case MegaApi::USER_ATTR_LAST_INTERACTION: case MegaApi::USER_ATTR_KEYRING: case MegaApi::USER_ATTR_RICH_PREVIEWS: + case MegaApi::USER_ATTR_GEOLOCATION: scope = '*'; break; @@ -5922,47 +5930,6 @@ void MegaApiImpl::setUserAttribute(int type, const MegaStringMap *value, MegaReq waiter->notify(); } -void MegaApiImpl::enableRichPreviews(bool enable, MegaRequestListener *listener) -{ - MegaStringMap *stringMap = new MegaStringMapPrivate(); - string rawvalue = enable ? "1" : "0"; - string base64value; - Base64::btoa(rawvalue, base64value); - stringMap->set("num", base64value.c_str()); - setUserAttribute(MegaApi::USER_ATTR_RICH_PREVIEWS, stringMap, listener); - delete stringMap; -} - -void MegaApiImpl::isRichPreviewsEnabled(MegaRequestListener *listener) -{ - MegaRequestPrivate *request = new MegaRequestPrivate(MegaRequest::TYPE_GET_ATTR_USER, listener); - request->setParamType(MegaApi::USER_ATTR_RICH_PREVIEWS); - request->setNumDetails(0); // 0 --> flag should indicate whether rich-links are enabled or not - requestQueue.push(request); - waiter->notify(); -} - -void MegaApiImpl::shouldShowRichLinkWarning(MegaRequestListener *listener) -{ - MegaRequestPrivate *request = new MegaRequestPrivate(MegaRequest::TYPE_GET_ATTR_USER, listener); - request->setParamType(MegaApi::USER_ATTR_RICH_PREVIEWS); - request->setNumDetails(1); // 1 --> flag should indicate whether to show the warning or not - requestQueue.push(request); - waiter->notify(); -} - -void MegaApiImpl::setRichLinkWarningCounterValue(int value, MegaRequestListener *listener) -{ - MegaStringMap *stringMap = new MegaStringMapPrivate(); - std::ostringstream oss; - oss << value; - string base64value; - Base64::btoa(oss.str(), base64value); - stringMap->set("c", base64value.c_str()); - setUserAttribute(MegaApi::USER_ATTR_RICH_PREVIEWS, stringMap, listener); - delete stringMap; -} - void MegaApiImpl::getRubbishBinAutopurgePeriod(MegaRequestListener *listener) { MegaRequestPrivate *request = new MegaRequestPrivate(MegaRequest::TYPE_GET_ATTR_USER, listener); @@ -9040,6 +9007,67 @@ void MegaApiImpl::chatLinkJoin(MegaHandle publichandle, const char *unifiedkey, waiter->notify(); } +void MegaApiImpl::enableRichPreviews(bool enable, MegaRequestListener *listener) +{ + MegaStringMap *stringMap = new MegaStringMapPrivate(); + string rawvalue = enable ? "1" : "0"; + string base64value; + Base64::btoa(rawvalue, base64value); + stringMap->set("num", base64value.c_str()); + setUserAttribute(MegaApi::USER_ATTR_RICH_PREVIEWS, stringMap, listener); + delete stringMap; +} + +void MegaApiImpl::isRichPreviewsEnabled(MegaRequestListener *listener) +{ + MegaRequestPrivate *request = new MegaRequestPrivate(MegaRequest::TYPE_GET_ATTR_USER, listener); + request->setParamType(MegaApi::USER_ATTR_RICH_PREVIEWS); + request->setNumDetails(0); // 0 --> flag should indicate whether rich-links are enabled or not + requestQueue.push(request); + waiter->notify(); +} + +void MegaApiImpl::shouldShowRichLinkWarning(MegaRequestListener *listener) +{ + MegaRequestPrivate *request = new MegaRequestPrivate(MegaRequest::TYPE_GET_ATTR_USER, listener); + request->setParamType(MegaApi::USER_ATTR_RICH_PREVIEWS); + request->setNumDetails(1); // 1 --> flag should indicate whether to show the warning or not + requestQueue.push(request); + waiter->notify(); +} + +void MegaApiImpl::setRichLinkWarningCounterValue(int value, MegaRequestListener *listener) +{ + MegaStringMap *stringMap = new MegaStringMapPrivate(); + std::ostringstream oss; + oss << value; + string base64value; + Base64::btoa(oss.str(), base64value); + stringMap->set("c", base64value.c_str()); + setUserAttribute(MegaApi::USER_ATTR_RICH_PREVIEWS, stringMap, listener); + delete stringMap; +} + +void MegaApiImpl::enableGeolocation(MegaRequestListener *listener) +{ + MegaStringMap *stringMap = new MegaStringMapPrivate(); + std::ostringstream oss; + oss << 1; + string base64value; + Base64::btoa(oss.str(), base64value); + stringMap->set("v", base64value.c_str()); + setUserAttribute(MegaApi::USER_ATTR_GEOLOCATION, stringMap, listener); + delete stringMap; +} + +void MegaApiImpl::isGeolocationEnabled(MegaRequestListener *listener) +{ + MegaRequestPrivate *request = new MegaRequestPrivate(MegaRequest::TYPE_GET_ATTR_USER, listener); + request->setParamType(MegaApi::USER_ATTR_GEOLOCATION); + requestQueue.push(request); + waiter->notify(); +} + #endif void MegaApiImpl::getAccountAchievements(MegaRequestListener *listener) diff --git a/src/user.cpp b/src/user.cpp index 8cd3220fe8..32bf3f818b 100644 --- a/src/user.cpp +++ b/src/user.cpp @@ -412,6 +412,10 @@ string User::attr2string(attr_t type) attrname = "^!usl"; break; + case ATTR_GEOLOCATION: + attrname = "*!geo"; + break; + case ATTR_UNKNOWN: // empty string break; } @@ -509,6 +513,10 @@ attr_t User::string2attr(const char* name) { return ATTR_STORAGE_STATE; } + else if(!strcmp(name, "*!geo")) + { + return ATTR_GEOLOCATION; + } else { return ATTR_UNKNOWN; // attribute not recognized @@ -532,6 +540,7 @@ bool User::needversioning(attr_t at) case ATTR_RICH_PREVIEWS: case ATTR_LAST_PSA: case ATTR_RUBBISH_TIME: + case ATTR_GEOLOCATION: return 0; case ATTR_AUTHRING: @@ -558,6 +567,7 @@ char User::scope(attr_t at) case ATTR_AUTHRING: case ATTR_LAST_INT: case ATTR_RICH_PREVIEWS: + case ATTR_GEOLOCATION: return '*'; case ATTR_AVATAR: @@ -946,6 +956,10 @@ bool User::setChanged(attr_t at) changed.storageState = true; break; + case ATTR_GEOLOCATION: + changed.geolocation = true; + break; + default: return false; } From 0306cb9b6c0bd5f8a48174dc1994ec319c00013e Mon Sep 17 00:00:00 2001 From: Javier Navarro Date: Tue, 11 Dec 2018 13:23:05 +0100 Subject: [PATCH 06/53] Geolocation attribute for messages (Obj-C) --- bindings/ios/MEGASdk.h | 67 ++++++++++++++++++++++++++++++++++++++++- bindings/ios/MEGASdk.mm | 16 ++++++++++ bindings/ios/MEGAUser.h | 9 +++++- 3 files changed, 90 insertions(+), 2 deletions(-) diff --git a/bindings/ios/MEGASdk.h b/bindings/ios/MEGASdk.h index e917437d0d..59e2db390b 100644 --- a/bindings/ios/MEGASdk.h +++ b/bindings/ios/MEGASdk.h @@ -97,7 +97,8 @@ typedef NS_ENUM(NSInteger, MEGAUserAttribute) { MEGAUserAttributeRichPreviews = 18, // private - byte array MEGAUserAttributeRubbishTime = 19, // private - byte array MEGAUserAttributeLastPSA = 20, // private - char array - MEGAUserAttributeStorageState = 21 // private - char array + MEGAUserAttributeStorageState = 21, // private - char array + MEGAUserAttributeGeolocation = 22 // private - char array }; typedef NS_ENUM(NSInteger, MEGANodeAttribute) { @@ -3050,6 +3051,8 @@ typedef NS_ENUM(NSUInteger, StorageState) { * Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted) * MEGAUserAttributeStorageState = 21 * Get the state of the storage (private non-encrypted) + * MEGAUserAttributeGeolocation = 22 + * Get whether the user has enabled send geolocation messages (private) * */ - (void)getUserAttributeForUser:(MEGAUser *)user type:(MEGAUserAttribute)type; @@ -3101,6 +3104,8 @@ typedef NS_ENUM(NSUInteger, StorageState) { * Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted) * MEGAUserAttributeStorageState = 21 * Get the state of the storage (private non-encrypted) + * MEGAUserAttributeGeolocation = 22 + * Get whether the user has enabled send geolocation messages (private) * * @param delegate MEGARequestDelegate to track this request */ @@ -3156,6 +3161,8 @@ typedef NS_ENUM(NSUInteger, StorageState) { * Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted) * MEGAUserAttributeStorageState = 21 * Get the state of the storage (private non-encrypted) + * MEGAUserAttributeGeolocation = 22 + * Get whether the user has enabled send geolocation messages (private) * */ - (void)getUserAttributeForEmailOrHandle:(NSString *)emailOrHandle type:(MEGAUserAttribute)type; @@ -3210,6 +3217,8 @@ typedef NS_ENUM(NSUInteger, StorageState) { * Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted) * MEGAUserAttributeStorageState = 21 * Get the state of the storage (private non-encrypted) + * MEGAUserAttributeGeolocation = 22 + * Get whether the user has enabled send geolocation messages (private) * * @param delegate MEGARequestDelegate to track this request */ @@ -3263,6 +3272,8 @@ typedef NS_ENUM(NSUInteger, StorageState) { * Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted) * MEGAUserAttributeStorageState = 21 * Get the state of the storage (private non-encrypted) + * MEGAUserAttributeGeolocation = 22 + * Get whether the user has enabled send geolocation messages (private) * */ - (void)getUserAttributeType:(MEGAUserAttribute)type; @@ -3315,6 +3326,8 @@ typedef NS_ENUM(NSUInteger, StorageState) { * Get number of days for rubbish-bin cleaning scheduler (private, non-encrypted) * MEGAUserAttributeStorageState = 21 * Get the state of the storage (private non-encrypted) + * MEGAUserAttributeGeolocation = 22 + * Get whether the user has enabled send geolocation messages (private) * * @param delegate MEGARequestDelegate to track this request */ @@ -3924,6 +3937,58 @@ typedef NS_ENUM(NSUInteger, StorageState) { */ - (void)setRichLinkWarningCounterValue:(NSUInteger)value; +/** + * @brief Enable the sending of geolocation messages + * + * The associated request type with this request is MEGARequestTypeSetAttrUser + * Valid data in the MEGARequest object received on callbacks: + * - [MEGARequest paramType] - Returns the attribute type MEGAUserAttributeGeolocation + * + * @param delegate MEGARequestDelegate to track this request + */ +- (void)enableGeolocationWithDelegate:(id)delegate; + +/** + * @brief Enable the sending of geolocation messages + * + * The associated request type with this request is MEGARequestTypeSetAttrUser + * Valid data in the MEGARequest object received on callbacks: + * - [MEGARequest paramType] - Returns the attribute type MEGAUserAttributeGeolocation + */ +- (void)enableGeolocation; + +/** + * @brief Check if the sending of geolocation messages is enabled + * + * The associated request type with this request is MEGARequestTypeSetAttrUser + * Valid data in the MEGARequest object received on callbacks: + * - [MEGARequest paramType] - Returns the attribute type MEGAUserAttributeGeolocation + * + * Valid data in the MEGARequest object received in onRequestFinish when the error code + * is MEGAErrorTypeApiOk: + * + * The error MEGAErrorTypeApiENoent is a valid value returned by the request when the user attribute + * is not set yet. + * + * @param delegate MEGARequestDelegate to track this request + */ +- (void)isGeolocationEnabledWithDelegate:(id)delegate; + +/** + * @brief Check if the sending of geolocation messages is enabled + * + * The associated request type with this request is MEGARequestTypeSetAttrUser + * Valid data in the MEGARequest object received on callbacks: + * - [MEGARequest paramType] - Returns the attribute type MEGAUserAttributeGeolocation + * + * Valid data in the MEGARequest object received in onRequestFinish when the error code + * is MEGAErrorTypeApiOk: + * + * The error MEGAErrorTypeApiENoent is a valid value returned by the request when the user attribute + * is not set yet. + */ +- (void)isGeolocationEnabled; + /** * @brief Get the number of days for rubbish-bin cleaning scheduler * diff --git a/bindings/ios/MEGASdk.mm b/bindings/ios/MEGASdk.mm index 17c21efa8c..7511abbdcc 100644 --- a/bindings/ios/MEGASdk.mm +++ b/bindings/ios/MEGASdk.mm @@ -1194,6 +1194,22 @@ - (void)setRichLinkWarningCounterValue:(NSUInteger)value { self.megaApi->setRichLinkWarningCounterValue((int)value); } +- (void)enableGeolocationWithDelegate:(id)delegate { + self.megaApi->enableGeolocation([self createDelegateMEGARequestListener:delegate singleListener:YES]); +} + +- (void)enableGeolocation { + self.megaApi->enableGeolocation(); +} + +- (void)isGeolocationEnabledWithDelegate:(id)delegate { + self.megaApi->isGeolocationEnabled([self createDelegateMEGARequestListener:delegate singleListener:YES]); +} + +- (void)isGeolocationEnabled { + self.megaApi->isGeolocationEnabled(); +} + - (void)getRubbishBinAutopurgePeriodWithDelegate:(id)delegate { self.megaApi->getRubbishBinAutopurgePeriod([self createDelegateMEGARequestListener:delegate singleListener:YES]); } diff --git a/bindings/ios/MEGAUser.h b/bindings/ios/MEGAUser.h index deea295961..69248055ed 100644 --- a/bindings/ios/MEGAUser.h +++ b/bindings/ios/MEGAUser.h @@ -48,7 +48,8 @@ typedef NS_ENUM(NSInteger, MEGAUserChangeType) { MEGAUserChangeTypeContactLinkVerification = 0x10000, MEGAUserChangeTypeRichPreviews = 0x20000, MEGAUserChangeTypeRubbishTime = 0x40000, - MEGAUserChangeTypeStorageState = 0x80000 + MEGAUserChangeTypeStorageState = 0x80000, + MEGAUserChangeTypeGeolocation = 0x100000, }; @@ -174,6 +175,9 @@ typedef NS_ENUM(NSInteger, MEGAUserChangeType) { * - MEGAUserChangeTypeStorageState = 0x80000 * Check if the state of the storage has changed * + * - MEGAUserChangeTypeGeolocation = 0x100000 + * Check if option for geolocation messages has changed + * */ @property (readonly, nonatomic) MEGAUserChangeType changes; @@ -264,6 +268,9 @@ typedef NS_ENUM(NSInteger, MEGAUserChangeType) { * - MEGAUserChangeTypeStorageState = 0x80000 * Check if the state of the storage has changed * + * - MEGAUserChangeTypeGeolocation = 0x100000 + * Check if option for geolocation messages has changed + * * @return YES if this user has an specific change */ - (BOOL)hasChangedType:(MEGAUserChangeType)changeType; From 6ec767c2db4d6098941b0cf2497430f177597279 Mon Sep 17 00:00:00 2001 From: Matt Weir Date: Thu, 13 Dec 2018 18:16:46 +1300 Subject: [PATCH 07/53] Changes to support building megaclc under QT Added autocomplete and posix/console cpp files Adjusted a few places the QT compilation showed warnings. --- bindings/qt/sdk.pri | 2 ++ include/mega/autocomplete.h | 2 ++ src/autocomplete.cpp | 22 +++++++++++++--------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/bindings/qt/sdk.pri b/bindings/qt/sdk.pri index 0a78bfd3d9..9e565b681c 100644 --- a/bindings/qt/sdk.pri +++ b/bindings/qt/sdk.pri @@ -3,6 +3,7 @@ MEGASDK_BASE_PATH = $$PWD/../../ VPATH += $$MEGASDK_BASE_PATH SOURCES += src/attrmap.cpp \ + src/autocomplete.cpp \ src/backofftimer.cpp \ src/base64.cpp \ src/command.cpp \ @@ -271,6 +272,7 @@ win32 { unix { SOURCES += src/posix/net.cpp \ + src/posix/console.cpp \ src/posix/fs.cpp \ src/posix/waiter.cpp } diff --git a/include/mega/autocomplete.h b/include/mega/autocomplete.h index 1a5d394d23..6a5a721204 100644 --- a/include/mega/autocomplete.h +++ b/include/mega/autocomplete.h @@ -99,6 +99,8 @@ namespace autocomplete { // output suitable for user 'help' virtual std::ostream& describe(std::ostream& s) const = 0; + + virtual ~ACNode(); }; std::ostream& operator<<(std::ostream&, const ACNode&); diff --git a/src/autocomplete.cpp b/src/autocomplete.cpp index d5388f7fc6..b26af5da82 100644 --- a/src/autocomplete.cpp +++ b/src/autocomplete.cpp @@ -76,7 +76,7 @@ ACState::quoting::quoting() ACState::quoting::quoting(std::string& s) { - quoted = !s.empty() && s[0] == '\"' || s[0] == '\''; + quoted = (!s.empty() && s[0] == '\"') || (s[0] == '\''); if (quoted) { quote_char = s[0]; @@ -187,6 +187,10 @@ std::ostream& operator<<(std::ostream& s, const ACNode& n) return n.describe(s); } +ACNode::~ACNode() +{ +} + Optional::Optional(ACN n) : subnode(n) { @@ -211,7 +215,7 @@ std::ostream& Optional::describe(std::ostream& s) const if (auto e = dynamic_cast(subnode.get())) { std::ostringstream s2; - s2 << *subnode; + s2 << *e; std::string str = s2.str(); if (str.size() >= 2 && str.front() == '(' && str.back() == ')') { @@ -542,8 +546,8 @@ bool LocalFS::addCompletions(ACState& s) { for (fs::directory_iterator iter(searchPath); iter != fs::directory_iterator(); ++iter) { - if (reportFolders && fs::is_directory(iter->status()) || - reportFiles && fs::is_regular_file(iter->status())) + if ((reportFolders && fs::is_directory(iter->status())) || + (reportFiles && fs::is_regular_file(iter->status()))) { s.addPathCompletion(iter->path().u8string(), cp, fs::is_directory(iter->status()), sep, true); } @@ -580,10 +584,10 @@ std::ostream& LocalFS::describe(std::ostream& s) const } MegaFS::MegaFS(bool files, bool folders, MegaClient* c, ::mega::handle* curDirHandle, const std::string descriptionPrefix) - : reportFiles(files) - , reportFolders(folders) - , client(c) + : client(c) , cwd(curDirHandle) + , reportFiles(files) + , reportFolders(folders) , descPref(descriptionPrefix) { } @@ -713,8 +717,8 @@ bool MegaFS::addCompletions(ACState& s) { for (Node* subnode : n->children) { - if (reportFolders && subnode->type == FOLDERNODE || - reportFiles && subnode->type == FILENODE) + if ((reportFolders && subnode->type == FOLDERNODE) || + (reportFiles && subnode->type == FILENODE)) { s.addPathCompletion(pathprefix + subnode->displayname(), "", subnode->type == FOLDERNODE, '/', false); } From 008931481bf61c5e317a66a2739135647b5b5753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Rodr=C3=ADguez?= Date: Mon, 17 Dec 2018 09:34:13 +0100 Subject: [PATCH 08/53] Improve documentation --- include/megaapi.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/megaapi.h b/include/megaapi.h index db8a292bbb..c76d59adcc 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -8691,11 +8691,9 @@ class MegaApi * Valid data in the MegaRequest object received on callbacks: * - MegaRequest::getParamType - Returns the attribute type MegaApi::USER_ATTR_GEOLOCATION * - * Valid data in the MegaRequest object received in onRequestFinish when the error code - * is MegaError::API_OK: - * - * The error MegaError::API_ENOENT is a valid value returned by the request when the user attribute - * is not set yet. + * Sending a Geolocation message is enabled if the MegaRequest object, received in onRequestFinish, + * has error code MegaError::API_OK. In other cases, send geolocation messages is not enabled and + * the application has to answer before send a message of this type. * * @param listener MegaRequestListener to track this request */ From 0cea5b01fa0996f68fcd8deb1681925b6e774545 Mon Sep 17 00:00:00 2001 From: Javier Navarro Date: Mon, 17 Dec 2018 11:57:28 +0100 Subject: [PATCH 09/53] Update doc (Obj-C) --- bindings/ios/MEGASdk.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/bindings/ios/MEGASdk.h b/bindings/ios/MEGASdk.h index 59e2db390b..d4748b66a5 100644 --- a/bindings/ios/MEGASdk.h +++ b/bindings/ios/MEGASdk.h @@ -3964,11 +3964,9 @@ typedef NS_ENUM(NSUInteger, StorageState) { * Valid data in the MEGARequest object received on callbacks: * - [MEGARequest paramType] - Returns the attribute type MEGAUserAttributeGeolocation * - * Valid data in the MEGARequest object received in onRequestFinish when the error code - * is MEGAErrorTypeApiOk: - * - * The error MEGAErrorTypeApiENoent is a valid value returned by the request when the user attribute - * is not set yet. + * Sending a Geolocation message is enabled if the MEGARequest object, received in onRequestFinish, + * has error code MEGAErrorTypeApiOk. In other cases, send geolocation messages is not enabled and + * the application has to answer before send a message of this type. * * @param delegate MEGARequestDelegate to track this request */ @@ -3981,11 +3979,9 @@ typedef NS_ENUM(NSUInteger, StorageState) { * Valid data in the MEGARequest object received on callbacks: * - [MEGARequest paramType] - Returns the attribute type MEGAUserAttributeGeolocation * - * Valid data in the MEGARequest object received in onRequestFinish when the error code - * is MEGAErrorTypeApiOk: - * - * The error MEGAErrorTypeApiENoent is a valid value returned by the request when the user attribute - * is not set yet. + * Sending a Geolocation message is enabled if the MEGARequest object, received in onRequestFinish, + * has error code MEGAErrorTypeApiOk. In other cases, send geolocation messages is not enabled and + * the application has to answer before send a message of this type. */ - (void)isGeolocationEnabled; From 3f068877eea8f767ea096dbf70b80e843f62f1ed Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Andres Date: Tue, 18 Dec 2018 11:17:29 +0100 Subject: [PATCH 10/53] Adjust errcodes and documentation related to chatlinks The documentation to the following functions has been modified: - getChatLinkURL - chatLinkClose - chatLinkJoin - chatLinkDelete - chatLinkCreate - chatLinkQuery --- include/megaapi.h | 19 +++++++++++++++---- src/megaapi_impl.cpp | 22 ++++++++++++++++------ 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/include/megaapi.h b/include/megaapi.h index ce1db8b574..2420c41cd3 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -13180,7 +13180,8 @@ class MegaApi * * If caller is not operator or the chat is not a public chat or it's a 1on1 room, this request * will return API_EACCESS. - * If the chatroom does not have a chatlink, this request will return MegaError::API_ENOENT. + * If the chatroom does not have a valid chatlink, or the chatroom does not exists this request + * will return MegaError::API_ENOENT. * * @param chatid MegaHandle that identifies the chat room * @param listener MegaRequestListener to track this request @@ -13204,6 +13205,8 @@ class MegaApi * * If caller is not operator or the chat is not a public chat or it's a 1on1 room, this request * will return API_EACCESS. + * If the chatroom does not have a valid chatlink, or the chatroom does not exists this request + * will return MegaError::API_ENOENT. * * @param chatid MegaHandle that identifies the chat room * @param listener MegaRequestListener to track this request @@ -13221,9 +13224,10 @@ class MegaApi * Valid data in the MegaRequest object received on all callbacks: * - MegaRequest::getNodeHandle - Returns the chat identifier * - * If caller is not operator or the chat is not an public chat or it's a 1on1 room, this request - * will return MegaError::API_EACCESS. - * If the chatroom does not have a chatlink, this request will return MegaError::API_ENOENT. + * If caller is not operator or the chat is not a public chat or it's a 1on1 room, this request + * will return API_EACCESS. + * If the chatroom does not have a valid chatlink, or the chatroom does not exists this request + * will return MegaError::API_ENOENT. * * @param chatid MegaHandle that identifies the chat room * @param listener MegaRequestListener to track this request @@ -13257,6 +13261,9 @@ class MegaApi * @note This function can be called without being logged in. In that case, the returned * URL will be different than for logged in users, so chatd knows whether user has a session. * + * If the public handle is not valid or the chat room does not exists this request + * will return MegaError::API_ENOENT. + * * @param publichandle MegaHandle that represents the public handle of the chat link * @param listener MegaRequestListener to track this request */ @@ -13279,6 +13286,8 @@ class MegaApi * * If caller is not operator or it's a 1on1 room, this request will return MegaError::API_EACCESS. * If the chat is not an public chat, this request will return MegaError::API_EEXIST. + * If the chatroom does not exists, this request will return MegaError::API_ENOENT. + * If the chatroom does not have topic this request will return MegaError::API_EARGS. * * @param chatid MegaHandle that identifies the chat room * @param title Byte array representing the title, already encrypted and converted to Base64url @@ -13301,6 +13310,8 @@ class MegaApi * - MegaRequest::getNodeHandle - Returns the public handle of the chat link * - MegaRequest::getSessionKey - Returns the unified key of the chat link * + * If the public handle is not valid, this request will return MegaError::API_ENOENT. + * * @param publichandle MegaHandle that represents the public handle of the chat link * @param unifiedKey Byte array that contains the unified key, already encrypted and * converted to Base64url encoding. diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 63c6948722..deee6e686f 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -19505,12 +19505,16 @@ void MegaApiImpl::sendPendingRequests() MegaHandle chatid = request->getNodeHandle(); bool del = request->getFlag(); bool createifmissing = request->getAccess(); - if (chatid == INVALID_HANDLE || (del && createifmissing)) + if (del && createifmissing) { e = API_EARGS; break; } - + if (chatid == INVALID_HANDLE) + { + e = API_ENOENT; + break; + } textchat_map::iterator it = client->chats.find(chatid); if (it == client->chats.end()) { @@ -19533,7 +19537,7 @@ void MegaApiImpl::sendPendingRequests() MegaHandle publichandle = request->getNodeHandle(); if (publichandle == INVALID_HANDLE) { - e = API_EARGS; + e = API_ENOENT; break; } client->chatlinkurl(publichandle); @@ -19546,7 +19550,7 @@ void MegaApiImpl::sendPendingRequests() const char *title = request->getText(); if (chatid == INVALID_HANDLE) { - e = API_EARGS; + e = API_ENOENT; break; } @@ -19569,7 +19573,7 @@ void MegaApiImpl::sendPendingRequests() } if (!chat->title.empty() && (!title || title[0] == '\0')) { - e = API_EINCOMPLETE; + e = API_EARGS; break; } @@ -19582,7 +19586,13 @@ void MegaApiImpl::sendPendingRequests() MegaHandle publichandle = request->getNodeHandle(); const char *unifiedkey = request->getSessionKey(); - if (publichandle == INVALID_HANDLE || unifiedkey == NULL) + if (publichandle == INVALID_HANDLE) + { + e = API_ENOENT; + break; + } + + if (unifiedkey == NULL) { e = API_EARGS; break; From 923cf68d61551a74083c1d610f3a10dabcc69007 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Andres Date: Tue, 18 Dec 2018 14:36:42 +0100 Subject: [PATCH 11/53] Adjust new errcodes and documentation related The documentation to the following functions has been modified: - updateChatPermissions - inviteToChat - removeFromChat - archiveChat - grantAccessInChat --- include/megaapi.h | 28 +++++++++++++++++++++++++++- src/megaapi_impl.cpp | 25 +++++++++++++++---------- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/include/megaapi.h b/include/megaapi.h index 2420c41cd3..6eafd811ed 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -12776,6 +12776,9 @@ class MegaApi * is MegaError::API_OK: * - MegaRequest::getMegaTextChatList - Returns the new chat's information * + * If we try to create a peer chat room with more than one peer this request + * will return MegaError::API_ENOENT. + * * @note If you are trying to create a chat with more than 1 other person, then it will be forced * to be a group chat. * @@ -12846,7 +12849,8 @@ class MegaApi * On the onTransferFinish error, the error code associated to the MegaError can be: * - MegaError::API_EACCESS - If the logged in user doesn't have privileges to invite peers. * - MegaError::API_EARGS - If there's a title and it's not Base64url encoded. - + * - MegaError::API_ENOENT - If the chat room does not exists. + * * @param chatid MegaHandle that identifies the chat room * @param uh MegaHandle that identifies the user * @param privilege Privilege level for the new peers. Valid values are: @@ -12900,6 +12904,10 @@ class MegaApi * - MegaRequest::getNodeHandle - Returns the chat identifier * - MegaRequest::getParentHandle - Returns the MegaHandle of the user to be removed * + * If caller is not operator or is not a chat member, or the target is not a chat member this request + * will return API_EACCESS. + * If chat room does not exists this request will return API_ENOENT. + * * @param chatid MegaHandle that identifies the chat room * @param uh MegaHandle that identifies the user. If not provided (INVALID_HANDLE), the requester is removed * @param listener MegaRequestListener to track this request @@ -12934,6 +12942,13 @@ class MegaApi * - MegaRequest::getParentHandle - Returns the chat identifier * - MegaRequest::getEmail - Returns the MegaHandle of the user in Base64 enconding * + * If the chat room does not exists, this request will return MegaError::API_ENOENT. + * If the node provided does not exists, this request will return MegaError::API_ENOENT. + * If the target user does not exists, this request will return MegaError::API_ENOENT. + * If the target user is the same as caller, this request will return MegaError::API_EACCESS. + * If the target user is anonymous but the chat room is in private mode, this request will return MegaError::API_EACCESS. + * If caller is not an operator or the target user is not a chat member, this request will return MegaError::API_EACCESS. + * * @param chatid MegaHandle that identifies the chat room * @param n MegaNode that wants to be shared * @param uh MegaHandle that identifies the user @@ -12950,6 +12965,10 @@ class MegaApi * - MegaRequest::getParentHandle - Returns the chat identifier * - MegaRequest::getEmail - Returns the MegaHandle of the user in Base64 enconding * + * If the chatroom does not exists, this request will return MegaError::API_ENOENT. + * If the node provided does not exists, this request will return MegaError::API_ENOENT. + * If the target user does not exists, this request will return MegaError::API_ENOENT. + * * @param chatid MegaHandle that identifies the chat room * @param n MegaNode whose access wants to be revokesd * @param uh MegaHandle that identifies the user @@ -12968,6 +12987,10 @@ class MegaApi * is to be upgraded * - MegaRequest::getAccess - Returns the privilege level wanted for the user * + * If the chat room does not exists this request will return MegaError::API_ENOENT. + * If the user specified is not a chat member this request will return MegaError::API_ENOENT. + * If caller is not operator this request will return MegaError::API_ENOENT. + * * @param chatid MegaHandle that identifies the chat room * @param uh MegaHandle that identifies the user * @param privilege Privilege level for the existing peer. Valid values are: @@ -13141,6 +13164,9 @@ class MegaApi * - MegaRequest::getNodeHandle - Returns the chat identifier * - MegaRequest::getFlag - Returns chat desired state * + * If the chatroom does not exists this request will return MegaError::API_ENOENT. + * If the caller is not operator this request will return MegaError::API_EACCESS. + * * @param chatid MegaHandle that identifies the chat room * @param archive Desired chat state * @param listener MegaRequestListener to track this request diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index deee6e686f..54345cbaaa 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -19195,7 +19195,7 @@ void MegaApiImpl::sendPendingRequests() { if (!group && numPeers != 1) { - e = API_EARGS; + e = API_EACCESS; break; } } @@ -19220,11 +19220,17 @@ void MegaApiImpl::sendPendingRequests() bool publicMode = request->getFlag(); const char *unifiedKey = request->getSessionKey(); - if (chatid == INVALID_HANDLE || uh == INVALID_HANDLE || (publicMode && !unifiedKey)) + if (publicMode && !unifiedKey) { e = API_EARGS; break; - } + } + + if (chatid == INVALID_HANDLE || uh == INVALID_HANDLE) + { + e = API_ENOENT; + break; + } textchat_map::iterator it = client->chats.find(chatid); if (it == client->chats.end()) @@ -19263,7 +19269,7 @@ void MegaApiImpl::sendPendingRequests() if (chatid == INVALID_HANDLE) { - e = API_EARGS; + e = API_ENOENT; break; } @@ -19312,7 +19318,7 @@ void MegaApiImpl::sendPendingRequests() if (chatid == INVALID_HANDLE || h == INVALID_HANDLE || !uid) { - e = API_EARGS; + e = API_ENOENT; break; } @@ -19327,7 +19333,7 @@ void MegaApiImpl::sendPendingRequests() if (chatid == INVALID_HANDLE || h == INVALID_HANDLE || !uid) { - e = API_EARGS; + e = API_ENOENT; break; } @@ -19342,10 +19348,9 @@ void MegaApiImpl::sendPendingRequests() if (chatid == INVALID_HANDLE || uh == INVALID_HANDLE) { - e = API_EARGS; + e = API_ENOENT; break; } - textchat_map::iterator it = client->chats.find(chatid); if (it == client->chats.end()) { @@ -19355,7 +19360,7 @@ void MegaApiImpl::sendPendingRequests() TextChat *chat = it->second; if (!chat->group || chat->priv != PRIV_MODERATOR) { - e = API_EACCESS; + e = API_ENOENT; break; } @@ -19442,7 +19447,7 @@ void MegaApiImpl::sendPendingRequests() bool archive = request->getFlag(); if (chatid == INVALID_HANDLE) { - e = API_EARGS; + e = API_ENOENT; break; } From d541a083aa9ceb81309141dc48b949a90e1a7e02 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Tue, 18 Dec 2018 17:20:48 +0100 Subject: [PATCH 12/53] fix compilation when !ENABLE_SYNC --- include/mega/win32/megafs.h | 2 ++ src/win32/fs.cpp | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/include/mega/win32/megafs.h b/include/mega/win32/megafs.h index 2d8081c898..58f4c02085 100644 --- a/include/mega/win32/megafs.h +++ b/include/mega/win32/megafs.h @@ -90,7 +90,9 @@ struct MEGA_API WinDirNotify : public DirNotify { WinFileSystemAccess* fsaccess; +#ifdef ENABLE_SYNC LocalNode* localrootnode; +#endif HANDLE hDirectory; diff --git a/src/win32/fs.cpp b/src/win32/fs.cpp index bc4cb3a9d1..2fe52b9b3e 100644 --- a/src/win32/fs.cpp +++ b/src/win32/fs.cpp @@ -1272,11 +1272,13 @@ void WinDirNotify::process(DWORD dwBytes) #ifndef WINDOWS_PHONE if (!dwBytes) { +#ifdef ENABLE_SYNC LOG_err << "Empty filesystem notification: " << (localrootnode ? localrootnode->name.c_str() : "NULL") << " errors: " << error; error++; readchanges(); notify(DIREVENTS, localrootnode, NULL, 0); +#endif } else { @@ -1314,9 +1316,14 @@ void WinDirNotify::process(DWORD dwBytes) (char*)path.data(), int(path.size() + 1), NULL, NULL)); +#ifdef ENABLE_SYNC + LOG_debug << "Filesystem notification. Root: " << (localrootnode ? localrootnode->name.c_str() : "NULL") << " Path: " << path; +#endif } +#ifdef ENABLE_SYNC notify(DIREVENTS, localrootnode, (char*)fni->FileName, fni->FileNameLength); +#endif } else if (SimpleLogger::logCurrentLevel >= logDebug) { @@ -1328,7 +1335,9 @@ void WinDirNotify::process(DWORD dwBytes) (char*)path.data(), int(path.size() + 1), NULL, NULL)); +#ifdef ENABLE_SYNC LOG_debug << "Skipped filesystem notification. Root: " << (localrootnode ? localrootnode->name.c_str() : "NULL") << " Path: " << path; +#endif } From f65c23db8b3776ab341b64db25e9542c3f5d83cc Mon Sep 17 00:00:00 2001 From: Carolina Zato Date: Tue, 18 Dec 2018 19:58:12 +0100 Subject: [PATCH 13/53] Geolocation attribute for messages (Android bindings) --- bindings/java/nz/mega/sdk/MegaApiJava.java | 45 ++++++++++++++++++++-- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/bindings/java/nz/mega/sdk/MegaApiJava.java b/bindings/java/nz/mega/sdk/MegaApiJava.java index 26c34353f0..93c1ef4f41 100644 --- a/bindings/java/nz/mega/sdk/MegaApiJava.java +++ b/bindings/java/nz/mega/sdk/MegaApiJava.java @@ -2903,7 +2903,8 @@ public String getUserAvatarColor(String userhandle){ * Get number of days for rubbish-bin cleaning scheduler (private non-encrypted) * MegaApi::USER_ATTR_STORAGE_STATE = 21 * Get the state of the storage (private non-encrypted) - * + * MegaApi::USER_ATTR_GEOLOCATION = 22 + * Get whether the user has enabled send geolocation messages (private) * @param listener MegaRequestListener to track this request */ public void getUserAttribute(MegaUser user, int type, MegaRequestListenerInterface listener) { @@ -2961,6 +2962,8 @@ public void getUserAttribute(MegaUser user, int type, MegaRequestListenerInterfa * Get number of days for rubbish-bin cleaning scheduler (private non-encrypted) * MegaApi::USER_ATTR_STORAGE_STATE = 21 * Get the state of the storage (private non-encrypted) + * MegaApi::USER_ATTR_GEOLOCATION = 22 + * Get whether the user has enabled send geolocation messages (private) */ public void getUserAttribute(MegaUser user, int type) { megaApi.getUserAttribute(user, type); @@ -3016,7 +3019,8 @@ public void getUserAttribute(MegaUser user, int type) { * Get number of days for rubbish-bin cleaning scheduler (private non-encrypted) * MegaApi::USER_ATTR_STORAGE_STATE = 21 * Get the state of the storage (private non-encrypted) - * + * MegaApi::USER_ATTR_GEOLOCATION = 22 + * Get whether the user has enabled send geolocation messages (private) * @param listener MegaRequestListener to track this request */ public void getUserAttribute(String email_or_handle, int type, MegaRequestListenerInterface listener) { @@ -3073,6 +3077,8 @@ public void getUserAttribute(String email_or_handle, int type, MegaRequestListen * Get number of days for rubbish-bin cleaning scheduler (private non-encrypted) * MegaApi::USER_ATTR_STORAGE_STATE = 21 * Get the state of the storage (private non-encrypted) + * MegaApi::USER_ATTR_GEOLOCATION = 22 + * Get whether the user has enabled send geolocation messages (private) */ public void getUserAttribute(String email_or_handle, int type) { megaApi.getUserAttribute(email_or_handle, type); @@ -3127,7 +3133,8 @@ public void getUserAttribute(String email_or_handle, int type) { * Get number of days for rubbish-bin cleaning scheduler (private non-encrypted) * MegaApi::USER_ATTR_STORAGE_STATE = 21 * Get the state of the storage (private non-encrypted) - * + * MegaApi::USER_ATTR_GEOLOCATION = 22 + * Get whether the user has enabled send geolocation messages (private) * @param listener MegaRequestListener to track this request */ public void getUserAttribute(int type, MegaRequestListenerInterface listener) { @@ -3183,6 +3190,8 @@ public void getUserAttribute(int type, MegaRequestListenerInterface listener) { * Get number of days for rubbish-bin cleaning scheduler (private non-encrypted) * MegaApi::USER_ATTR_STORAGE_STATE = 21 * Get the state of the storage (private non-encrypted) + * MegaApi::USER_ATTR_GEOLOCATION = 22 + * Get whether the user has enabled send geolocation messages (private) */ public void getUserAttribute(int type) { megaApi.getUserAttribute(type); @@ -4315,6 +4324,36 @@ public void setRichLinkWarningCounterValue(int value){ megaApi.setRichLinkWarningCounterValue(value); } + /** + * Enable the sending of geolocation messages + * + * The associated request type with this request is MegaRequest::TYPE_SET_ATTR_USER + * Valid data in the MegaRequest object received on callbacks: + * - MegaRequest::getParamType - Returns the attribute type MegaApi::USER_ATTR_GEOLOCATION + * + * @param listener MegaRequestListener to track this request + */ + public void enableGeolocation(MegaRequestListenerInterface listener){ + megaApi.enableGeolocation(createDelegateRequestListener(listener)); + } + + /** + * Check if the sending of geolocation messages is enabled + * + * The associated request type with this request is MegaRequest::TYPE_GET_ATTR_USER + * Valid data in the MegaRequest object received on callbacks: + * - MegaRequest::getParamType - Returns the attribute type MegaApi::USER_ATTR_GEOLOCATION + * + * Sending a Geolocation message is enabled if the MegaRequest object, received in onRequestFinish, + * has error code MegaError::API_OK. In other cases, send geolocation messages is not enabled and + * the application has to answer before send a message of this type. + * + * @param listener MegaRequestListener to track this request + */ + public void isGeolocationEnabled(MegaRequestListenerInterface listener){ + megaApi.isGeolocationEnabled(createDelegateRequestListener(listener)); + } + /** * Get the number of days for rubbish-bin cleaning scheduler * From 79e93e61296a179b468d24608749597b23c071d7 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Andres Date: Wed, 19 Dec 2018 10:36:23 +0100 Subject: [PATCH 14/53] Add suport to authorize voice-clips --- include/mega/megaclient.h | 4 ++-- include/mega/transfer.h | 3 ++- src/commands.cpp | 5 +++++ src/megaapi_impl.cpp | 3 ++- src/megaclient.cpp | 8 ++++---- src/transfer.cpp | 7 ++++++- 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/include/mega/megaclient.h b/include/mega/megaclient.h index 87bc925cd6..1f8b6d4371 100644 --- a/include/mega/megaclient.h +++ b/include/mega/megaclient.h @@ -373,7 +373,7 @@ class MEGA_API MegaClient // enqueue/abort direct read void pread(Node*, m_off_t, m_off_t, void*); - void pread(handle, SymmCipher* key, int64_t, m_off_t, m_off_t, void*, bool = false, const char* = NULL, const char* = NULL); + void pread(handle, SymmCipher* key, int64_t, m_off_t, m_off_t, void*, bool = false, const char* = NULL, const char* = NULL, const char* = NULL); void preadabort(Node*, m_off_t = -1, m_off_t = -1); void preadabort(handle, m_off_t = -1, m_off_t = -1); @@ -828,7 +828,7 @@ class MEGA_API MegaClient bool isprivatehandle(handle*); // add direct read - void queueread(handle, bool, SymmCipher*, int64_t, m_off_t, m_off_t, void*, const char* = NULL, const char* = NULL); + void queueread(handle, bool, SymmCipher*, int64_t, m_off_t, m_off_t, void*, const char* = NULL, const char* = NULL, const char* = NULL); // execute pending direct reads bool execdirectreads(); diff --git a/include/mega/transfer.h b/include/mega/transfer.h index 0680f8d50a..b943874013 100644 --- a/include/mega/transfer.h +++ b/include/mega/transfer.h @@ -234,6 +234,7 @@ struct MEGA_API DirectReadNode bool p; string publicauth; string privateauth; + string chatauth; m_off_t partiallen; dstime partialstarttime; @@ -270,7 +271,7 @@ struct MEGA_API DirectReadNode // report failure to app and abort or retry all reads void retry(error, dstime = 0); - DirectReadNode(MegaClient*, handle, bool, SymmCipher*, int64_t, const char*, const char*); + DirectReadNode(MegaClient*, handle, bool, SymmCipher*, int64_t, const char*, const char*, const char*); ~DirectReadNode(); }; } // namespace diff --git a/src/commands.cpp b/src/commands.cpp index b6d1c2083f..d8abd848e4 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -408,6 +408,11 @@ CommandDirectRead::CommandDirectRead(MegaClient *client, DirectReadNode* cdrn) arg("en", drn->publicauth.c_str()); } + if (drn->chatauth.size()) + { + arg("cauth", drn->chatauth.c_str()); + } + if (client->usehttps) { arg("ssl", 2); diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 325cb593a1..fd8c401f96 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -16500,7 +16500,8 @@ void MegaApiImpl::sendPendingTransfers() MemAccess::get((const char*)publicNode->getNodeKey()->data() + SymmCipher::KEYLENGTH), startPos, totalBytes, transfer, publicNode->isForeign(), publicNode->getPrivateAuth()->c_str(), - publicNode->getPublicAuth()->c_str()); + publicNode->getPublicAuth()->c_str(), + publicNode->getChatAuth()); waiter->notify(); } } diff --git a/src/megaclient.cpp b/src/megaclient.cpp index 2b647d0171..4e4e5316d2 100644 --- a/src/megaclient.cpp +++ b/src/megaclient.cpp @@ -10831,9 +10831,9 @@ void MegaClient::pread(Node* n, m_off_t count, m_off_t offset, void* appdata) } // request direct read by exported handle / key -void MegaClient::pread(handle ph, SymmCipher* key, int64_t ctriv, m_off_t count, m_off_t offset, void* appdata, bool isforeign, const char *privauth, const char *pubauth) +void MegaClient::pread(handle ph, SymmCipher* key, int64_t ctriv, m_off_t count, m_off_t offset, void* appdata, bool isforeign, const char *privauth, const char *pubauth, const char *cauth) { - queueread(ph, isforeign, key, ctriv, count, offset, appdata, privauth, pubauth); + queueread(ph, isforeign, key, ctriv, count, offset, appdata, privauth, pubauth, cauth); } // since only the first six bytes of a handle are in use, we use the seventh to encode its type @@ -10850,7 +10850,7 @@ bool MegaClient::isprivatehandle(handle* hp) return ((char*)hp)[NODEHANDLE] != 0; } -void MegaClient::queueread(handle h, bool p, SymmCipher* key, int64_t ctriv, m_off_t offset, m_off_t count, void* appdata, const char* privauth, const char *pubauth) +void MegaClient::queueread(handle h, bool p, SymmCipher* key, int64_t ctriv, m_off_t offset, m_off_t count, void* appdata, const char* privauth, const char *pubauth, const char *cauth) { handledrn_map::iterator it; @@ -10861,7 +10861,7 @@ void MegaClient::queueread(handle h, bool p, SymmCipher* key, int64_t ctriv, m_o if (it == hdrns.end()) { // this handle is not being accessed yet: insert - it = hdrns.insert(hdrns.end(), pair(h, new DirectReadNode(this, h, p, key, ctriv, privauth, pubauth))); + it = hdrns.insert(hdrns.end(), pair(h, new DirectReadNode(this, h, p, key, ctriv, privauth, pubauth, cauth))); it->second->hdrn_it = it; it->second->enqueue(offset, count, reqtag, appdata); diff --git a/src/transfer.cpp b/src/transfer.cpp index ca3cb21ec2..4715dec7e9 100644 --- a/src/transfer.cpp +++ b/src/transfer.cpp @@ -1038,7 +1038,7 @@ m_off_t Transfer::nextpos() return pos; } -DirectReadNode::DirectReadNode(MegaClient* cclient, handle ch, bool cp, SymmCipher* csymmcipher, int64_t cctriv, const char *privauth, const char *pubauth) +DirectReadNode::DirectReadNode(MegaClient* cclient, handle ch, bool cp, SymmCipher* csymmcipher, int64_t cctriv, const char *privauth, const char *pubauth, const char *cauth) { client = cclient; @@ -1055,6 +1055,11 @@ DirectReadNode::DirectReadNode(MegaClient* cclient, handle ch, bool cp, SymmCiph publicauth = pubauth; } + if (cauth) + { + chatauth = cauth; + } + symmcipher = *csymmcipher; ctriv = cctriv; From 806d7288467f35eff9625d620bb6f068de75b7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Wed, 19 Dec 2018 11:02:23 +0100 Subject: [PATCH 15/53] Update DNS servers --- include/mega/http.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mega/http.h b/include/mega/http.h index 43764c9a83..aac106e703 100644 --- a/include/mega/http.h +++ b/include/mega/http.h @@ -92,7 +92,7 @@ namespace mega { #define MEGA_DNS_SERVERS "2001:678:25c:2215::554,89.44.169.136," \ "2001:67c:1998:2212::13,31.216.148.13," \ - "2405:f900:3e6a:1::103,103.244.183.5," \ + "2405:f900:3e6a:1::103,31.216.148.11," \ "2403:9800:c020::43,122.56.56.216" class MEGA_API SpeedController From 1cfd21ff14c82a0b8a81af2f64e5edbbacc39cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Wed, 19 Dec 2018 13:11:44 +0100 Subject: [PATCH 16/53] Simplify preparation of TLV --- src/megaapi_impl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 303f5efb6c..40d0712d27 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -9051,10 +9051,8 @@ void MegaApiImpl::setRichLinkWarningCounterValue(int value, MegaRequestListener void MegaApiImpl::enableGeolocation(MegaRequestListener *listener) { MegaStringMap *stringMap = new MegaStringMapPrivate(); - std::ostringstream oss; - oss << 1; string base64value; - Base64::btoa(oss.str(), base64value); + Base64::btoa("1", base64value); stringMap->set("v", base64value.c_str()); setUserAttribute(MegaApi::USER_ATTR_GEOLOCATION, stringMap, listener); delete stringMap; From 56b2a77bafbd2aed9439718a389709a54380fa57 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Andres Date: Wed, 19 Dec 2018 17:26:36 +0100 Subject: [PATCH 17/53] Adjust createChat errCode --- include/megaapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/megaapi.h b/include/megaapi.h index 6eafd811ed..32d3e371a0 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -12777,7 +12777,7 @@ class MegaApi * - MegaRequest::getMegaTextChatList - Returns the new chat's information * * If we try to create a peer chat room with more than one peer this request - * will return MegaError::API_ENOENT. + * will return MegaError::API_EACCESS. * * @note If you are trying to create a chat with more than 1 other person, then it will be forced * to be a group chat. From eb0824ea0d80b5b04e0007e957e43f91e2d145e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Wed, 19 Dec 2018 18:40:30 +0100 Subject: [PATCH 18/53] Adjust error-codes and documentation in MegaApi --- include/megaapi.h | 101 ++++++++++++++++++++++--------------------- src/megaapi_impl.cpp | 8 ++-- 2 files changed, 55 insertions(+), 54 deletions(-) diff --git a/include/megaapi.h b/include/megaapi.h index 32d3e371a0..2137e0165f 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -12776,11 +12776,8 @@ class MegaApi * is MegaError::API_OK: * - MegaRequest::getMegaTextChatList - Returns the new chat's information * - * If we try to create a peer chat room with more than one peer this request - * will return MegaError::API_EACCESS. - * - * @note If you are trying to create a chat with more than 1 other person, then it will be forced - * to be a group chat. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_EACCESS - If more than 1 peer is provided for a 1on1 chatroom. * * @note If peers list contains only one person, group chat is not set and a permament chat already * exists with that person, then this call will return the information for the existing chat, rather @@ -12821,6 +12818,9 @@ class MegaApi * is MegaError::ERROR_OK: * - MegaChatRequest::getChatHandle - Returns the handle of the new chatroom * + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_EARGS - If the number of keys doesn't match the number of peers plus one (own user) + * * @param peers MegaChatPeerList including other users and their privilege level * @param title Byte array that contains the chat topic if exists. NULL if no custom title is required. * @param userKeyMap MegaStringMap of user handles in B64 as keys, and unified keys in B64 as values. Own user included @@ -12846,10 +12846,10 @@ class MegaApi * - MegaRequest::getFlag - Returns false (private/closed mode) * - MegaRequest::getSessionKey - Returns the unified key for the new peer * - * On the onTransferFinish error, the error code associated to the MegaError can be: - * - MegaError::API_EACCESS - If the logged in user doesn't have privileges to invite peers. - * - MegaError::API_EARGS - If there's a title and it's not Base64url encoded. - * - MegaError::API_ENOENT - If the chat room does not exists. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_EACCESS - If the logged in user doesn't have privileges to invite peers or the chatroom is in public mode. + * - MegaError::API_EINCOMPLETE - If no valid title is provided and the chatroom has a custom title already. + * - MegaError::API_ENOENT- If no valid chatid or user handle is provided, of if the chatroom does not exists. * * @param chatid MegaHandle that identifies the chat room * @param uh MegaHandle that identifies the user @@ -12877,10 +12877,12 @@ class MegaApi * - MegaRequest::getFlag - Returns true (open/public mode) * - MegaRequest::getSessionKey - Returns the unified key for the new peer * - * On the onTransferFinish error, the error code associated to the MegaError can be: - * - MegaError::API_EACCESS - If the logged in user doesn't have privileges to invite peers. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_EACCESS - If the logged in user doesn't have privileges to invite peers or the chatroom is in private mode. * - MegaError::API_EARGS - If there's a title and it's not Base64url encoded. - + * - MegaError::API_ENOENT- If no valid chatid or user handle is provided, of if the chatroom does not exists. + * - MegaError::API_EINCOMPLETE - If no unified key is provided. + * * @param chatid MegaHandle that identifies the chat room * @param uh MegaHandle that identifies the user * @param privilege Privilege level for the new peers. Valid values are: @@ -12904,9 +12906,10 @@ class MegaApi * - MegaRequest::getNodeHandle - Returns the chat identifier * - MegaRequest::getParentHandle - Returns the MegaHandle of the user to be removed * - * If caller is not operator or is not a chat member, or the target is not a chat member this request - * will return API_EACCESS. - * If chat room does not exists this request will return API_ENOENT. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT- If no valid chatid is provided or the chatroom does not exists. + * - MegaError::API_EACCESS - If the chatroom is 1on1 or the caller is not operator or is not a + * chat member, or the target is not a chat member. * * @param chatid MegaHandle that identifies the chat room * @param uh MegaHandle that identifies the user. If not provided (INVALID_HANDLE), the requester is removed @@ -12942,12 +12945,11 @@ class MegaApi * - MegaRequest::getParentHandle - Returns the chat identifier * - MegaRequest::getEmail - Returns the MegaHandle of the user in Base64 enconding * - * If the chat room does not exists, this request will return MegaError::API_ENOENT. - * If the node provided does not exists, this request will return MegaError::API_ENOENT. - * If the target user does not exists, this request will return MegaError::API_ENOENT. - * If the target user is the same as caller, this request will return MegaError::API_EACCESS. - * If the target user is anonymous but the chat room is in private mode, this request will return MegaError::API_EACCESS. - * If caller is not an operator or the target user is not a chat member, this request will return MegaError::API_EACCESS. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT- If the chatroom, the node or the target user don't exist. + * - MegaError::API_EACCESS- If the target user is the same as caller, or if the target + * user is anonymous but the chatroom is in private mode, or if caller is not an operator + * or the target user is not a chat member. * * @param chatid MegaHandle that identifies the chat room * @param n MegaNode that wants to be shared @@ -12965,9 +12967,8 @@ class MegaApi * - MegaRequest::getParentHandle - Returns the chat identifier * - MegaRequest::getEmail - Returns the MegaHandle of the user in Base64 enconding * - * If the chatroom does not exists, this request will return MegaError::API_ENOENT. - * If the node provided does not exists, this request will return MegaError::API_ENOENT. - * If the target user does not exists, this request will return MegaError::API_ENOENT. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT- If the chatroom, the node or the target user don't exist. * * @param chatid MegaHandle that identifies the chat room * @param n MegaNode whose access wants to be revokesd @@ -12987,9 +12988,9 @@ class MegaApi * is to be upgraded * - MegaRequest::getAccess - Returns the privilege level wanted for the user * - * If the chat room does not exists this request will return MegaError::API_ENOENT. - * If the user specified is not a chat member this request will return MegaError::API_ENOENT. - * If caller is not operator this request will return MegaError::API_ENOENT. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT- If the chatroom doesn't exist or if the user specified is not a participant. + * - MegaError::API_EACCESS- If caller is not operator or the chatroom is 1on1. * * @param chatid MegaHandle that identifies the chat room * @param uh MegaHandle that identifies the user @@ -13028,7 +13029,7 @@ class MegaApi * Valid data in the MegaRequest object received on callbacks: * - MegaRequest::getText - Returns the title of the chat. * - * On the onTransferFinish error, the error code associated to the MegaError can be: + * On the onRequestFinish error, the error code associated to the MegaError can be: * - MegaError::API_EACCESS - If the logged in user doesn't have privileges to invite peers. * - MegaError::API_EARGS - If there's a title and it's not Base64url encoded. * @@ -13164,8 +13165,8 @@ class MegaApi * - MegaRequest::getNodeHandle - Returns the chat identifier * - MegaRequest::getFlag - Returns chat desired state * - * If the chatroom does not exists this request will return MegaError::API_ENOENT. - * If the caller is not operator this request will return MegaError::API_EACCESS. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT - If the chatroom does not exists. * * @param chatid MegaHandle that identifies the chat room * @param archive Desired chat state @@ -13204,10 +13205,9 @@ class MegaApi * is MegaError::API_OK: * - MegaRequest::getParentHandle - Returns the public handle of the chat link, if any * - * If caller is not operator or the chat is not a public chat or it's a 1on1 room, this request - * will return API_EACCESS. - * If the chatroom does not have a valid chatlink, or the chatroom does not exists this request - * will return MegaError::API_ENOENT. + * On the onTransferFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT - If the chatroom does not have a valid chatlink, or the chatroom does not exists. + * - MegaError::API_EACCESS - If caller is not operator or the chat is not a public chat or it's a 1on1 room. * * @param chatid MegaHandle that identifies the chat room * @param listener MegaRequestListener to track this request @@ -13229,10 +13229,9 @@ class MegaApi * is MegaError::API_OK: * - MegaRequest::getParentHandle - Returns the public handle of the chat link * - * If caller is not operator or the chat is not a public chat or it's a 1on1 room, this request - * will return API_EACCESS. - * If the chatroom does not have a valid chatlink, or the chatroom does not exists this request - * will return MegaError::API_ENOENT. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT - If the chatroom does not have a valid chatlink, or the chatroom does not exists. + * - MegaError::API_EACCESS - If caller is not operator or the chat is not a public chat or it's a 1on1 room. * * @param chatid MegaHandle that identifies the chat room * @param listener MegaRequestListener to track this request @@ -13250,10 +13249,9 @@ class MegaApi * Valid data in the MegaRequest object received on all callbacks: * - MegaRequest::getNodeHandle - Returns the chat identifier * - * If caller is not operator or the chat is not a public chat or it's a 1on1 room, this request - * will return API_EACCESS. - * If the chatroom does not have a valid chatlink, or the chatroom does not exists this request - * will return MegaError::API_ENOENT. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT - If the chatroom does not have a valid chatlink, or the chatroom does not exists. + * - MegaError::API_EACCESS - If caller is not operator or the chat is not a public chat or it's a 1on1 room. * * @param chatid MegaHandle that identifies the chat room * @param listener MegaRequestListener to track this request @@ -13284,12 +13282,12 @@ class MegaApi * - MegaRequest::getNumDetails - Returns the current number of participants * - MegaRequest::getNumber - Returns the creation timestamp * + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT - If the public handle is not valid or the chatroom does not exists. + * * @note This function can be called without being logged in. In that case, the returned * URL will be different than for logged in users, so chatd knows whether user has a session. * - * If the public handle is not valid or the chat room does not exists this request - * will return MegaError::API_ENOENT. - * * @param publichandle MegaHandle that represents the public handle of the chat link * @param listener MegaRequestListener to track this request */ @@ -13310,10 +13308,11 @@ class MegaApi * - MegaRequest::getNodeHandle - Returns the chat identifier * - MegaRequest::getText - Returns the title of the chat * - * If caller is not operator or it's a 1on1 room, this request will return MegaError::API_EACCESS. - * If the chat is not an public chat, this request will return MegaError::API_EEXIST. - * If the chatroom does not exists, this request will return MegaError::API_ENOENT. - * If the chatroom does not have topic this request will return MegaError::API_EARGS. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT - If the chatroom does not exists. + * - MegaError::API_EACCESS - If caller is not operator or it's a 1on1 room. + * - MegaError::API_EEXIST - If the chat is already in private mode. + * - MegaError::API_EARGS - If custom title is set and no title is provided.PI_EARGS. * * @param chatid MegaHandle that identifies the chat room * @param title Byte array representing the title, already encrypted and converted to Base64url @@ -13336,7 +13335,9 @@ class MegaApi * - MegaRequest::getNodeHandle - Returns the public handle of the chat link * - MegaRequest::getSessionKey - Returns the unified key of the chat link * - * If the public handle is not valid, this request will return MegaError::API_ENOENT. + * On the onRequestFinish error, the error code associated to the MegaError can be: + * - MegaError::API_ENOENT - If the public handle is not valid. + * - MegaError::API_EINCOMPLETE - If the no unified key is provided. * * @param publichandle MegaHandle that represents the public handle of the chat link * @param unifiedKey Byte array that contains the unified key, already encrypted and diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 54345cbaaa..5d007d918e 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -19222,7 +19222,7 @@ void MegaApiImpl::sendPendingRequests() if (publicMode && !unifiedKey) { - e = API_EARGS; + e = API_EINCOMPLETE; break; } @@ -19242,7 +19242,7 @@ void MegaApiImpl::sendPendingRequests() TextChat *chat = it->second; if (chat->publicchat != publicMode) { - e = API_EARGS; + e = API_EACCESS; break; } @@ -19360,7 +19360,7 @@ void MegaApiImpl::sendPendingRequests() TextChat *chat = it->second; if (!chat->group || chat->priv != PRIV_MODERATOR) { - e = API_ENOENT; + e = API_EACCESS; break; } @@ -19599,7 +19599,7 @@ void MegaApiImpl::sendPendingRequests() if (unifiedkey == NULL) { - e = API_EARGS; + e = API_EINCOMPLETE; break; } client->chatlinkjoin(publichandle, unifiedkey); From fac2624fb29349e819aa11c8a1d5c5371547aba2 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Wed, 19 Dec 2018 18:56:48 +0100 Subject: [PATCH 19/53] fix expanse local path for network locations --- src/win32/fs.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/win32/fs.cpp b/src/win32/fs.cpp index bc4cb3a9d1..d2a69a6f9c 100644 --- a/src/win32/fs.cpp +++ b/src/win32/fs.cpp @@ -1148,7 +1148,14 @@ bool WinFileSystemAccess::expanselocalpath(string *path, string *absolutepath) if (memcmp(absolutepath->data(), L"\\\\?\\", 8)) { - absolutepath->insert(0, (const char *)(const wchar_t*)L"\\\\?\\", 8); + if (!memcmp(absolutepath->data(), L"\\\\", 4)) //network location + { + absolutepath->insert(0, (const char *)(const wchar_t*)L"\\\\?\\UNC\\", 16); + } + else + { + absolutepath->insert(0, (const char *)(const wchar_t*)L"\\\\?\\", 8); + } } absolutepath->resize(absolutepath->size() - 2); return true; From 83c8e0e016c367e8aa82508b3e39fce118cb81d0 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Andres Date: Thu, 20 Dec 2018 12:31:48 +0100 Subject: [PATCH 20/53] Minor adjustments --- include/megaapi.h | 2 +- src/megaapi_impl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/megaapi.h b/include/megaapi.h index 2137e0165f..cb6ced1b35 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -13312,7 +13312,7 @@ class MegaApi * - MegaError::API_ENOENT - If the chatroom does not exists. * - MegaError::API_EACCESS - If caller is not operator or it's a 1on1 room. * - MegaError::API_EEXIST - If the chat is already in private mode. - * - MegaError::API_EARGS - If custom title is set and no title is provided.PI_EARGS. + * - MegaError::API_EARGS - If custom title is set and no title is provided. * * @param chatid MegaHandle that identifies the chat room * @param title Byte array representing the title, already encrypted and converted to Base64url diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 5d007d918e..d7cc228d30 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -19172,7 +19172,7 @@ void MegaApiImpl::sendPendingRequests() bool publicchat = (request->getAccess() == 1); MegaStringMap *userKeyMap = request->getMegaStringMap(); - if (!chatPeers) // emtpy groupchat + if (!chatPeers) // empty groupchat { MegaTextChatPeerListPrivate tmp = MegaTextChatPeerListPrivate(); request->setMegaTextChatPeerList(&tmp); From a9d1e79006a32d1f3182081d01a08bb1b5e69275 Mon Sep 17 00:00:00 2001 From: Javier Serrano Date: Wed, 2 Jan 2019 14:00:52 +0100 Subject: [PATCH 21/53] Optionally include console and autocompletion support --- bindings/qt/sdk.pri | 24 ++++++++++++++++++++++-- contrib/QtCreator/MEGACli/MEGACli.pro | 22 +--------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/bindings/qt/sdk.pri b/bindings/qt/sdk.pri index 9e565b681c..360111f417 100644 --- a/bindings/qt/sdk.pri +++ b/bindings/qt/sdk.pri @@ -3,7 +3,6 @@ MEGASDK_BASE_PATH = $$PWD/../../ VPATH += $$MEGASDK_BASE_PATH SOURCES += src/attrmap.cpp \ - src/autocomplete.cpp \ src/backofftimer.cpp \ src/base64.cpp \ src/command.cpp \ @@ -67,6 +66,28 @@ CONFIG(USE_AUTOCOMPLETE) { } } +CONFIG(USE_CONSOLE) { + win32 { + CONFIG(noreadline) { + DEFINES += NO_READLINE + SOURCES += src/win32/console.cpp + SOURCES += src/win32/consolewaiter.cpp + } + else { + DEFINES += USE_READLINE_STATIC + SOURCES += src/wincurl/console.cpp + SOURCES += src/wincurl/consolewaiter.cpp + LIBS += -lreadline + } + QMAKE_CXXFLAGS+=/Zc:__cplusplus /std:c++ #this will set _cplusplus correctly in MSVC >= 2017 15.7 Preview 3 + } + else { + SOURCES += src/posix/console.cpp + SOURCES += src/posix/consolewaiter.cpp + LIBS += -lreadline + } +} + CONFIG(USE_LIBWEBSOCKETS) { CONFIG += USE_LIBUV DEFINES += USE_LIBWEBSOCKETS=1 @@ -272,7 +293,6 @@ win32 { unix { SOURCES += src/posix/net.cpp \ - src/posix/console.cpp \ src/posix/fs.cpp \ src/posix/waiter.cpp } diff --git a/contrib/QtCreator/MEGACli/MEGACli.pro b/contrib/QtCreator/MEGACli/MEGACli.pro index f653db132f..0310004272 100644 --- a/contrib/QtCreator/MEGACli/MEGACli.pro +++ b/contrib/QtCreator/MEGACli/MEGACli.pro @@ -13,31 +13,11 @@ CONFIG += console CONFIG += noreadline win32 { - DEFINES += USE_READLINE_STATIC DEFINES += __STDC_LIMIT_MACROS #this is required to include or - CONFIG(noreadline) { - DEFINES += NO_READLINE - } } -LIBS += -lreadline - CONFIG += USE_AUTOCOMPLETE -win32 { - CONFIG(noreadline) { - SOURCES += ../../../src/win32/console.cpp - SOURCES += ../../../src/win32/consolewaiter.cpp - } - else { - SOURCES += ../../../src/wincurl/console.cpp - SOURCES += ../../../src/wincurl/consolewaiter.cpp - } - QMAKE_CXXFLAGS+=/Zc:__cplusplus /std:c++ #this will set _cplusplus correctly in MSVC >= 2017 15.7 Preview 3 -} -else { - SOURCES += ../../../src/posix/console.cpp - SOURCES += ../../../src/posix/consolewaiter.cpp -} +CONFIG += USE_CONSOLE SOURCES += ../../../examples/megacli.cpp HEADERS += ../../../examples/megacli.h From 6b5c579acc9de80b695e5a0fbcfea8992a6dfd38 Mon Sep 17 00:00:00 2001 From: Javier Serrano Date: Wed, 2 Jan 2019 19:20:41 +0100 Subject: [PATCH 22/53] Unify the different startUpload functions --- include/megaapi_impl.h | 3 +-- src/megaapi.cpp | 6 +++--- src/megaapi_impl.cpp | 8 +------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/include/megaapi_impl.h b/include/megaapi_impl.h index 4e711d6c9b..80c58d2a7a 100644 --- a/include/megaapi_impl.h +++ b/include/megaapi_impl.h @@ -1925,8 +1925,7 @@ class MegaApiImpl : public MegaApp void startUpload(const char* localPath, MegaNode *parent, MegaTransferListener *listener=NULL); void startUpload(const char* localPath, MegaNode *parent, int64_t mtime, MegaTransferListener *listener=NULL); void startUpload(const char* localPath, MegaNode* parent, const char* fileName, MegaTransferListener *listener = NULL); - void startUpload(bool startFirst, const char *localPath, MegaNode *parent, const char *fileName, int64_t mtime, int folderTransferTag = 0, const char *appData = NULL, bool isSourceFileTemporary = false, MegaTransferListener *listener = NULL); - void startUpload(bool startFirst, const char* localPath, MegaNode* parent, const char* fileName, int64_t mtime, int folderTransferTag = 0, bool isBackup = false, const char *appData = NULL, bool isSourceFileTemporary = false, MegaTransferListener *listener = NULL); + void startUpload(bool startFirst, const char* localPath, MegaNode* parent, const char* fileName, int64_t mtime, int folderTransferTag, bool isBackup, const char *appData, bool isSourceFileTemporary, MegaTransferListener *listener); void startDownload(MegaNode* node, const char* localPath, MegaTransferListener *listener = NULL); void startDownload(bool startFirst, MegaNode *node, const char* target, int folderTransferTag, const char *appData, MegaTransferListener *listener); void startStreaming(MegaNode* node, m_off_t startPos, m_off_t size, MegaTransferListener *listener); diff --git a/src/megaapi.cpp b/src/megaapi.cpp index efe5bcc767..7bcf362337 100644 --- a/src/megaapi.cpp +++ b/src/megaapi.cpp @@ -2514,7 +2514,7 @@ void MegaApi::startTimer( int64_t period, MegaRequestListener *listener) void MegaApi::startUploadWithData(const char *localPath, MegaNode *parent, const char *appData, MegaTransferListener *listener) { - pImpl->startUpload(false, localPath, parent, (const char *)NULL, -1, 0, appData, false, listener); + pImpl->startUpload(false, localPath, parent, (const char *)NULL, -1, 0, false, appData, false, listener); } void MegaApi::startUploadWithData(const char *localPath, MegaNode *parent, const char *appData, bool isSourceTemporary, MegaTransferListener *listener) @@ -2534,7 +2534,7 @@ void MegaApi::startUpload(const char *localPath, MegaNode *parent, int64_t mtime void MegaApi::startUpload(const char *localPath, MegaNode *parent, int64_t mtime, bool isSourceTemporary, MegaTransferListener *listener) { - pImpl->startUpload(false, localPath, parent, (const char *)NULL, mtime, false, 0, NULL, isSourceTemporary, listener); + pImpl->startUpload(false, localPath, parent, (const char *)NULL, mtime, 0, false, NULL, isSourceTemporary, listener); } void MegaApi::startUpload(const char* localPath, MegaNode* parent, const char* fileName, MegaTransferListener *listener) @@ -2544,7 +2544,7 @@ void MegaApi::startUpload(const char* localPath, MegaNode* parent, const char* f void MegaApi::startUpload(const char *localPath, MegaNode *parent, const char *fileName, int64_t mtime, MegaTransferListener *listener) { - pImpl->startUpload(false, localPath, parent, fileName, mtime, 0, NULL, false, listener); + pImpl->startUpload(false, localPath, parent, fileName, mtime, 0, false, NULL, false, listener); } void MegaApi::startDownload(MegaNode *node, const char* localFolder, MegaTransferListener *listener) diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 6297ac778d..5b4351bd6d 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -7203,11 +7203,6 @@ void MegaApiImpl::startUpload(const char *localPath, MegaNode *parent, int64_t m void MegaApiImpl::startUpload(const char* localPath, MegaNode* parent, const char* fileName, MegaTransferListener *listener) { return startUpload(false, localPath, parent, fileName, -1, 0, false, NULL, false, listener); } -void MegaApiImpl::startUpload(bool startFirst, const char *localPath, MegaNode *parent, const char *fileName, int64_t mtime, int folderTransferTag, const char *appData, bool isSourceFileTemporary, MegaTransferListener *listener) -{ - return startUpload(startFirst, localPath, parent, fileName, mtime, folderTransferTag, false, appData, isSourceFileTemporary, listener); -} - void MegaApiImpl::startDownload(bool startFirst, MegaNode *node, const char* localPath, int folderTransferTag, const char *appData, MegaTransferListener *listener) { MegaTransferPrivate* transfer = new MegaTransferPrivate(MegaTransfer::TYPE_DOWNLOAD, listener); @@ -21455,7 +21450,7 @@ void MegaFolderUploadController::onFolderAvailable(MegaHandle handle) pendingTransfers++; string utf8path; client->fsaccess->local2path(&localPath, &utf8path); - megaApi->startUpload(false, utf8path.c_str(), parent, (const char *)NULL, -1, tag, NULL, false, this); + megaApi->startUpload(false, utf8path.c_str(), parent, (const char *)NULL, -1, tag, false, NULL, false, this); } else { @@ -22641,7 +22636,6 @@ MegaBackupController::~MegaBackupController() { delete *it; } - } MegaFolderDownloadController::MegaFolderDownloadController(MegaApiImpl *megaApi, MegaTransferPrivate *transfer) From a3bbdac8de0722f4f2dc1c08860e26101fdc8e2e Mon Sep 17 00:00:00 2001 From: Javier Serrano Date: Thu, 3 Jan 2019 17:03:38 +0100 Subject: [PATCH 23/53] Allow to set custom DNS servers --- include/megaapi.h | 25 ++++++++++++++++++ include/megaapi_impl.h | 1 + src/megaapi.cpp | 5 ++++ src/megaapi_impl.cpp | 59 +++++++++++++++++++++++------------------- 4 files changed, 63 insertions(+), 27 deletions(-) diff --git a/include/megaapi.h b/include/megaapi.h index f69beb44c6..a17fd4e7ca 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -6227,6 +6227,31 @@ class MegaApi */ void retryPendingConnections(bool disconnect = false, bool includexfers = false, MegaRequestListener* listener = NULL); + /** + * @brief Use custom DNS servers + * + * The SDK tries to automatically get and use DNS servers configured in the system at startup. This function can be used + * to override that automatic detection and use a custom list of DNS servers. It is also useful to provide working + * DNS servers to the SDK in platforms in which it can't get them from the system (Windows Phone and Universal Windows Platform). + * + * Since the usage of this function implies a change in DNS servers used by the SDK, all connections are + * closed and restarted using the new list of new DNS servers, so calling this function too often can cause + * many retries and problems to complete requests. Please use it only at startup or when DNS servers need to be changed. + * + * The associated request type with this request is MegaRequest::TYPE_RETRY_PENDING_CONNECTIONS. + * Valid data in the MegaRequest object received on callbacks: + * - MegaRequest::getText - Returns the new list of DNS servers + * + * @param dnsServers New list of DNS servers. It must be a list of IPs separated by a comma character ",". + * IPv6 servers are allowed (without brackets). + * + * The usage of this function will trigger the callback MegaGlobalListener::onEvent and the callback + * MegaListener::onEvent with the event type MegaEvent::EVENT_DISCONNECT. + * + * @param listener MegaRequestListener to track this request + */ + void setDnsServers(const char *dnsServers, MegaRequestListener* listener = NULL); + /** * @brief Check if server-side Rubbish Bin autopurging is enabled for the current account * @return True if this feature is enabled. Otherwise false. diff --git a/include/megaapi_impl.h b/include/megaapi_impl.h index 1365ef93b5..27d9c940d2 100644 --- a/include/megaapi_impl.h +++ b/include/megaapi_impl.h @@ -1753,6 +1753,7 @@ class MegaApiImpl : public MegaApp static char *userHandleToBase64(MegaHandle handle); static const char* ebcEncryptKey(const char* encryptionKey, const char* plainKey); void retryPendingConnections(bool disconnect = false, bool includexfers = false, MegaRequestListener* listener = NULL); + void setDnsServers(const char *dnsServers, MegaRequestListener* listener = NULL); static void addEntropy(char* data, unsigned int size); static string userAttributeToString(int); static char userAttributeToScope(int); diff --git a/src/megaapi.cpp b/src/megaapi.cpp index 6b1140545d..9945b904f0 100644 --- a/src/megaapi.cpp +++ b/src/megaapi.cpp @@ -1646,6 +1646,11 @@ void MegaApi::retryPendingConnections(bool disconnect, bool includexfers, MegaRe pImpl->retryPendingConnections(disconnect, includexfers, listener); } +void MegaApi::setDnsServers(const char *dnsServers, MegaRequestListener *listener) +{ + pImpl->setDnsServers(dnsServers, listener); +} + bool MegaApi::serverSideRubbishBinAutopurgeEnabled() { return pImpl->serverSideRubbishBinAutopurgeEnabled(); diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index cde560b7cd..06c0c38627 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -4950,6 +4950,17 @@ void MegaApiImpl::retryPendingConnections(bool disconnect, bool includexfers, Me waiter->notify(); } +void MegaApiImpl::setDnsServers(const char *dnsServers, MegaRequestListener *listener) +{ + MegaRequestPrivate *request = new MegaRequestPrivate(MegaRequest::TYPE_RETRY_PENDING_CONNECTIONS); + request->setFlag(true); + request->setNumber(true); + request->setText(dnsServers); + request->setListener(listener); + requestQueue.push(request); + waiter->notify(); +} + void MegaApiImpl::addEntropy(char *data, unsigned int size) { if(PrnGen::rng.CanIncorporateEntropy()) @@ -5548,15 +5559,12 @@ MegaProxy *MegaApiImpl::getAutoProxySettings() void MegaApiImpl::loop() { -#if defined(WINDOWS_PHONE) || TARGET_OS_IPHONE - // Workaround to get the IP of valid DNS servers on Windows Phone/iOS +#if TARGET_OS_IPHONE + // Workaround to get the IP of valid DNS servers on iOS string servers; while (true) { - #ifdef WINDOWS_PHONE - client->httpio->getMEGADNSservers(&servers); - #else __res_state res; bool valid; if (res_ninit(&res) == 0) @@ -5592,21 +5600,15 @@ void MegaApiImpl::loop() res_ndestroy(&res); } - #endif if (servers.size()) break; - #ifdef WINDOWS_PHONE - std::this_thread::sleep_for(std::chrono::seconds(1)); - #else sleep(1); - #endif } - LOG_debug << "Using MEGA DNS servers " << servers; + LOG_debug << "Using DNS servers " << servers; httpio->setdnsservers(servers.c_str()); - #elif _WIN32 httpio->lock(); #endif @@ -17907,20 +17909,24 @@ void MegaApiImpl::sendPendingRequests() { bool disconnect = request->getFlag(); bool includexfers = request->getNumber(); + const char *dnsservers = request->getText(); + client->abortbackoff(includexfers); - if(disconnect) + if (disconnect) { client->disconnect(); -#if defined(WINDOWS_PHONE) || TARGET_OS_IPHONE - // Workaround to get the IP of valid DNS servers on Windows Phone/iOS string servers; - + if (dnsservers && dnsservers[0]) + { + servers = dnsservers; + } + else + { +#if TARGET_OS_IPHONE + // Workaround to get the IP of valid DNS servers on iOS while (true) { - #ifdef WINDOWS_PHONE - client->httpio->getMEGADNSservers(&servers); - #else __res_state res; bool valid; if (res_ninit(&res) == 0) @@ -17956,21 +17962,20 @@ void MegaApiImpl::sendPendingRequests() res_ndestroy(&res); } - #endif if (servers.size()) break; - #ifdef WINDOWS_PHONE - std::this_thread::sleep_for(std::chrono::seconds(1)); - #else sleep(1); - #endif } - - LOG_debug << "Using MEGA DNS servers " << servers; - httpio->setdnsservers(servers.c_str()); #endif + } + + if (servers.size()) + { + LOG_debug << "Using DNS servers " << servers; + httpio->setdnsservers(servers.c_str()); + } } fireOnRequestFinish(request, MegaError(API_OK)); From 1c95c60ab690e101d7933c3e60c5010c58839c0b Mon Sep 17 00:00:00 2001 From: Javier Serrano Date: Fri, 4 Jan 2019 03:11:34 +0100 Subject: [PATCH 24/53] Updated gradle build scripts --- .../android/ExampleApp/.idea/compiler.xml | 22 ------- .../.idea/copyright/profiles_settings.xml | 3 - examples/android/ExampleApp/.idea/misc.xml | 62 +------------------ examples/android/ExampleApp/.idea/vcs.xml | 6 -- examples/android/ExampleApp/app/build.gradle | 14 ++--- .../app/src/main/AndroidManifest.xml | 5 +- examples/android/ExampleApp/build.gradle | 5 +- .../gradle/wrapper/gradle-wrapper.properties | 4 +- 8 files changed, 14 insertions(+), 107 deletions(-) delete mode 100644 examples/android/ExampleApp/.idea/compiler.xml delete mode 100644 examples/android/ExampleApp/.idea/copyright/profiles_settings.xml delete mode 100644 examples/android/ExampleApp/.idea/vcs.xml diff --git a/examples/android/ExampleApp/.idea/compiler.xml b/examples/android/ExampleApp/.idea/compiler.xml deleted file mode 100644 index 96cc43efa6..0000000000 --- a/examples/android/ExampleApp/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/android/ExampleApp/.idea/copyright/profiles_settings.xml b/examples/android/ExampleApp/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf3377..0000000000 --- a/examples/android/ExampleApp/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/examples/android/ExampleApp/.idea/misc.xml b/examples/android/ExampleApp/.idea/misc.xml index c64217c111..39c65f6495 100644 --- a/examples/android/ExampleApp/.idea/misc.xml +++ b/examples/android/ExampleApp/.idea/misc.xml @@ -1,69 +1,9 @@ - - - - - - - - - - - - - - - - - - - - - + - - - - - 1.7 - - - - - - - \ No newline at end of file diff --git a/examples/android/ExampleApp/.idea/vcs.xml b/examples/android/ExampleApp/.idea/vcs.xml deleted file mode 100644 index 6564d52db2..0000000000 --- a/examples/android/ExampleApp/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/examples/android/ExampleApp/app/build.gradle b/examples/android/ExampleApp/app/build.gradle index b2ea7bf371..59fa3ce6d8 100644 --- a/examples/android/ExampleApp/app/build.gradle +++ b/examples/android/ExampleApp/app/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 23 - buildToolsVersion "23.0.3" - + compileSdkVersion 27 + buildToolsVersion '28.0.3' + defaultConfig { applicationId "nz.mega.android.bindingsample" - minSdkVersion 9 - targetSdkVersion 23 + minSdkVersion 14 + targetSdkVersion 27 versionCode 1 versionName "1.0" } @@ -30,6 +30,6 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.2.1' + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7:27.1.1' } diff --git a/examples/android/ExampleApp/app/src/main/AndroidManifest.xml b/examples/android/ExampleApp/app/src/main/AndroidManifest.xml index 6cccbb4a27..6af9201083 100644 --- a/examples/android/ExampleApp/app/src/main/AndroidManifest.xml +++ b/examples/android/ExampleApp/app/src/main/AndroidManifest.xml @@ -4,11 +4,8 @@ android:versionCode="1" android:versionName="1.0" > - - + Date: Fri, 4 Jan 2019 03:12:47 +0100 Subject: [PATCH 25/53] Fixed the login in the Android example app It was trying to use functions that have been already removed --- .../android/bindingsample/MainActivity.java | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/examples/android/ExampleApp/app/src/main/java/nz/mega/android/bindingsample/MainActivity.java b/examples/android/ExampleApp/app/src/main/java/nz/mega/android/bindingsample/MainActivity.java index 27febd850c..300cb865b6 100644 --- a/examples/android/ExampleApp/app/src/main/java/nz/mega/android/bindingsample/MainActivity.java +++ b/examples/android/ExampleApp/app/src/main/java/nz/mega/android/bindingsample/MainActivity.java @@ -58,26 +58,6 @@ public class MainActivity extends Activity implements OnClickListener, MegaReque MegaApiAndroid megaApi; - /* - * Task to process email and password - */ - private class HashTask extends AsyncTask { - - @Override - protected String[] doInBackground(String... args) { - String privateKey = megaApi.getBase64PwKey(args[1]); - String publicKey = megaApi.getStringHash(privateKey, args[0]); - return new String[]{new String(privateKey), new String(publicKey)}; - } - - - @Override - protected void onPostExecute(String[] key) { - onKeysGenerated(key[0], key[1]); - } - - } - @Override protected void onCreate(Bundle savedInstanceState) { @@ -128,9 +108,9 @@ private void initLogin(){ passwordText.setVisibility(View.GONE); loginButton.setVisibility(View.GONE); - title.setText(getResources().getString(R.string.generating_hash)); - - new HashTask().execute(email, password); + title.setText(getResources().getString(R.string.logging_in)); + + megaApi.login(email, password, this); } /* @@ -177,13 +157,6 @@ private String getPasswordError() { } return null; } - - private void onKeysGenerated(String privateKey, String publicKey) { - this.gPrivateKey = privateKey; - this.gPublicKey = publicKey; - - megaApi.fastLogin(email, publicKey, privateKey, this); - } @Override public void onRequestStart(MegaApiJava api, MegaRequest request) { From 86f0b781a66557d9a9156808e745937f5c162ddb Mon Sep 17 00:00:00 2001 From: Javier Serrano Date: Fri, 4 Jan 2019 03:14:18 +0100 Subject: [PATCH 26/53] Configure exceptions and rtti for the whole application --- examples/android/ExampleApp/app/src/main/jni/Application.mk | 4 ++-- .../android/ExampleApp/app/src/main/jni/bindings/Android.mk | 2 +- examples/android/ExampleApp/app/src/main/jni/curl/Android.mk | 4 ++-- examples/android/ExampleApp/app/src/main/jni/libuv/Android.mk | 2 +- .../android/ExampleApp/app/src/main/jni/mediainfo/Android.mk | 4 ++-- examples/android/ExampleApp/app/src/main/jni/mega/Android.mk | 2 +- .../android/ExampleApp/app/src/main/jni/openssl/Android.mk | 4 ++-- .../android/ExampleApp/app/src/main/jni/sqlite/Android.mk | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/android/ExampleApp/app/src/main/jni/Application.mk b/examples/android/ExampleApp/app/src/main/jni/Application.mk index 7e37bfd2f2..14690fecef 100644 --- a/examples/android/ExampleApp/app/src/main/jni/Application.mk +++ b/examples/android/ExampleApp/app/src/main/jni/Application.mk @@ -6,8 +6,8 @@ APP_OPTIM := release APP_PIE := false # then enable c++11 extentions in source code -APP_CPPFLAGS += -std=c++11 -Wno-extern-c-compat -mno-unaligned-access -# or use APP_CPPFLAGS := -std=gnu++11 +APP_CPPFLAGS += -std=c++11 -Wno-extern-c-compat -mno-unaligned-access -fexceptions -frtti DISABLE_WEBRTC = true +USE_LIBWEBSOCKETS = false diff --git a/examples/android/ExampleApp/app/src/main/jni/bindings/Android.mk b/examples/android/ExampleApp/app/src/main/jni/bindings/Android.mk index d36932e53d..c44e7e02ec 100644 --- a/examples/android/ExampleApp/app/src/main/jni/bindings/Android.mk +++ b/examples/android/ExampleApp/app/src/main/jni/bindings/Android.mk @@ -5,7 +5,7 @@ LOCAL_PATH := $(call my-dir) # The link step uses -Wl,-dead_strip,-gc-sections to strip all unused code include $(CLEAR_VARS) LOCAL_MODULE := mega -LOCAL_CFLAGS := -fexceptions -frtti -fdata-sections -ffunction-sections -DDEBUG +LOCAL_CFLAGS := -fdata-sections -ffunction-sections -DDEBUG LOCAL_SRC_FILES := $(LOCAL_PATH)/megasdk.cpp LOCAL_LDLIBS := -lm -lz -llog -lGLESv2 -lOpenSLES -latomic LOCAL_LDFLAGS := -Wl,-gc-sections diff --git a/examples/android/ExampleApp/app/src/main/jni/curl/Android.mk b/examples/android/ExampleApp/app/src/main/jni/curl/Android.mk index 64ef046027..de388cf8bc 100644 --- a/examples/android/ExampleApp/app/src/main/jni/curl/Android.mk +++ b/examples/android/ExampleApp/app/src/main/jni/curl/Android.mk @@ -8,7 +8,7 @@ LOCAL_MODULE := curl LOCAL_SRC_FILES := $(addprefix curl/lib/,$(CSOURCES)) LOCAL_C_INCLUDES += $(LOCAL_PATH)/curl/include $(LOCAL_PATH)/curl/lib $(LOCAL_PATH)/include LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/curl/include $(LOCAL_PATH)/include -LOCAL_CFLAGS += $(CFLAGS) -DHAVE_CONFIG_H -fexceptions -frtti -fvisibility=hidden -fdata-sections -ffunction-sections +LOCAL_CFLAGS += $(CFLAGS) -DHAVE_CONFIG_H -fvisibility=hidden -fdata-sections -ffunction-sections LOCAL_STATIC_LIBRARIES := ares ssl crypto include $(BUILD_STATIC_LIBRARY) @@ -18,7 +18,7 @@ LOCAL_MODULE := ares LOCAL_SRC_FILES := $(addprefix ares/,$(CSOURCES)) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ares $(LOCAL_PATH)/include LOCAL_C_INCLUDES += $(LOCAL_PATH)/ares $(LOCAL_PATH)/include -LOCAL_CFLAGS += $(CFLAGS) -DHAVE_CONFIG_H -fexceptions -frtti -fvisibility=hidden -fdata-sections -ffunction-sections +LOCAL_CFLAGS += $(CFLAGS) -DHAVE_CONFIG_H -fvisibility=hidden -fdata-sections -ffunction-sections LOCAL_STATIC_LIBRARIES := crypto ssl include $(BUILD_STATIC_LIBRARY) diff --git a/examples/android/ExampleApp/app/src/main/jni/libuv/Android.mk b/examples/android/ExampleApp/app/src/main/jni/libuv/Android.mk index af848e9311..5421494141 100644 --- a/examples/android/ExampleApp/app/src/main/jni/libuv/Android.mk +++ b/examples/android/ExampleApp/app/src/main/jni/libuv/Android.mk @@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := libuv -LOCAL_CFLAGS := -fexceptions -frtti -fvisibility=hidden -fdata-sections -ffunction-sections +LOCAL_CFLAGS := -fvisibility=hidden -fdata-sections -ffunction-sections ifneq ($(TARGET_ARCH_ABI),arm64-v8a) LOCAL_CFLAGS += -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC diff --git a/examples/android/ExampleApp/app/src/main/jni/mediainfo/Android.mk b/examples/android/ExampleApp/app/src/main/jni/mediainfo/Android.mk index 6de2bf5ac0..0d4ca7b5d2 100644 --- a/examples/android/ExampleApp/app/src/main/jni/mediainfo/Android.mk +++ b/examples/android/ExampleApp/app/src/main/jni/mediainfo/Android.mk @@ -4,7 +4,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := zenlib LOCAL_C_INCLUDES := $(LOCAL_PATH)/ZenLib/Source $(LOCAL_PATH)/ZenLib/Source/ZenLib LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ZenLib/Source -LOCAL_CFLAGS := -fexceptions -frtti -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DUNICODE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 +LOCAL_CFLAGS := -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DUNICODE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 LOCAL_SRC_FILES := $(addprefix ZenLib/Source/ZenLib/, \ Conf.cpp \ CriticalSection.cpp \ @@ -40,7 +40,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/mediainfo/Source $(LOCAL_PATH)/mediainfo/Sourc $(LOCAL_PATH)/mediainfo/Source/ThirdParty/sha1-gladman $(LOCAL_PATH)/mediainfo/Source/ThirdParty/sha2-gladman LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/mediainfo/Source -LOCAL_CFLAGS := -fexceptions -frtti -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DMEDIAINFO_MINIMIZESIZE -DMEDIAINFO_MINIMAL_YES -DMEDIAINFO_ARCHIVE_NO -DMEDIAINFO_IMAGE_NO \ +LOCAL_CFLAGS := -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DMEDIAINFO_MINIMIZESIZE -DMEDIAINFO_MINIMAL_YES -DMEDIAINFO_ARCHIVE_NO -DMEDIAINFO_IMAGE_NO \ -DMEDIAINFO_TAG_NO -DMEDIAINFO_TEXT_NO -DMEDIAINFO_SWF_NO -DMEDIAINFO_FLV_NO -DMEDIAINFO_HDSF4M_NO -DMEDIAINFO_CDXA_NO -DMEDIAINFO_DPG_NO -DMEDIAINFO_PMP_NO -DMEDIAINFO_RM_NO -DMEDIAINFO_WTV_NO -DMEDIAINFO_MXF_NO \ -DMEDIAINFO_DCP_NO -DMEDIAINFO_AAF_NO -DMEDIAINFO_BDAV_NO -DMEDIAINFO_BDMV_NO -DMEDIAINFO_DVDV_NO -DMEDIAINFO_GXF_NO -DMEDIAINFO_MIXML_NO -DMEDIAINFO_SKM_NO -DMEDIAINFO_NUT_NO -DMEDIAINFO_TSP_NO -DMEDIAINFO_HLS_NO \ -DMEDIAINFO_DXW_NO -DMEDIAINFO_DVDIF_NO -DMEDIAINFO_DASHMPD_NO -DMEDIAINFO_AIC_NO -DMEDIAINFO_AVSV_NO -DMEDIAINFO_CANOPUS_NO -DMEDIAINFO_FFV1_NO -DMEDIAINFO_FLIC_NO -DMEDIAINFO_HUFFYUV_NO -DMEDIAINFO_PRORES_NO -DMEDIAINFO_Y4M_NO \ diff --git a/examples/android/ExampleApp/app/src/main/jni/mega/Android.mk b/examples/android/ExampleApp/app/src/main/jni/mega/Android.mk index 3bd1360710..a760eb9136 100644 --- a/examples/android/ExampleApp/app/src/main/jni/mega/Android.mk +++ b/examples/android/ExampleApp/app/src/main/jni/mega/Android.mk @@ -11,7 +11,7 @@ local_c_includes := \ include $(CLEAR_VARS) include $(LOCAL_PATH)/Makefile.inc LOCAL_MODULE := megasdk -LOCAL_CFLAGS := -fexceptions -frtti -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DDEBUG -DENABLE_CHAT +LOCAL_CFLAGS := -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DDEBUG -DENABLE_CHAT LOCAL_SRC_FILES := $(CPP_SOURCES) $(C_SOURCES) $(C_WRAPPER_SOURCES) LOCAL_C_INCLUDES += $(local_c_includes) LOCAL_EXPORT_C_INCLUDES += $(local_c_includes) diff --git a/examples/android/ExampleApp/app/src/main/jni/openssl/Android.mk b/examples/android/ExampleApp/app/src/main/jni/openssl/Android.mk index 7fd41d923d..2d830371d4 100644 --- a/examples/android/ExampleApp/app/src/main/jni/openssl/Android.mk +++ b/examples/android/ExampleApp/app/src/main/jni/openssl/Android.mk @@ -20,7 +20,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(addprefix openssl/ssl/, ssl_conf.c t1_ext.c t1_trce.c bio_ssl.c d1_lib.c d1_srvr.c s23_meth.c s2_enc.c s2_srvr.c s3_enc.c s3_srvr.c ssl_ciph.c ssl_rsa.c t1_lib.c tls_srp.c d1_both.c d1_meth.c kssl.c s23_pkt.c s2_lib.c s3_both.c s3_lib.c ssl_algs.c ssl_err2.c ssl_sess.c ssl_txt.c t1_meth.c d1_clnt.c d1_pkt.c s23_clnt.c s23_srvr.c s2_meth.c s3_cbc.c s3_meth.c ssl_asn1.c ssl_err.c ssl_stat.c t1_clnt.c t1_reneg.c d1_srtp.c s23_lib.c s2_clnt.c s2_pkt.c s3_clnt.c s3_pkt.c ssl_cert.c ssl_lib.c t1_enc.c t1_srvr.c) LOCAL_C_INCLUDES := $(local_c_includes) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/openssl $(LOCAL_PATH)/openssl/include $(LOCAL_PATH)/openssl/crypto -LOCAL_CFLAGS := $(local_c_flags) -fexceptions -frtti -fvisibility=hidden -fdata-sections -ffunction-sections +LOCAL_CFLAGS := $(local_c_flags) -fvisibility=hidden -fdata-sections -ffunction-sections LOCAL_SHARED_LIBRARIES := crypto LOCAL_MODULE_TAGS := optional LOCAL_MODULE := ssl @@ -28,7 +28,7 @@ include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_SRC_FILES := $(addprefix openssl/crypto/, cms/cms_asn1.c cms/cms_att.c cms/cms_cd.c cms/cms_dd.c cms/cms_enc.c cms/cms_env.c cms/cms_err.c cms/cms_ess.c cms/cms_io.c cms/cms_kari.c cms/cms_lib.c cms/cms_pwri.c cms/cms_sd.c cms/cms_smime.c ec/ec2_mult.c ec/ec2_oct.c ec/ec2_smpl.c ec/ec_ameth.c ec/ec_asn1.c ec/ec_check.c ec/ec_curve.c ec/ec_cvt.c ec/ec_err.c ec/ec_key.c ec/eck_prn.c ec/ec_lib.c ec/ec_mult.c ec/ec_oct.c ec/ec_pmeth.c ec/ecp_mont.c ec/ecp_nist.c ec/ecp_nistp224.c ec/ecp_nistp256.c ec/ecp_nistp521.c ec/ecp_nistputil.c ec/ecp_oct.c ec/ec_print.c ec/ecp_smpl.c ecdsa/ecs_asn1.c ecdsa/ecs_err.c ecdsa/ecs_lib.c ecdsa/ecs_ossl.c ecdsa/ecs_sign.c ecdsa/ecs_vrf.c ecdh/ech_err.c ecdh/ech_kdf.c ecdh/ech_key.c ecdh/ech_lib.c ecdh/ech_ossl.c stack/stack.c o_fips.c asn1/f_int.c asn1/asn1_err.c asn1/x_spki.c asn1/d2i_pu.c asn1/x_val.c asn1/x_bignum.c asn1/x_info.c asn1/p5_pbe.c asn1/a_object.c asn1/asn1_par.c asn1/asn_moid.c asn1/a_verify.c asn1/tasn_typ.c asn1/x_attrib.c asn1/x_algor.c asn1/a_octet.c asn1/a_digest.c asn1/tasn_utl.c asn1/x_exten.c asn1/a_print.c asn1/a_strnid.c asn1/p8_pkey.c asn1/t_req.c asn1/bio_asn1.c asn1/a_utctm.c asn1/t_crl.c asn1/x_req.c asn1/t_pkey.c asn1/nsseq.c asn1/a_dup.c asn1/a_set.c asn1/f_enum.c asn1/x_nx509.c asn1/evp_asn1.c asn1/t_bitst.c asn1/x_x509.c asn1/t_x509.c asn1/n_pkey.c asn1/a_type.c asn1/x_sig.c asn1/tasn_new.c asn1/t_spki.c asn1/asn_pack.c asn1/a_bool.c asn1/p5_pbev2.c asn1/a_mbstr.c asn1/a_utf8.c asn1/tasn_dec.c asn1/x_crl.c asn1/asn1_gen.c asn1/x_long.c asn1/tasn_enc.c asn1/bio_ndef.c asn1/asn_mime.c asn1/tasn_fre.c asn1/ameth_lib.c asn1/a_bitstr.c asn1/x_pkey.c asn1/a_strex.c asn1/x_name.c asn1/i2d_pr.c asn1/a_time.c asn1/a_int.c asn1/t_x509a.c asn1/a_bytes.c asn1/f_string.c asn1/i2d_pu.c asn1/x_pubkey.c asn1/a_sign.c asn1/a_i2d_fp.c asn1/a_enum.c asn1/x_x509a.c asn1/a_gentm.c asn1/d2i_pr.c asn1/asn1_lib.c asn1/tasn_prn.c asn1/a_d2i_fp.c cmac/cm_ameth.c cmac/cmac.c cmac/cm_pmeth.c o_dir.c hmac/hm_ameth.c hmac/hm_pmeth.c hmac/hmac.c fips_ers.c sparcv9cap.c bio/b_sock.c bio/b_dump.c bio/bss_log.c bio/bss_mem.c bio/bss_fd.c bio/bss_null.c bio/bss_acpt.c bio/bio_err.c bio/bio_lib.c bio/bss_bio.c bio/bf_null.c bio/bf_nbio.c bio/bss_sock.c bio/bss_file.c bio/bss_conn.c bio/bf_buff.c bio/bf_lbuf.c bio/bio_cb.c bio/b_print.c bio/bss_dgram.c o_time.c pkcs12/p12_decr.c pkcs12/p12_attr.c pkcs12/p12_mutl.c pkcs12/p12_utl.c pkcs12/p12_crt.c pkcs12/p12_asn.c pkcs12/p12_add.c pkcs12/p12_key.c pkcs12/p12_npas.c pkcs12/p12_p8e.c pkcs12/p12_crpt.c pkcs12/pk12err.c pkcs12/p12_kiss.c pkcs12/p12_p8d.c pkcs12/p12_init.c txt_db/txt_db.c err/err_all.c err/err_prn.c err/err.c sha/sha1dgst.c sha/sha512.c sha/sha_one.c sha/sha1_one.c sha/sha_dgst.c sha/sha256.c objects/obj_dat.c objects/obj_xref.c objects/obj_err.c objects/o_names.c objects/obj_lib.c ppccap.c uid.c rand/randfile.c rand/rand_win.c rand/rand_unix.c rand/rand_egd.c rand/rand_nw.c rand/rand_vms.c rand/rand_os2.c rand/rand_lib.c rand/rand_err.c rand/md_rand.c aes/aes_core.c aes/aes_ofb.c aes/aes_cbc.c aes/aes_cfb.c aes/aes_ctr.c aes/aes_ige.c aes/aes_ecb.c aes/aes_wrap.c aes/aes_misc.c conf/conf_mod.c conf/conf_lib.c conf/conf_mall.c conf/conf_err.c conf/conf_api.c conf/conf_def.c conf/conf_sap.c ts/ts_rsp_sign.c ts/ts_rsp_print.c ts/ts_rsp_verify.c ts/ts_err.c ts/ts_rsp_utils.c ts/ts_conf.c ts/ts_lib.c ts/ts_req_print.c ts/ts_req_utils.c ts/ts_verify_ctx.c ts/ts_asn1.c srp/srp_vfy.c srp/srp_lib.c o_str.c pem/pem_oth.c pem/pem_lib.c pem/pem_all.c pem/pem_xaux.c pem/pem_pkey.c pem/pvkfmt.c pem/pem_seal.c pem/pem_err.c pem/pem_sign.c pem/pem_x509.c pem/pem_info.c pem/pem_pk8.c mem_clr.c rsa/rsa_err.c rsa/rsa_none.c rsa/rsa_eay.c rsa/rsa_prn.c rsa/rsa_ameth.c rsa/rsa_depr.c rsa/rsa_ssl.c rsa/rsa_chk.c rsa/rsa_pss.c rsa/rsa_lib.c rsa/rsa_oaep.c rsa/rsa_asn1.c rsa/rsa_saos.c rsa/rsa_null.c rsa/rsa_x931.c rsa/rsa_crpt.c rsa/rsa_gen.c rsa/rsa_sign.c rsa/rsa_pmeth.c rsa/rsa_pk1.c x509v3/v3_scts.c x509v3/v3_prn.c x509v3/v3_akeya.c x509v3/v3_lib.c x509v3/v3_extku.c x509v3/v3_purp.c x509v3/v3_enum.c x509v3/v3_ocsp.c x509v3/v3_skey.c x509v3/v3_pcia.c x509v3/v3_pci.c x509v3/v3_sxnet.c x509v3/v3_ncons.c x509v3/v3_addr.c x509v3/v3_int.c x509v3/v3_genn.c x509v3/v3_ia5.c x509v3/v3_pku.c x509v3/pcy_map.c x509v3/v3_asid.c x509v3/v3_utl.c x509v3/v3_bcons.c x509v3/pcy_node.c x509v3/pcy_data.c x509v3/v3_cpols.c x509v3/v3_info.c x509v3/v3_akey.c x509v3/v3_pcons.c x509v3/v3_alt.c x509v3/pcy_cache.c x509v3/v3_crld.c x509v3/pcy_lib.c x509v3/v3_bitst.c x509v3/v3_pmaps.c x509v3/pcy_tree.c x509v3/v3_conf.c x509v3/v3err.c o_init.c evp/bio_b64.c evp/bio_enc.c evp/bio_md.c evp/bio_ok.c evp/c_all.c evp/c_allc.c evp/c_alld.c evp/digest.c evp/e_aes.c evp/e_aes_cbc_hmac_sha1.c evp/e_aes_cbc_hmac_sha256.c evp/e_bf.c evp/e_camellia.c evp/e_cast.c evp/e_des3.c evp/e_des.c evp/e_idea.c evp/encode.c evp/e_null.c evp/e_old.c evp/e_rc2.c evp/e_rc4.c evp/e_rc4_hmac_md5.c evp/e_rc5.c evp/e_seed.c evp/evp_acnf.c evp/evp_cnf.c evp/evp_enc.c evp/evp_err.c evp/evp_key.c evp/evp_lib.c evp/evp_pbe.c evp/evp_pkey.c evp/e_xcbc_d.c evp/m_dss1.c evp/m_dss.c evp/m_ecdsa.c evp/m_md2.c evp/m_md4.c evp/m_md5.c evp/m_mdc2.c evp/m_null.c evp/m_ripemd.c evp/m_sha1.c evp/m_sha.c evp/m_sigver.c evp/m_wp.c evp/names.c evp/openbsd_hw.c evp/p5_crpt2.c evp/p5_crpt.c evp/p_dec.c evp/p_enc.c evp/p_lib.c evp/pmeth_fn.c evp/pmeth_gn.c evp/pmeth_lib.c evp/p_open.c evp/p_seal.c evp/p_sign.c evp/p_verify.c cversion.c threads/th-lock.c krb5/krb5_asn.c des/ecb_enc.c des/set_key.c des/enc_writ.c des/fcrypt.c des/cfb_enc.c des/cfb64enc.c des/ede_cbcm_enc.c des/cfb64ede.c des/des_old.c des/enc_read.c des/cbc_enc.c des/ofb_enc.c des/des_old2.c des/cbc_cksm.c des/cbc3_enc.c des/fcrypt_b.c des/des_enc.c des/ncbc_enc.c des/rpc_enc.c des/xcbc_enc.c des/ecb3_enc.c des/ofb64ede.c des/qud_cksm.c des/ofb64enc.c des/pcbc_enc.c des/str2key.c des/read2pwd.c des/rand_key.c buffer/buffer.c buffer/buf_err.c buffer/buf_str.c mem_dbg.c rc2/rc2cfb64.c rc2/rc2_ecb.c rc2/rc2_skey.c rc2/rc2ofb64.c rc2/rc2_cbc.c bn/bn_rand.c bn/bn_sqrt.c bn/bn_mul.c bn/bn_exp.c bn/bn_const.c bn/bn_print.c bn/bn_gcd.c bn/bn_word.c bn/bn_div.c bn/bn_gf2m.c bn/bn_mod.c bn/bn_mont.c bn/bn_exp2.c bn/vms-helper.c bn/bn_asm.c bn/bn_recp.c bn/bn_shift.c bn/bn_depr.c bn/bn_mpi.c bn/bn_kron.c bn/bn_ctx.c bn/bn_prime.c bn/bn_err.c bn/bn_nist.c bn/bn_sqr.c bn/bn_blind.c bn/bn_lib.c bn/bn_x931p.c bn/bn_add.c cpt_err.c lhash/lh_stats.c lhash/lhash.c cryptlib.c ripemd/rmd_one.c ripemd/rmd_dgst.c modes/wrap128.c modes/ccm128.c modes/gcm128.c modes/ofb128.c modes/cfb128.c modes/ctr128.c modes/cts128.c modes/cbc128.c modes/xts128.c ebcdic.c s390xcap.c x509/x509_att.c x509/x509_v3.c x509/x509type.c x509/by_file.c x509/x509_lu.c x509/x509_vpm.c x509/x509cset.c x509/x509spki.c x509/x509_trs.c x509/x509_ext.c x509/x_all.c x509/x509_d2.c x509/x509_req.c x509/x509_set.c x509/x509rset.c x509/x509name.c x509/x509_def.c x509/x509_txt.c x509/x509_r2x.c x509/x509_obj.c x509/x509_vfy.c x509/x509_cmp.c x509/by_dir.c x509/x509_err.c md5/md5_one.c md5/md5_dgst.c ocsp/ocsp_asn.c ocsp/ocsp_prn.c ocsp/ocsp_ext.c ocsp/ocsp_ht.c ocsp/ocsp_cl.c ocsp/ocsp_vfy.c ocsp/ocsp_lib.c ocsp/ocsp_srv.c ocsp/ocsp_err.c md4/md4_dgst.c md4/md4_one.c dso/dso_lib.c dso/dso_dlfcn.c dso/dso_win32.c dso/dso_beos.c dso/dso_openssl.c dso/dso_vms.c dso/dso_dl.c dso/dso_null.c dso/dso_err.c ex_data.c ui/ui_lib.c ui/ui_openssl.c ui/ui_util.c ui/ui_compat.c ui/ui_err.c pkcs7/pk7_dgst.c pkcs7/pkcs7err.c pkcs7/pk7_attr.c pkcs7/pk7_lib.c pkcs7/pk7_doit.c pkcs7/bio_pk7.c pkcs7/pk7_asn1.c pkcs7/pk7_mime.c pkcs7/pk7_smime.c mem.c pqueue/pqueue.c comp/c_rle.c comp/comp_err.c comp/c_zlib.c comp/comp_lib.c rc4/rc4_utl.c rc4/rc4_skey.c rc4/rc4_enc.c) -LOCAL_CFLAGS := $(local_c_flags) -fexceptions -frtti -fvisibility=hidden -fdata-sections -ffunction-sections +LOCAL_CFLAGS := $(local_c_flags) -fvisibility=hidden -fdata-sections -ffunction-sections LOCAL_C_INCLUDES := $(local_c_includes) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/openssl $(LOCAL_PATH)/openssl/include $(LOCAL_PATH)/openssl/crypto LOCAL_MODULE_TAGS := optional diff --git a/examples/android/ExampleApp/app/src/main/jni/sqlite/Android.mk b/examples/android/ExampleApp/app/src/main/jni/sqlite/Android.mk index b2f6c57688..41bd43e91b 100644 --- a/examples/android/ExampleApp/app/src/main/jni/sqlite/Android.mk +++ b/examples/android/ExampleApp/app/src/main/jni/sqlite/Android.mk @@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := sqlite -LOCAL_CFLAGS := -fexceptions -frtti -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections +LOCAL_CFLAGS := -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections LOCAL_SRC_FILES := sqlite/sqlite3.c LOCAL_C_INCLUDES += sqlite/sqlite3.h LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/sqlite From 0775adb61f850df532c1221298649ac53b221cdc Mon Sep 17 00:00:00 2001 From: Javier Serrano Date: Fri, 4 Jan 2019 03:15:06 +0100 Subject: [PATCH 27/53] Update c-ares to 1.15.0 --- examples/android/ExampleApp/app/src/main/jni/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/android/ExampleApp/app/src/main/jni/build.sh b/examples/android/ExampleApp/app/src/main/jni/build.sh index b6915a8a51..20e7436ee0 100755 --- a/examples/android/ExampleApp/app/src/main/jni/build.sh +++ b/examples/android/ExampleApp/app/src/main/jni/build.sh @@ -36,7 +36,7 @@ SQLITE_SHA1="22632bf0cfacedbeddde9f92695f71cab8d8c0a5" CURL=curl CURL_VERSION=7.48.0 -C_ARES_VERSION=1.11.0 +C_ARES_VERSION=1.15.0 CURL_EXTRA="--disable-smb --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher --disable-sspi" CURL_SOURCE_FILE=curl-${CURL_VERSION}.tar.gz CURL_SOURCE_FOLDER=curl-${CURL_VERSION} @@ -47,7 +47,7 @@ ARES_SOURCE_FILE=c-ares-${C_ARES_VERSION}.tar.gz ARES_SOURCE_FOLDER=c-ares-${C_ARES_VERSION} ARES_CONFIGURED=${CURL}/${ARES_SOURCE_FOLDER}/Makefile.inc ARES_DOWNLOAD_URL=http://c-ares.haxx.se/download/${ARES_SOURCE_FILE} -ARES_SHA1="8c20b2680099ac73861a780c731edd59e010383a" +ARES_SHA1="74a50c02b7f051c4fb66c0f60f187350f196d908" OPENSSL=openssl OPENSSL_VERSION=1.0.2h From 73f8a3ed6c7c9f49e3233fc90996735de233092e Mon Sep 17 00:00:00 2001 From: Javier Serrano Date: Fri, 4 Jan 2019 03:16:15 +0100 Subject: [PATCH 28/53] Updated Crypto++ in the Android example to version 8.0 --- examples/android/ExampleApp/app/src/main/jni/build.sh | 5 +++-- .../ExampleApp/app/src/main/jni/cryptopp/Android.mk | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/android/ExampleApp/app/src/main/jni/build.sh b/examples/android/ExampleApp/app/src/main/jni/build.sh index 20e7436ee0..e2271384a9 100755 --- a/examples/android/ExampleApp/app/src/main/jni/build.sh +++ b/examples/android/ExampleApp/app/src/main/jni/build.sh @@ -19,11 +19,11 @@ APP_PLATFORM=`grep APP_PLATFORM Application.mk | cut -d '=' -f 2` LOG_FILE=/dev/null CRYPTOPP=cryptopp -CRYPTOPP_VERSION=563 +CRYPTOPP_VERSION=800 CRYPTOPP_SOURCE_FILE=cryptopp${CRYPTOPP_VERSION}.zip CRYPTOPP_SOURCE_FOLDER=${CRYPTOPP}/${CRYPTOPP} CRYPTOPP_DOWNLOAD_URL=http://www.cryptopp.com/${CRYPTOPP_SOURCE_FILE} -CRYPTOPP_SHA1="f2fcd1fbf884bed70a69b565970ecd8b33a68cc4" +CRYPTOPP_SHA1="dd0dc0586c0a3e0696cd323efc6fa2e2945ad920" SQLITE=sqlite SQLITE_VERSION=3120200 @@ -271,6 +271,7 @@ echo "* Setting up Crypto++" if [ ! -f ${CRYPTOPP}/${CRYPTOPP_SOURCE_FILE}.ready ]; then mkdir -p ${CRYPTOPP}/${CRYPTOPP} downloadCheckAndUnpack ${CRYPTOPP_DOWNLOAD_URL} ${CRYPTOPP}/${CRYPTOPP_SOURCE_FILE} ${CRYPTOPP_SHA1} ${CRYPTOPP}/${CRYPTOPP} + cp ${NDK_ROOT}/sources/android/cpufeatures/cpu-features.h ${CRYPTOPP}/${CRYPTOPP}/ touch ${CRYPTOPP}/${CRYPTOPP_SOURCE_FILE}.ready fi echo "* Crypto++ is ready" diff --git a/examples/android/ExampleApp/app/src/main/jni/cryptopp/Android.mk b/examples/android/ExampleApp/app/src/main/jni/cryptopp/Android.mk index 3a607582e0..1157124c54 100644 --- a/examples/android/ExampleApp/app/src/main/jni/cryptopp/Android.mk +++ b/examples/android/ExampleApp/app/src/main/jni/cryptopp/Android.mk @@ -3,9 +3,10 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := cryptopp -LOCAL_CFLAGS := -DCRYPTOPP_DISABLE_X86ASM -DCRYPTOPP_DISABLE_SSSE3 -DCRYPTOPP_DISABLE_AESNI -D__ILP32__=0 -D_ILP32=0 -Wno-macro-redefined -fexceptions -frtti -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -LOCAL_SRC_FILES := $(addprefix cryptopp/, 3way.cpp crc.cpp eax.cpp idea.cpp mqv.cpp rabin.cpp safer.cpp socketft.cpp twofish.cpp zinflate.cpp bfinit.cpp cryptlib_bds.cpp ec2n.cpp gcm.cpp integer.cpp nbtheory.cpp randpool.cpp salsa.cpp sosemanuk.cpp zlib.cpp adler32.cpp blowfish.cpp cryptlib.cpp eccrypto.cpp gf2_32.cpp iterhash.cpp network.cpp rc2.cpp seal.cpp square.cpp algebra.cpp blumshub.cpp ecp.cpp gf256.cpp luc.cpp oaep.cpp rc5.cpp seed.cpp squaretb.cpp algparam.cpp camellia.cpp default.cpp elgamal.cpp gf2n.cpp mars.cpp osrng.cpp rc6.cpp serpent.cpp strciphr.cpp vmac.cpp arc4.cpp cast.cpp des.cpp emsa2.cpp gfpcrypt.cpp marss.cpp panama.cpp rdtables.cpp sha3.cpp tea.cpp wait.cpp asn.cpp casts.cpp dessp.cpp eprecomp.cpp gost.cpp md2.cpp pch.cpp shacal2.cpp wake.cpp authenc.cpp cbcmac.cpp dh2.cpp esign.cpp gzip.cpp md4.cpp pkcspad.cpp rijndael.cpp sha.cpp tftables.cpp whrlpool.cpp base32.cpp ccm.cpp dh.cpp files.cpp hex.cpp md5.cpp polynomi.cpp ripemd.cpp sharkbox.cpp tiger.cpp winpipes.cpp base64.cpp channels.cpp dll.cpp filters.cpp hmac.cpp misc.cpp pssr.cpp rng.cpp shark.cpp tigertab.cpp xtr.cpp basecode.cpp cmac.cpp fips140.cpp hrtimer.cpp modes.cpp pubkey.cpp rsa.cpp simple.cpp trdlocal.cpp xtrcrypt.cpp cpu.cpp dsa.cpp fipsalgt.cpp ida.cpp mqueue.cpp queue.cpp rw.cpp skipjack.cpp ttmac.cpp zdeflate.cpp) +LOCAL_CFLAGS := -DCRYPTOPP_DISABLE_ASM -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections +LOCAL_SRC_FILES := $(addprefix cryptopp/, cryptlib.cpp cpu.cpp integer.cpp 3way.cpp adler32.cpp algebra.cpp algparam.cpp arc4.cpp aria.cpp aria_simd.cpp ariatab.cpp asn.cpp authenc.cpp base32.cpp base64.cpp basecode.cpp bfinit.cpp blake2.cpp blake2b_simd.cpp blake2s_simd.cpp blowfish.cpp blumshub.cpp camellia.cpp cast.cpp casts.cpp cbcmac.cpp ccm.cpp chacha.cpp chacha_avx.cpp chacha_simd.cpp cham.cpp cham_simd.cpp channels.cpp cmac.cpp crc.cpp crc_simd.cpp darn.cpp default.cpp des.cpp dessp.cpp dh.cpp dh2.cpp dll.cpp donna_32.cpp donna_64.cpp donna_sse.cpp dsa.cpp eax.cpp ec2n.cpp eccrypto.cpp ecp.cpp elgamal.cpp emsa2.cpp eprecomp.cpp esign.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gcm.cpp gcm_simd.cpp gf256.cpp gf2_32.cpp gf2n.cpp gfpcrypt.cpp gost.cpp gzip.cpp hc128.cpp hc256.cpp hex.cpp hight.cpp hmac.cpp hrtimer.cpp ida.cpp idea.cpp iterhash.cpp kalyna.cpp kalynatab.cpp keccak.cpp keccakc.cpp lea.cpp lea_simd.cpp luc.cpp mars.cpp marss.cpp md2.cpp md4.cpp md5.cpp misc.cpp modes.cpp mqueue.cpp mqv.cpp nbtheory.cpp neon_simd.cpp oaep.cpp osrng.cpp padlkrng.cpp panama.cpp pkcspad.cpp poly1305.cpp polynomi.cpp ppc_power7.cpp ppc_power8.cpp ppc_power9.cpp ppc_simd.cpp pssr.cpp pubkey.cpp queue.cpp rabbit.cpp rabin.cpp randpool.cpp rc2.cpp rc5.cpp rc6.cpp rdrand.cpp rdtables.cpp rijndael.cpp rijndael_simd.cpp ripemd.cpp rng.cpp rsa.cpp rw.cpp safer.cpp salsa.cpp scrypt.cpp seal.cpp seed.cpp serpent.cpp sha.cpp sha3.cpp sha_simd.cpp shacal2.cpp shacal2_simd.cpp shark.cpp sharkbox.cpp simeck.cpp simeck_simd.cpp simon.cpp simon128_simd.cpp simon64_simd.cpp skipjack.cpp sm3.cpp sm4.cpp sm4_simd.cpp sosemanuk.cpp speck.cpp speck128_simd.cpp speck64_simd.cpp square.cpp squaretb.cpp sse_simd.cpp strciphr.cpp tea.cpp tftables.cpp threefish.cpp tiger.cpp tigertab.cpp ttmac.cpp tweetnacl.cpp twofish.cpp vmac.cpp wake.cpp whrlpool.cpp xed25519.cpp xtr.cpp xtrcrypt.cpp zdeflate.cpp zinflate.cpp zlib.cpp) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) -LOCAL_EXPORT_CFLAGS := -DCRYPTOPP_DISABLE_X86ASM -DCRYPTOPP_DISABLE_SSSE3 -DCRYPTOPP_DISABLE_AESNI -D__ILP32__=0 -D_ILP32=0 -Wno-macro-redefined +LOCAL_EXPORT_CFLAGS := -DCRYPTOPP_DISABLE_ASM include $(BUILD_STATIC_LIBRARY) + From e13a7f7f2a5c89279a4c27854b88c825919647dd Mon Sep 17 00:00:00 2001 From: Javier Gomez Date: Fri, 4 Jan 2019 12:19:01 +0100 Subject: [PATCH 29/53] Allow to set custom DNS servers (WP & UWP bindings) --- bindings/wp8/MegaSDK.cpp | 16 ++++++++++++++ bindings/wp8/MegaSDK.h | 48 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/bindings/wp8/MegaSDK.cpp b/bindings/wp8/MegaSDK.cpp index fdd7e8362c..2545f53b6c 100644 --- a/bindings/wp8/MegaSDK.cpp +++ b/bindings/wp8/MegaSDK.cpp @@ -378,6 +378,22 @@ void MegaSDK::setStatsID(String^ id) MegaApi::setStatsID((id != nullptr) ? utf8id.c_str() : NULL); } +void MegaSDK::setDnsServers(String^ dnsServers, MRequestListenerInterface^ listener) +{ + std::string utf8dnsServers; + if (dnsServers != nullptr) + MegaApi::utf16ToUtf8(dnsServers->Data(), dnsServers->Length(), &utf8dnsServers); + + megaApi->setDnsServers( + (dnsServers != nullptr) ? utf8dnsServers.c_str() : NULL, + createDelegateMRequestListener(listener)); +} + +void MegaSDK::setDnsServers(String^ dnsServers) +{ + this->setDnsServers(dnsServers, nullptr); +} + bool MegaSDK::serverSideRubbishBinAutopurgeEnabled() { return megaApi->serverSideRubbishBinAutopurgeEnabled(); diff --git a/bindings/wp8/MegaSDK.h b/bindings/wp8/MegaSDK.h index 73cec7eef2..05f9269cbc 100644 --- a/bindings/wp8/MegaSDK.h +++ b/bindings/wp8/MegaSDK.h @@ -199,6 +199,54 @@ namespace mega void reconnect(); static void setStatsID(String^ id); + /** + * @brief Use custom DNS servers + * + * The SDK tries to automatically get and use DNS servers configured in the system at startup. This function can be used + * to override that automatic detection and use a custom list of DNS servers. It is also useful to provide working + * DNS servers to the SDK in platforms in which it can't get them from the system (Windows Phone and Universal Windows Platform). + * + * Since the usage of this function implies a change in DNS servers used by the SDK, all connections are + * closed and restarted using the new list of new DNS servers, so calling this function too often can cause + * many retries and problems to complete requests. Please use it only at startup or when DNS servers need to be changed. + * + * The associated request type with this request is MRequest::TYPE_RETRY_PENDING_CONNECTIONS. + * Valid data in the MRequest object received on callbacks: + * - MRequest::getText - Returns the new list of DNS servers + * + * @param dnsServers New list of DNS servers. It must be a list of IPs separated by a comma character ",". + * IPv6 servers are allowed (without brackets). + * + * The usage of this function will trigger the callback MGlobalListener::onEvent and the callback + * MListener::onEvent with the event type MEvent::EVENT_DISCONNECT. + * + * @param listener MRequestListener to track this request + */ + void setDnsServers(String^ dnsServers, MRequestListenerInterface^ listener); + + /** + * @brief Use custom DNS servers + * + * The SDK tries to automatically get and use DNS servers configured in the system at startup. This function can be used + * to override that automatic detection and use a custom list of DNS servers. It is also useful to provide working + * DNS servers to the SDK in platforms in which it can't get them from the system (Windows Phone and Universal Windows Platform). + * + * Since the usage of this function implies a change in DNS servers used by the SDK, all connections are + * closed and restarted using the new list of new DNS servers, so calling this function too often can cause + * many retries and problems to complete requests. Please use it only at startup or when DNS servers need to be changed. + * + * The associated request type with this request is MRequest::TYPE_RETRY_PENDING_CONNECTIONS. + * Valid data in the MRequest object received on callbacks: + * - MRequest::getText - Returns the new list of DNS servers + * + * @param dnsServers New list of DNS servers. It must be a list of IPs separated by a comma character ",". + * IPv6 servers are allowed (without brackets). + * + * The usage of this function will trigger the callback MGlobalListener::onEvent and the callback + * MListener::onEvent with the event type MEvent::EVENT_DISCONNECT. + */ + void setDnsServers(String^ dnsServers); + /** * @brief Check if server-side Rubbish Bin autopurging is enabled for the current account * @return True if this feature is enabled. Otherwise false. From 60926d4ecc0263804b977c8aac1ffd40081f883b Mon Sep 17 00:00:00 2001 From: Javier Serrano Date: Fri, 4 Jan 2019 13:20:16 +0100 Subject: [PATCH 30/53] Use hardcoded DNS servers in WP/UWP by default --- src/megaapi_impl.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 06c0c38627..d2d1253fb2 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -5559,12 +5559,15 @@ MegaProxy *MegaApiImpl::getAutoProxySettings() void MegaApiImpl::loop() { -#if TARGET_OS_IPHONE - // Workaround to get the IP of valid DNS servers on iOS +#if defined(WINDOWS_PHONE) || TARGET_OS_IPHONE + // Workaround to get the IP of valid DNS servers on Windows Phone/iOS string servers; while (true) { + #ifdef WINDOWS_PHONE + client->httpio->getMEGADNSservers(&servers, false); + #else __res_state res; bool valid; if (res_ninit(&res) == 0) @@ -5600,11 +5603,16 @@ void MegaApiImpl::loop() res_ndestroy(&res); } + #endif if (servers.size()) break; + #ifdef WINDOWS_PHONE + std::this_thread::sleep_for(std::chrono::seconds(1)); + #else sleep(1); + #endif } LOG_debug << "Using DNS servers " << servers; From 73e9442740870718e91e1c1513ead37f78f960cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Fri, 4 Jan 2019 14:09:30 +0100 Subject: [PATCH 31/53] Update prebuilt libs and bindings for Android's example --- examples/android/ExampleApp/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/android/ExampleApp/README.md b/examples/android/ExampleApp/README.md index 5353054207..c24bc6a905 100644 --- a/examples/android/ExampleApp/README.md +++ b/examples/android/ExampleApp/README.md @@ -20,7 +20,7 @@ You have two options, using a prebuilt native library or building it by yourself ``` git clone --recursive https://github.com/meganz/sdk.git ``` -* Download the prebuilt libraries (`libmega.so`) along with its corresponding Java classes from [here](https://mega.nz/#!F9MDiIYR!Udguz_byyIttpjaa2twcWZGqcqWCfalhGO-_jg7kNCo). Generated with commit: 08adf46ca80dd8aa9f54916b998c2efe1f7a444d +* Download the prebuilt libraries (`libmega.so`) along with its corresponding Java classes from [here](https://mega.nz/#!UdJwVKJL!_0XsoFtnuVzzuQTb8Qiiwd5wpAk_SnXKJywhTiLhvdY). Generated with commit: 73f8a3ed6c7c9f49e3233fc90996735de233092e * Extract the content into `app/src/main`, keeping the folder structure. * Open the project with Android Studio, let it build the project and hit _*Run*_ From 5e164f4d02961e9865bff7db93a03ea52fa160ca Mon Sep 17 00:00:00 2001 From: Matt Weir Date: Mon, 7 Jan 2019 12:37:20 +1300 Subject: [PATCH 32/53] Prevent 'contact accepted' to match webclient In this case the 'contact established' alert is sufficient, and that is all the webclient shows, and all that the condenseactions provides. --- src/megaclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/megaclient.cpp b/src/megaclient.cpp index 4e4e5316d2..a88352291a 100644 --- a/src/megaclient.cpp +++ b/src/megaclient.cpp @@ -5534,7 +5534,7 @@ void MegaClient::sc_upc(bool incoming) pcr->uts = uts; } - if (statecurrent && ou != me) + if (statecurrent && ou != me && (incoming || s != 2)) { string email; Node::copystring(&email, m); From 5838d2ac89dec79f9d5f40837df3e64605d85962 Mon Sep 17 00:00:00 2001 From: Javier Navarro Date: Tue, 8 Jan 2019 10:39:16 +0100 Subject: [PATCH 33/53] Update cryptopp script for iOS --- bindings/ios/3rdparty/build-cryptopp.sh | 53 +- .../cryptopp.xcodeproj/project.pbxproj | 1013 ----------------- .../contents.xcworkspacedata | 7 - .../UserInterfaceState.xcuserstate | Bin 73542 -> 0 bytes .../WorkspaceSettings.xcsettings | 10 - .../MEGA.xcuserdatad/xcschemes/cares.xcscheme | 77 -- .../xcschemes/caresTests.xcscheme | 96 -- .../xcschemes/cryptopp.xcscheme | 77 -- .../xcschemes/cryptoppTests.xcscheme | 96 -- .../xcschemes/xcschememanagement.plist | 52 - 10 files changed, 28 insertions(+), 1453 deletions(-) delete mode 100644 bindings/ios/3rdparty/cryptopp.xcodeproj/project.pbxproj delete mode 100644 bindings/ios/3rdparty/cryptopp.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 bindings/ios/3rdparty/cryptopp.xcodeproj/project.xcworkspace/xcuserdata/MEGA.xcuserdatad/UserInterfaceState.xcuserstate delete mode 100644 bindings/ios/3rdparty/cryptopp.xcodeproj/project.xcworkspace/xcuserdata/MEGA.xcuserdatad/WorkspaceSettings.xcsettings delete mode 100644 bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cares.xcscheme delete mode 100644 bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/caresTests.xcscheme delete mode 100644 bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cryptopp.xcscheme delete mode 100644 bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cryptoppTests.xcscheme delete mode 100644 bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/bindings/ios/3rdparty/build-cryptopp.sh b/bindings/ios/3rdparty/build-cryptopp.sh index 9d1b849135..672c7f46c6 100644 --- a/bindings/ios/3rdparty/build-cryptopp.sh +++ b/bindings/ios/3rdparty/build-cryptopp.sh @@ -1,40 +1,43 @@ #!/bin/sh -PROJECT_NAME="cryptopp" -CRYPTOPP_VERSION="565" +CURRENTPATH=`pwd` -UNIVERSAL_OUTPUTFOLDER="lib" -BUILD_DIR="cryptopp" -CONFIGURATION="Release" -BUILD_ROOT="cryptopp" - -############################################## +CRYPTOPP_VERSION="b43f8f597650e316bb4b4f782ce174d695f43dbc" set -e -if [ ! -e "cryptopp${CRYPTOPP_VERSION}.zip" ] +NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) + +if [ ! -e "${CRYPTOPP_VERSION}.tar.gz" ] then -curl -LO "http://www.cryptopp.com/cryptopp${CRYPTOPP_VERSION}.zip" +curl -LO "https://github.com/weidai11/cryptopp/archive/${CRYPTOPP_VERSION}.tar.gz" fi -unzip cryptopp${CRYPTOPP_VERSION}.zip -d cryptopp - -# Step 1. Build versions for devices and simulator -xcodebuild -jobs 8 -target cryptopp ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" -xcodebuild -jobs 8 -target cryptopp ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphonesimulator BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" - -# Make sure the output directory exists -mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" - -# Step 2. Create universal binary file, using lipo -lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/lib${PROJECT_NAME}.a" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/lib${PROJECT_NAME}.a" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/lib${PROJECT_NAME}.a" +ARCHS="x86_64 armv7 armv7s arm64" + +for ARCH in ${ARCHS} +do +tar zxf ${CRYPTOPP_VERSION}.tar.gz +pushd cryptopp-${CRYPTOPP_VERSION} +source setenv-ios.sh ${ARCH} +mkdir -p "${CURRENTPATH}/bin/${ARCH}.sdk" +make -f GNUmakefile-cross lean -j ${NPROCESSORS} +mv libcryptopp.a "${CURRENTPATH}/bin/${ARCH}.sdk" +popd +rm -rf cryptopp-${CRYPTOPP_VERSION} +done + +mkdir -p lib + +lipo -create "${CURRENTPATH}/bin/x86_64.sdk/libcryptopp.a" "${CURRENTPATH}/bin/armv7.sdk/libcryptopp.a" "${CURRENTPATH}/bin/armv7s.sdk/libcryptopp.a" "${CURRENTPATH}/bin/arm64.sdk/libcryptopp.a" -output "${CURRENTPATH}/libcryptopp.a" +tar zxf ${CRYPTOPP_VERSION}.tar.gz mkdir -p include/cryptopp || true -cp -f cryptopp/*.h include/cryptopp -sed -i '' $'s/\#ifdef CRYPTOPP_DISABLE_X86ASM/\#define CRYPTOPP_DISABLE_X86ASM\\\n\#ifdef CRYPTOPP_DISABLE_X86ASM/' include/cryptopp/config.h +cp -f cryptopp-${CRYPTOPP_VERSION}/*.h include/cryptopp +rm -rf cryptopp-${CRYPTOPP_VERSION} +mv -f libcryptopp.a lib/ -rm -rf cryptopp -rm -rf build rm -rf bin +rm -rf ${CRYPTOPP_VERSION}.tar.gz echo "Done." diff --git a/bindings/ios/3rdparty/cryptopp.xcodeproj/project.pbxproj b/bindings/ios/3rdparty/cryptopp.xcodeproj/project.pbxproj deleted file mode 100644 index b31c5bdf6f..0000000000 --- a/bindings/ios/3rdparty/cryptopp.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1013 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 41ACFBC51A11524C00905ACF /* wake.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41ACFBC41A11524C00905ACF /* wake.cpp */; }; - 9426682E19DAC5A300B63EB5 /* algebra.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667A919DAC5A300B63EB5 /* algebra.cpp */; }; - 9426683219DAC5A300B63EB5 /* dsa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667AD19DAC5A300B63EB5 /* dsa.cpp */; }; - 9426683319DAC5A300B63EB5 /* eccrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667AE19DAC5A300B63EB5 /* eccrypto.cpp */; }; - 9426683419DAC5A300B63EB5 /* gfpcrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667AF19DAC5A300B63EB5 /* gfpcrypt.cpp */; }; - 9426683519DAC5A300B63EB5 /* osrng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667B019DAC5A300B63EB5 /* osrng.cpp */; }; - 9426683619DAC5A300B63EB5 /* panama.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667B119DAC5A300B63EB5 /* panama.cpp */; }; - 9426683819DAC5A300B63EB5 /* rijndael.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667B319DAC5A300B63EB5 /* rijndael.cpp */; }; - 9426683919DAC5A300B63EB5 /* salsa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667B419DAC5A300B63EB5 /* salsa.cpp */; }; - 9426683A19DAC5A300B63EB5 /* sha3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667B519DAC5A300B63EB5 /* sha3.cpp */; }; - 9426683D19DAC5A300B63EB5 /* 3way.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667B819DAC5A300B63EB5 /* 3way.cpp */; }; - 9426683E19DAC5A300B63EB5 /* adler32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667B919DAC5A300B63EB5 /* adler32.cpp */; }; - 9426683F19DAC5A300B63EB5 /* algparam.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667BA19DAC5A300B63EB5 /* algparam.cpp */; }; - 9426684019DAC5A300B63EB5 /* arc4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667BB19DAC5A300B63EB5 /* arc4.cpp */; }; - 9426684119DAC5A300B63EB5 /* asn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667BC19DAC5A300B63EB5 /* asn.cpp */; }; - 9426684219DAC5A300B63EB5 /* authenc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667BD19DAC5A300B63EB5 /* authenc.cpp */; }; - 9426684319DAC5A300B63EB5 /* base32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667BE19DAC5A300B63EB5 /* base32.cpp */; }; - 9426684419DAC5A300B63EB5 /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667BF19DAC5A300B63EB5 /* base64.cpp */; }; - 9426684519DAC5A300B63EB5 /* basecode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667C019DAC5A300B63EB5 /* basecode.cpp */; }; - 9426684619DAC5A300B63EB5 /* bfinit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667C119DAC5A300B63EB5 /* bfinit.cpp */; }; - 9426684719DAC5A300B63EB5 /* blowfish.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667C219DAC5A300B63EB5 /* blowfish.cpp */; }; - 9426684819DAC5A300B63EB5 /* blumshub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667C319DAC5A300B63EB5 /* blumshub.cpp */; }; - 9426684919DAC5A300B63EB5 /* camellia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667C419DAC5A300B63EB5 /* camellia.cpp */; }; - 9426684A19DAC5A300B63EB5 /* cast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667C519DAC5A300B63EB5 /* cast.cpp */; }; - 9426684B19DAC5A300B63EB5 /* casts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667C619DAC5A300B63EB5 /* casts.cpp */; }; - 9426684C19DAC5A300B63EB5 /* cbcmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667C719DAC5A300B63EB5 /* cbcmac.cpp */; }; - 9426684D19DAC5A300B63EB5 /* ccm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667C819DAC5A300B63EB5 /* ccm.cpp */; }; - 9426684E19DAC5A300B63EB5 /* channels.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667C919DAC5A300B63EB5 /* channels.cpp */; }; - 9426684F19DAC5A300B63EB5 /* cmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667CA19DAC5A300B63EB5 /* cmac.cpp */; }; - 9426685019DAC5A300B63EB5 /* cpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667CB19DAC5A300B63EB5 /* cpu.cpp */; }; - 9426685119DAC5A300B63EB5 /* crc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667CC19DAC5A300B63EB5 /* crc.cpp */; }; - 9426685319DAC5A300B63EB5 /* cryptlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667CE19DAC5A300B63EB5 /* cryptlib.cpp */; }; - 9426685419DAC5A300B63EB5 /* default.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667CF19DAC5A300B63EB5 /* default.cpp */; }; - 9426685519DAC5A300B63EB5 /* des.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667D019DAC5A300B63EB5 /* des.cpp */; }; - 9426685619DAC5A300B63EB5 /* dessp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667D119DAC5A300B63EB5 /* dessp.cpp */; }; - 9426685719DAC5A300B63EB5 /* dh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667D219DAC5A300B63EB5 /* dh.cpp */; }; - 9426685819DAC5A300B63EB5 /* dh2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667D319DAC5A300B63EB5 /* dh2.cpp */; }; - 9426685919DAC5A300B63EB5 /* dll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667D419DAC5A300B63EB5 /* dll.cpp */; }; - 9426685B19DAC5A300B63EB5 /* eax.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667D619DAC5A300B63EB5 /* eax.cpp */; }; - 9426685C19DAC5A300B63EB5 /* ec2n.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667D719DAC5A300B63EB5 /* ec2n.cpp */; }; - 9426685D19DAC5A300B63EB5 /* ecp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667D819DAC5A300B63EB5 /* ecp.cpp */; }; - 9426685E19DAC5A300B63EB5 /* elgamal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667D919DAC5A300B63EB5 /* elgamal.cpp */; }; - 9426685F19DAC5A300B63EB5 /* emsa2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667DA19DAC5A300B63EB5 /* emsa2.cpp */; }; - 9426686019DAC5A300B63EB5 /* eprecomp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667DB19DAC5A300B63EB5 /* eprecomp.cpp */; }; - 9426686119DAC5A300B63EB5 /* esign.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667DC19DAC5A300B63EB5 /* esign.cpp */; }; - 9426686219DAC5A300B63EB5 /* files.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667DD19DAC5A300B63EB5 /* files.cpp */; }; - 9426686319DAC5A300B63EB5 /* filters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667DE19DAC5A300B63EB5 /* filters.cpp */; }; - 9426686419DAC5A300B63EB5 /* fips140.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667DF19DAC5A300B63EB5 /* fips140.cpp */; }; - 9426686519DAC5A300B63EB5 /* fipsalgt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667E019DAC5A300B63EB5 /* fipsalgt.cpp */; }; - 9426686719DAC5A300B63EB5 /* gcm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667E219DAC5A300B63EB5 /* gcm.cpp */; }; - 9426686819DAC5A300B63EB5 /* gf2_32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667E319DAC5A300B63EB5 /* gf2_32.cpp */; }; - 9426686919DAC5A300B63EB5 /* gf2n.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667E419DAC5A300B63EB5 /* gf2n.cpp */; }; - 9426686A19DAC5A300B63EB5 /* gf256.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667E519DAC5A300B63EB5 /* gf256.cpp */; }; - 9426686B19DAC5A300B63EB5 /* gost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667E619DAC5A300B63EB5 /* gost.cpp */; }; - 9426686C19DAC5A300B63EB5 /* gzip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667E719DAC5A300B63EB5 /* gzip.cpp */; }; - 9426686D19DAC5A300B63EB5 /* hex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667E819DAC5A300B63EB5 /* hex.cpp */; }; - 9426686E19DAC5A300B63EB5 /* hmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667E919DAC5A300B63EB5 /* hmac.cpp */; }; - 9426686F19DAC5A300B63EB5 /* hrtimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667EA19DAC5A300B63EB5 /* hrtimer.cpp */; }; - 9426687019DAC5A300B63EB5 /* ida.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667EB19DAC5A300B63EB5 /* ida.cpp */; }; - 9426687119DAC5A300B63EB5 /* idea.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667EC19DAC5A300B63EB5 /* idea.cpp */; }; - 9426687219DAC5A300B63EB5 /* integer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667ED19DAC5A300B63EB5 /* integer.cpp */; }; - 9426687319DAC5A300B63EB5 /* iterhash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667EE19DAC5A300B63EB5 /* iterhash.cpp */; }; - 9426687419DAC5A300B63EB5 /* luc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667EF19DAC5A300B63EB5 /* luc.cpp */; }; - 9426687519DAC5A300B63EB5 /* mars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667F019DAC5A300B63EB5 /* mars.cpp */; }; - 9426687619DAC5A300B63EB5 /* marss.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667F119DAC5A300B63EB5 /* marss.cpp */; }; - 9426687719DAC5A300B63EB5 /* md2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667F219DAC5A300B63EB5 /* md2.cpp */; }; - 9426687819DAC5A300B63EB5 /* md4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667F319DAC5A300B63EB5 /* md4.cpp */; }; - 9426687919DAC5A300B63EB5 /* md5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667F419DAC5A300B63EB5 /* md5.cpp */; }; - 9426687A19DAC5A300B63EB5 /* misc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667F519DAC5A300B63EB5 /* misc.cpp */; }; - 9426687B19DAC5A300B63EB5 /* modes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667F619DAC5A300B63EB5 /* modes.cpp */; }; - 9426687C19DAC5A300B63EB5 /* mqueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667F719DAC5A300B63EB5 /* mqueue.cpp */; }; - 9426687D19DAC5A300B63EB5 /* mqv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667F819DAC5A300B63EB5 /* mqv.cpp */; }; - 9426687E19DAC5A300B63EB5 /* nbtheory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667F919DAC5A300B63EB5 /* nbtheory.cpp */; }; - 9426687F19DAC5A300B63EB5 /* network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667FA19DAC5A300B63EB5 /* network.cpp */; }; - 9426688019DAC5A300B63EB5 /* oaep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667FB19DAC5A300B63EB5 /* oaep.cpp */; }; - 9426688119DAC5A300B63EB5 /* pch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667FC19DAC5A300B63EB5 /* pch.cpp */; }; - 9426688219DAC5A300B63EB5 /* pkcspad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667FD19DAC5A300B63EB5 /* pkcspad.cpp */; }; - 9426688319DAC5A300B63EB5 /* polynomi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667FE19DAC5A300B63EB5 /* polynomi.cpp */; }; - 9426688419DAC5A300B63EB5 /* pssr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942667FF19DAC5A300B63EB5 /* pssr.cpp */; }; - 9426688519DAC5A300B63EB5 /* pubkey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680019DAC5A300B63EB5 /* pubkey.cpp */; }; - 9426688619DAC5A300B63EB5 /* queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680119DAC5A300B63EB5 /* queue.cpp */; }; - 9426688719DAC5A300B63EB5 /* rabin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680219DAC5A300B63EB5 /* rabin.cpp */; }; - 9426688819DAC5A300B63EB5 /* randpool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680319DAC5A300B63EB5 /* randpool.cpp */; }; - 9426688919DAC5A300B63EB5 /* rc2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680419DAC5A300B63EB5 /* rc2.cpp */; }; - 9426688A19DAC5A300B63EB5 /* rc5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680519DAC5A300B63EB5 /* rc5.cpp */; }; - 9426688B19DAC5A300B63EB5 /* rc6.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680619DAC5A300B63EB5 /* rc6.cpp */; }; - 9426688C19DAC5A300B63EB5 /* rdtables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680719DAC5A300B63EB5 /* rdtables.cpp */; }; - 9426688D19DAC5A300B63EB5 /* ripemd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680819DAC5A300B63EB5 /* ripemd.cpp */; }; - 9426688E19DAC5A300B63EB5 /* rng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680919DAC5A300B63EB5 /* rng.cpp */; }; - 9426688F19DAC5A300B63EB5 /* rsa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680A19DAC5A300B63EB5 /* rsa.cpp */; }; - 9426689019DAC5A300B63EB5 /* rw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680B19DAC5A300B63EB5 /* rw.cpp */; }; - 9426689119DAC5A300B63EB5 /* safer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680C19DAC5A300B63EB5 /* safer.cpp */; }; - 9426689219DAC5A300B63EB5 /* seal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680D19DAC5A300B63EB5 /* seal.cpp */; }; - 9426689319DAC5A300B63EB5 /* seed.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680E19DAC5A300B63EB5 /* seed.cpp */; }; - 9426689419DAC5A300B63EB5 /* serpent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426680F19DAC5A300B63EB5 /* serpent.cpp */; }; - 9426689519DAC5A300B63EB5 /* sha.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681019DAC5A300B63EB5 /* sha.cpp */; }; - 9426689619DAC5A300B63EB5 /* shacal2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681119DAC5A300B63EB5 /* shacal2.cpp */; }; - 9426689719DAC5A300B63EB5 /* shark.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681219DAC5A300B63EB5 /* shark.cpp */; }; - 9426689819DAC5A300B63EB5 /* sharkbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681319DAC5A300B63EB5 /* sharkbox.cpp */; }; - 9426689919DAC5A300B63EB5 /* simple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681419DAC5A300B63EB5 /* simple.cpp */; }; - 9426689A19DAC5A300B63EB5 /* skipjack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681519DAC5A300B63EB5 /* skipjack.cpp */; }; - 9426689B19DAC5A300B63EB5 /* socketft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681619DAC5A300B63EB5 /* socketft.cpp */; }; - 9426689C19DAC5A300B63EB5 /* sosemanuk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681719DAC5A300B63EB5 /* sosemanuk.cpp */; }; - 9426689D19DAC5A300B63EB5 /* square.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681819DAC5A300B63EB5 /* square.cpp */; }; - 9426689E19DAC5A300B63EB5 /* squaretb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681919DAC5A300B63EB5 /* squaretb.cpp */; }; - 9426689F19DAC5A300B63EB5 /* strciphr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681A19DAC5A300B63EB5 /* strciphr.cpp */; }; - 942668A019DAC5A300B63EB5 /* tea.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681B19DAC5A300B63EB5 /* tea.cpp */; }; - 942668A219DAC5A300B63EB5 /* tftables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681D19DAC5A300B63EB5 /* tftables.cpp */; }; - 942668A319DAC5A300B63EB5 /* tiger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681E19DAC5A300B63EB5 /* tiger.cpp */; }; - 942668A419DAC5A300B63EB5 /* tigertab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426681F19DAC5A300B63EB5 /* tigertab.cpp */; }; - 942668A519DAC5A300B63EB5 /* trdlocal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682019DAC5A300B63EB5 /* trdlocal.cpp */; }; - 942668A619DAC5A300B63EB5 /* ttmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682119DAC5A300B63EB5 /* ttmac.cpp */; }; - 942668A719DAC5A300B63EB5 /* twofish.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682219DAC5A300B63EB5 /* twofish.cpp */; }; - 942668A919DAC5A300B63EB5 /* vmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682419DAC5A300B63EB5 /* vmac.cpp */; }; - 942668AA19DAC5A300B63EB5 /* wait.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682519DAC5A300B63EB5 /* wait.cpp */; }; - 942668AC19DAC5A300B63EB5 /* whrlpool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682719DAC5A300B63EB5 /* whrlpool.cpp */; }; - 942668AD19DAC5A300B63EB5 /* winpipes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682819DAC5A300B63EB5 /* winpipes.cpp */; }; - 942668AE19DAC5A300B63EB5 /* xtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682919DAC5A300B63EB5 /* xtr.cpp */; }; - 942668AF19DAC5A300B63EB5 /* xtrcrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682A19DAC5A300B63EB5 /* xtrcrypt.cpp */; }; - 942668B019DAC5A300B63EB5 /* zdeflate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682B19DAC5A300B63EB5 /* zdeflate.cpp */; }; - 942668B119DAC5A300B63EB5 /* zinflate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682C19DAC5A300B63EB5 /* zinflate.cpp */; }; - 942668B219DAC5A300B63EB5 /* zlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9426682D19DAC5A300B63EB5 /* zlib.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9426679219DAC3F500B63EB5 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "include/$(PRODUCT_NAME)"; - dstSubfolderSpec = 16; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 41ACFBC41A11524C00905ACF /* wake.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wake.cpp; sourceTree = ""; }; - 9426679419DAC3F500B63EB5 /* libcryptopp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libcryptopp.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 942667A919DAC5A300B63EB5 /* algebra.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = algebra.cpp; sourceTree = ""; }; - 942667AD19DAC5A300B63EB5 /* dsa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dsa.cpp; sourceTree = ""; }; - 942667AE19DAC5A300B63EB5 /* eccrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eccrypto.cpp; sourceTree = ""; }; - 942667AF19DAC5A300B63EB5 /* gfpcrypt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gfpcrypt.cpp; sourceTree = ""; }; - 942667B019DAC5A300B63EB5 /* osrng.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osrng.cpp; sourceTree = ""; }; - 942667B119DAC5A300B63EB5 /* panama.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = panama.cpp; sourceTree = ""; }; - 942667B319DAC5A300B63EB5 /* rijndael.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rijndael.cpp; sourceTree = ""; }; - 942667B419DAC5A300B63EB5 /* salsa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = salsa.cpp; sourceTree = ""; }; - 942667B519DAC5A300B63EB5 /* sha3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sha3.cpp; sourceTree = ""; }; - 942667B819DAC5A300B63EB5 /* 3way.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = 3way.cpp; sourceTree = ""; }; - 942667B919DAC5A300B63EB5 /* adler32.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = adler32.cpp; sourceTree = ""; }; - 942667BA19DAC5A300B63EB5 /* algparam.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = algparam.cpp; sourceTree = ""; }; - 942667BB19DAC5A300B63EB5 /* arc4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = arc4.cpp; sourceTree = ""; }; - 942667BC19DAC5A300B63EB5 /* asn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = asn.cpp; sourceTree = ""; }; - 942667BD19DAC5A300B63EB5 /* authenc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = authenc.cpp; sourceTree = ""; }; - 942667BE19DAC5A300B63EB5 /* base32.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = base32.cpp; sourceTree = ""; }; - 942667BF19DAC5A300B63EB5 /* base64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = base64.cpp; sourceTree = ""; }; - 942667C019DAC5A300B63EB5 /* basecode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = basecode.cpp; sourceTree = ""; }; - 942667C119DAC5A300B63EB5 /* bfinit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bfinit.cpp; sourceTree = ""; }; - 942667C219DAC5A300B63EB5 /* blowfish.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = blowfish.cpp; sourceTree = ""; }; - 942667C319DAC5A300B63EB5 /* blumshub.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = blumshub.cpp; sourceTree = ""; }; - 942667C419DAC5A300B63EB5 /* camellia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = camellia.cpp; sourceTree = ""; }; - 942667C519DAC5A300B63EB5 /* cast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cast.cpp; sourceTree = ""; }; - 942667C619DAC5A300B63EB5 /* casts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = casts.cpp; sourceTree = ""; }; - 942667C719DAC5A300B63EB5 /* cbcmac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cbcmac.cpp; sourceTree = ""; }; - 942667C819DAC5A300B63EB5 /* ccm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ccm.cpp; sourceTree = ""; }; - 942667C919DAC5A300B63EB5 /* channels.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = channels.cpp; sourceTree = ""; }; - 942667CA19DAC5A300B63EB5 /* cmac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cmac.cpp; sourceTree = ""; }; - 942667CB19DAC5A300B63EB5 /* cpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpu.cpp; sourceTree = ""; }; - 942667CC19DAC5A300B63EB5 /* crc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = crc.cpp; sourceTree = ""; }; - 942667CD19DAC5A300B63EB5 /* cryptlib_bds.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cryptlib_bds.cpp; sourceTree = ""; }; - 942667CE19DAC5A300B63EB5 /* cryptlib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cryptlib.cpp; sourceTree = ""; }; - 942667CF19DAC5A300B63EB5 /* default.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = default.cpp; sourceTree = ""; }; - 942667D019DAC5A300B63EB5 /* des.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = des.cpp; sourceTree = ""; }; - 942667D119DAC5A300B63EB5 /* dessp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dessp.cpp; sourceTree = ""; }; - 942667D219DAC5A300B63EB5 /* dh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dh.cpp; sourceTree = ""; }; - 942667D319DAC5A300B63EB5 /* dh2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dh2.cpp; sourceTree = ""; }; - 942667D419DAC5A300B63EB5 /* dll.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dll.cpp; sourceTree = ""; }; - 942667D619DAC5A300B63EB5 /* eax.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eax.cpp; sourceTree = ""; }; - 942667D719DAC5A300B63EB5 /* ec2n.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ec2n.cpp; sourceTree = ""; }; - 942667D819DAC5A300B63EB5 /* ecp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ecp.cpp; sourceTree = ""; }; - 942667D919DAC5A300B63EB5 /* elgamal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = elgamal.cpp; sourceTree = ""; }; - 942667DA19DAC5A300B63EB5 /* emsa2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = emsa2.cpp; sourceTree = ""; }; - 942667DB19DAC5A300B63EB5 /* eprecomp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eprecomp.cpp; sourceTree = ""; }; - 942667DC19DAC5A300B63EB5 /* esign.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = esign.cpp; sourceTree = ""; }; - 942667DD19DAC5A300B63EB5 /* files.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = files.cpp; sourceTree = ""; }; - 942667DE19DAC5A300B63EB5 /* filters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = filters.cpp; sourceTree = ""; }; - 942667DF19DAC5A300B63EB5 /* fips140.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fips140.cpp; sourceTree = ""; }; - 942667E019DAC5A300B63EB5 /* fipsalgt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fipsalgt.cpp; sourceTree = ""; }; - 942667E219DAC5A300B63EB5 /* gcm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gcm.cpp; sourceTree = ""; }; - 942667E319DAC5A300B63EB5 /* gf2_32.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gf2_32.cpp; sourceTree = ""; }; - 942667E419DAC5A300B63EB5 /* gf2n.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gf2n.cpp; sourceTree = ""; }; - 942667E519DAC5A300B63EB5 /* gf256.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gf256.cpp; sourceTree = ""; }; - 942667E619DAC5A300B63EB5 /* gost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gost.cpp; sourceTree = ""; }; - 942667E719DAC5A300B63EB5 /* gzip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gzip.cpp; sourceTree = ""; }; - 942667E819DAC5A300B63EB5 /* hex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hex.cpp; sourceTree = ""; }; - 942667E919DAC5A300B63EB5 /* hmac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hmac.cpp; sourceTree = ""; }; - 942667EA19DAC5A300B63EB5 /* hrtimer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hrtimer.cpp; sourceTree = ""; }; - 942667EB19DAC5A300B63EB5 /* ida.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ida.cpp; sourceTree = ""; }; - 942667EC19DAC5A300B63EB5 /* idea.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = idea.cpp; sourceTree = ""; }; - 942667ED19DAC5A300B63EB5 /* integer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = integer.cpp; sourceTree = ""; }; - 942667EE19DAC5A300B63EB5 /* iterhash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iterhash.cpp; sourceTree = ""; }; - 942667EF19DAC5A300B63EB5 /* luc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = luc.cpp; sourceTree = ""; }; - 942667F019DAC5A300B63EB5 /* mars.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mars.cpp; sourceTree = ""; }; - 942667F119DAC5A300B63EB5 /* marss.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = marss.cpp; sourceTree = ""; }; - 942667F219DAC5A300B63EB5 /* md2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = md2.cpp; sourceTree = ""; }; - 942667F319DAC5A300B63EB5 /* md4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = md4.cpp; sourceTree = ""; }; - 942667F419DAC5A300B63EB5 /* md5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = md5.cpp; sourceTree = ""; }; - 942667F519DAC5A300B63EB5 /* misc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = misc.cpp; sourceTree = ""; }; - 942667F619DAC5A300B63EB5 /* modes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = modes.cpp; sourceTree = ""; }; - 942667F719DAC5A300B63EB5 /* mqueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mqueue.cpp; sourceTree = ""; }; - 942667F819DAC5A300B63EB5 /* mqv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mqv.cpp; sourceTree = ""; }; - 942667F919DAC5A300B63EB5 /* nbtheory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nbtheory.cpp; sourceTree = ""; }; - 942667FA19DAC5A300B63EB5 /* network.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = network.cpp; sourceTree = ""; }; - 942667FB19DAC5A300B63EB5 /* oaep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = oaep.cpp; sourceTree = ""; }; - 942667FC19DAC5A300B63EB5 /* pch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pch.cpp; sourceTree = ""; }; - 942667FD19DAC5A300B63EB5 /* pkcspad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pkcspad.cpp; sourceTree = ""; }; - 942667FE19DAC5A300B63EB5 /* polynomi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = polynomi.cpp; sourceTree = ""; }; - 942667FF19DAC5A300B63EB5 /* pssr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pssr.cpp; sourceTree = ""; }; - 9426680019DAC5A300B63EB5 /* pubkey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pubkey.cpp; sourceTree = ""; }; - 9426680119DAC5A300B63EB5 /* queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = queue.cpp; sourceTree = ""; }; - 9426680219DAC5A300B63EB5 /* rabin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rabin.cpp; sourceTree = ""; }; - 9426680319DAC5A300B63EB5 /* randpool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = randpool.cpp; sourceTree = ""; }; - 9426680419DAC5A300B63EB5 /* rc2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rc2.cpp; sourceTree = ""; }; - 9426680519DAC5A300B63EB5 /* rc5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rc5.cpp; sourceTree = ""; }; - 9426680619DAC5A300B63EB5 /* rc6.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rc6.cpp; sourceTree = ""; }; - 9426680719DAC5A300B63EB5 /* rdtables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rdtables.cpp; sourceTree = ""; }; - 9426680819DAC5A300B63EB5 /* ripemd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ripemd.cpp; sourceTree = ""; }; - 9426680919DAC5A300B63EB5 /* rng.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rng.cpp; sourceTree = ""; }; - 9426680A19DAC5A300B63EB5 /* rsa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rsa.cpp; sourceTree = ""; }; - 9426680B19DAC5A300B63EB5 /* rw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rw.cpp; sourceTree = ""; }; - 9426680C19DAC5A300B63EB5 /* safer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = safer.cpp; sourceTree = ""; }; - 9426680D19DAC5A300B63EB5 /* seal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = seal.cpp; sourceTree = ""; }; - 9426680E19DAC5A300B63EB5 /* seed.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = seed.cpp; sourceTree = ""; }; - 9426680F19DAC5A300B63EB5 /* serpent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = serpent.cpp; sourceTree = ""; }; - 9426681019DAC5A300B63EB5 /* sha.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sha.cpp; sourceTree = ""; }; - 9426681119DAC5A300B63EB5 /* shacal2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shacal2.cpp; sourceTree = ""; }; - 9426681219DAC5A300B63EB5 /* shark.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shark.cpp; sourceTree = ""; }; - 9426681319DAC5A300B63EB5 /* sharkbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharkbox.cpp; sourceTree = ""; }; - 9426681419DAC5A300B63EB5 /* simple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = simple.cpp; sourceTree = ""; }; - 9426681519DAC5A300B63EB5 /* skipjack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = skipjack.cpp; sourceTree = ""; }; - 9426681619DAC5A300B63EB5 /* socketft.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = socketft.cpp; sourceTree = ""; }; - 9426681719DAC5A300B63EB5 /* sosemanuk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sosemanuk.cpp; sourceTree = ""; }; - 9426681819DAC5A300B63EB5 /* square.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = square.cpp; sourceTree = ""; }; - 9426681919DAC5A300B63EB5 /* squaretb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = squaretb.cpp; sourceTree = ""; }; - 9426681A19DAC5A300B63EB5 /* strciphr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strciphr.cpp; sourceTree = ""; }; - 9426681B19DAC5A300B63EB5 /* tea.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tea.cpp; sourceTree = ""; }; - 9426681D19DAC5A300B63EB5 /* tftables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tftables.cpp; sourceTree = ""; }; - 9426681E19DAC5A300B63EB5 /* tiger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tiger.cpp; sourceTree = ""; }; - 9426681F19DAC5A300B63EB5 /* tigertab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tigertab.cpp; sourceTree = ""; }; - 9426682019DAC5A300B63EB5 /* trdlocal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = trdlocal.cpp; sourceTree = ""; }; - 9426682119DAC5A300B63EB5 /* ttmac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ttmac.cpp; sourceTree = ""; }; - 9426682219DAC5A300B63EB5 /* twofish.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = twofish.cpp; sourceTree = ""; }; - 9426682419DAC5A300B63EB5 /* vmac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vmac.cpp; sourceTree = ""; }; - 9426682519DAC5A300B63EB5 /* wait.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wait.cpp; sourceTree = ""; }; - 9426682719DAC5A300B63EB5 /* whrlpool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = whrlpool.cpp; sourceTree = ""; }; - 9426682819DAC5A300B63EB5 /* winpipes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = winpipes.cpp; sourceTree = ""; }; - 9426682919DAC5A300B63EB5 /* xtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xtr.cpp; sourceTree = ""; }; - 9426682A19DAC5A300B63EB5 /* xtrcrypt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xtrcrypt.cpp; sourceTree = ""; }; - 9426682B19DAC5A300B63EB5 /* zdeflate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = zdeflate.cpp; sourceTree = ""; }; - 9426682C19DAC5A300B63EB5 /* zinflate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = zinflate.cpp; sourceTree = ""; }; - 9426682D19DAC5A300B63EB5 /* zlib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = zlib.cpp; sourceTree = ""; }; - 942668B319DAC5E600B63EB5 /* blowfish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = blowfish.h; sourceTree = ""; }; - 942668B419DAC5E600B63EB5 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; - 942668B519DAC5E600B63EB5 /* cryptlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cryptlib.h; sourceTree = ""; }; - 942668B619DAC5E600B63EB5 /* eccrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eccrypto.h; sourceTree = ""; }; - 942668B719DAC5E600B63EB5 /* factory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = factory.h; sourceTree = ""; }; - 942668B819DAC5E600B63EB5 /* gfpcrypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gfpcrypt.h; sourceTree = ""; }; - 942668B919DAC5E600B63EB5 /* misc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = misc.h; sourceTree = ""; }; - 942668BA19DAC5E600B63EB5 /* panama.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = panama.h; sourceTree = ""; }; - 942668BB19DAC5E600B63EB5 /* queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = queue.h; sourceTree = ""; }; - 942668BC19DAC5E600B63EB5 /* rw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rw.h; sourceTree = ""; }; - 942668BD19DAC5E600B63EB5 /* secblock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = secblock.h; sourceTree = ""; }; - 942668BE19DAC5E600B63EB5 /* sha3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sha3.h; sourceTree = ""; }; - 942668BF19DAC5E600B63EB5 /* validate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = validate.h; sourceTree = ""; }; - 942668C019DAC5E600B63EB5 /* 3way.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 3way.h; sourceTree = ""; }; - 942668C119DAC5E600B63EB5 /* adler32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = adler32.h; sourceTree = ""; }; - 942668C219DAC5E600B63EB5 /* aes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aes.h; sourceTree = ""; }; - 942668C319DAC5E600B63EB5 /* algebra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = algebra.h; sourceTree = ""; }; - 942668C419DAC5E600B63EB5 /* algparam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = algparam.h; sourceTree = ""; }; - 942668C519DAC5E600B63EB5 /* arc4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = arc4.h; sourceTree = ""; }; - 942668C619DAC5E600B63EB5 /* argnames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = argnames.h; sourceTree = ""; }; - 942668C719DAC5E600B63EB5 /* asn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asn.h; sourceTree = ""; }; - 942668C819DAC5E600B63EB5 /* authenc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = authenc.h; sourceTree = ""; }; - 942668C919DAC5E600B63EB5 /* base32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = base32.h; sourceTree = ""; }; - 942668CA19DAC5E600B63EB5 /* base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = base64.h; sourceTree = ""; }; - 942668CB19DAC5E600B63EB5 /* basecode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = basecode.h; sourceTree = ""; }; - 942668CC19DAC5E600B63EB5 /* bench.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bench.h; sourceTree = ""; }; - 942668CD19DAC5E600B63EB5 /* blumshub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = blumshub.h; sourceTree = ""; }; - 942668CE19DAC5E600B63EB5 /* camellia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = camellia.h; sourceTree = ""; }; - 942668CF19DAC5E600B63EB5 /* cast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cast.h; sourceTree = ""; }; - 942668D019DAC5E600B63EB5 /* cbcmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cbcmac.h; sourceTree = ""; }; - 942668D119DAC5E600B63EB5 /* ccm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ccm.h; sourceTree = ""; }; - 942668D219DAC5E600B63EB5 /* channels.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = channels.h; sourceTree = ""; }; - 942668D319DAC5E600B63EB5 /* cmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cmac.h; sourceTree = ""; }; - 942668D419DAC5E600B63EB5 /* cpu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpu.h; sourceTree = ""; }; - 942668D519DAC5E600B63EB5 /* crc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crc.h; sourceTree = ""; }; - 942668D619DAC5E600B63EB5 /* default.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = default.h; sourceTree = ""; }; - 942668D719DAC5E600B63EB5 /* des.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = des.h; sourceTree = ""; }; - 942668D819DAC5E600B63EB5 /* dh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dh.h; sourceTree = ""; }; - 942668D919DAC5E600B63EB5 /* dh2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dh2.h; sourceTree = ""; }; - 942668DA19DAC5E600B63EB5 /* dll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dll.h; sourceTree = ""; }; - 942668DB19DAC5E600B63EB5 /* dmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dmac.h; sourceTree = ""; }; - 942668DC19DAC5E600B63EB5 /* dsa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dsa.h; sourceTree = ""; }; - 942668DD19DAC5E600B63EB5 /* eax.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eax.h; sourceTree = ""; }; - 942668DE19DAC5E600B63EB5 /* ec2n.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ec2n.h; sourceTree = ""; }; - 942668DF19DAC5E600B63EB5 /* ecp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ecp.h; sourceTree = ""; }; - 942668E019DAC5E600B63EB5 /* elgamal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = elgamal.h; sourceTree = ""; }; - 942668E119DAC5E600B63EB5 /* emsa2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = emsa2.h; sourceTree = ""; }; - 942668E219DAC5E600B63EB5 /* eprecomp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eprecomp.h; sourceTree = ""; }; - 942668E319DAC5E600B63EB5 /* esign.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = esign.h; sourceTree = ""; }; - 942668E419DAC5E600B63EB5 /* files.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = files.h; sourceTree = ""; }; - 942668E519DAC5E600B63EB5 /* filters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = filters.h; sourceTree = ""; }; - 942668E619DAC5E600B63EB5 /* fips140.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fips140.h; sourceTree = ""; }; - 942668E719DAC5E600B63EB5 /* fltrimpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fltrimpl.h; sourceTree = ""; }; - 942668E819DAC5E600B63EB5 /* gcm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gcm.h; sourceTree = ""; }; - 942668E919DAC5E600B63EB5 /* gf2_32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gf2_32.h; sourceTree = ""; }; - 942668EA19DAC5E600B63EB5 /* gf2n.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gf2n.h; sourceTree = ""; }; - 942668EB19DAC5E600B63EB5 /* gf256.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gf256.h; sourceTree = ""; }; - 942668EC19DAC5E600B63EB5 /* gost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gost.h; sourceTree = ""; }; - 942668ED19DAC5E600B63EB5 /* gzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gzip.h; sourceTree = ""; }; - 942668EE19DAC5E600B63EB5 /* hex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hex.h; sourceTree = ""; }; - 942668EF19DAC5E600B63EB5 /* hmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hmac.h; sourceTree = ""; }; - 942668F019DAC5E600B63EB5 /* hrtimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hrtimer.h; sourceTree = ""; }; - 942668F119DAC5E600B63EB5 /* ida.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ida.h; sourceTree = ""; }; - 942668F219DAC5E600B63EB5 /* idea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = idea.h; sourceTree = ""; }; - 942668F319DAC5E600B63EB5 /* integer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = integer.h; sourceTree = ""; }; - 942668F419DAC5E600B63EB5 /* iterhash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iterhash.h; sourceTree = ""; }; - 942668F519DAC5E600B63EB5 /* lubyrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lubyrack.h; sourceTree = ""; }; - 942668F619DAC5E600B63EB5 /* luc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = luc.h; sourceTree = ""; }; - 942668F719DAC5E600B63EB5 /* mars.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mars.h; sourceTree = ""; }; - 942668F819DAC5E600B63EB5 /* md2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = md2.h; sourceTree = ""; }; - 942668F919DAC5E600B63EB5 /* md4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = md4.h; sourceTree = ""; }; - 942668FA19DAC5E600B63EB5 /* md5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = md5.h; sourceTree = ""; }; - 942668FB19DAC5E600B63EB5 /* mdc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mdc.h; sourceTree = ""; }; - 942668FC19DAC5E600B63EB5 /* modarith.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = modarith.h; sourceTree = ""; }; - 942668FD19DAC5E600B63EB5 /* modes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = modes.h; sourceTree = ""; }; - 942668FE19DAC5E600B63EB5 /* modexppc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = modexppc.h; sourceTree = ""; }; - 942668FF19DAC5E600B63EB5 /* mqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mqueue.h; sourceTree = ""; }; - 9426690019DAC5E600B63EB5 /* mqv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mqv.h; sourceTree = ""; }; - 9426690119DAC5E600B63EB5 /* nbtheory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nbtheory.h; sourceTree = ""; }; - 9426690219DAC5E600B63EB5 /* network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = network.h; sourceTree = ""; }; - 9426690319DAC5E600B63EB5 /* nr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nr.h; sourceTree = ""; }; - 9426690419DAC5E600B63EB5 /* oaep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oaep.h; sourceTree = ""; }; - 9426690519DAC5E600B63EB5 /* oids.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oids.h; sourceTree = ""; }; - 9426690619DAC5E600B63EB5 /* osrng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = osrng.h; sourceTree = ""; }; - 9426690719DAC5E600B63EB5 /* pch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pch.h; sourceTree = ""; }; - 9426690819DAC5E600B63EB5 /* pkcspad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pkcspad.h; sourceTree = ""; }; - 9426690919DAC5E600B63EB5 /* polynomi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = polynomi.h; sourceTree = ""; }; - 9426690A19DAC5E600B63EB5 /* pssr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pssr.h; sourceTree = ""; }; - 9426690B19DAC5E600B63EB5 /* pubkey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pubkey.h; sourceTree = ""; }; - 9426690C19DAC5E600B63EB5 /* pwdbased.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pwdbased.h; sourceTree = ""; }; - 9426690D19DAC5E600B63EB5 /* rabin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rabin.h; sourceTree = ""; }; - 9426690E19DAC5E600B63EB5 /* randpool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = randpool.h; sourceTree = ""; }; - 9426690F19DAC5E600B63EB5 /* rc2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rc2.h; sourceTree = ""; }; - 9426691019DAC5E600B63EB5 /* rc5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rc5.h; sourceTree = ""; }; - 9426691119DAC5E600B63EB5 /* rc6.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rc6.h; sourceTree = ""; }; - 9426691219DAC5E600B63EB5 /* resource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resource.h; sourceTree = ""; }; - 9426691319DAC5E600B63EB5 /* rijndael.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rijndael.h; sourceTree = ""; }; - 9426691419DAC5E600B63EB5 /* ripemd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ripemd.h; sourceTree = ""; }; - 9426691519DAC5E600B63EB5 /* rng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rng.h; sourceTree = ""; }; - 9426691619DAC5E600B63EB5 /* rsa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rsa.h; sourceTree = ""; }; - 9426691719DAC5E600B63EB5 /* safer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = safer.h; sourceTree = ""; }; - 9426691819DAC5E600B63EB5 /* salsa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = salsa.h; sourceTree = ""; }; - 9426691919DAC5E600B63EB5 /* seal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = seal.h; sourceTree = ""; }; - 9426691A19DAC5E600B63EB5 /* seckey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = seckey.h; sourceTree = ""; }; - 9426691B19DAC5E600B63EB5 /* seed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = seed.h; sourceTree = ""; }; - 9426691C19DAC5E600B63EB5 /* serpent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = serpent.h; sourceTree = ""; }; - 9426691D19DAC5E600B63EB5 /* serpentp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = serpentp.h; sourceTree = ""; }; - 9426691E19DAC5E600B63EB5 /* sha.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sha.h; sourceTree = ""; }; - 9426691F19DAC5E600B63EB5 /* shacal2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shacal2.h; sourceTree = ""; }; - 9426692019DAC5E600B63EB5 /* shark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shark.h; sourceTree = ""; }; - 9426692119DAC5E600B63EB5 /* simple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simple.h; sourceTree = ""; }; - 9426692219DAC5E600B63EB5 /* skipjack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = skipjack.h; sourceTree = ""; }; - 9426692319DAC5E600B63EB5 /* smartptr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = smartptr.h; sourceTree = ""; }; - 9426692419DAC5E600B63EB5 /* socketft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socketft.h; sourceTree = ""; }; - 9426692519DAC5E600B63EB5 /* sosemanuk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sosemanuk.h; sourceTree = ""; }; - 9426692619DAC5E600B63EB5 /* square.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = square.h; sourceTree = ""; }; - 9426692719DAC5E600B63EB5 /* stdcpp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stdcpp.h; sourceTree = ""; }; - 9426692819DAC5E600B63EB5 /* strciphr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strciphr.h; sourceTree = ""; }; - 9426692919DAC5E600B63EB5 /* tea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tea.h; sourceTree = ""; }; - 9426692A19DAC5E600B63EB5 /* tiger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tiger.h; sourceTree = ""; }; - 9426692B19DAC5E600B63EB5 /* trdlocal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = trdlocal.h; sourceTree = ""; }; - 9426692C19DAC5E600B63EB5 /* trunhash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = trunhash.h; sourceTree = ""; }; - 9426692D19DAC5E600B63EB5 /* ttmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttmac.h; sourceTree = ""; }; - 9426692E19DAC5E600B63EB5 /* twofish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = twofish.h; sourceTree = ""; }; - 9426692F19DAC5E600B63EB5 /* vmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vmac.h; sourceTree = ""; }; - 9426693019DAC5E600B63EB5 /* wait.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wait.h; sourceTree = ""; }; - 9426693119DAC5E600B63EB5 /* wake.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wake.h; sourceTree = ""; }; - 9426693219DAC5E600B63EB5 /* whrlpool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = whrlpool.h; sourceTree = ""; }; - 9426693319DAC5E600B63EB5 /* winpipes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = winpipes.h; sourceTree = ""; }; - 9426693419DAC5E600B63EB5 /* words.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = words.h; sourceTree = ""; }; - 9426693519DAC5E600B63EB5 /* xtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xtr.h; sourceTree = ""; }; - 9426693619DAC5E600B63EB5 /* xtrcrypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xtrcrypt.h; sourceTree = ""; }; - 9426693719DAC5E600B63EB5 /* zdeflate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zdeflate.h; sourceTree = ""; }; - 9426693819DAC5E600B63EB5 /* zinflate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zinflate.h; sourceTree = ""; }; - 9426693919DAC5E600B63EB5 /* zlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zlib.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9426679119DAC3F500B63EB5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9426678619DAC20200B63EB5 = { - isa = PBXGroup; - children = ( - 9426679619DAC3F500B63EB5 /* cryptopp */, - 9426679519DAC3F500B63EB5 /* Products */, - ); - sourceTree = ""; - }; - 9426679519DAC3F500B63EB5 /* Products */ = { - isa = PBXGroup; - children = ( - 9426679419DAC3F500B63EB5 /* libcryptopp.a */, - ); - name = Products; - sourceTree = ""; - }; - 9426679619DAC3F500B63EB5 /* cryptopp */ = { - isa = PBXGroup; - children = ( - 41ACFBC41A11524C00905ACF /* wake.cpp */, - 942668B319DAC5E600B63EB5 /* blowfish.h */, - 942668B419DAC5E600B63EB5 /* config.h */, - 942668B519DAC5E600B63EB5 /* cryptlib.h */, - 942668B619DAC5E600B63EB5 /* eccrypto.h */, - 942668B719DAC5E600B63EB5 /* factory.h */, - 942668B819DAC5E600B63EB5 /* gfpcrypt.h */, - 942668B919DAC5E600B63EB5 /* misc.h */, - 942668BA19DAC5E600B63EB5 /* panama.h */, - 942668BB19DAC5E600B63EB5 /* queue.h */, - 942668BC19DAC5E600B63EB5 /* rw.h */, - 942668BD19DAC5E600B63EB5 /* secblock.h */, - 942668BE19DAC5E600B63EB5 /* sha3.h */, - 942668BF19DAC5E600B63EB5 /* validate.h */, - 942668C019DAC5E600B63EB5 /* 3way.h */, - 942668C119DAC5E600B63EB5 /* adler32.h */, - 942668C219DAC5E600B63EB5 /* aes.h */, - 942668C319DAC5E600B63EB5 /* algebra.h */, - 942668C419DAC5E600B63EB5 /* algparam.h */, - 942668C519DAC5E600B63EB5 /* arc4.h */, - 942668C619DAC5E600B63EB5 /* argnames.h */, - 942668C719DAC5E600B63EB5 /* asn.h */, - 942668C819DAC5E600B63EB5 /* authenc.h */, - 942668C919DAC5E600B63EB5 /* base32.h */, - 942668CA19DAC5E600B63EB5 /* base64.h */, - 942668CB19DAC5E600B63EB5 /* basecode.h */, - 942668CC19DAC5E600B63EB5 /* bench.h */, - 942668CD19DAC5E600B63EB5 /* blumshub.h */, - 942668CE19DAC5E600B63EB5 /* camellia.h */, - 942668CF19DAC5E600B63EB5 /* cast.h */, - 942668D019DAC5E600B63EB5 /* cbcmac.h */, - 942668D119DAC5E600B63EB5 /* ccm.h */, - 942668D219DAC5E600B63EB5 /* channels.h */, - 942668D319DAC5E600B63EB5 /* cmac.h */, - 942668D419DAC5E600B63EB5 /* cpu.h */, - 942668D519DAC5E600B63EB5 /* crc.h */, - 942668D619DAC5E600B63EB5 /* default.h */, - 942668D719DAC5E600B63EB5 /* des.h */, - 942668D819DAC5E600B63EB5 /* dh.h */, - 942668D919DAC5E600B63EB5 /* dh2.h */, - 942668DA19DAC5E600B63EB5 /* dll.h */, - 942668DB19DAC5E600B63EB5 /* dmac.h */, - 942668DC19DAC5E600B63EB5 /* dsa.h */, - 942668DD19DAC5E600B63EB5 /* eax.h */, - 942668DE19DAC5E600B63EB5 /* ec2n.h */, - 942668DF19DAC5E600B63EB5 /* ecp.h */, - 942668E019DAC5E600B63EB5 /* elgamal.h */, - 942668E119DAC5E600B63EB5 /* emsa2.h */, - 942668E219DAC5E600B63EB5 /* eprecomp.h */, - 942668E319DAC5E600B63EB5 /* esign.h */, - 942668E419DAC5E600B63EB5 /* files.h */, - 942668E519DAC5E600B63EB5 /* filters.h */, - 942668E619DAC5E600B63EB5 /* fips140.h */, - 942668E719DAC5E600B63EB5 /* fltrimpl.h */, - 942668E819DAC5E600B63EB5 /* gcm.h */, - 942668E919DAC5E600B63EB5 /* gf2_32.h */, - 942668EA19DAC5E600B63EB5 /* gf2n.h */, - 942668EB19DAC5E600B63EB5 /* gf256.h */, - 942668EC19DAC5E600B63EB5 /* gost.h */, - 942668ED19DAC5E600B63EB5 /* gzip.h */, - 942668EE19DAC5E600B63EB5 /* hex.h */, - 942668EF19DAC5E600B63EB5 /* hmac.h */, - 942668F019DAC5E600B63EB5 /* hrtimer.h */, - 942668F119DAC5E600B63EB5 /* ida.h */, - 942668F219DAC5E600B63EB5 /* idea.h */, - 942668F319DAC5E600B63EB5 /* integer.h */, - 942668F419DAC5E600B63EB5 /* iterhash.h */, - 942668F519DAC5E600B63EB5 /* lubyrack.h */, - 942668F619DAC5E600B63EB5 /* luc.h */, - 942668F719DAC5E600B63EB5 /* mars.h */, - 942668F819DAC5E600B63EB5 /* md2.h */, - 942668F919DAC5E600B63EB5 /* md4.h */, - 942668FA19DAC5E600B63EB5 /* md5.h */, - 942668FB19DAC5E600B63EB5 /* mdc.h */, - 942668FC19DAC5E600B63EB5 /* modarith.h */, - 942668FD19DAC5E600B63EB5 /* modes.h */, - 942668FE19DAC5E600B63EB5 /* modexppc.h */, - 942668FF19DAC5E600B63EB5 /* mqueue.h */, - 9426690019DAC5E600B63EB5 /* mqv.h */, - 9426690119DAC5E600B63EB5 /* nbtheory.h */, - 9426690219DAC5E600B63EB5 /* network.h */, - 9426690319DAC5E600B63EB5 /* nr.h */, - 9426690419DAC5E600B63EB5 /* oaep.h */, - 9426690519DAC5E600B63EB5 /* oids.h */, - 9426690619DAC5E600B63EB5 /* osrng.h */, - 9426690719DAC5E600B63EB5 /* pch.h */, - 9426690819DAC5E600B63EB5 /* pkcspad.h */, - 9426690919DAC5E600B63EB5 /* polynomi.h */, - 9426690A19DAC5E600B63EB5 /* pssr.h */, - 9426690B19DAC5E600B63EB5 /* pubkey.h */, - 9426690C19DAC5E600B63EB5 /* pwdbased.h */, - 9426690D19DAC5E600B63EB5 /* rabin.h */, - 9426690E19DAC5E600B63EB5 /* randpool.h */, - 9426690F19DAC5E600B63EB5 /* rc2.h */, - 9426691019DAC5E600B63EB5 /* rc5.h */, - 9426691119DAC5E600B63EB5 /* rc6.h */, - 9426691219DAC5E600B63EB5 /* resource.h */, - 9426691319DAC5E600B63EB5 /* rijndael.h */, - 9426691419DAC5E600B63EB5 /* ripemd.h */, - 9426691519DAC5E600B63EB5 /* rng.h */, - 9426691619DAC5E600B63EB5 /* rsa.h */, - 9426691719DAC5E600B63EB5 /* safer.h */, - 9426691819DAC5E600B63EB5 /* salsa.h */, - 9426691919DAC5E600B63EB5 /* seal.h */, - 9426691A19DAC5E600B63EB5 /* seckey.h */, - 9426691B19DAC5E600B63EB5 /* seed.h */, - 9426691C19DAC5E600B63EB5 /* serpent.h */, - 9426691D19DAC5E600B63EB5 /* serpentp.h */, - 9426691E19DAC5E600B63EB5 /* sha.h */, - 9426691F19DAC5E600B63EB5 /* shacal2.h */, - 9426692019DAC5E600B63EB5 /* shark.h */, - 9426692119DAC5E600B63EB5 /* simple.h */, - 9426692219DAC5E600B63EB5 /* skipjack.h */, - 9426692319DAC5E600B63EB5 /* smartptr.h */, - 9426692419DAC5E600B63EB5 /* socketft.h */, - 9426692519DAC5E600B63EB5 /* sosemanuk.h */, - 9426692619DAC5E600B63EB5 /* square.h */, - 9426692719DAC5E600B63EB5 /* stdcpp.h */, - 9426692819DAC5E600B63EB5 /* strciphr.h */, - 9426692919DAC5E600B63EB5 /* tea.h */, - 9426692A19DAC5E600B63EB5 /* tiger.h */, - 9426692B19DAC5E600B63EB5 /* trdlocal.h */, - 9426692C19DAC5E600B63EB5 /* trunhash.h */, - 9426692D19DAC5E600B63EB5 /* ttmac.h */, - 9426692E19DAC5E600B63EB5 /* twofish.h */, - 9426692F19DAC5E600B63EB5 /* vmac.h */, - 9426693019DAC5E600B63EB5 /* wait.h */, - 9426693119DAC5E600B63EB5 /* wake.h */, - 9426693219DAC5E600B63EB5 /* whrlpool.h */, - 9426693319DAC5E600B63EB5 /* winpipes.h */, - 9426693419DAC5E600B63EB5 /* words.h */, - 9426693519DAC5E600B63EB5 /* xtr.h */, - 9426693619DAC5E600B63EB5 /* xtrcrypt.h */, - 9426693719DAC5E600B63EB5 /* zdeflate.h */, - 9426693819DAC5E600B63EB5 /* zinflate.h */, - 9426693919DAC5E600B63EB5 /* zlib.h */, - 942667A919DAC5A300B63EB5 /* algebra.cpp */, - 942667AD19DAC5A300B63EB5 /* dsa.cpp */, - 942667AE19DAC5A300B63EB5 /* eccrypto.cpp */, - 942667AF19DAC5A300B63EB5 /* gfpcrypt.cpp */, - 942667B019DAC5A300B63EB5 /* osrng.cpp */, - 942667B119DAC5A300B63EB5 /* panama.cpp */, - 942667B319DAC5A300B63EB5 /* rijndael.cpp */, - 942667B419DAC5A300B63EB5 /* salsa.cpp */, - 942667B519DAC5A300B63EB5 /* sha3.cpp */, - 942667B819DAC5A300B63EB5 /* 3way.cpp */, - 942667B919DAC5A300B63EB5 /* adler32.cpp */, - 942667BA19DAC5A300B63EB5 /* algparam.cpp */, - 942667BB19DAC5A300B63EB5 /* arc4.cpp */, - 942667BC19DAC5A300B63EB5 /* asn.cpp */, - 942667BD19DAC5A300B63EB5 /* authenc.cpp */, - 942667BE19DAC5A300B63EB5 /* base32.cpp */, - 942667BF19DAC5A300B63EB5 /* base64.cpp */, - 942667C019DAC5A300B63EB5 /* basecode.cpp */, - 942667C119DAC5A300B63EB5 /* bfinit.cpp */, - 942667C219DAC5A300B63EB5 /* blowfish.cpp */, - 942667C319DAC5A300B63EB5 /* blumshub.cpp */, - 942667C419DAC5A300B63EB5 /* camellia.cpp */, - 942667C519DAC5A300B63EB5 /* cast.cpp */, - 942667C619DAC5A300B63EB5 /* casts.cpp */, - 942667C719DAC5A300B63EB5 /* cbcmac.cpp */, - 942667C819DAC5A300B63EB5 /* ccm.cpp */, - 942667C919DAC5A300B63EB5 /* channels.cpp */, - 942667CA19DAC5A300B63EB5 /* cmac.cpp */, - 942667CB19DAC5A300B63EB5 /* cpu.cpp */, - 942667CC19DAC5A300B63EB5 /* crc.cpp */, - 942667CD19DAC5A300B63EB5 /* cryptlib_bds.cpp */, - 942667CE19DAC5A300B63EB5 /* cryptlib.cpp */, - 942667CF19DAC5A300B63EB5 /* default.cpp */, - 942667D019DAC5A300B63EB5 /* des.cpp */, - 942667D119DAC5A300B63EB5 /* dessp.cpp */, - 942667D219DAC5A300B63EB5 /* dh.cpp */, - 942667D319DAC5A300B63EB5 /* dh2.cpp */, - 942667D419DAC5A300B63EB5 /* dll.cpp */, - 942667D619DAC5A300B63EB5 /* eax.cpp */, - 942667D719DAC5A300B63EB5 /* ec2n.cpp */, - 942667D819DAC5A300B63EB5 /* ecp.cpp */, - 942667D919DAC5A300B63EB5 /* elgamal.cpp */, - 942667DA19DAC5A300B63EB5 /* emsa2.cpp */, - 942667DB19DAC5A300B63EB5 /* eprecomp.cpp */, - 942667DC19DAC5A300B63EB5 /* esign.cpp */, - 942667DD19DAC5A300B63EB5 /* files.cpp */, - 942667DE19DAC5A300B63EB5 /* filters.cpp */, - 942667DF19DAC5A300B63EB5 /* fips140.cpp */, - 942667E019DAC5A300B63EB5 /* fipsalgt.cpp */, - 942667E219DAC5A300B63EB5 /* gcm.cpp */, - 942667E319DAC5A300B63EB5 /* gf2_32.cpp */, - 942667E419DAC5A300B63EB5 /* gf2n.cpp */, - 942667E519DAC5A300B63EB5 /* gf256.cpp */, - 942667E619DAC5A300B63EB5 /* gost.cpp */, - 942667E719DAC5A300B63EB5 /* gzip.cpp */, - 942667E819DAC5A300B63EB5 /* hex.cpp */, - 942667E919DAC5A300B63EB5 /* hmac.cpp */, - 942667EA19DAC5A300B63EB5 /* hrtimer.cpp */, - 942667EB19DAC5A300B63EB5 /* ida.cpp */, - 942667EC19DAC5A300B63EB5 /* idea.cpp */, - 942667ED19DAC5A300B63EB5 /* integer.cpp */, - 942667EE19DAC5A300B63EB5 /* iterhash.cpp */, - 942667EF19DAC5A300B63EB5 /* luc.cpp */, - 942667F019DAC5A300B63EB5 /* mars.cpp */, - 942667F119DAC5A300B63EB5 /* marss.cpp */, - 942667F219DAC5A300B63EB5 /* md2.cpp */, - 942667F319DAC5A300B63EB5 /* md4.cpp */, - 942667F419DAC5A300B63EB5 /* md5.cpp */, - 942667F519DAC5A300B63EB5 /* misc.cpp */, - 942667F619DAC5A300B63EB5 /* modes.cpp */, - 942667F719DAC5A300B63EB5 /* mqueue.cpp */, - 942667F819DAC5A300B63EB5 /* mqv.cpp */, - 942667F919DAC5A300B63EB5 /* nbtheory.cpp */, - 942667FA19DAC5A300B63EB5 /* network.cpp */, - 942667FB19DAC5A300B63EB5 /* oaep.cpp */, - 942667FC19DAC5A300B63EB5 /* pch.cpp */, - 942667FD19DAC5A300B63EB5 /* pkcspad.cpp */, - 942667FE19DAC5A300B63EB5 /* polynomi.cpp */, - 942667FF19DAC5A300B63EB5 /* pssr.cpp */, - 9426680019DAC5A300B63EB5 /* pubkey.cpp */, - 9426680119DAC5A300B63EB5 /* queue.cpp */, - 9426680219DAC5A300B63EB5 /* rabin.cpp */, - 9426680319DAC5A300B63EB5 /* randpool.cpp */, - 9426680419DAC5A300B63EB5 /* rc2.cpp */, - 9426680519DAC5A300B63EB5 /* rc5.cpp */, - 9426680619DAC5A300B63EB5 /* rc6.cpp */, - 9426680719DAC5A300B63EB5 /* rdtables.cpp */, - 9426680819DAC5A300B63EB5 /* ripemd.cpp */, - 9426680919DAC5A300B63EB5 /* rng.cpp */, - 9426680A19DAC5A300B63EB5 /* rsa.cpp */, - 9426680B19DAC5A300B63EB5 /* rw.cpp */, - 9426680C19DAC5A300B63EB5 /* safer.cpp */, - 9426680D19DAC5A300B63EB5 /* seal.cpp */, - 9426680E19DAC5A300B63EB5 /* seed.cpp */, - 9426680F19DAC5A300B63EB5 /* serpent.cpp */, - 9426681019DAC5A300B63EB5 /* sha.cpp */, - 9426681119DAC5A300B63EB5 /* shacal2.cpp */, - 9426681219DAC5A300B63EB5 /* shark.cpp */, - 9426681319DAC5A300B63EB5 /* sharkbox.cpp */, - 9426681419DAC5A300B63EB5 /* simple.cpp */, - 9426681519DAC5A300B63EB5 /* skipjack.cpp */, - 9426681619DAC5A300B63EB5 /* socketft.cpp */, - 9426681719DAC5A300B63EB5 /* sosemanuk.cpp */, - 9426681819DAC5A300B63EB5 /* square.cpp */, - 9426681919DAC5A300B63EB5 /* squaretb.cpp */, - 9426681A19DAC5A300B63EB5 /* strciphr.cpp */, - 9426681B19DAC5A300B63EB5 /* tea.cpp */, - 9426681D19DAC5A300B63EB5 /* tftables.cpp */, - 9426681E19DAC5A300B63EB5 /* tiger.cpp */, - 9426681F19DAC5A300B63EB5 /* tigertab.cpp */, - 9426682019DAC5A300B63EB5 /* trdlocal.cpp */, - 9426682119DAC5A300B63EB5 /* ttmac.cpp */, - 9426682219DAC5A300B63EB5 /* twofish.cpp */, - 9426682419DAC5A300B63EB5 /* vmac.cpp */, - 9426682519DAC5A300B63EB5 /* wait.cpp */, - 9426682719DAC5A300B63EB5 /* whrlpool.cpp */, - 9426682819DAC5A300B63EB5 /* winpipes.cpp */, - 9426682919DAC5A300B63EB5 /* xtr.cpp */, - 9426682A19DAC5A300B63EB5 /* xtrcrypt.cpp */, - 9426682B19DAC5A300B63EB5 /* zdeflate.cpp */, - 9426682C19DAC5A300B63EB5 /* zinflate.cpp */, - 9426682D19DAC5A300B63EB5 /* zlib.cpp */, - ); - path = cryptopp; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9426679319DAC3F500B63EB5 /* cryptopp */ = { - isa = PBXNativeTarget; - buildConfigurationList = 942667A719DAC3F500B63EB5 /* Build configuration list for PBXNativeTarget "cryptopp" */; - buildPhases = ( - 9426679019DAC3F500B63EB5 /* Sources */, - 9426679119DAC3F500B63EB5 /* Frameworks */, - 9426679219DAC3F500B63EB5 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = cryptopp; - productName = cryptopp; - productReference = 9426679419DAC3F500B63EB5 /* libcryptopp.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 9426678719DAC20200B63EB5 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0600; - TargetAttributes = { - 9426679319DAC3F500B63EB5 = { - CreatedOnToolsVersion = 6.0.1; - }; - }; - }; - buildConfigurationList = 9426678A19DAC20200B63EB5 /* Build configuration list for PBXProject "cryptopp" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 9426678619DAC20200B63EB5; - productRefGroup = 9426679519DAC3F500B63EB5 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9426679319DAC3F500B63EB5 /* cryptopp */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 9426679019DAC3F500B63EB5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 942668AE19DAC5A300B63EB5 /* xtr.cpp in Sources */, - 9426685D19DAC5A300B63EB5 /* ecp.cpp in Sources */, - 942668B119DAC5A300B63EB5 /* zinflate.cpp in Sources */, - 9426685819DAC5A300B63EB5 /* dh2.cpp in Sources */, - 9426686C19DAC5A300B63EB5 /* gzip.cpp in Sources */, - 9426688119DAC5A300B63EB5 /* pch.cpp in Sources */, - 9426686E19DAC5A300B63EB5 /* hmac.cpp in Sources */, - 9426684219DAC5A300B63EB5 /* authenc.cpp in Sources */, - 942668AF19DAC5A300B63EB5 /* xtrcrypt.cpp in Sources */, - 9426683319DAC5A300B63EB5 /* eccrypto.cpp in Sources */, - 9426686119DAC5A300B63EB5 /* esign.cpp in Sources */, - 9426689319DAC5A300B63EB5 /* seed.cpp in Sources */, - 942668A619DAC5A300B63EB5 /* ttmac.cpp in Sources */, - 9426687219DAC5A300B63EB5 /* integer.cpp in Sources */, - 9426686419DAC5A300B63EB5 /* fips140.cpp in Sources */, - 942668A719DAC5A300B63EB5 /* twofish.cpp in Sources */, - 9426685719DAC5A300B63EB5 /* dh.cpp in Sources */, - 942668B019DAC5A300B63EB5 /* zdeflate.cpp in Sources */, - 9426684F19DAC5A300B63EB5 /* cmac.cpp in Sources */, - 9426684519DAC5A300B63EB5 /* basecode.cpp in Sources */, - 942668A219DAC5A300B63EB5 /* tftables.cpp in Sources */, - 9426684B19DAC5A300B63EB5 /* casts.cpp in Sources */, - 9426684A19DAC5A300B63EB5 /* cast.cpp in Sources */, - 9426684119DAC5A300B63EB5 /* asn.cpp in Sources */, - 9426687119DAC5A300B63EB5 /* idea.cpp in Sources */, - 9426685F19DAC5A300B63EB5 /* emsa2.cpp in Sources */, - 942668A919DAC5A300B63EB5 /* vmac.cpp in Sources */, - 9426689919DAC5A300B63EB5 /* simple.cpp in Sources */, - 9426684C19DAC5A300B63EB5 /* cbcmac.cpp in Sources */, - 9426687519DAC5A300B63EB5 /* mars.cpp in Sources */, - 942668AA19DAC5A300B63EB5 /* wait.cpp in Sources */, - 9426684919DAC5A300B63EB5 /* camellia.cpp in Sources */, - 9426688919DAC5A300B63EB5 /* rc2.cpp in Sources */, - 942668A419DAC5A300B63EB5 /* tigertab.cpp in Sources */, - 9426688C19DAC5A300B63EB5 /* rdtables.cpp in Sources */, - 9426686719DAC5A300B63EB5 /* gcm.cpp in Sources */, - 9426686A19DAC5A300B63EB5 /* gf256.cpp in Sources */, - 9426683919DAC5A300B63EB5 /* salsa.cpp in Sources */, - 9426689F19DAC5A300B63EB5 /* strciphr.cpp in Sources */, - 9426688D19DAC5A300B63EB5 /* ripemd.cpp in Sources */, - 9426688319DAC5A300B63EB5 /* polynomi.cpp in Sources */, - 9426684319DAC5A300B63EB5 /* base32.cpp in Sources */, - 9426688619DAC5A300B63EB5 /* queue.cpp in Sources */, - 9426688019DAC5A300B63EB5 /* oaep.cpp in Sources */, - 9426689219DAC5A300B63EB5 /* seal.cpp in Sources */, - 9426684D19DAC5A300B63EB5 /* ccm.cpp in Sources */, - 9426689519DAC5A300B63EB5 /* sha.cpp in Sources */, - 942668AC19DAC5A300B63EB5 /* whrlpool.cpp in Sources */, - 9426684619DAC5A300B63EB5 /* bfinit.cpp in Sources */, - 9426683A19DAC5A300B63EB5 /* sha3.cpp in Sources */, - 9426689419DAC5A300B63EB5 /* serpent.cpp in Sources */, - 9426687419DAC5A300B63EB5 /* luc.cpp in Sources */, - 9426686219DAC5A300B63EB5 /* files.cpp in Sources */, - 9426687019DAC5A300B63EB5 /* ida.cpp in Sources */, - 9426689D19DAC5A300B63EB5 /* square.cpp in Sources */, - 9426687B19DAC5A300B63EB5 /* modes.cpp in Sources */, - 9426684419DAC5A300B63EB5 /* base64.cpp in Sources */, - 9426683619DAC5A300B63EB5 /* panama.cpp in Sources */, - 9426683519DAC5A300B63EB5 /* osrng.cpp in Sources */, - 9426687A19DAC5A300B63EB5 /* misc.cpp in Sources */, - 9426687F19DAC5A300B63EB5 /* network.cpp in Sources */, - 9426686019DAC5A300B63EB5 /* eprecomp.cpp in Sources */, - 9426685619DAC5A300B63EB5 /* dessp.cpp in Sources */, - 9426688F19DAC5A300B63EB5 /* rsa.cpp in Sources */, - 942668A519DAC5A300B63EB5 /* trdlocal.cpp in Sources */, - 9426684719DAC5A300B63EB5 /* blowfish.cpp in Sources */, - 9426688719DAC5A300B63EB5 /* rabin.cpp in Sources */, - 9426689819DAC5A300B63EB5 /* sharkbox.cpp in Sources */, - 9426686519DAC5A300B63EB5 /* fipsalgt.cpp in Sources */, - 9426688419DAC5A300B63EB5 /* pssr.cpp in Sources */, - 9426688B19DAC5A300B63EB5 /* rc6.cpp in Sources */, - 9426689119DAC5A300B63EB5 /* safer.cpp in Sources */, - 9426687719DAC5A300B63EB5 /* md2.cpp in Sources */, - 9426687819DAC5A300B63EB5 /* md4.cpp in Sources */, - 9426682E19DAC5A300B63EB5 /* algebra.cpp in Sources */, - 9426687E19DAC5A300B63EB5 /* nbtheory.cpp in Sources */, - 9426689019DAC5A300B63EB5 /* rw.cpp in Sources */, - 9426686F19DAC5A300B63EB5 /* hrtimer.cpp in Sources */, - 9426683419DAC5A300B63EB5 /* gfpcrypt.cpp in Sources */, - 9426688219DAC5A300B63EB5 /* pkcspad.cpp in Sources */, - 9426683819DAC5A300B63EB5 /* rijndael.cpp in Sources */, - 9426687619DAC5A300B63EB5 /* marss.cpp in Sources */, - 9426685C19DAC5A300B63EB5 /* ec2n.cpp in Sources */, - 9426686919DAC5A300B63EB5 /* gf2n.cpp in Sources */, - 9426688A19DAC5A300B63EB5 /* rc5.cpp in Sources */, - 9426685119DAC5A300B63EB5 /* crc.cpp in Sources */, - 9426683219DAC5A300B63EB5 /* dsa.cpp in Sources */, - 9426689A19DAC5A300B63EB5 /* skipjack.cpp in Sources */, - 9426683F19DAC5A300B63EB5 /* algparam.cpp in Sources */, - 9426686319DAC5A300B63EB5 /* filters.cpp in Sources */, - 9426684019DAC5A300B63EB5 /* arc4.cpp in Sources */, - 9426685B19DAC5A300B63EB5 /* eax.cpp in Sources */, - 9426685519DAC5A300B63EB5 /* des.cpp in Sources */, - 9426687D19DAC5A300B63EB5 /* mqv.cpp in Sources */, - 9426683E19DAC5A300B63EB5 /* adler32.cpp in Sources */, - 9426684819DAC5A300B63EB5 /* blumshub.cpp in Sources */, - 9426689C19DAC5A300B63EB5 /* sosemanuk.cpp in Sources */, - 9426685319DAC5A300B63EB5 /* cryptlib.cpp in Sources */, - 9426688819DAC5A300B63EB5 /* randpool.cpp in Sources */, - 9426688E19DAC5A300B63EB5 /* rng.cpp in Sources */, - 942668B219DAC5A300B63EB5 /* zlib.cpp in Sources */, - 41ACFBC51A11524C00905ACF /* wake.cpp in Sources */, - 9426686819DAC5A300B63EB5 /* gf2_32.cpp in Sources */, - 9426685419DAC5A300B63EB5 /* default.cpp in Sources */, - 9426689619DAC5A300B63EB5 /* shacal2.cpp in Sources */, - 942668AD19DAC5A300B63EB5 /* winpipes.cpp in Sources */, - 9426684E19DAC5A300B63EB5 /* channels.cpp in Sources */, - 9426683D19DAC5A300B63EB5 /* 3way.cpp in Sources */, - 9426687319DAC5A300B63EB5 /* iterhash.cpp in Sources */, - 9426685919DAC5A300B63EB5 /* dll.cpp in Sources */, - 9426685E19DAC5A300B63EB5 /* elgamal.cpp in Sources */, - 9426687919DAC5A300B63EB5 /* md5.cpp in Sources */, - 9426685019DAC5A300B63EB5 /* cpu.cpp in Sources */, - 9426689E19DAC5A300B63EB5 /* squaretb.cpp in Sources */, - 9426688519DAC5A300B63EB5 /* pubkey.cpp in Sources */, - 9426689719DAC5A300B63EB5 /* shark.cpp in Sources */, - 9426686D19DAC5A300B63EB5 /* hex.cpp in Sources */, - 9426687C19DAC5A300B63EB5 /* mqueue.cpp in Sources */, - 9426686B19DAC5A300B63EB5 /* gost.cpp in Sources */, - 942668A019DAC5A300B63EB5 /* tea.cpp in Sources */, - 942668A319DAC5A300B63EB5 /* tiger.cpp in Sources */, - 9426689B19DAC5A300B63EB5 /* socketft.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 9426678B19DAC20200B63EB5 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - 9426678C19DAC20200B63EB5 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - 942667A319DAC3F500B63EB5 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - "GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = ( - "DEBUG=1", - "$(inherited)", - CRYPTOPP_DISABLE_X86ASM, - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-Wno-c++11-narrowing", - ); - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 942667A419DAC3F500B63EB5 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = CRYPTOPP_DISABLE_X86ASM; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-Wno-c++11-narrowing", - ); - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9426678A19DAC20200B63EB5 /* Build configuration list for PBXProject "cryptopp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9426678B19DAC20200B63EB5 /* Debug */, - 9426678C19DAC20200B63EB5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 942667A719DAC3F500B63EB5 /* Build configuration list for PBXNativeTarget "cryptopp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 942667A319DAC3F500B63EB5 /* Debug */, - 942667A419DAC3F500B63EB5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 9426678719DAC20200B63EB5 /* Project object */; -} diff --git a/bindings/ios/3rdparty/cryptopp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/bindings/ios/3rdparty/cryptopp.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 437ecf1bc3..0000000000 --- a/bindings/ios/3rdparty/cryptopp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/bindings/ios/3rdparty/cryptopp.xcodeproj/project.xcworkspace/xcuserdata/MEGA.xcuserdatad/UserInterfaceState.xcuserstate b/bindings/ios/3rdparty/cryptopp.xcodeproj/project.xcworkspace/xcuserdata/MEGA.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index f339bbb2a89ff73617303f4e667f5f99acb3035d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 73542 zcmd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$GLD6@EL@%CcKV$5RP;-|%l#ji_zOX5qCOD;>kOV5@Xm%5gE zmYJ4Wm)V!Cm+hAwmubr%mf@9CE0n)}TWdGh)Yk5=WvvygQGXx*eg5~w-!{J;emnhc`rZAz zcb#utd|h Kw{t-oC_S}$4uwf<*)cSC#Q@rKbx%0|XU*2cod?~RSk8=H4F?{0c+ z25p9Hc5Z&!{Jh1!C9oy5<+T;G6|&X0^<`^pn}1tk``Wh0cEEPfcJKDc_UIqsKhl3> z|M>rj_!IT#`=8Z6zjxGk^mhz)a(9Y%XgmLQ&+PuUi`%u{CGURNZQbqL9o+rA`(<~0 z_uKA|-NoIN-L>8IJ)S+?J)gaTz2?1vy`jC4y|KN?y{Wy0y_LPSy^X!C{iFM*_RsF0 z-)GuK?W6ZG`$GFS_bv9x`>y+5`@Z}B`yu<``%(MP_fz&W_OthM_w)BZ>?8Xh_Z# - - - - HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges - - SnapshotAutomaticallyBeforeSignificantChanges - - - diff --git a/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cares.xcscheme b/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cares.xcscheme deleted file mode 100644 index 25b50be062..0000000000 --- a/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cares.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/caresTests.xcscheme b/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/caresTests.xcscheme deleted file mode 100644 index 669226087a..0000000000 --- a/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/caresTests.xcscheme +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cryptopp.xcscheme b/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cryptopp.xcscheme deleted file mode 100644 index d4db4aa850..0000000000 --- a/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cryptopp.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cryptoppTests.xcscheme b/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cryptoppTests.xcscheme deleted file mode 100644 index 4809bb34e9..0000000000 --- a/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/cryptoppTests.xcscheme +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/xcschememanagement.plist b/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 281a51d802..0000000000 --- a/bindings/ios/3rdparty/cryptopp.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,52 +0,0 @@ - - - - - SchemeUserState - - cares.xcscheme - - orderHint - 3 - - caresTests.xcscheme - - orderHint - 4 - - cryptopp.xcscheme - - orderHint - 1 - - cryptoppTests.xcscheme - - orderHint - 2 - - - SuppressBuildableAutocreation - - 9426679319DAC3F500B63EB5 - - primary - - - 9426679E19DAC3F500B63EB5 - - primary - - - 9426694619DAD21700B63EB5 - - primary - - - 9426695019DAD21700B63EB5 - - primary - - - - - From 10bff139983968775d8a8756c351e420a3ffaba6 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Tue, 8 Jan 2019 10:57:12 +0100 Subject: [PATCH 34/53] do not call unexisting setdnsservers when !curl in win32 (mingw) --- src/megaapi_impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index d2d1253fb2..53874f7ada 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -17978,12 +17978,13 @@ void MegaApiImpl::sendPendingRequests() } #endif } - +#ifndef __MINGW32__ if (servers.size()) { LOG_debug << "Using DNS servers " << servers; httpio->setdnsservers(servers.c_str()); } +#endif } fireOnRequestFinish(request, MegaError(API_OK)); From 7be59fa6fed26098de64af4dc7841fed6b56356c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Tue, 8 Jan 2019 15:06:50 +0100 Subject: [PATCH 35/53] Clear peerlist upon own users leave When the own user is removed/leaves a room, the API still includes the peerlist in the actionpacket. However, the peerlist is not included in a fresh fetchnodes. This commit aims to be consistent with API's state. Also, it clears the peerlist if inactive chats are stored in cache. --- src/commands.cpp | 4 ++++ src/megaclient.cpp | 26 ++++++++++++++++++-------- src/utils.cpp | 6 ++++++ 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/commands.cpp b/src/commands.cpp index b6d1c2083f..6a174d4e7e 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -5390,6 +5390,10 @@ void CommandChatRemove::procresult() if (uh == client->me) { chat->priv = PRIV_RM; + + // clear the list of peers (if re-invited, peers will be re-added) + delete chat->userpriv; + chat->userpriv = NULL; } chat->setTag(tag ? tag : -1); diff --git a/src/megaclient.cpp b/src/megaclient.cpp index 2b647d0171..f4799a0416 100644 --- a/src/megaclient.cpp +++ b/src/megaclient.cpp @@ -9096,18 +9096,28 @@ void MegaClient::procmcf(JSON *j) // remove yourself from the list of users (only peers matter) if (userpriv) { - userpriv_vector::iterator upvit; - for (upvit = userpriv->begin(); upvit != userpriv->end(); upvit++) + if (chat->priv == PRIV_RM) { - if (upvit->first == me) + // clear the list of peers because API still includes peers in the + // actionpacket, but not in a fresh fetchnodes + delete userpriv; + userpriv = NULL; + } + else + { + userpriv_vector::iterator upvit; + for (upvit = userpriv->begin(); upvit != userpriv->end(); upvit++) { - userpriv->erase(upvit); - if (userpriv->empty()) + if (upvit->first == me) { - delete userpriv; - userpriv = NULL; + userpriv->erase(upvit); + if (userpriv->empty()) + { + delete userpriv; + userpriv = NULL; + } + break; } - break; } } } diff --git a/src/utils.cpp b/src/utils.cpp index 6732e61254..c14865c1d9 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -201,6 +201,12 @@ TextChat* TextChat::unserialize(class MegaClient *client, string *d) userpriv->push_back(userpriv_pair(uh, priv)); } + + if (priv == PRIV_RM) // clear peerlist if removed + { + delete userpriv; + userpriv = NULL; + } } if (ptr + sizeof(bool) + sizeof(unsigned short) > end) From bf261b91063a78e0f91794be728cc3146f9c9ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Wed, 9 Jan 2019 12:52:35 +0100 Subject: [PATCH 36/53] Clear peerlist also upon AP reception when removed --- src/megaclient.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/megaclient.cpp b/src/megaclient.cpp index f4799a0416..a9246cde89 100644 --- a/src/megaclient.cpp +++ b/src/megaclient.cpp @@ -5866,6 +5866,15 @@ void MegaClient::sc_chatupdate() } } } + + if (chat->priv == PRIV_RM) + { + // clear the list of peers because API still includes peers in the + // actionpacket, but not in a fresh fetchnodes + delete userpriv; + userpriv = NULL; + } + delete chat->userpriv; // discard any existing `userpriv` chat->userpriv = userpriv; From 562a5ea7588d059a0dd347418cf6f4d3f8a9c8ae Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Andres Date: Wed, 9 Jan 2019 13:44:23 +0100 Subject: [PATCH 37/53] Rename macro in sdk pri Rename unused macro USE_LIBWEBSOCKETS by ENABLE_CHAT --- bindings/qt/sdk.pri | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bindings/qt/sdk.pri b/bindings/qt/sdk.pri index 0a78bfd3d9..3525a98a2c 100644 --- a/bindings/qt/sdk.pri +++ b/bindings/qt/sdk.pri @@ -66,9 +66,8 @@ CONFIG(USE_AUTOCOMPLETE) { } } -CONFIG(USE_LIBWEBSOCKETS) { +CONFIG(ENABLE_CHAT) { CONFIG += USE_LIBUV - DEFINES += USE_LIBWEBSOCKETS=1 !macx { exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libwebsockets.a) { From c5fe50e501123ea75e9837cff2340491c9c00b06 Mon Sep 17 00:00:00 2001 From: Matt Weir Date: Mon, 14 Jan 2019 17:53:04 +1300 Subject: [PATCH 38/53] Useralert notification for payment reminders When a payment is made, the SDK will notify the app with any payment reminders that should no longer be shown. The payment reminder useralert's getRelevant() function will return false to indicate it should be hidden. --- examples/megacli.cpp | 8 ++++++++ src/useralerts.cpp | 34 ++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/examples/megacli.cpp b/examples/megacli.cpp index dc2c81e82e..5b152220dd 100644 --- a/examples/megacli.cpp +++ b/examples/megacli.cpp @@ -5244,6 +5244,14 @@ static void process_line(char* l) { shownew = true; } + else if (words[1] == "test_reminder") + { + client->useralerts.add(new UserAlert::PaymentReminder(time(NULL) - 86000*3 /2, client->useralerts.nextId())); + } + else if (words[1] == "test_payment") + { + client->useralerts.add(new UserAlert::Payment(true, 1, time(NULL) + 86000 * 1, client->useralerts.nextId())); + } else if (atoi(words[1].c_str()) > 0) { showN = atoi(words[1].c_str()); diff --git a/src/useralerts.cpp b/src/useralerts.cpp index 53dcbb97de..e3aca16d3b 100644 --- a/src/useralerts.cpp +++ b/src/useralerts.cpp @@ -594,25 +594,31 @@ UserAlert::PaymentReminder::PaymentReminder(UserAlertRaw& un, unsigned int id) : Base(un, id) { expiryTime = un.getint64(MAKENAMEID2('t', 's'), timestamp); - relevant = expiryTime > timestamp && expiryTime > m_time(); + relevant = true; // relevant until we see a subsequent payment } UserAlert::PaymentReminder::PaymentReminder(m_time_t expiryts, unsigned int id) : Base(type_pses, UNDEF, "", m_time(), id) { expiryTime = expiryts; - relevant = expiryTime > timestamp; + relevant = true; // relevant until we see a subsequent payment } void UserAlert::PaymentReminder::text(string& header, string& title, MegaClient* mc) { updateEmail(mc); m_time_t now = m_time(); - int days = expiryTime > now ? int((expiryTime - now) / 86400) : 0; + int days = int((expiryTime - now) / 86400); ostringstream s; - s << "Your PRO membership plan will expire in " << days << (days == 1 ? " day." : " days."); // 8596, 8597 - + if (expiryTime < now) + { + s << "Your PRO membership plan expired " << -days << (days == -1 ? " day" : " days") << " ago"; + } + else + { + s << "Your PRO membership plan will expire in " << days << (days == 1 ? " day." : " days."); // 8596, 8597 + } title = s.str(); header = "PRO membership plan expiring soon"; // 8598 } @@ -844,6 +850,22 @@ void UserAlerts::add(UserAlert::Base* unb) } } + if (!alerts.empty() && unb->type == UserAlert::type_psts && static_cast(unb)->success) + { + // if a successful payment is made then hide/remove any reminders received + for (Alerts::iterator i = alerts.begin(); i != alerts.end(); ++i) + { + if ((*i)->type == UserAlert::type_pses && (*i)->relevant) + { + (*i)->relevant = false; + if (catchupdone) + { + useralertnotify.push_back(*i); + } + } + } + } + unb->updateEmail(&mc); alerts.push_back(unb); LOG_debug << "Added user alert, type " << alerts.back()->type << " ts " << alerts.back()->timestamp; @@ -864,7 +886,7 @@ void UserAlerts::startprovisional() void UserAlerts::evalprovisional(handle originatinguser) { provisionalmode = false; - for (int i = 0; i < provisionals.size(); ++i) + for (unsigned i = 0; i < provisionals.size(); ++i) { if (provisionals[i]->checkprovisional(originatinguser, &mc)) { From 37bbb99c5fe052a6f71b4c2ae3027eb37fc830dc Mon Sep 17 00:00:00 2001 From: Javier Navarro Date: Mon, 14 Jan 2019 17:56:16 +0100 Subject: [PATCH 39/53] Fix compilation for Swift demo --- .../Swift/MEGA/MEGA.xcodeproj/project.pbxproj | 36 +++++++++---------- examples/Swift/MEGA/MEGA/AppDelegate.swift | 6 ++-- .../CloudDriveTableViewController.swift | 29 ++++++++++----- .../DetailsNodeInfoViewController.swift | 14 ++++---- .../ContactsTableViewController.swift | 2 +- .../AppIcon.appiconset/Contents.json | 24 +++++++++++-- .../MEGA/MEGA/Login/LoginViewController.swift | 24 ++++++------- .../Settings/SettingsViewController.swift | 12 +++---- examples/Swift/MEGA/MEGA/Utils/Helper.swift | 7 ++-- 9 files changed, 91 insertions(+), 63 deletions(-) diff --git a/examples/Swift/MEGA/MEGA.xcodeproj/project.pbxproj b/examples/Swift/MEGA/MEGA.xcodeproj/project.pbxproj index 18a27eccab..29cd27e51c 100644 --- a/examples/Swift/MEGA/MEGA.xcodeproj/project.pbxproj +++ b/examples/Swift/MEGA/MEGA.xcodeproj/project.pbxproj @@ -39,19 +39,14 @@ 41F175A81A51F1B700570E30 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41F175A71A51F1B700570E30 /* libz.dylib */; }; 41F175AA1A51F1C200570E30 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41F175A91A51F1C200570E30 /* libsqlite3.dylib */; }; A88EE20C1F0A62AF00AECF76 /* libcares.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2051F0A62AF00AECF76 /* libcares.a */; }; - A88EE20D1F0A62AF00AECF76 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2061F0A62AF00AECF76 /* libcrypto.a */; }; A88EE20E1F0A62AF00AECF76 /* libcryptopp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2071F0A62AF00AECF76 /* libcryptopp.a */; }; A88EE20F1F0A62AF00AECF76 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2081F0A62AF00AECF76 /* libcurl.a */; }; - A88EE2101F0A62AF00AECF76 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2091F0A62AF00AECF76 /* libssl.a */; }; A88EE2111F0A62AF00AECF76 /* libuv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE20A1F0A62AF00AECF76 /* libuv.a */; }; A88EE2121F0A62AF00AECF76 /* libsodium.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE20B1F0A62AF00AECF76 /* libsodium.a */; }; - A88EE22D1F0A648600AECF76 /* libcares.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2261F0A648600AECF76 /* libcares.a */; }; - A88EE22E1F0A648600AECF76 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2271F0A648600AECF76 /* libcrypto.a */; }; - A88EE22F1F0A648600AECF76 /* libcryptopp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2281F0A648600AECF76 /* libcryptopp.a */; }; - A88EE2301F0A648600AECF76 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2291F0A648600AECF76 /* libcurl.a */; }; A88EE2311F0A648600AECF76 /* libsodium.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE22A1F0A648600AECF76 /* libsodium.a */; }; - A88EE2321F0A648600AECF76 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE22B1F0A648600AECF76 /* libssl.a */; }; - A88EE2331F0A648600AECF76 /* libuv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE22C1F0A648600AECF76 /* libuv.a */; }; + A8AF6F8C21ECF0D800262474 /* librtc_sdk_objc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8AF6F8B21ECF0D800262474 /* librtc_sdk_objc.a */; }; + A8AF6F8F21ECF31E00262474 /* libmediainfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8AF6F8D21ECF31E00262474 /* libmediainfo.a */; }; + A8AF6F9021ECF31E00262474 /* libzen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8AF6F8E21ECF31E00262474 /* libzen.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -108,6 +103,9 @@ A88EE22A1F0A648600AECF76 /* libsodium.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsodium.a; path = ../../../bindings/ios/3rdparty/lib/libsodium.a; sourceTree = ""; }; A88EE22B1F0A648600AECF76 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = ../../../bindings/ios/3rdparty/lib/libssl.a; sourceTree = ""; }; A88EE22C1F0A648600AECF76 /* libuv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuv.a; path = ../../../bindings/ios/3rdparty/lib/libuv.a; sourceTree = ""; }; + A8AF6F8B21ECF0D800262474 /* librtc_sdk_objc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = librtc_sdk_objc.a; path = ../../../bindings/ios/3rdparty/lib/librtc_sdk_objc.a; sourceTree = ""; }; + A8AF6F8D21ECF31E00262474 /* libmediainfo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmediainfo.a; path = ../../../bindings/ios/3rdparty/lib/libmediainfo.a; sourceTree = ""; }; + A8AF6F8E21ECF31E00262474 /* libzen.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzen.a; path = ../../../bindings/ios/3rdparty/lib/libzen.a; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -115,24 +113,19 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A88EE22D1F0A648600AECF76 /* libcares.a in Frameworks */, - A88EE22E1F0A648600AECF76 /* libcrypto.a in Frameworks */, - A88EE22F1F0A648600AECF76 /* libcryptopp.a in Frameworks */, - A88EE2301F0A648600AECF76 /* libcurl.a in Frameworks */, + A8AF6F8F21ECF31E00262474 /* libmediainfo.a in Frameworks */, + A8AF6F9021ECF31E00262474 /* libzen.a in Frameworks */, + A8AF6F8C21ECF0D800262474 /* librtc_sdk_objc.a in Frameworks */, A88EE2311F0A648600AECF76 /* libsodium.a in Frameworks */, - A88EE2321F0A648600AECF76 /* libssl.a in Frameworks */, - A88EE2331F0A648600AECF76 /* libuv.a in Frameworks */, 41ABFDF11CBB942D00CC9D71 /* CoreMedia.framework in Frameworks */, 41ABFDEF1CBB93F700CC9D71 /* AVFoundation.framework in Frameworks */, A88EE2121F0A62AF00AECF76 /* libsodium.a in Frameworks */, - A88EE2101F0A62AF00AECF76 /* libssl.a in Frameworks */, A88EE2111F0A62AF00AECF76 /* libuv.a in Frameworks */, 41C346BC1B4C47C9002091F8 /* libMEGASDK.a in Frameworks */, 41F175AA1A51F1C200570E30 /* libsqlite3.dylib in Frameworks */, A88EE20E1F0A62AF00AECF76 /* libcryptopp.a in Frameworks */, 41F175A81A51F1B700570E30 /* libz.dylib in Frameworks */, 41F175A61A51F1AF00570E30 /* libc++.dylib in Frameworks */, - A88EE20D1F0A62AF00AECF76 /* libcrypto.a in Frameworks */, A88EE20C1F0A62AF00AECF76 /* libcares.a in Frameworks */, A88EE20F1F0A62AF00AECF76 /* libcurl.a in Frameworks */, 41F175A41A51F19F00570E30 /* libresolv.dylib in Frameworks */, @@ -281,6 +274,9 @@ 41F175931A51E57C00570E30 /* Frameworks */ = { isa = PBXGroup; children = ( + A8AF6F8D21ECF31E00262474 /* libmediainfo.a */, + A8AF6F8E21ECF31E00262474 /* libzen.a */, + A8AF6F8B21ECF0D800262474 /* librtc_sdk_objc.a */, A88EE2261F0A648600AECF76 /* libcares.a */, A88EE2271F0A648600AECF76 /* libcrypto.a */, A88EE2281F0A648600AECF76 /* libcryptopp.a */, @@ -344,7 +340,7 @@ 41F175681A51E22500570E30 = { CreatedOnToolsVersion = 6.1.1; DevelopmentTeam = T9RH74Y7L9; - LastSwiftMigration = 0830; + LastSwiftMigration = 1010; }; }; }; @@ -517,7 +513,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "nz.mega.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/MEGA/MEGA-Bridging-Header.h"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.2; USER_HEADER_SEARCH_PATHS = "../../../bindings/ios ../../../include"; }; name = Debug; @@ -537,7 +534,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "nz.mega.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/MEGA/MEGA-Bridging-Header.h"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.2; USER_HEADER_SEARCH_PATHS = "../../../bindings/ios ../../../include"; }; name = Release; diff --git a/examples/Swift/MEGA/MEGA/AppDelegate.swift b/examples/Swift/MEGA/MEGA/AppDelegate.swift index baa9c38f70..524a906657 100644 --- a/examples/Swift/MEGA/MEGA/AppDelegate.swift +++ b/examples/Swift/MEGA/MEGA/AppDelegate.swift @@ -27,7 +27,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, MEGARequestDelegate { var window: UIWindow? let megaapi: MEGASdk = MEGASdk(appKey: "iOS Swift/1.0", userAgent: "hNF3ELhK", basePath: nil) - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { MEGASdk.setLogLevel(MEGALogLevel.debug) @@ -71,7 +71,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, MEGARequestDelegate { // MARK: - MEGA Request delegate func onRequestStart(_ api: MEGASdk!, request: MEGARequest!) { - if request.type == MEGARequestType.fetchNodes { + if request.type == MEGARequestType.MEGARequestTypeFetchNodes { SVProgressHUD.show(withStatus: "Updating nodes...") } } @@ -81,7 +81,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, MEGARequestDelegate { return } - if request.type == MEGARequestType.login { + if request.type == MEGARequestType.MEGARequestTypeLogin { megaapi.fetchNodes(with: self) } } diff --git a/examples/Swift/MEGA/MEGA/CloudDrive/CloudDriveTableViewController.swift b/examples/Swift/MEGA/MEGA/CloudDrive/CloudDriveTableViewController.swift index 29a1667645..7e64a6887c 100644 --- a/examples/Swift/MEGA/MEGA/CloudDrive/CloudDriveTableViewController.swift +++ b/examples/Swift/MEGA/MEGA/CloudDrive/CloudDriveTableViewController.swift @@ -171,7 +171,7 @@ class CloudDriveTableViewController: UITableViewController, MEGADelegate, UIActi return 20.0 } - override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { let node = nodes.node(at: indexPath.row) megaapi.remove(node) @@ -217,7 +217,7 @@ class CloudDriveTableViewController: UITableViewController, MEGADelegate, UIActi } else if buttonIndex == 2 { //Upload photo let imagePickerController = UIImagePickerController() imagePickerController.modalPresentationStyle = UIModalPresentationStyle.currentContext - imagePickerController.sourceType = UIImagePickerControllerSourceType.photoLibrary + imagePickerController.sourceType = UIImagePickerController.SourceType.photoLibrary imagePickerController.delegate = self self.tabBarController?.present(imagePickerController, animated: true, completion: nil) @@ -239,15 +239,18 @@ class CloudDriveTableViewController: UITableViewController, MEGADelegate, UIActi } // MARK: - UIImagePickerControllerDelegate - func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { - let assetURL = info[UIImagePickerControllerReferenceURL] as! URL + func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { + // Local variable inserted by Swift 4.2 migrator. + let info = convertFromUIImagePickerControllerInfoKeyDictionary(info) + + let assetURL = info[convertFromUIImagePickerControllerInfoKey(UIImagePickerController.InfoKey.referenceURL)] as! URL let library = ALAssetsLibrary() library.asset(for: assetURL, resultBlock: { (asset: ALAsset!) in let name: String = asset.defaultRepresentation().filename() let modificationTime: Date = asset.value(forProperty: ALAssetPropertyDate) as! Date let imageView = UIImageView() - imageView.image = (info[UIImagePickerControllerOriginalImage] as! UIImage) - let webData: Data = UIImageJPEGRepresentation(imageView.image!, 0.9)! + imageView.image = (info[convertFromUIImagePickerControllerInfoKey(UIImagePickerController.InfoKey.originalImage)] as! UIImage) + let webData: Data = imageView.image!.jpegData(compressionQuality: 0.9)! let localFileURL = URL(fileURLWithPath:NSTemporaryDirectory()); let localFilePath = localFileURL.appendingPathComponent(name) @@ -279,10 +282,10 @@ class CloudDriveTableViewController: UITableViewController, MEGADelegate, UIActi } switch request.type { - case MEGARequestType.fetchNodes: + case MEGARequestType.MEGARequestTypeFetchNodes: SVProgressHUD.dismiss() - case MEGARequestType.getAttrFile: + case MEGARequestType.MEGARequestTypeGetAttrFile: for tableViewCell in tableView.visibleCells as! [NodeTableViewCell] { if request?.nodeHandle == tableViewCell.nodeHandle { let node = megaapi.node(forHandle: request.nodeHandle) @@ -307,3 +310,13 @@ class CloudDriveTableViewController: UITableViewController, MEGADelegate, UIActi } } + +// Helper function inserted by Swift 4.2 migrator. +fileprivate func convertFromUIImagePickerControllerInfoKeyDictionary(_ input: [UIImagePickerController.InfoKey: Any]) -> [String: Any] { + return Dictionary(uniqueKeysWithValues: input.map {key, value in (key.rawValue, value)}) +} + +// Helper function inserted by Swift 4.2 migrator. +fileprivate func convertFromUIImagePickerControllerInfoKey(_ input: UIImagePickerController.InfoKey) -> String { + return input.rawValue +} diff --git a/examples/Swift/MEGA/MEGA/CloudDrive/DetailsNodeInfoViewController.swift b/examples/Swift/MEGA/MEGA/CloudDrive/DetailsNodeInfoViewController.swift index 66793e2be7..060964bdc2 100644 --- a/examples/Swift/MEGA/MEGA/CloudDrive/DetailsNodeInfoViewController.swift +++ b/examples/Swift/MEGA/MEGA/CloudDrive/DetailsNodeInfoViewController.swift @@ -99,7 +99,7 @@ class DetailsNodeInfoViewController: UIViewController, MEGADelegate, UIAlertView downloadProgressView.isHidden = true cancelButton.isHidden = true saveLabel.isHidden = false - downloadButton.setImage(UIImage(named: "savedFile"), for: UIControlState()) + downloadButton.setImage(UIImage(named: "savedFile"), for: UIControl.State()) saveLabel.text = "Saved for offline" } else if megaapi.transfers.size.int32Value > 0 { downloadProgressView.isHidden = true @@ -193,7 +193,7 @@ class DetailsNodeInfoViewController: UIViewController, MEGADelegate, UIAlertView // MARK: - MEGA Request delegate func onRequestStart(_ api: MEGASdk!, request: MEGARequest!) { - if request.type == MEGARequestType.export { + if request.type == MEGARequestType.MEGARequestTypeExport { SVProgressHUD.show(withStatus: "Generate link...") } } @@ -204,7 +204,7 @@ class DetailsNodeInfoViewController: UIViewController, MEGADelegate, UIAlertView } switch request.type { - case MEGARequestType.getAttrFile: + case MEGARequestType.MEGARequestTypeGetAttrFile: if request.nodeHandle == node.handle { let node = megaapi.node(forHandle: request.nodeHandle) let thumbnailFilePath = Helper.pathForNode(node!, path: FileManager.SearchPathDirectory.cachesDirectory, directory: "thumbs") @@ -215,12 +215,12 @@ class DetailsNodeInfoViewController: UIViewController, MEGADelegate, UIAlertView } } - case MEGARequestType.export: + case MEGARequestType.MEGARequestTypeExport: SVProgressHUD.showSuccess(withStatus: "Link Generate") SVProgressHUD.dismiss() let items = [request.link] - let activity : UIActivityViewController = UIActivityViewController(activityItems: items, applicationActivities: nil) - activity.excludedActivityTypes = [UIActivityType.print, UIActivityType.copyToPasteboard, UIActivityType.assignToContact, UIActivityType.saveToCameraRoll] + let activity : UIActivityViewController = UIActivityViewController(activityItems: items as [Any], applicationActivities: nil) + activity.excludedActivityTypes = [UIActivity.ActivityType.print, UIActivity.ActivityType.copyToPasteboard, UIActivity.ActivityType.assignToContact, UIActivity.ActivityType.saveToCameraRoll] self.present(activity, animated: true, completion: nil) default: @@ -261,7 +261,7 @@ class DetailsNodeInfoViewController: UIViewController, MEGADelegate, UIAlertView } else { downloadProgressView.setProgress(1.0, animated: true) saveLabel.isHidden = false - downloadButton.setImage(UIImage(named: "savedFile"), for: UIControlState()) + downloadButton.setImage(UIImage(named: "savedFile"), for: UIControl.State()) saveLabel.text = "Saved for offline" } } diff --git a/examples/Swift/MEGA/MEGA/Contacts/ContactsTableViewController.swift b/examples/Swift/MEGA/MEGA/Contacts/ContactsTableViewController.swift index 5c6ed92db2..5a2f9fec91 100644 --- a/examples/Swift/MEGA/MEGA/Contacts/ContactsTableViewController.swift +++ b/examples/Swift/MEGA/MEGA/Contacts/ContactsTableViewController.swift @@ -96,7 +96,7 @@ class ContactsTableViewController: UITableViewController, MEGARequestDelegate { } switch request.type { - case MEGARequestType.getAttrUser: + case MEGARequestType.MEGARequestTypeGetAttrUser: for tableViewCell in tableView.visibleCells as! [ContactTableViewCell] { if request?.email == tableViewCell.nameLabel.text { let filename = request.email diff --git a/examples/Swift/MEGA/MEGA/Images.xcassets/AppIcon.appiconset/Contents.json b/examples/Swift/MEGA/MEGA/Images.xcassets/AppIcon.appiconset/Contents.json index 609c7491f4..d2fcbbd1a5 100644 --- a/examples/Swift/MEGA/MEGA/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/examples/Swift/MEGA/MEGA/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -48,6 +58,16 @@ "filename" : "icon-60@3x.png", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -108,8 +128,8 @@ "scale" : "2x" }, { - "idiom" : "car", - "size" : "120x120", + "idiom" : "ios-marketing", + "size" : "1024x1024", "scale" : "1x" } ], diff --git a/examples/Swift/MEGA/MEGA/Login/LoginViewController.swift b/examples/Swift/MEGA/MEGA/Login/LoginViewController.swift index 6f7b8c030d..cea4408a6c 100644 --- a/examples/Swift/MEGA/MEGA/Login/LoginViewController.swift +++ b/examples/Swift/MEGA/MEGA/Login/LoginViewController.swift @@ -55,16 +55,16 @@ class LoginViewController: UIViewController, MEGARequestDelegate { func validateForm() -> Bool { if !validateEmail(emailTextField.text!) { - let alertController = UIAlertController(title: "Invalid email", message: "Enter a valid email", preferredStyle: UIAlertControllerStyle.alert) - alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.default,handler: nil)) + let alertController = UIAlertController(title: "Invalid email", message: "Enter a valid email", preferredStyle: UIAlertController.Style.alert) + alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertAction.Style.default,handler: nil)) self.present(alertController, animated: true, completion: nil) emailTextField.becomeFirstResponder() return false } else if !validatePassword(passwordTextField.text!) { - let alertController = UIAlertController(title: "Invalid password", message: "Enter a valid password", preferredStyle: UIAlertControllerStyle.alert) - alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.default,handler: nil)) + let alertController = UIAlertController(title: "Invalid password", message: "Enter a valid password", preferredStyle: UIAlertController.Style.alert) + alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertAction.Style.default,handler: nil)) self.present(alertController, animated: true, completion: nil) passwordTextField.becomeFirstResponder() @@ -89,7 +89,7 @@ class LoginViewController: UIViewController, MEGARequestDelegate { // MARK: - MEGA Request delegate func onRequestStart(_ api: MEGASdk!, request: MEGARequest!) { - if request.type == MEGARequestType.login { + if request.type == MEGARequestType.MEGARequestTypeLogin { loginButton.isEnabled = false loginProgressView.isHidden = false } @@ -104,13 +104,13 @@ class LoginViewController: UIViewController, MEGARequestDelegate { switch error.type { case MEGAErrorType.apiEArgs: - let alertController = UIAlertController(title: "Error", message: "Email or password invalid", preferredStyle: UIAlertControllerStyle.alert) - alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.default,handler: nil)) + let alertController = UIAlertController(title: "Error", message: "Email or password invalid", preferredStyle: UIAlertController.Style.alert) + alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertAction.Style.default,handler: nil)) self.present(alertController, animated: true, completion: nil) case MEGAErrorType.apiENoent: - let alertController = UIAlertController(title: "Error", message: "User does not exist", preferredStyle: UIAlertControllerStyle.alert) - alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.default,handler: nil)) + let alertController = UIAlertController(title: "Error", message: "User does not exist", preferredStyle: UIAlertController.Style.alert) + alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertAction.Style.default,handler: nil)) self.present(alertController, animated: true, completion: nil) default: @@ -121,12 +121,12 @@ class LoginViewController: UIViewController, MEGARequestDelegate { } switch request.type { - case MEGARequestType.login: + case MEGARequestType.MEGARequestTypeLogin: let session = megaapi.dumpSession() SSKeychain.setPassword(session, forService: "MEGA", account: "session") api.fetchNodes(with: self) - case MEGARequestType.fetchNodes: + case MEGARequestType.MEGARequestTypeFetchNodes: self.performSegue(withIdentifier: "showCloudDrive", sender: self) default: @@ -135,7 +135,7 @@ class LoginViewController: UIViewController, MEGARequestDelegate { } func onRequestUpdate(_ api: MEGASdk!, request: MEGARequest!) { - if request.type == MEGARequestType.fetchNodes { + if request.type == MEGARequestType.MEGARequestTypeFetchNodes { let progress = request.transferredBytes.floatValue / request.totalBytes.floatValue if progress > 0 && progress < 0.99 { informationLabel.text = "Fectching nodes" diff --git a/examples/Swift/MEGA/MEGA/Settings/SettingsViewController.swift b/examples/Swift/MEGA/MEGA/Settings/SettingsViewController.swift index ac5c877480..9922ed5000 100644 --- a/examples/Swift/MEGA/MEGA/Settings/SettingsViewController.swift +++ b/examples/Swift/MEGA/MEGA/Settings/SettingsViewController.swift @@ -67,7 +67,7 @@ class SettingsViewController: UIViewController, MEGARequestDelegate { // MARK: - MEGA Request delegate func onRequestStart(_ api: MEGASdk!, request: MEGARequest!) { - if request.type == MEGARequestType.logout { + if request.type == MEGARequestType.MEGARequestTypeLogout { SVProgressHUD.show(withStatus: "Logout") } } @@ -78,7 +78,7 @@ class SettingsViewController: UIViewController, MEGARequestDelegate { } switch request.type { - case MEGARequestType.logout: + case MEGARequestType.MEGARequestTypeLogout: SSKeychain.deletePassword(forService: "MEGA", account: "session") let thumbsURL = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0] @@ -94,7 +94,7 @@ class SettingsViewController: UIViewController, MEGARequestDelegate { success = false } if (!success || error != nil) { - print("(Cache) Remove file error: \(error)") + print("(Cache) Remove file error: \(error!)") } let documentDirectory : String = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true)[0] @@ -106,7 +106,7 @@ class SettingsViewController: UIViewController, MEGARequestDelegate { success = false } if (!success || error != nil) { - print("(Document) Remove file error: \(error)") + print("(Document) Remove file error: \(error!)") } SVProgressHUD.dismiss() @@ -114,10 +114,10 @@ class SettingsViewController: UIViewController, MEGARequestDelegate { let lvc = storyboard.instantiateViewController(withIdentifier: "LoginViewControllerID") as! LoginViewController present(lvc, animated: true, completion: nil) - case MEGARequestType.getAttrUser: + case MEGARequestType.MEGARequestTypeGetAttrUser: setUserAvatar() - case MEGARequestType.accountDetails: + case MEGARequestType.MEGARequestTypeAccountDetails: spaceUsedLabel.text = "\(ByteCountFormatter.string(fromByteCount: request.megaAccountDetails.storageUsed.int64Value, countStyle: ByteCountFormatter.CountStyle.memory)) of \(ByteCountFormatter.string(fromByteCount: request.megaAccountDetails.storageMax.int64Value, countStyle: ByteCountFormatter.CountStyle.memory))" let progress = request.megaAccountDetails.storageUsed.floatValue / request.megaAccountDetails.storageMax.floatValue spaceUsedProgressView.setProgress(progress, animated: true) diff --git a/examples/Swift/MEGA/MEGA/Utils/Helper.swift b/examples/Swift/MEGA/MEGA/Utils/Helper.swift index e2ea56a36e..983a5917f2 100644 --- a/examples/Swift/MEGA/MEGA/Utils/Helper.swift +++ b/examples/Swift/MEGA/MEGA/Utils/Helper.swift @@ -197,13 +197,10 @@ class Helper { } - class func imageForNode(_ node : MEGANode) -> UIImage { - - let megaapi : MEGASdk! = (UIApplication.shared.delegate as! AppDelegate).megaapi - + class func imageForNode(_ node : MEGANode) -> UIImage { switch node.type { case MEGANodeType.folder: - if megaapi.isSharedNode(node) { + if node.isInShare() { return UIImage(named: "folder_shared")! } else { return UIImage(named: "folder")! From 26ffdb016d90ac5e4c422013b244b6d2d786bcb3 Mon Sep 17 00:00:00 2001 From: Javier Navarro Date: Mon, 14 Jan 2019 20:02:20 +0100 Subject: [PATCH 40/53] Fix compilation for Objective-C demo Update readme for Objective-C and Swift demo Update libraries used in Swift demo --- .../Swift/MEGA/MEGA.xcodeproj/project.pbxproj | 130 ++++++++---------- examples/Swift/README.md | 2 +- .../iOS/Demo/Demo.xcodeproj/project.pbxproj | 85 +++++++++--- examples/iOS/Demo/Demo/Info.plist | 2 +- .../iOS/Demo/Demo/Login/LoginViewController.m | 5 +- examples/iOS/Demo/Demo/Utils/Helper.m | 2 +- .../MWPhotoBrowser.xcodeproj/project.pbxproj | 42 +++++- examples/iOS/README.md | 2 +- 8 files changed, 163 insertions(+), 107 deletions(-) diff --git a/examples/Swift/MEGA/MEGA.xcodeproj/project.pbxproj b/examples/Swift/MEGA/MEGA.xcodeproj/project.pbxproj index 29cd27e51c..329dde571b 100644 --- a/examples/Swift/MEGA/MEGA.xcodeproj/project.pbxproj +++ b/examples/Swift/MEGA/MEGA.xcodeproj/project.pbxproj @@ -24,7 +24,6 @@ 41ABFDF11CBB942D00CC9D71 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41ABFDF01CBB942D00CC9D71 /* CoreMedia.framework */; }; 41B4A5B51A5E94B8008B6E73 /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B4A5B41A5E94B8008B6E73 /* Helper.swift */; }; 41B4A5BA1A5EF067008B6E73 /* DetailsNodeInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B4A5B91A5EF067008B6E73 /* DetailsNodeInfoViewController.swift */; }; - 41C346BC1B4C47C9002091F8 /* libMEGASDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 41C346BB1B4C47C9002091F8 /* libMEGASDK.a */; }; 41C6A0441A5FD13300865971 /* Offline.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 41C6A0431A5FD13300865971 /* Offline.storyboard */; }; 41C6A0461A5FD15B00865971 /* OfflineTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41C6A0451A5FD15B00865971 /* OfflineTableViewController.swift */; }; 41C6A0491A5FF8CC00865971 /* Settings.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 41C6A0481A5FF8CC00865971 /* Settings.storyboard */; }; @@ -34,19 +33,20 @@ 41F175791A51E22500570E30 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 41F175771A51E22500570E30 /* LaunchScreen.xib */; }; 41F175A01A51F17E00570E30 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41F1759F1A51F17E00570E30 /* ImageIO.framework */; }; 41F175A21A51F18B00570E30 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41F175A11A51F18B00570E30 /* MobileCoreServices.framework */; }; - 41F175A41A51F19F00570E30 /* libresolv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41F175A31A51F19F00570E30 /* libresolv.dylib */; }; - 41F175A61A51F1AF00570E30 /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41F175A51A51F1AF00570E30 /* libc++.dylib */; }; - 41F175A81A51F1B700570E30 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41F175A71A51F1B700570E30 /* libz.dylib */; }; - 41F175AA1A51F1C200570E30 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41F175A91A51F1C200570E30 /* libsqlite3.dylib */; }; - A88EE20C1F0A62AF00AECF76 /* libcares.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2051F0A62AF00AECF76 /* libcares.a */; }; - A88EE20E1F0A62AF00AECF76 /* libcryptopp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2071F0A62AF00AECF76 /* libcryptopp.a */; }; - A88EE20F1F0A62AF00AECF76 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2081F0A62AF00AECF76 /* libcurl.a */; }; - A88EE2111F0A62AF00AECF76 /* libuv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE20A1F0A62AF00AECF76 /* libuv.a */; }; - A88EE2121F0A62AF00AECF76 /* libsodium.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE20B1F0A62AF00AECF76 /* libsodium.a */; }; - A88EE2311F0A648600AECF76 /* libsodium.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE22A1F0A648600AECF76 /* libsodium.a */; }; - A8AF6F8C21ECF0D800262474 /* librtc_sdk_objc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8AF6F8B21ECF0D800262474 /* librtc_sdk_objc.a */; }; - A8AF6F8F21ECF31E00262474 /* libmediainfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8AF6F8D21ECF31E00262474 /* libmediainfo.a */; }; - A8AF6F9021ECF31E00262474 /* libzen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8AF6F8E21ECF31E00262474 /* libzen.a */; }; + A8BF109621ED0BD8006B283A /* libsodium.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF108D21ED0BD7006B283A /* libsodium.a */; }; + A8BF109721ED0BD8006B283A /* libuv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF108E21ED0BD7006B283A /* libuv.a */; }; + A8BF109821ED0BD8006B283A /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF108F21ED0BD7006B283A /* libcrypto.a */; }; + A8BF109921ED0BD8006B283A /* libcryptopp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF109021ED0BD7006B283A /* libcryptopp.a */; }; + A8BF109A21ED0BD8006B283A /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF109121ED0BD8006B283A /* libcurl.a */; }; + A8BF109B21ED0BD8006B283A /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF109221ED0BD8006B283A /* libssl.a */; }; + A8BF109C21ED0BD8006B283A /* libzen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF109321ED0BD8006B283A /* libzen.a */; }; + A8BF109D21ED0BD8006B283A /* libmediainfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF109421ED0BD8006B283A /* libmediainfo.a */; }; + A8BF109E21ED0BD8006B283A /* libcares.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF109521ED0BD8006B283A /* libcares.a */; }; + A8BF10A021ED0BF7006B283A /* libMEGASDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF109F21ED0BF7006B283A /* libMEGASDK.a */; }; + A8BF10A221ED0CF9006B283A /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF10A121ED0CF9006B283A /* libc++.tbd */; }; + A8BF10A421ED0D04006B283A /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF10A321ED0D04006B283A /* libsqlite3.tbd */; }; + A8BF10A621ED0D0D006B283A /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF10A521ED0D0D006B283A /* libz.tbd */; }; + A8BF10A821ED0D15006B283A /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF10A721ED0D15006B283A /* libresolv.tbd */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -71,7 +71,6 @@ 41ABFDF01CBB942D00CC9D71 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 41B4A5B41A5E94B8008B6E73 /* Helper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Helper.swift; sourceTree = ""; }; 41B4A5B91A5EF067008B6E73 /* DetailsNodeInfoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DetailsNodeInfoViewController.swift; path = ../CloudDrive/DetailsNodeInfoViewController.swift; sourceTree = ""; }; - 41C346BB1B4C47C9002091F8 /* libMEGASDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libMEGASDK.a; path = "../../../bindings/ios/build/Debug-iphoneos/libMEGASDK.a"; sourceTree = ""; }; 41C6A0431A5FD13300865971 /* Offline.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Offline.storyboard; sourceTree = ""; }; 41C6A0451A5FD15B00865971 /* OfflineTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OfflineTableViewController.swift; sourceTree = ""; }; 41C6A0481A5FF8CC00865971 /* Settings.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Settings.storyboard; sourceTree = ""; }; @@ -81,31 +80,23 @@ 41F1756E1A51E22500570E30 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 41F175751A51E22500570E30 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41F175781A51E22500570E30 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 41F175901A51E3A500570E30 /* libmega.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmega.a; path = "../../../bindings/ios/build/Debug-iphoneos/libmega.a"; sourceTree = ""; }; 41F175941A51E5E500570E30 /* MEGA-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MEGA-Bridging-Header.h"; sourceTree = ""; }; 41F1759F1A51F17E00570E30 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; 41F175A11A51F18B00570E30 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; - 41F175A31A51F19F00570E30 /* libresolv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libresolv.dylib; path = usr/lib/libresolv.dylib; sourceTree = SDKROOT; }; - 41F175A51A51F1AF00570E30 /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "usr/lib/libc++.dylib"; sourceTree = SDKROOT; }; - 41F175A71A51F1B700570E30 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; - 41F175A91A51F1C200570E30 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; - A88EE2051F0A62AF00AECF76 /* libcares.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcares.a; sourceTree = ""; }; - A88EE2061F0A62AF00AECF76 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcrypto.a; sourceTree = ""; }; - A88EE2071F0A62AF00AECF76 /* libcryptopp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcryptopp.a; sourceTree = ""; }; - A88EE2081F0A62AF00AECF76 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcurl.a; sourceTree = ""; }; - A88EE2091F0A62AF00AECF76 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libssl.a; sourceTree = ""; }; - A88EE20A1F0A62AF00AECF76 /* libuv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libuv.a; sourceTree = ""; }; - A88EE20B1F0A62AF00AECF76 /* libsodium.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libsodium.a; sourceTree = ""; }; - A88EE2261F0A648600AECF76 /* libcares.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcares.a; path = ../../../bindings/ios/3rdparty/lib/libcares.a; sourceTree = ""; }; - A88EE2271F0A648600AECF76 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = ../../../bindings/ios/3rdparty/lib/libcrypto.a; sourceTree = ""; }; - A88EE2281F0A648600AECF76 /* libcryptopp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcryptopp.a; path = ../../../bindings/ios/3rdparty/lib/libcryptopp.a; sourceTree = ""; }; - A88EE2291F0A648600AECF76 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../../bindings/ios/3rdparty/lib/libcurl.a; sourceTree = ""; }; - A88EE22A1F0A648600AECF76 /* libsodium.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsodium.a; path = ../../../bindings/ios/3rdparty/lib/libsodium.a; sourceTree = ""; }; - A88EE22B1F0A648600AECF76 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = ../../../bindings/ios/3rdparty/lib/libssl.a; sourceTree = ""; }; - A88EE22C1F0A648600AECF76 /* libuv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuv.a; path = ../../../bindings/ios/3rdparty/lib/libuv.a; sourceTree = ""; }; - A8AF6F8B21ECF0D800262474 /* librtc_sdk_objc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = librtc_sdk_objc.a; path = ../../../bindings/ios/3rdparty/lib/librtc_sdk_objc.a; sourceTree = ""; }; - A8AF6F8D21ECF31E00262474 /* libmediainfo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmediainfo.a; path = ../../../bindings/ios/3rdparty/lib/libmediainfo.a; sourceTree = ""; }; - A8AF6F8E21ECF31E00262474 /* libzen.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzen.a; path = ../../../bindings/ios/3rdparty/lib/libzen.a; sourceTree = ""; }; + A8BF108D21ED0BD7006B283A /* libsodium.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsodium.a; path = ../../../bindings/ios/3rdparty/lib/libsodium.a; sourceTree = ""; }; + A8BF108E21ED0BD7006B283A /* libuv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuv.a; path = ../../../bindings/ios/3rdparty/lib/libuv.a; sourceTree = ""; }; + A8BF108F21ED0BD7006B283A /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = ../../../bindings/ios/3rdparty/lib/libcrypto.a; sourceTree = ""; }; + A8BF109021ED0BD7006B283A /* libcryptopp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcryptopp.a; path = ../../../bindings/ios/3rdparty/lib/libcryptopp.a; sourceTree = ""; }; + A8BF109121ED0BD8006B283A /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../../bindings/ios/3rdparty/lib/libcurl.a; sourceTree = ""; }; + A8BF109221ED0BD8006B283A /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = ../../../bindings/ios/3rdparty/lib/libssl.a; sourceTree = ""; }; + A8BF109321ED0BD8006B283A /* libzen.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzen.a; path = ../../../bindings/ios/3rdparty/lib/libzen.a; sourceTree = ""; }; + A8BF109421ED0BD8006B283A /* libmediainfo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmediainfo.a; path = ../../../bindings/ios/3rdparty/lib/libmediainfo.a; sourceTree = ""; }; + A8BF109521ED0BD8006B283A /* libcares.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcares.a; path = ../../../bindings/ios/3rdparty/lib/libcares.a; sourceTree = ""; }; + A8BF109F21ED0BF7006B283A /* libMEGASDK.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libMEGASDK.a; sourceTree = BUILT_PRODUCTS_DIR; }; + A8BF10A121ED0CF9006B283A /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; + A8BF10A321ED0D04006B283A /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; + A8BF10A521ED0D0D006B283A /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + A8BF10A721ED0D15006B283A /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -113,22 +104,22 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A8AF6F8F21ECF31E00262474 /* libmediainfo.a in Frameworks */, - A8AF6F9021ECF31E00262474 /* libzen.a in Frameworks */, - A8AF6F8C21ECF0D800262474 /* librtc_sdk_objc.a in Frameworks */, - A88EE2311F0A648600AECF76 /* libsodium.a in Frameworks */, + A8BF10A821ED0D15006B283A /* libresolv.tbd in Frameworks */, + A8BF10A621ED0D0D006B283A /* libz.tbd in Frameworks */, + A8BF10A421ED0D04006B283A /* libsqlite3.tbd in Frameworks */, + A8BF10A221ED0CF9006B283A /* libc++.tbd in Frameworks */, + A8BF10A021ED0BF7006B283A /* libMEGASDK.a in Frameworks */, + A8BF109621ED0BD8006B283A /* libsodium.a in Frameworks */, + A8BF109721ED0BD8006B283A /* libuv.a in Frameworks */, + A8BF109821ED0BD8006B283A /* libcrypto.a in Frameworks */, + A8BF109921ED0BD8006B283A /* libcryptopp.a in Frameworks */, + A8BF109A21ED0BD8006B283A /* libcurl.a in Frameworks */, + A8BF109B21ED0BD8006B283A /* libssl.a in Frameworks */, + A8BF109C21ED0BD8006B283A /* libzen.a in Frameworks */, + A8BF109D21ED0BD8006B283A /* libmediainfo.a in Frameworks */, + A8BF109E21ED0BD8006B283A /* libcares.a in Frameworks */, 41ABFDF11CBB942D00CC9D71 /* CoreMedia.framework in Frameworks */, 41ABFDEF1CBB93F700CC9D71 /* AVFoundation.framework in Frameworks */, - A88EE2121F0A62AF00AECF76 /* libsodium.a in Frameworks */, - A88EE2111F0A62AF00AECF76 /* libuv.a in Frameworks */, - 41C346BC1B4C47C9002091F8 /* libMEGASDK.a in Frameworks */, - 41F175AA1A51F1C200570E30 /* libsqlite3.dylib in Frameworks */, - A88EE20E1F0A62AF00AECF76 /* libcryptopp.a in Frameworks */, - 41F175A81A51F1B700570E30 /* libz.dylib in Frameworks */, - 41F175A61A51F1AF00570E30 /* libc++.dylib in Frameworks */, - A88EE20C1F0A62AF00AECF76 /* libcares.a in Frameworks */, - A88EE20F1F0A62AF00AECF76 /* libcurl.a in Frameworks */, - 41F175A41A51F19F00570E30 /* libresolv.dylib in Frameworks */, 41F175A21A51F18B00570E30 /* MobileCoreServices.framework in Frameworks */, 41F175A01A51F17E00570E30 /* ImageIO.framework in Frameworks */, ); @@ -274,33 +265,24 @@ 41F175931A51E57C00570E30 /* Frameworks */ = { isa = PBXGroup; children = ( - A8AF6F8D21ECF31E00262474 /* libmediainfo.a */, - A8AF6F8E21ECF31E00262474 /* libzen.a */, - A8AF6F8B21ECF0D800262474 /* librtc_sdk_objc.a */, - A88EE2261F0A648600AECF76 /* libcares.a */, - A88EE2271F0A648600AECF76 /* libcrypto.a */, - A88EE2281F0A648600AECF76 /* libcryptopp.a */, - A88EE2291F0A648600AECF76 /* libcurl.a */, - A88EE22A1F0A648600AECF76 /* libsodium.a */, - A88EE22B1F0A648600AECF76 /* libssl.a */, - A88EE22C1F0A648600AECF76 /* libuv.a */, - A88EE2051F0A62AF00AECF76 /* libcares.a */, - A88EE2061F0A62AF00AECF76 /* libcrypto.a */, - A88EE2071F0A62AF00AECF76 /* libcryptopp.a */, - A88EE2081F0A62AF00AECF76 /* libcurl.a */, - A88EE2091F0A62AF00AECF76 /* libssl.a */, - A88EE20A1F0A62AF00AECF76 /* libuv.a */, - A88EE20B1F0A62AF00AECF76 /* libsodium.a */, + A8BF10A721ED0D15006B283A /* libresolv.tbd */, + A8BF10A521ED0D0D006B283A /* libz.tbd */, + A8BF10A321ED0D04006B283A /* libsqlite3.tbd */, + A8BF10A121ED0CF9006B283A /* libc++.tbd */, + A8BF109F21ED0BF7006B283A /* libMEGASDK.a */, + A8BF109521ED0BD8006B283A /* libcares.a */, + A8BF108F21ED0BD7006B283A /* libcrypto.a */, + A8BF109021ED0BD7006B283A /* libcryptopp.a */, + A8BF109121ED0BD8006B283A /* libcurl.a */, + A8BF109421ED0BD8006B283A /* libmediainfo.a */, + A8BF108D21ED0BD7006B283A /* libsodium.a */, + A8BF109221ED0BD8006B283A /* libssl.a */, + A8BF108E21ED0BD7006B283A /* libuv.a */, + A8BF109321ED0BD8006B283A /* libzen.a */, 41ABFDF01CBB942D00CC9D71 /* CoreMedia.framework */, 41ABFDEE1CBB93F700CC9D71 /* AVFoundation.framework */, - 41C346BB1B4C47C9002091F8 /* libMEGASDK.a */, - 41F175A91A51F1C200570E30 /* libsqlite3.dylib */, - 41F175A71A51F1B700570E30 /* libz.dylib */, - 41F175A51A51F1AF00570E30 /* libc++.dylib */, - 41F175A31A51F19F00570E30 /* libresolv.dylib */, 41F175A11A51F18B00570E30 /* MobileCoreServices.framework */, 41F1759F1A51F17E00570E30 /* ImageIO.framework */, - 41F175901A51E3A500570E30 /* libmega.a */, ); name = Frameworks; sourceTree = ""; diff --git a/examples/Swift/README.md b/examples/Swift/README.md index 17a9a4850c..40ac44d5aa 100644 --- a/examples/Swift/README.md +++ b/examples/Swift/README.md @@ -27,7 +27,7 @@ To build and run the project, follow theses steps: 1. Download or clone the whole SDK -2. Download the prebuilt third party dependencies from this link: https://mega.nz/#!YIdnRKSR!UIOuMq_h8A5CHwt7OX_THnyZ_OR1eS_cPmiwm8yxsb0 +2. Download the prebuilt third party dependencies from this link: https://mega.nz/#!gN9w0I7Q!-OPUWBoEnvXeZWkkC5oUho2MFm_49nwBwN6q07sxKII 3. Uncompress the content and move `include`and `lib`to the directory `sdk/bindings/ios/3rdparty` diff --git a/examples/iOS/Demo/Demo.xcodeproj/project.pbxproj b/examples/iOS/Demo/Demo.xcodeproj/project.pbxproj index e76edde3ac..2075528b44 100644 --- a/examples/iOS/Demo/Demo.xcodeproj/project.pbxproj +++ b/examples/iOS/Demo/Demo.xcodeproj/project.pbxproj @@ -39,16 +39,20 @@ 41C681F31A23658C0088F2E6 /* MEGASdkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 41C681F21A23658C0088F2E6 /* MEGASdkManager.m */; }; 41D4EADD19EED5270097C00F /* libresolv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41D4EADC19EED5270097C00F /* libresolv.dylib */; }; 943D11F91A25F25100318442 /* MEGAphoto.m in Sources */ = {isa = PBXBuildFile; fileRef = 943D11F81A25F25100318442 /* MEGAphoto.m */; }; - A88EE21B1F0A63B600AECF76 /* libcares.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2151F0A63B600AECF76 /* libcares.a */; }; - A88EE21C1F0A63B600AECF76 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2161F0A63B600AECF76 /* libcrypto.a */; }; - A88EE21D1F0A63B600AECF76 /* libcryptopp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2171F0A63B600AECF76 /* libcryptopp.a */; }; - A88EE21E1F0A63B600AECF76 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2181F0A63B600AECF76 /* libcurl.a */; }; - A88EE21F1F0A63B600AECF76 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2191F0A63B600AECF76 /* libssl.a */; }; - A88EE2201F0A63B600AECF76 /* libuv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE21A1F0A63B600AECF76 /* libuv.a */; }; A88EE2211F0A63FB00AECF76 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41AB68FD1A094459003FE608 /* ImageIO.framework */; }; A88EE2221F0A641400AECF76 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41AB68F91A0943FE003FE608 /* MobileCoreServices.framework */; }; - A88EE2241F0A642300AECF76 /* libsodium.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2231F0A642300AECF76 /* libsodium.a */; }; A88EE2251F0A642F00AECF76 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41ACFBC61A1155AC00905ACF /* MapKit.framework */; }; + A8BF10C121ED1114006B283A /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF10C021ED1114006B283A /* AVFoundation.framework */; }; + A8BF10C321ED111A006B283A /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF10C221ED1119006B283A /* CoreMedia.framework */; }; + A8BF10C421ED1175006B283A /* libcares.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2151F0A63B600AECF76 /* libcares.a */; }; + A8BF10C521ED1175006B283A /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2161F0A63B600AECF76 /* libcrypto.a */; }; + A8BF10C621ED1175006B283A /* libcryptopp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2171F0A63B600AECF76 /* libcryptopp.a */; }; + A8BF10C721ED1175006B283A /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2181F0A63B600AECF76 /* libcurl.a */; }; + A8BF10C821ED1175006B283A /* libmediainfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF10BD21ED10E5006B283A /* libmediainfo.a */; }; + A8BF10C921ED1175006B283A /* libsodium.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2231F0A642300AECF76 /* libsodium.a */; }; + A8BF10CA21ED1175006B283A /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE2191F0A63B600AECF76 /* libssl.a */; }; + A8BF10CB21ED1175006B283A /* libuv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A88EE21A1F0A63B600AECF76 /* libuv.a */; }; + A8BF10CC21ED1175006B283A /* libzen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8BF10BB21ED10E5006B283A /* libzen.a */; }; E80D15911A236C7100148421 /* Helper.m in Sources */ = {isa = PBXBuildFile; fileRef = E80D15901A236C7100148421 /* Helper.m */; }; /* End PBXBuildFile section */ @@ -124,6 +128,10 @@ A88EE2191F0A63B600AECF76 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = ../../../bindings/ios/3rdparty/lib/libssl.a; sourceTree = ""; }; A88EE21A1F0A63B600AECF76 /* libuv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuv.a; path = ../../../bindings/ios/3rdparty/lib/libuv.a; sourceTree = ""; }; A88EE2231F0A642300AECF76 /* libsodium.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsodium.a; path = ../../../bindings/ios/3rdparty/lib/libsodium.a; sourceTree = ""; }; + A8BF10BB21ED10E5006B283A /* libzen.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzen.a; path = ../../../bindings/ios/3rdparty/lib/libzen.a; sourceTree = ""; }; + A8BF10BD21ED10E5006B283A /* libmediainfo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmediainfo.a; path = ../../../bindings/ios/3rdparty/lib/libmediainfo.a; sourceTree = ""; }; + A8BF10C021ED1114006B283A /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + A8BF10C221ED1119006B283A /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; E80D158F1A236C7100148421 /* Helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Helper.h; sourceTree = ""; }; E80D15901A236C7100148421 /* Helper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Helper.m; sourceTree = ""; }; E85477501A24944900C848F8 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Main.strings; sourceTree = ""; }; @@ -137,16 +145,20 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + A8BF10C421ED1175006B283A /* libcares.a in Frameworks */, + A8BF10C521ED1175006B283A /* libcrypto.a in Frameworks */, + A8BF10C621ED1175006B283A /* libcryptopp.a in Frameworks */, + A8BF10C721ED1175006B283A /* libcurl.a in Frameworks */, + A8BF10C821ED1175006B283A /* libmediainfo.a in Frameworks */, + A8BF10C921ED1175006B283A /* libsodium.a in Frameworks */, + A8BF10CA21ED1175006B283A /* libssl.a in Frameworks */, + A8BF10CB21ED1175006B283A /* libuv.a in Frameworks */, + A8BF10CC21ED1175006B283A /* libzen.a in Frameworks */, + A8BF10C321ED111A006B283A /* CoreMedia.framework in Frameworks */, + A8BF10C121ED1114006B283A /* AVFoundation.framework in Frameworks */, A88EE2251F0A642F00AECF76 /* MapKit.framework in Frameworks */, - A88EE2241F0A642300AECF76 /* libsodium.a in Frameworks */, A88EE2221F0A641400AECF76 /* MobileCoreServices.framework in Frameworks */, A88EE2211F0A63FB00AECF76 /* ImageIO.framework in Frameworks */, - A88EE21B1F0A63B600AECF76 /* libcares.a in Frameworks */, - A88EE21C1F0A63B600AECF76 /* libcrypto.a in Frameworks */, - A88EE21D1F0A63B600AECF76 /* libcryptopp.a in Frameworks */, - A88EE21E1F0A63B600AECF76 /* libcurl.a in Frameworks */, - A88EE21F1F0A63B600AECF76 /* libssl.a in Frameworks */, - A88EE2201F0A63B600AECF76 /* libuv.a in Frameworks */, 414295FB1B13399800639A20 /* libMEGASDK.a in Frameworks */, 4135AEA819F58ED700A8A56A /* libMWPhotoBrowser.a in Frameworks */, 41D4EADD19EED5270097C00F /* libresolv.dylib in Frameworks */, @@ -225,6 +237,10 @@ 4168129C19EE6E6D00C72800 /* Frameworks */ = { isa = PBXGroup; children = ( + A8BF10C221ED1119006B283A /* CoreMedia.framework */, + A8BF10C021ED1114006B283A /* AVFoundation.framework */, + A8BF10BD21ED10E5006B283A /* libmediainfo.a */, + A8BF10BB21ED10E5006B283A /* libzen.a */, A88EE2231F0A642300AECF76 /* libsodium.a */, A88EE2151F0A63B600AECF76 /* libcares.a */, A88EE2161F0A63B600AECF76 /* libcrypto.a */, @@ -375,7 +391,7 @@ isa = PBXProject; attributes = { CLASSPREFIX = ""; - LastUpgradeCheck = 0600; + LastUpgradeCheck = 1010; ORGANIZATIONNAME = MEGA; TargetAttributes = { 4168127019EE6E5700C72800 = { @@ -534,25 +550,38 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -565,7 +594,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -576,17 +605,28 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -595,13 +635,14 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; @@ -615,13 +656,14 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; INFOPLIST_FILE = Demo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/../../../bindings/ios/3rdparty/lib", ); - OTHER_LDFLAGS = "-ObjC"; + OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = "MEGA.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; USER_HEADER_SEARCH_PATHS = "../../../bindings/ios ../../../include/** Demo/vendor/MWPhotoBrowser/**"; @@ -635,13 +677,14 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; INFOPLIST_FILE = Demo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/../../../bindings/ios/3rdparty/lib", ); - OTHER_LDFLAGS = "-ObjC"; + OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = "MEGA.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; USER_HEADER_SEARCH_PATHS = "../../../bindings/ios ../../../include/** Demo/vendor/MWPhotoBrowser/**"; diff --git a/examples/iOS/Demo/Demo/Info.plist b/examples/iOS/Demo/Demo/Info.plist index 2cda3bbca3..993496b977 100644 --- a/examples/iOS/Demo/Demo/Info.plist +++ b/examples/iOS/Demo/Demo/Info.plist @@ -5,7 +5,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - MEGA.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleLocalizations diff --git a/examples/iOS/Demo/Demo/Login/LoginViewController.m b/examples/iOS/Demo/Demo/Login/LoginViewController.m index 779a0dd230..009a9e9478 100644 --- a/examples/iOS/Demo/Demo/Login/LoginViewController.m +++ b/examples/iOS/Demo/Demo/Login/LoginViewController.m @@ -53,10 +53,7 @@ - (IBAction)tapLogin:(id)sender { } - (void)generateKeys { - NSString *privateKey = [[MEGASdkManager sharedMEGASdk] base64pwkeyForPassword:self.passwordTextField.text]; - NSString *publicKey = [[MEGASdkManager sharedMEGASdk] hashForBase64pwkey:privateKey email:self.emailTextField.text]; - - [[MEGASdkManager sharedMEGASdk] fastLoginWithEmail:self.emailTextField.text stringHash:publicKey base64pwKey:privateKey delegate:self]; + [[MEGASdkManager sharedMEGASdk] loginWithEmail:self.emailTextField.text password:self.passwordTextField.text delegate:self]; } - (BOOL)validateForm { diff --git a/examples/iOS/Demo/Demo/Utils/Helper.m b/examples/iOS/Demo/Demo/Utils/Helper.m index 8ff2b0e0c6..c1bc7a8b7b 100644 --- a/examples/iOS/Demo/Demo/Utils/Helper.m +++ b/examples/iOS/Demo/Demo/Utils/Helper.m @@ -181,7 +181,7 @@ + (UIImage *)imageForNode:(MEGANode *)node { switch (nodeType) { case MEGANodeTypeFolder: { - if ([[MEGASdkManager sharedMEGASdk] isSharedNode:node]) + if (node.isInShare) return [UIImage imageNamed:@"folder_shared"]; else return [UIImage imageNamed:@"folder"]; diff --git a/examples/iOS/Demo/Demo/vendor/MWPhotoBrowser/MWPhotoBrowser.xcodeproj/project.pbxproj b/examples/iOS/Demo/Demo/vendor/MWPhotoBrowser/MWPhotoBrowser.xcodeproj/project.pbxproj index 3e43c93e06..f410e248c3 100644 --- a/examples/iOS/Demo/Demo/vendor/MWPhotoBrowser/MWPhotoBrowser.xcodeproj/project.pbxproj +++ b/examples/iOS/Demo/Demo/vendor/MWPhotoBrowser/MWPhotoBrowser.xcodeproj/project.pbxproj @@ -475,7 +475,7 @@ 4C6F96BB14AF704100F8389A /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 1010; }; buildConfigurationList = 4C6F96BE14AF704100F8389A /* Build configuration list for PBXProject "MWPhotoBrowser" */; compatibilityVersion = "Xcode 3.2"; @@ -548,16 +548,27 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; @@ -566,7 +577,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; @@ -588,17 +599,29 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -613,7 +636,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -623,16 +646,27 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; @@ -641,7 +675,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; diff --git a/examples/iOS/README.md b/examples/iOS/README.md index 93aac7f9f1..44a81bbe3a 100644 --- a/examples/iOS/README.md +++ b/examples/iOS/README.md @@ -27,7 +27,7 @@ To build and run the project, follow theses steps: 1. Download or clone the whole SDK -2. Download the prebuilt third party dependencies from this link: https://mega.nz/#!YIdnRKSR!UIOuMq_h8A5CHwt7OX_THnyZ_OR1eS_cPmiwm8yxsb0 +2. Download the prebuilt third party dependencies from this link: https://mega.nz/#!gN9w0I7Q!-OPUWBoEnvXeZWkkC5oUho2MFm_49nwBwN6q07sxKII 3. Uncompress the content and move `include`and `lib`to the directory `sdk/bindings/ios/3rdparty` From 1d32351be44c8a9f5e0ac1193b0c7d51299b448e Mon Sep 17 00:00:00 2001 From: Carolina Zato Date: Wed, 16 Jan 2019 10:57:42 +0100 Subject: [PATCH 41/53] Update Android bindings: added constant for geolocation user attribute --- bindings/java/nz/mega/sdk/MegaApiJava.java | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/java/nz/mega/sdk/MegaApiJava.java b/bindings/java/nz/mega/sdk/MegaApiJava.java index 1fbeb4f981..8ae3b13612 100644 --- a/bindings/java/nz/mega/sdk/MegaApiJava.java +++ b/bindings/java/nz/mega/sdk/MegaApiJava.java @@ -95,6 +95,7 @@ void runCallback(Runnable runnable) { public final static int USER_ATTR_RUBBISH_TIME = MegaApi.USER_ATTR_RUBBISH_TIME; public final static int USER_ATTR_LAST_PSA = MegaApi.USER_ATTR_LAST_PSA; public final static int USER_ATTR_STORAGE_STATE = MegaApi.USER_ATTR_STORAGE_STATE; + public final static int USER_ATTR_GEOLOCATION = MegaApi.USER_ATTR_GEOLOCATION; public final static int NODE_ATTR_DURATION = MegaApi.NODE_ATTR_DURATION; public final static int NODE_ATTR_COORDINATES = MegaApi.NODE_ATTR_COORDINATES; From 032c76b00cdf3a7e4c328c5bd53d520bd0aebdf4 Mon Sep 17 00:00:00 2001 From: Javier Navarro Date: Thu, 17 Jan 2019 11:44:44 +0100 Subject: [PATCH 42/53] Update cryptopp for iOS --- bindings/ios/3rdparty/build-cryptopp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/ios/3rdparty/build-cryptopp.sh b/bindings/ios/3rdparty/build-cryptopp.sh index 672c7f46c6..97ba39fd3c 100644 --- a/bindings/ios/3rdparty/build-cryptopp.sh +++ b/bindings/ios/3rdparty/build-cryptopp.sh @@ -2,7 +2,7 @@ CURRENTPATH=`pwd` -CRYPTOPP_VERSION="b43f8f597650e316bb4b4f782ce174d695f43dbc" +CRYPTOPP_VERSION="982655845a784a9a4cfbc92221359a25a74184a3" set -e From c18ced47159ca5a9420dcef2c66cab3acae23635 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Thu, 17 Jan 2019 13:32:11 +0100 Subject: [PATCH 43/53] consider current backup as completed in removal before attr is set --- include/megaapi_impl.h | 2 +- src/megaapi_impl.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/megaapi_impl.h b/include/megaapi_impl.h index ccf6fad288..94b0bc08af 100644 --- a/include/megaapi_impl.h +++ b/include/megaapi_impl.h @@ -229,7 +229,7 @@ class MegaBackupController : public MegaBackup, public MegaRequestListener, publ void update(); void start(bool skip = false); - void removeexceeding(); + void removeexceeding(bool currentoneOK); void abortCurrent(); // MegaBackup interface diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index e95854660d..82aefa8782 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -21609,7 +21609,7 @@ MegaBackupController::MegaBackupController(MegaApiImpl *megaApi, int tag, int fo megaApi->startTimer(this->startTime - Waiter::ds + 1); //wake the sdk when required this->state = MegaBackup::BACKUP_ACTIVE; megaApi->fireOnBackupStateChanged(this); - removeexceeding(); + removeexceeding(false); } else { @@ -21766,7 +21766,7 @@ void MegaBackupController::update() } } -void MegaBackupController::removeexceeding() +void MegaBackupController::removeexceeding(bool currentoneOK) { map backupTimesNodes; int ncompleted=0; @@ -21794,7 +21794,9 @@ void MegaBackupController::removeexceeding() megaApi->setCustomNodeAttribute(childNode, "BACKST", "MISCARRIED", this); } - if (backstvalue && !strcmp(backstvalue,"COMPLETE")) + if ( (backstvalue && !strcmp(backstvalue,"COMPLETE")) + || ( childNode->getHandle() == currentHandle && currentoneOK ) //either its completed or is the current one and it went ok (it might not have backstvalue yet set + ) { ncompleted++; } @@ -22320,7 +22322,7 @@ bool MegaBackupController::checkCompletion() megaApi->fireOnBackupFinish(this, MegaError(e)); megaApi->fireOnBackupStateChanged(this); - removeexceeding(); + removeexceeding(e == API_OK); return true; } From 6b10835e795b0136935cf9fdc2fc1d6abf08b105 Mon Sep 17 00:00:00 2001 From: Javier Gomez Date: Wed, 23 Jan 2019 17:00:27 +0100 Subject: [PATCH 44/53] Fix local copy in Windows Phone and UWP --- src/win32/fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win32/fs.cpp b/src/win32/fs.cpp index 71446fc452..6f971b63fc 100644 --- a/src/win32/fs.cpp +++ b/src/win32/fs.cpp @@ -805,7 +805,7 @@ bool WinFileSystemAccess::copylocal(string* oldname, string* newname, m_time_t) newname->append("", 1); #ifdef WINDOWS_PHONE - bool r = !!CopyFile2((LPCWSTR)oldname->data(), (LPCWSTR)newname->data(), NULL); + bool r = SUCCEEDED(CopyFile2((LPCWSTR)oldname->data(), (LPCWSTR)newname->data(), NULL)); #else bool r = !!CopyFileW((LPCWSTR)oldname->data(), (LPCWSTR)newname->data(), FALSE); #endif From 41b0f0021da82e22738a0586e88f285c62ff108e Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Thu, 24 Jan 2019 20:01:57 +0100 Subject: [PATCH 45/53] add qt project for synctests and fix some compilation issues --- contrib/QtCreator/MEGATests/MEGATests.pro | 28 +++++++++++++++++++++++ tests/synctests.cpp | 12 +++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 contrib/QtCreator/MEGATests/MEGATests.pro diff --git a/contrib/QtCreator/MEGATests/MEGATests.pro b/contrib/QtCreator/MEGATests/MEGATests.pro new file mode 100644 index 0000000000..9ecaecc75b --- /dev/null +++ b/contrib/QtCreator/MEGATests/MEGATests.pro @@ -0,0 +1,28 @@ + + +CONFIG(debug, debug|release) { + CONFIG -= debug release + CONFIG += debug +} +CONFIG(release, debug|release) { + CONFIG -= debug release + CONFIG += release +} + +TARGET = MEGASyncTests +TEMPLATE = app + +CONFIG += USE_AUTOCOMPLETE +CONFIG += USE_MEDIAINFO +CONFIG += USE_LIBRAW +CONFIG += USE_FFMPEG + +CONFIG += c++17 +LIBS+=-lstdc++fs +QMAKE_CXXFLAGS+=-std=c++17 + +LIBS+=-lgtest + +include(../../../bindings/qt/sdk.pri) +SOURCES += ../../../tests/synctests.cpp + diff --git a/tests/synctests.cpp b/tests/synctests.cpp index aa5ca3aa42..42cf9f5fc7 100644 --- a/tests/synctests.cpp +++ b/tests/synctests.cpp @@ -808,7 +808,7 @@ struct StandardClient : public MegaApp multimap ms; multimap ns; for (auto& m : mn->kids) ms.emplace(m->name, m.get()); - for (auto& n : n->children) ns.emplace(n->displayname(), n); + for (auto& n2 : n->children) ns.emplace(n2->displayname(), n2); int matched = 0; vector matchedlist; @@ -911,8 +911,14 @@ struct StandardClient : public MegaApp multimap ms; multimap ns; - for (auto& m : mn->kids) ms.emplace(m->name, m.get()); - for (auto& n : n->children) if (!n.second->deleted) ns.emplace(n.second->name, n.second); // todo: should LocalNodes marked as deleted actually have been removed by now? + for (auto& m : mn->kids) + { + ms.emplace(m->name, m.get()); + } + for (auto& n2 : n->children) + { + if (!n2.second->deleted) ns.emplace(n2.second->name, n2.second); // todo: should LocalNodes marked as deleted actually have been removed by now? + } int matched = 0; vector matchedlist; From 32470468c43ca09f04f7548af4359c6565c97710 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Fri, 25 Jan 2019 14:25:06 +0100 Subject: [PATCH 46/53] Add check to test QFile::copy way (in newer Qts ) of creating files --- tests/synctests.cpp | 81 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 4 deletions(-) diff --git a/tests/synctests.cpp b/tests/synctests.cpp index 42cf9f5fc7..a3bb5a356f 100644 --- a/tests/synctests.cpp +++ b/tests/synctests.cpp @@ -1488,6 +1488,35 @@ bool buildLocalFolders(fs::path targetfolder, const string& prefix, int n, int r return true; } +#ifdef __linux__ +bool createSpecialFiles(fs::path targetfolder, const string& prefix, int n = 1) +{ + fs::path p = targetfolder; + for (int i = 0; i < n; ++i) + { + string filename = "file" + to_string(i) + "_" + prefix; + fs::path fp = p / fs::u8path(filename); + + int fdtmp = openat(AT_FDCWD, p.c_str(), O_RDWR|O_CLOEXEC|O_TMPFILE, 0600); + write(fdtmp, filename.data(), filename.size()); + + stringstream fdproc; + fdproc << "/proc/self/fd/"; + fdproc << fdtmp; + + int r = linkat(AT_FDCWD, fdproc.str().c_str() , AT_FDCWD, fp.c_str(), AT_SYMLINK_FOLLOW); + if (r) + { + cerr << " errno =" << errno << endl; + return false; + } + close(fdtmp); + } + return true; +} +#endif + + GTEST_TEST(BasicSync, DelRemoteFolder) { // delete a remote folder and confirm the client sending the request and another also synced both correctly update the disk @@ -1755,7 +1784,7 @@ GTEST_TEST(BasicSync, MAX_NEWNODES2) // make new folders in the local filesystem and see if we catch up in A1 and A2 (adder and observer syncs) assert(MegaClient::MAX_NEWNODES < 3000); - ASSERT_TRUE(buildLocalFolders(clientA1.syncSet[1].localpath, "g", 3000, 1, 0)); + ASSERT_TRUE(buildLocalFolders(clientA1.syncSet[1].localpath, "g", 3000, 1, 0)); // let them catch up waitonsyncs(30s, &clientA1, &clientA2); @@ -1942,7 +1971,7 @@ GTEST_TEST(BasicSync, RemoveLocalNodeBeforeSessionResume) ASSERT_TRUE(pclientA1->confirmModel_mainthread(model.findnode("f"), 1)); } -/* not expected to work yet +/* not expected to work yet GTEST_TEST(BasicSync, RemoteFolderCreationRaceSamename) { // confirm change is synced to remote, and also seen and applied in a second client that syncs the same folder @@ -2158,7 +2187,7 @@ GTEST_TEST(CmdChecks, RRAttributeAfterMoveNode) // remove remote folder via A2 future p1 = pclientA1->thread_do([](StandardClient& sc, promise& pb) - { + { sc.movenodetotrash("f", pb); }); ASSERT_TRUE(waitonresults(&p1)); @@ -2184,13 +2213,57 @@ GTEST_TEST(CmdChecks, RRAttributeAfterMoveNode) WaitMillisec(3000); // allow for attribute delivery too - // check it's back and the rr attribute is gone + // check it's back and the rr attribute is gone f = pclientA1->drillchildnodebyname(pclientA1->gettestbasenode(), "f"); ASSERT_TRUE(f != nullptr); ASSERT_EQ(f->attrs.map[rrname], string()); } +#ifdef __linux__ +GTEST_TEST(BasicSync, SpecialCreateFile) +{ + // confirm change is synced to remote, and also seen and applied in a second client that syncs the same folder + fs::path localtestroot = makeNewTestRoot(LOCAL_TEST_FOLDER); + StandardClient clientA1(localtestroot, "clientA1"); // user 1 client 1 + StandardClient clientA2(localtestroot, "clientA2"); // user 1 client 2 + + ASSERT_TRUE(clientA1.login_reset_makeremotenodes("MEGAAUTOTESTUSER1", "MEGAAUTOTESTPWD1", "f", 2, 2)); + ASSERT_TRUE(clientA2.login_fetchnodes("MEGAAUTOTESTUSER1", "MEGAAUTOTESTPWD1")); + ASSERT_EQ(clientA1.basefolderhandle, clientA2.basefolderhandle); + + Model model; + model.root->addkid(model.buildModelSubdirs("f", 2, 2, 0)); + + // set up sync for A1, it should build matching local folders + ASSERT_TRUE(clientA1.setupSync_mainthread("sync1", "f", 1)); + ASSERT_TRUE(clientA2.setupSync_mainthread("sync2", "f", 2)); + + waitonsyncs(4s, &clientA1, &clientA2); + clientA1.logcb = clientA2.logcb = true; + // check everything matches (model has expected state of remote and local) + ASSERT_TRUE(clientA1.confirmModel_mainthread(model.findnode("f"), 1)); + ASSERT_TRUE(clientA2.confirmModel_mainthread(model.findnode("f"), 2)); + + // make new folders (and files) in the local filesystem and see if we catch up in A1 and A2 (adder and observer syncs) + ASSERT_TRUE(createSpecialFiles(clientA1.syncSet[1].localpath / "f_0", "newkid", 2)); + + for (int i = 0; i < 2; ++i) + { + string filename = "file" + to_string(i) + "_" + "newkid"; + model.findnode("f/f_0")->addkid(model.makeModelSubfile(filename)); + } + + // let them catch up + waitonsyncs(20s, &clientA1, &clientA2); + + // check everything matches (model has expected state of remote and local) + ASSERT_TRUE(clientA1.confirmModel_mainthread(model.findnode("f"), 1)); + model.ensureLocalDebrisTmpLock("f"); // since we downloaded files + ASSERT_TRUE(clientA2.confirmModel_mainthread(model.findnode("f"), 2)); +} +#endif + class MegaCLILogger : public ::mega::Logger { public: virtual void log(const char *time, int loglevel, const char *source, const char *message) From e3fdd515b28e4487a82d72c5d4a4361d4751a6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Mon, 28 Jan 2019 17:36:25 +0100 Subject: [PATCH 47/53] Add missing headers to Qt project --- bindings/qt/sdk.pri | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/qt/sdk.pri b/bindings/qt/sdk.pri index 03e0ed6b4c..065940f35a 100644 --- a/bindings/qt/sdk.pri +++ b/bindings/qt/sdk.pri @@ -377,6 +377,8 @@ unix { include/mega/posix/megasys.h \ include/mega/posix/megafs.h \ include/mega/posix/megawaiter.h \ + include/mega/posix/megaconsole.h \ + include/mega/posix/megaconsolewaiter.h \ include/mega/config.h } From ca793613a0c5563342c56bb4576fdd5ed790d6bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Mon, 28 Jan 2019 17:53:55 +0100 Subject: [PATCH 48/53] Add headers for console only if `USE_CONSOLE` is defined --- bindings/qt/sdk.pri | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bindings/qt/sdk.pri b/bindings/qt/sdk.pri index 065940f35a..f5f0d71161 100644 --- a/bindings/qt/sdk.pri +++ b/bindings/qt/sdk.pri @@ -68,6 +68,10 @@ CONFIG(USE_AUTOCOMPLETE) { CONFIG(USE_CONSOLE) { win32 { + + HEADERS += include/mega/win32/megaconsole.h + HEADERS += include/mega/win32/megaconsolewaiter.h + CONFIG(noreadline) { DEFINES += NO_READLINE SOURCES += src/win32/console.cpp @@ -82,6 +86,8 @@ CONFIG(USE_CONSOLE) { QMAKE_CXXFLAGS+=/Zc:__cplusplus /std:c++ #this will set _cplusplus correctly in MSVC >= 2017 15.7 Preview 3 } else { + HEADERS += include/mega/posix/megaconsole.h + HEADERS += include/mega/posix/megaconsolewaiter.h SOURCES += src/posix/console.cpp SOURCES += src/posix/consolewaiter.cpp LIBS += -lreadline @@ -362,9 +368,7 @@ CONFIG(USE_MEGAAPI) { win32 { HEADERS += include/mega/win32/megasys.h \ include/mega/win32/megafs.h \ - include/mega/win32/megawaiter.h \ - include/mega/win32/megaconsole.h \ - include/mega/win32/megaconsolewaiter.h + include/mega/win32/megawaiter.h SOURCES += bindings/qt/3rdparty/libs/sqlite3.c } @@ -377,8 +381,6 @@ unix { include/mega/posix/megasys.h \ include/mega/posix/megafs.h \ include/mega/posix/megawaiter.h \ - include/mega/posix/megaconsole.h \ - include/mega/posix/megaconsolewaiter.h \ include/mega/config.h } From 9a16b4d2cfeca80a45c5b6c6bd1c0d57857d3d5d Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Mon, 28 Jan 2019 18:20:08 +0100 Subject: [PATCH 49/53] add support for new accounts to megasimplesync --- examples/megasimplesync.cpp | 72 +++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 2 deletions(-) diff --git a/examples/megasimplesync.cpp b/examples/megasimplesync.cpp index 3677a6c756..9ece8fcc78 100644 --- a/examples/megasimplesync.cpp +++ b/examples/megasimplesync.cpp @@ -30,6 +30,49 @@ using std::cout; using std::cerr; using std::endl; + + +struct Login +{ + string email, password, salt, pin; + int version; + + Login() : version(0) + { + } + + void reset() + { + *this = Login(); + } + + void login(MegaClient* client) + { + byte pwkey[SymmCipher::KEYLENGTH]; + + if (version == 1) + { + if (error e = client->pw_key(password.c_str(), pwkey)) + { + cout << "Login error: " << e << endl; + } + else + { + client->login(email.c_str(), pwkey, pin.c_str()); + } + } + else if (version == 2 && !salt.empty()) + { + client->login2(email.c_str(), password.c_str(), &salt, pin.c_str()); + } + else + { + cout << "Login unexpected error" << endl; + } + } +}; +static Login login; + class SyncApp : public MegaApp, public Logger { string local_folder; @@ -37,6 +80,8 @@ class SyncApp : public MegaApp, public Logger handle cwd; bool initial_fetch; + void prelogin_result(int version, string* email, string *salt, error e); + void login_result(error e); void fetchnodes_result(error e); @@ -319,6 +364,28 @@ void SyncApp::log(const char *time, int loglevel, const char *source, const char cout << "[" << time << "][" << SimpleLogger::toStr((LogLevel)loglevel) << "] " << message << endl; } +void SyncApp::prelogin_result(int version, std::string* email, std::string *salt, error e) +{ + if (e) + { + cout << "Login error: " << e << endl; + return; + } + + login.version = version; + login.salt = (version == 2 && salt ? *salt : string()); + + if (login.password.empty()) + { + cerr << "invalid empty password" << endl; + } + else + { + login.login(client); + } +} + + // this callback function is called when we have login result (success or // error) // TODO: check for errors @@ -570,8 +637,9 @@ int main(int argc, char *argv[]) //client->followsymlinks = true; // get values from env - client->pw_key(getenv("MEGA_PWD"), pwkey); - client->login(getenv("MEGA_EMAIL"), pwkey); + login.password = getenv("MEGA_PWD"); + login.email = getenv("MEGA_EMAIL"); + client->prelogin(login.email.c_str()); while (true) { From bc8d26d1ea190b3cbcb29ee54883533b1418089d Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Thu, 31 Jan 2019 18:47:48 +0100 Subject: [PATCH 50/53] add methods to convert from attr number to name/long name --- include/mega/user.h | 1 + include/megaapi.h | 28 +++++++++++ include/megaapi_impl.h | 2 + src/megaapi.cpp | 15 ++++++ src/megaapi_impl.cpp | 87 ++++----------------------------- src/user.cpp | 107 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 162 insertions(+), 78 deletions(-) diff --git a/include/mega/user.h b/include/mega/user.h index 51f99a76e4..34aa7ca57c 100644 --- a/include/mega/user.h +++ b/include/mega/user.h @@ -109,6 +109,7 @@ struct MEGA_API User : public Cachable void removeattr(attr_t at); static string attr2string(attr_t at); + static string attr2longname(attr_t at); static attr_t string2attr(const char *name); static bool needversioning(attr_t at); static char scope(attr_t at); diff --git a/include/megaapi.h b/include/megaapi.h index 2b33eda8e5..cdf7e3296e 100644 --- a/include/megaapi.h +++ b/include/megaapi.h @@ -5766,6 +5766,7 @@ class MegaApi }; enum { + USER_ATTR_UNKNOWN = -1, USER_ATTR_AVATAR = 0, // public - char array USER_ATTR_FIRSTNAME = 1, // public - char array USER_ATTR_LASTNAME = 2, // public - char array @@ -8018,6 +8019,33 @@ class MegaApi */ void getUserAttribute(int type, MegaRequestListener *listener = NULL); + /** + * @brief Get the name associated to a user attribute + * + * You take the ownership of the returned value. + * + * @param attr Attribute + * @return name associated to the user attribute + */ + const char *userAttributeToString(int attr); + + /** + * @brief Get the long descriptive name associated to a user attribute + * + * You take the ownership of the returned value. + * + * @param attr Attribute + * @return descriptive name associated to the user attribute + */ + const char *userAttributeToLongName(int attr); + + /** + * @brief Get numeric value for user attribute given a string + * @param name Name of the attribute + * @return numeric value for user attribute + */ + int userAttributeFromString(const char *name); + /** * @brief Get the email address of any user in MEGA. * diff --git a/include/megaapi_impl.h b/include/megaapi_impl.h index 94b0bc08af..25c9b28871 100644 --- a/include/megaapi_impl.h +++ b/include/megaapi_impl.h @@ -1762,6 +1762,8 @@ class MegaApiImpl : public MegaApp void setDnsServers(const char *dnsServers, MegaRequestListener* listener = NULL); static void addEntropy(char* data, unsigned int size); static string userAttributeToString(int); + static string userAttributeToLongName(int); + static int userAttributeFromString(const char *name); static char userAttributeToScope(int); static void setStatsID(const char *id); diff --git a/src/megaapi.cpp b/src/megaapi.cpp index 259950a7d9..7ab22d4d08 100644 --- a/src/megaapi.cpp +++ b/src/megaapi.cpp @@ -2058,6 +2058,21 @@ void MegaApi::getUserAttribute(int type, MegaRequestListener *listener) pImpl->getUserAttribute((MegaUser*)NULL, type, listener); } +const char *MegaApi::userAttributeToString(int attr) +{ + return MegaApi::strdup(pImpl->userAttributeToString(attr).c_str()); +} + +const char *MegaApi::userAttributeToLongName(int attr) +{ + return MegaApi::strdup(pImpl->userAttributeToLongName(attr).c_str()); +} + +int MegaApi::userAttributeFromString(const char *name) +{ + return pImpl->userAttributeFromString(name); +} + void MegaApi::getUserEmail(MegaHandle handle, MegaRequestListener *listener) { pImpl->getUserEmail(handle, listener); diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index 82aefa8782..cdd48e82a3 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -4987,86 +4987,17 @@ void MegaApiImpl::addEntropy(char *data, unsigned int size) string MegaApiImpl::userAttributeToString(int type) { - string attrname; - - switch(type) - { - case MegaApi::USER_ATTR_AVATAR: - attrname = "+a"; - break; - - case MegaApi::USER_ATTR_FIRSTNAME: - attrname = "firstname"; - break; - - case MegaApi::USER_ATTR_LASTNAME: - attrname = "lastname"; - break; - - case MegaApi::USER_ATTR_AUTHRING: - attrname = "*!authring"; - break; - - case MegaApi::USER_ATTR_LAST_INTERACTION: - attrname = "*!lstint"; - break; - - case MegaApi::USER_ATTR_ED25519_PUBLIC_KEY: - attrname = "+puEd255"; - break; - - case MegaApi::USER_ATTR_CU25519_PUBLIC_KEY: - attrname = "+puCu255"; - break; - - case MegaApi::USER_ATTR_SIG_RSA_PUBLIC_KEY: - attrname = "+sigPubk"; - break; - - case MegaApi::USER_ATTR_SIG_CU255_PUBLIC_KEY: - attrname = "+sigCu255"; - break; - - case MegaApi::USER_ATTR_KEYRING: - attrname = "*keyring"; - break; - - case MegaApi::USER_ATTR_LANGUAGE: - attrname = "^!lang"; - - case MegaApi::USER_ATTR_PWD_REMINDER: - attrname = "^!prd"; - break; - - case MegaApi::USER_ATTR_DISABLE_VERSIONS: - attrname = "^!dv"; - break; - - case MegaApi::USER_ATTR_CONTACT_LINK_VERIFICATION: - attrname = "^clv"; - break; - - case MegaApi::USER_ATTR_RICH_PREVIEWS: - attrname = "*!rp"; - break; - - case MegaApi::USER_ATTR_LAST_PSA: - attrname = "^!lastPsa"; - break; - - case MegaApi::USER_ATTR_RUBBISH_TIME: - attrname = "^!rubbishtime"; - break; - - case MegaApi::USER_ATTR_STORAGE_STATE: - attrname = "^!usl"; + return User::attr2string((::mega::attr_t) type); +} - case MegaApi::USER_ATTR_GEOLOCATION: - attrname = "*!geo"; - break; - } +string MegaApiImpl::userAttributeToLongName(int type) +{ + return User::attr2longname((::mega::attr_t) type); +} - return attrname; +int MegaApiImpl::userAttributeFromString(const char *name) +{ + return User::string2attr(name); } char MegaApiImpl::userAttributeToScope(int type) diff --git a/src/user.cpp b/src/user.cpp index 32bf3f818b..abcfb2ca7d 100644 --- a/src/user.cpp +++ b/src/user.cpp @@ -423,6 +423,113 @@ string User::attr2string(attr_t type) return attrname; } +string User::attr2longname(attr_t type) +{ + string longname; + + switch(type) + { + case ATTR_AVATAR: + longname = "AVATAR"; + break; + + case ATTR_FIRSTNAME: + longname = "FIRSTNAME"; + break; + + case ATTR_LASTNAME: + longname = "LASTNAME"; + break; + + case ATTR_AUTHRING: + longname = "AUTHRING"; + break; + + case ATTR_LAST_INT: + longname = "LAST_INT"; + break; + + case ATTR_ED25519_PUBK: + longname = "ED25519_PUBK"; + break; + + case ATTR_CU25519_PUBK: + longname = "CU25519_PUBK"; + break; + + case ATTR_SIG_RSA_PUBK: + longname = "SIG_RSA_PUBK"; + break; + + case ATTR_SIG_CU255_PUBK: + longname = "SIG_CU255_PUBK"; + break; + + case ATTR_KEYRING: + longname = "KEYRING"; + break; + + case ATTR_COUNTRY: + longname = "COUNTRY"; + break; + + case ATTR_BIRTHDAY: + longname = "BIRTHDAY"; + break; + + case ATTR_BIRTHMONTH: + longname = "BIRTHMONTH"; + break; + + case ATTR_BIRTHYEAR: + longname = "BIRTHYEAR"; + break; + + case ATTR_LANGUAGE: + longname = "LANGUAGE"; + break; + + case ATTR_PWD_REMINDER: + longname = "PWD_REMINDER"; + break; + + case ATTR_DISABLE_VERSIONS: + longname = "DISABLE_VERSIONS"; + break; + + case ATTR_CONTACT_LINK_VERIFICATION: + longname = "CONTACT_LINK_VERIFICATION"; + break; + + case ATTR_RICH_PREVIEWS: + longname = "RICH_PREVIEWS"; + break; + + case ATTR_LAST_PSA: + longname = "LAST_PSA"; + break; + + case ATTR_RUBBISH_TIME: + longname = "RUBBISH_TIME"; + break; + + case ATTR_STORAGE_STATE: + longname = "STORAGE_STATE"; + break; + + case ATTR_GEOLOCATION: + longname = "GEOLOCATION"; + break; + + case ATTR_UNKNOWN: + longname = ""; // empty string + break; + } + + return longname; +} + + attr_t User::string2attr(const char* name) { if (!strcmp(name, "*keyring")) From 98182f1dc2ddc923b569212da68d288c93a7f4a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Thu, 31 Jan 2019 19:29:18 +0100 Subject: [PATCH 51/53] Update src/megaapi_impl.cpp Co-Authored-By: polmr --- src/megaapi_impl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/megaapi_impl.cpp b/src/megaapi_impl.cpp index cdd48e82a3..3b64562543 100644 --- a/src/megaapi_impl.cpp +++ b/src/megaapi_impl.cpp @@ -4997,6 +4997,10 @@ string MegaApiImpl::userAttributeToLongName(int type) int MegaApiImpl::userAttributeFromString(const char *name) { + if (!name) + { + return MegaApi::USER_ATTR_UNKNOWN; + } return User::string2attr(name); } From f6a1b2bd45aae7c133186ba1d115a545ae6c1b59 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Mon, 4 Feb 2019 19:15:25 +0100 Subject: [PATCH 52/53] Add new failing test (in linux at least): moveAndDeleteLocalFile --- tests/synctests.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/synctests.cpp b/tests/synctests.cpp index a3bb5a356f..73f83bcee8 100644 --- a/tests/synctests.cpp +++ b/tests/synctests.cpp @@ -2264,6 +2264,47 @@ GTEST_TEST(BasicSync, SpecialCreateFile) } #endif +GTEST_TEST(BasicSync, moveAndDeleteLocalFile) +{ + // confirm change is synced to remote, and also seen and applied in a second client that syncs the same folder + fs::path localtestroot = makeNewTestRoot(LOCAL_TEST_FOLDER); + StandardClient clientA1(localtestroot, "clientA1"); // user 1 client 1 + StandardClient clientA2(localtestroot, "clientA2"); // user 1 client 2 + + ASSERT_TRUE(clientA1.login_reset_makeremotenodes("MEGAAUTOTESTUSER1", "MEGAAUTOTESTPWD1", "f", 1, 1)); + ASSERT_TRUE(clientA2.login_fetchnodes("MEGAAUTOTESTUSER1", "MEGAAUTOTESTPWD1")); + ASSERT_EQ(clientA1.basefolderhandle, clientA2.basefolderhandle); + + Model model; + model.root->addkid(model.buildModelSubdirs("f", 1, 1, 0)); + + // set up sync for A1, it should build matching local folders + ASSERT_TRUE(clientA1.setupSync_mainthread("sync1", "f", 1)); + ASSERT_TRUE(clientA2.setupSync_mainthread("sync2", "f", 2)); + + waitonsyncs(4s, &clientA1, &clientA2); + clientA1.logcb = clientA2.logcb = true; + // check everything matches (model has expected state of remote and local) + ASSERT_TRUE(clientA1.confirmModel_mainthread(model.findnode("f"), 1)); + ASSERT_TRUE(clientA2.confirmModel_mainthread(model.findnode("f"), 2)); + + + // move something in the local filesystem and see if we catch up in A1 and A2 (deleter and observer syncs) + error_code rename_error; + fs::rename(clientA1.syncSet[1].localpath / "f_0", clientA1.syncSet[1].localpath / "renamed", rename_error); + ASSERT_TRUE(!rename_error) << rename_error; + fs::remove(clientA1.syncSet[1].localpath / "renamed"); + + // let them catch up + waitonsyncs(20s, &clientA1, &clientA2); + + // check everything matches (model has expected state of remote and local) + ASSERT_TRUE(model.movetosynctrash("f/f_0", "f")); + ASSERT_TRUE(clientA2.confirmModel_mainthread(model.findnode("f"), 2)); + ASSERT_TRUE(model.removesynctrash("f")); + ASSERT_TRUE(clientA1.confirmModel_mainthread(model.findnode("f"), 1)); +} + class MegaCLILogger : public ::mega::Logger { public: virtual void log(const char *time, int loglevel, const char *source, const char *message) From 642c25754b8063ab08b070b26505ff843e7bb43d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Hern=C3=A1ndez?= Date: Tue, 5 Feb 2019 14:27:46 +0100 Subject: [PATCH 53/53] Update version number --- include/mega/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mega/version.h b/include/mega/version.h index c2832c898d..9e89ef910d 100644 --- a/include/mega/version.h +++ b/include/mega/version.h @@ -5,5 +5,5 @@ #define MEGA_MINOR_VERSION 4 #endif #ifndef MEGA_MICRO_VERSION -#define MEGA_MICRO_VERSION 5 +#define MEGA_MICRO_VERSION 6 #endif