MEGA internet service using mega-sdk#7435
MEGA internet service using mega-sdk#7435githubmailsma wants to merge 3 commits intoclementine-player:masterfrom
Conversation
|
Can you accomplish this without git submodules? |
| // MEGA SDK application key. Provide your own via -DMEGA_API_KEY="yourkey" | ||
| // at CMake configure time. Register at https://mega.nz/sdk to obtain one. | ||
| #ifndef MEGA_API_KEY | ||
| #define MEGA_API_KEY "" |
There was a problem hiding this comment.
Does it make sense for Clementine to have one rather than expecting users to recompile?
| MegaService::~MegaService() { | ||
| // Stop the streaming server if running. | ||
| if (streaming_port_ > 0) { | ||
| mega_api_->httpServerStop(); |
There was a problem hiding this comment.
Probably needs to hold the lock?
| // Whether we are currently logged in and nodes are fetched. | ||
| bool logged_in_; | ||
|
|
||
| // Mutex for thread-safe access to streaming state. |
There was a problem hiding this comment.
Would be good to clear about exactly what this lock is intended to protect. Is it just all access to mega_api_?
| } | ||
|
|
||
| void MegaService::BuildFolderTree(mega::MegaNode* node, | ||
| QList<MegaFolderInfo>& list) { |
There was a problem hiding this comment.
Use a pointer instead of a non-const reference to make the mutable input parameter more obvious.
| return result; | ||
| } | ||
|
|
||
| bool MegaService::CollectFoldersWithAudio(mega::MegaNode* node, |
There was a problem hiding this comment.
Isn't it simpler to return QSet<QString> with the implication that has_audio == x.isEmpty()?
| ui_->email->setText(email); | ||
| ui_->password->setText(password); | ||
|
|
||
| if (!email.isEmpty() && !password.isEmpty()) { |
There was a problem hiding this comment.
Does this still work given you wipe the password after login?
| // MegaService Credential Tests | ||
| // ============================================================================ | ||
|
|
||
| class MegaServiceCredentialTest : public ::testing::Test { |
There was a problem hiding this comment.
These are only validating the behaviour of QSettings rather than any of our code.
| // Mega URL Scheme Tests | ||
| // ============================================================================ | ||
|
|
||
| class MegaUrlSchemeTest : public ::testing::Test {}; |
There was a problem hiding this comment.
A lot of these are only testing QUrl
| // Mega Folder Selection Persistence Tests | ||
| // ============================================================================ | ||
|
|
||
| class MegaFolderSelectionTest : public ::testing::Test { |
There was a problem hiding this comment.
Again, this is just testing QSettings.
| // Mega URL Handle Extraction Tests | ||
| // ============================================================================ | ||
|
|
||
| class MegaHandleExtractionTest : public ::testing::Test {}; |
There was a problem hiding this comment.
Most of these aren't testing anything.
A fully working MEGA internet service, comparable to Google Drive and other cloud storage providers, allowing users to:
Includes a settings page where the user can enter their email and password, and a service layer to handle the calls to the SDK.