summaryrefslogtreecommitdiff
path: root/include/m_database.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/m_database.h')
-rw-r--r--include/m_database.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/include/m_database.h b/include/m_database.h
index 157046603f..59c0dacb82 100644
--- a/include/m_database.h
+++ b/include/m_database.h
@@ -294,7 +294,7 @@ EXTERN_C MIR_CORE_DLL(int) db_event_delete(MEVENT hDbEvent, bool bFromServer = f
// Edits an event in the database
// Returns 0 on success, or nonzero on error
-EXTERN_C MIR_CORE_DLL(int) db_event_edit(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO *dbei);
+EXTERN_C MIR_CORE_DLL(int) db_event_edit(MEVENT hDbEvent, const DBEVENTINFO *dbei);
// Tries to find an event by its id if present
// if an event is found, it's edited, otherwise a new event is added
@@ -694,11 +694,30 @@ namespace DB
};
/////////////////////////////////////////////////////////////////////////////////////////
- // Helper to process the auth req body
- // blob is: 0(uint32_t), hContact(uint32_t), nick(UTF8), firstName(UTF8), lastName(UTF8), email(UTF8), reason(UTF8)
+ // Helper for file transfer events
+ #pragma warning(push)
#pragma warning(disable : 4251)
+ class MIR_APP_EXPORT FILE_BLOB : public MNonCopyable
+ {
+ ptrW m_wszFileName, m_wszDescription;
+
+ public:
+ explicit FILE_BLOB(const wchar_t *pwszName, const wchar_t *pwszDescr = nullptr);
+ explicit FILE_BLOB(const EventInfo &dbei);
+ ~FILE_BLOB();
+
+ void write(EventInfo &dbei);
+
+ __forceinline const wchar_t* getName() const { return m_wszFileName; }
+ __forceinline const wchar_t* getDescr() const { return m_wszDescription; }
+ };
+
+ /////////////////////////////////////////////////////////////////////////////////////////
+ // Helper to process the auth req body
+ // blob is: 0(uint32_t), hContact(uint32_t), nick(UTF8), firstName(UTF8), lastName(UTF8), email(UTF8), reason(UTF8)
+
class MIR_APP_EXPORT AUTH_BLOB
{
MCONTACT m_hContact;
@@ -729,6 +748,8 @@ namespace DB
__forceinline void set_uin(uint32_t dwValue) { m_dwUin = dwValue; }
};
+ #pragma warning(pop)
+
/////////////////////////////////////////////////////////////////////////////////////////
// Event cursors