From 6ea21b88c16c553aa97e2cd53266ffd4a689d581 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 25 Apr 2020 17:08:25 +0300 Subject: db_event_add / db_event_edit to receive const pointer to DBEVENTINFO --- include/m_database.h | 4 ++-- include/m_db_int.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/m_database.h b/include/m_database.h index 0988d2a483..c49ed1a270 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -277,7 +277,7 @@ public: #define EVENTTYPE_AUTHREQUEST 1001 //specific codes, hence the module- #define EVENTTYPE_FILE 1002 //specific limit has been raised to 2000 -EXTERN_C MIR_CORE_DLL(MEVENT) db_event_add(MCONTACT hContact, DBEVENTINFO *dbei); +EXTERN_C MIR_CORE_DLL(MEVENT) db_event_add(MCONTACT hContact, const DBEVENTINFO *dbei); // Gets the number of events in the chain belonging to a contact in the database. // Returns the number of events in the chain owned by hContact or -1 if hContact @@ -295,7 +295,7 @@ EXTERN_C MIR_CORE_DLL(int) db_event_delete(MEVENT hDbEvent); // 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, DBEVENTINFO *dbei); +EXTERN_C MIR_CORE_DLL(int) db_event_edit(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO *dbei); // Retrieves a handle to the first event in the chain for hContact // Returns the handle, or NULL if hContact is invalid or has no events diff --git a/include/m_db_int.h b/include/m_db_int.h index a2a13f3d12..c873609069 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -95,9 +95,9 @@ interface MIR_APP_EXPORT MIDatabase STDMETHOD_(LONG, GetContactSize)(void) PURE; STDMETHOD_(LONG, GetEventCount)(MCONTACT contactID) PURE; - STDMETHOD_(MEVENT, AddEvent)(MCONTACT contactID, DBEVENTINFO *dbe) PURE; + STDMETHOD_(MEVENT, AddEvent)(MCONTACT contactID, const DBEVENTINFO *dbe) PURE; STDMETHOD_(BOOL, DeleteEvent)(MEVENT hDbEvent) PURE; - STDMETHOD_(BOOL, EditEvent)(MCONTACT contactID, MEVENT hDbEvent, DBEVENTINFO *dbe) PURE; + STDMETHOD_(BOOL, EditEvent)(MCONTACT contactID, MEVENT hDbEvent, const DBEVENTINFO *dbe) PURE; STDMETHOD_(LONG, GetBlobSize)(MEVENT hDbEvent) PURE; STDMETHOD_(BOOL, GetEvent)(MEVENT hDbEvent, DBEVENTINFO *dbe) PURE; STDMETHOD_(BOOL, MarkEventRead)(MCONTACT contactID, MEVENT hDbEvent) PURE; @@ -209,9 +209,9 @@ public: STDMETHODIMP_(LONG) GetContactSize(void) override; //////////////////////////////////////////////////////////////////////////////////////// - STDMETHODIMP_(MEVENT) AddEvent(MCONTACT, DBEVENTINFO*) override; + STDMETHODIMP_(MEVENT) AddEvent(MCONTACT, const DBEVENTINFO*) override; STDMETHODIMP_(BOOL) DeleteEvent(MEVENT) override; - STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, DBEVENTINFO *dbe); + STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, const DBEVENTINFO *dbe) override; STDMETHODIMP_(LONG) GetBlobSize(MEVENT) override; STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT, MEVENT) override; STDMETHODIMP_(MCONTACT) GetEventContact(MEVENT) override; -- cgit v1.2.3