static AccountManager *instance();
~AccountManager() override = default;
- /**
- * Saves the accounts to a given settings file
- */
- void save(bool saveCredentials = true);
-
/**
* Creates account objects from a given settings file.
*
*/
AccountState *addAccount(const AccountPtr &newAccount);
- /**
- * remove all accounts
- */
- void shutdown();
-
/**
* Return a list of all accounts.
* (this is a list of QSharedPointer for internal reasons, one should normally not keep a copy of them)
[[nodiscard]] AccountStatePtr accountFromUserId(const QString &id) const;
- /**
- * Delete the AccountState
- */
- void deleteAccount(AccountState *account);
-
/**
* Creates an account and sets up some basic handlers.
* Does *not* add the account to the account manager just yet.
/// Saves account state data, not including the account
void saveAccountState(OCC::AccountState *a);
+ /// Saves the accounts to a given settings file
+ void save(bool saveCredentials = true);
+
+ /// Delete the AccountState
+ void deleteAccount(AccountState *account);
+
+ /// Remove all accounts
+ void shutdown();
+
signals:
void accountAdded(OCC::AccountState *account);
void accountRemoved(OCC::AccountState *account);