summaryrefslogtreecommitdiffstats
path: root/gui/MainWindow.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-27 03:00:49 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-27 03:00:49 +0100
commitffbc5bb62c0cd771b26cb1d9b5afdccef77075b4 (patch)
tree78b10cee3dc25acba02954aaf4f0e44ee4c295de /gui/MainWindow.h
parentd7113de3bd3cb43b1bc68792cd27a716b012f2b5 (diff)
downloadMultiMC-ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4.tar
MultiMC-ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4.tar.gz
MultiMC-ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4.tar.lz
MultiMC-ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4.tar.xz
MultiMC-ffbc5bb62c0cd771b26cb1d9b5afdccef77075b4.zip
Offline mode can be used even when online.
Allow the user to pick a player name for offline mode. Big auth refactor. Now using session objects instead of the accounts themselves. Sessions only last for one instance start and hold all the auth and player data.
Diffstat (limited to 'gui/MainWindow.h')
-rw-r--r--gui/MainWindow.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/gui/MainWindow.h b/gui/MainWindow.h
index eb478776..eeba2c26 100644
--- a/gui/MainWindow.h
+++ b/gui/MainWindow.h
@@ -96,6 +96,8 @@ slots:
void on_actionLaunchInstance_triggered();
+ void on_actionLaunchInstanceOffline_triggered();
+
void on_actionDeleteInstance_triggered();
void on_actionRenameInstance_triggered();
@@ -112,25 +114,18 @@ slots:
* Launches the currently selected instance with the default account.
* If no default account is selected, prompts the user to pick an account.
*/
- void doLaunch();
-
- /*!
- * Opens an input dialog, allowing the user to input their password and refresh its access token.
- * This function will execute the proper Yggdrasil task to refresh the access token.
- * Returns true if successful. False if the user cancelled.
- */
- bool loginWithPassword(MojangAccountPtr account, const QString& errorMsg="");
+ void doLaunch(bool online = true);
/*!
* Launches the given instance with the given account.
* This function assumes that the given account has a valid, usable access token.
*/
- void launchInstance(BaseInstance* instance, MojangAccountPtr account);
+ void launchInstance(BaseInstance *instance, AuthSessionPtr session);
/*!
* Prepares the given instance for launch with the given account.
*/
- void updateInstance(BaseInstance* instance, MojangAccountPtr account);
+ void updateInstance(BaseInstance *instance, AuthSessionPtr account);
void onGameUpdateError(QString error);