diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-04 16:19:31 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-04 16:19:31 +0100 |
| commit | afb30fe1502e9c45b722da3b5c09e292d589aa7f (patch) | |
| tree | 8f0429ccc50987a34e73899c0a724ff6e0205c93 /lib/Utils/Database.h | |
| parent | 892b7fde75cafca50a18dcb8620ddc22b2e74688 (diff) | |
*: UID:UUID -> crash_id conversion
This fixes at least three instances where we did not check whether
user is even allowed to report or delete a crash.
Also fixes a few cases when root might inadvertently act on (e.g. delete)
mote than one crash.
Renamed FILENAME_UID to CD_UID - makes more sense this way.
Added COL_INFORMALL and CD_INFORMALL. Nuked UID == -1 hacks.
Renamed getReport() to start_job on Python side.
Dropped a few unused parameters from server -> client dbus signals.
Fixed CLI's way of reverencing crashes (see updated help text).
Run-tested (GUI and CLI).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Acked-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'lib/Utils/Database.h')
| -rw-r--r-- | lib/Utils/Database.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/Utils/Database.h b/lib/Utils/Database.h index 6d7613b..a698bcb 100644 --- a/lib/Utils/Database.h +++ b/lib/Utils/Database.h @@ -40,6 +40,7 @@ typedef struct database_row_t { std::string m_sUUID; /**< A local UUID.*/ std::string m_sUID; /**< An UID of an user.*/ + std::string m_sInformAll; std::string m_sDebugDumpDir; /**< A debugdump directory of a crash.*/ std::string m_sCount; /**< Crash rate.*/ std::string m_sReported; /**< Is a row reported?*/ @@ -73,8 +74,8 @@ class CDatabase : public CPlugin * @param pDebugDumpPath A debugdump path. * @param pTime Time when a crash occurs. */ - virtual void Insert_or_Update(const char *pUUID, - const char *pUID, + virtual void Insert_or_Update(const char *crash_id, + bool inform_all_users, const char *pDebugDumpPath, const char *pTime) = 0; /** @@ -82,8 +83,7 @@ class CDatabase : public CPlugin * @param pUUID A lodal UUID of a crash. * @param pUID An UID of an user. */ - virtual void DeleteRow(const char *pUUID, - const char *pUID) = 0; + virtual void DeleteRow(const char *crash_id) = 0; virtual void DeleteRows_by_dir(const char *dump_dir) = 0; /** * A method, which sets that particular row was reported. @@ -92,11 +92,9 @@ class CDatabase : public CPlugin * @param pMessage A text explanation of reported problem * (where it is stored etc)... */ - virtual void SetReported(const char *pUUID, - const char *pUID, + virtual void SetReported(const char *crash_id, const char *pMessage) = 0; - virtual void SetReportedPerReporter(const char *pUUID, - const char *pUID, + virtual void SetReportedPerReporter(const char *crash_id, const char *reporter, const char *pMessage) = 0; /** @@ -106,7 +104,7 @@ class CDatabase : public CPlugin * @param pUID An UID of an user. * @return A vector of matched rows. */ - virtual vector_database_rows_t GetUIDData(const char *pUID) = 0; + virtual vector_database_rows_t GetUIDData(long caller_uid) = 0; /** * A method, which returns one row accordind to UUID of a crash and * UID of an user. If there are no row, empty row is returned. @@ -114,8 +112,7 @@ class CDatabase : public CPlugin * @param pUID An UID of an user. * @return A matched row. */ - virtual database_row_t GetRow(const char *pUUID, - const char *pUID) = 0; + virtual database_row_t GetRow(const char *crash_id) = 0; }; #endif |
