summaryrefslogtreecommitdiffstats
path: root/lib/MiddleWare/CrashTypes.h
blob: 3a4031c38870f016c426c87e1d23a4fde1a59da5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef CRASHTYPES_H_
#define CRASHTYPES_H_

#include <string>
#include <map>

typedef std::map<std::string, std::string> map_crash_t;

typedef struct SCrashInfo
{
    std::string m_sUUID;
    std::string m_sUID;
    std::string m_sCount;
    std::string m_sExecutable;
    std::string m_sPackage;
    std::string m_sTime;

    const map_crash_t GetMap()
    {
        map_crash_t mci;
        mci["UUID"] = m_sUUID;
        mci["UID"] = m_sUID;
        mci["Count"] = m_sCount;
        mci["Executable"] = m_sExecutable;
        mci["Package"] = m_sPackage;
        mci["Time"] = m_sTime;

        return mci;
    }
} crash_info_t;

typedef std::vector<crash_info_t> vector_crash_infos_t;

typedef struct SCrashContex
{
    std::string m_sUUID;
    std::string m_sUID;
    std::string m_sLanAppPlugin;
} crash_context_t;


typedef struct SCrashReport
{
    std::string m_sArchitecture;
    std::string m_sKernel;
    std::string m_sExecutable;
    std::string m_sCmdLine;
    std::string m_sPackage;
    std::string m_sTextData1;
    std::string m_sTextData2;
    std::string m_sBinaryData1;
    std::string m_sBinaryData2;

    const map_crash_t GetMap()
    {
        map_crash_t mci;
        mci["Architecture"] = m_sArchitecture;
        mci["Kernel"] = m_sKernel;
        mci["Executable"] = m_sExecutable;
        mci["CmdLine"] = m_sCmdLine;
        mci["Package"] = m_sPackage;
        mci["TextData1"] = m_sTextData1;
        mci["TextData2"] = m_sTextData2;
        mci["BinaryData1"] = m_sBinaryData1;
        mci["BinaryData2"] = m_sBinaryData2;

        return mci;
    }
} crash_report_t;

#endif /* CRASHTYPES_H_ */