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 
18 
19 
20 
21 
22 class CrashRecoveryHandler {
23 
24 public:
25  static bool checkForResetSettings(bool wasLikelyCrash, bool suppressPrompt = false);
26 
27 private:
28  enum Action {
29  DELETE_INTERFACE_INI,
30  RETAIN_IMPORTANT_INFO,
31  DO_NOTHING
32  };
33 
34  static bool suggestCrashReporting();
35  static Action promptUserForAction(bool showCrashMessage);
36  static void handleCrash(Action action);
37 
38 };
39 
40 #endif // hifi_CrashRecoveryHandler_h