aboutsummaryrefslogtreecommitdiffstats
path: root/ui.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui.h')
-rw-r--r--ui.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/ui.h b/ui.h
index ecf221b..123dc34 100644
--- a/ui.h
+++ b/ui.h
@@ -21,6 +21,7 @@
#include <pthread.h>
#include <time.h>
+#include "messagesocket.h"
#include "voldclient.h"
// Abstract class for controlling the user interface during recovery.
@@ -39,7 +40,7 @@ class RecoveryUI {
virtual void SetLocale(const char* locale) = 0;
// Set the overall recovery state ("background image").
- enum Icon { NONE, INSTALLING_UPDATE, ERASING, NO_COMMAND, ERROR };
+ enum Icon { NONE, INSTALLING_UPDATE, ERASING, NO_COMMAND, INFO, ERROR, NR_ICONS };
virtual void SetBackground(Icon icon) = 0;
// --- progress indicator ---
@@ -71,6 +72,12 @@ class RecoveryUI {
virtual void ShowFile(const char* filename) = 0;
+ virtual void DialogShowInfo(const char* text) = 0;
+ virtual void DialogShowError(const char* text) = 0;
+ virtual int DialogShowing() const = 0;
+ virtual bool DialogDismissable() const = 0;
+ virtual void DialogDismiss() = 0;
+
// --- key handling ---
// Wait for a key and return it. May return -1 after timeout.
@@ -160,6 +167,8 @@ private:
pthread_t input_thread_;
+ MessageSocket message_socket;
+
void OnKeyDetected(int key_code);
static int InputCallback(int fd, uint32_t epevents, void* data);