summaryrefslogtreecommitdiff
path: root/include/desktop/crashreport.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/desktop/crashreport.hxx')
-rw-r--r--include/desktop/crashreport.hxx59
1 files changed, 35 insertions, 24 deletions
diff --git a/include/desktop/crashreport.hxx b/include/desktop/crashreport.hxx
index e3486bbf0863..3af83b8e637c 100644
--- a/include/desktop/crashreport.hxx
+++ b/include/desktop/crashreport.hxx
@@ -17,7 +17,8 @@
#include <config_features.h>
-#include <map>
+// vector not sort the entries
+#include <vector>
#include <string>
namespace google_breakpad
@@ -41,40 +42,50 @@ CRASHREPORT_DLLPUBLIC
/*class*/ CrashReporter
{
public:
- static void addKeyValue(const OUString& rKey, const OUString& rValue);
-
- static std::string getIniFileName();
-
- static void writeCommonInfo();
+ typedef enum {AddItem, Write, Create} tAddKeyHandling;
+#if HAVE_FEATURE_BREAKPAD
+ static void addKeyValue(const OUString& rKey, const OUString& rValue, tAddKeyHandling AddKeyHandling);
static void storeExceptionHandler(google_breakpad::ExceptionHandler* pExceptionHandler);
- // when we create the ExceptionHandler we have no access to the user
- // profile yet, so update when we have access
- static void updateMinidumpLocation();
+ static bool crashReportInfoExists();
-private:
+ static bool readSendConfig(std::string& response);
+private:
static osl::Mutex maMutex;
-
static bool mbInit;
-
- static std::map<OUString, OUString> maKeyValues; // used to temporarily save entries before the old info has been uploaded
+ typedef struct _mpair
+ {
+ OUString first;
+ OUString second;
+ _mpair(const OUString& First, const OUString& Second)
+ {
+ first = First;
+ second = Second;
+ };
+ } mpair;
+
+ typedef std::vector<mpair> vmaKeyValues;
+ static vmaKeyValues maKeyValues; // used to temporarily save entries before the old info has been uploaded
static google_breakpad::ExceptionHandler* mpExceptionHandler;
-};
-// Add dummy methods for the non-breakpad case. That allows us to use
-// the code without linking to the lib and without adding HAVE_FEATURE_BREAKPAD
-// everywhere we want to log something to the crash report system.
-#if HAVE_FEATURE_BREAKPAD
-#else
-inline void CrashReporter::addKeyValue(SAL_UNUSED_PARAMETER const OUString& /*rKey*/, SAL_UNUSED_PARAMETER const OUString& /*rValue*/)
-{
-}
-#endif
+ static std::string getIniFileName();
+ static void writeCommonInfo();
+ static void writeToFile(std::ios_base::openmode Openmode);
+ // when we create the ExceptionHandler we have no access to the user
+ // profile yet, so update when we have access
+ static void updateMinidumpLocation();
+#else
+ // Add dummy methods for the non-breakpad case. That allows us to use
+ // // the code without linking to the lib and without adding HAVE_FEATURE_BREAKPAD
+ // // everywhere we want to log something to the crash report system.
+ inline static void addKeyValue(SAL_UNUSED_PARAMETER const OUString& /*rKey*/, SAL_UNUSED_PARAMETER const OUString& /*rValue*/, SAL_UNUSED_PARAMETER tAddKeyHandling /*AddKeyHandling*/) {};
+#endif // HAVE_FEATURE_BREAKPAD
+};
-#endif
+#endif // INCLUDED_DESKTOP_CRASHREPORT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */