diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-20 13:34:45 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-20 13:34:45 +0300 |
commit | e96132b4d5344d2d58d247906bcaefccfb9d5253 (patch) | |
tree | 24a9524e4900547f2ba3a461e228fd3c98c0410d /include | |
parent | 4dac8bd56f9116ac76423b2664286ed894ca80c2 (diff) |
DBEVENTINFO::hContact to be returned inside an event, no need to call db_event_getContact() just after db_event_get()
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_database.inc | 3 | ||||
-rw-r--r-- | include/m_database.h | 12 |
2 files changed, 8 insertions, 7 deletions
diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc index ab9e66984c..93baaf542e 100644 --- a/include/delphi/m_database.inc +++ b/include/delphi/m_database.inc @@ -42,7 +42,8 @@ type szModule : PAnsiChar; // module that 'owns' this event and controls the data format
timestamp: dword; // timestamp in UNIX time
flags : dword; // the DBEF_* flags above
- eventType: word; // event type, such as message, can be module defined
+ eventType: dword; // event type, such as message, can be module defined
+ hContact : TMCONTACT; // contact to which this event belongs
cbBlob : dword; // size in bytes of pBlob^
pBlob : PByte; // pointer to buffer containing the module defined event data
szId : PAnsiChar; // server id of event
diff --git a/include/m_database.h b/include/m_database.h index caf2546e42..7362c7ead9 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -188,9 +188,10 @@ struct DBEVENTINFO // unless you use the standard C library which is
// signed and can only do until 2038. In GMT.
uint32_t flags; // combination of DBEF_* flags
- uint16_t eventType; // module-defined event type field
+ uint32_t eventType; // module-defined event type field
+ MCONTACT hContact; // contact to which this event belongs
int cbBlob; // size of pBlob in bytes
- uint8_t *pBlob; // pointer to buffer containing module-defined event data
+ char *pBlob; // pointer to buffer containing module-defined event data
const char *szId; // server message id
const char *szUserId; // user id (for group chats only)
const char *szReplyId; // this message is a reply to a message with that server id
@@ -747,15 +748,14 @@ namespace DB ptrA m_szNick, m_szFirstName, m_szLastName, m_szEmail, m_szReason;
uint32_t m_size;
- uint8_t* makeBlob();
+ char* makeBlob();
public:
explicit AUTH_BLOB(MCONTACT hContact, const char *nick, const char *fname, const char *lname, const char *id, const char *reason);
- explicit AUTH_BLOB(uint8_t *blob);
+ explicit AUTH_BLOB(char *blob);
~AUTH_BLOB();
- __forceinline operator char*() { return (char*)makeBlob(); }
- __forceinline operator uint8_t*() { return makeBlob(); }
+ __forceinline operator char*() { return makeBlob(); }
__forceinline uint32_t size() const { return m_size; }
|