Overte C++ Documentation
CrashRecoveryHandler.h
1 //
2 // CrashRecoveryHandler.h
3 // interface/src
4 //
5 // Created by David Rowe on 24 Aug 2015.
6 // Copyright 2015 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_CrashRecoveryHandler_h
13 #define hifi_CrashRecoveryHandler_h
14 
15 #include <QString>
16 
17 class CrashRecoveryHandler {
18 
19 public:
20  static bool checkForResetSettings(bool wasLikelyCrash, bool suppressPrompt = false);
21 
22 private:
23  enum Action {
24  DELETE_INTERFACE_INI,
25  RETAIN_IMPORTANT_INFO,
26  DO_NOTHING
27  };
28 
29  static bool suggestCrashReporting();
30  static Action promptUserForAction(bool showCrashMessage);
31  static void handleCrash(Action action);
32 
33 };
34 
35 #endif // hifi_CrashRecoveryHandler_h