From 25ec54ea27a7099f33573b260a620ed7273176fe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Jun 2013 12:16:44 +0000 Subject: - db_set_blob used everywhere for writing blobs - DBCONTACTWRITESETTING left only in the event handlers git-svn-id: http://svn.miranda-ng.org/main/trunk@5191 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_database.inc | 12 ------------ include/m_database.h | 28 +++++++--------------------- 2 files changed, 7 insertions(+), 33 deletions(-) (limited to 'include') diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc index 210f4dc914..051690457c 100644 --- a/include/delphi/m_database.inc +++ b/include/delphi/m_database.inc @@ -77,18 +77,6 @@ const } MS_DB_CONTACT_GETSETTINGSTATIC:PAnsiChar = 'DB/Contact/GetSettingStatic'; - { - wParam : Handle to contact to write setting for - lParam : Pointer to TDBCONTACTWRITESETTING which must be initalised - affects: writes a setting under a contact -- TDBCONTACTWRITESETTING structure - must contain the module name writing -- the setting name, and the value - to write (which is NOT a pointer) .szModule, .szSetting, .Value, see notes - returns: 0 on success, non zero on failure - notes : this service triggers 'DB/Contact/SettingChanged' before it returns - as always, there is a helper function to use this service. - } - MS_DB_CONTACT_WRITESETTING:PAnsiChar = 'DB/Contact/WriteSetting'; - { wParam : Handle of a contact to enum settings for lParam : Pointer to a TDBCONTACTENUMSETTINGS structure, must be initalised diff --git a/include/m_database.h b/include/m_database.h index c5657b91b7..0706c95b0a 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -147,6 +147,13 @@ typedef struct { DBVARIANT *pValue; // pointer to variant to receive the value } DBCONTACTGETSETTING; +typedef struct { + const char *szModule; // pointer to name of the module that wrote the + // setting to get + const char *szSetting; // pointer to name of the setting to get + DBVARIANT value; // variant containing the value to set +} DBCONTACTWRITESETTING; + /* DB/Contact/GetSettingStatic service Look up the value of a named setting for a specific contact in the database wParam = (WPARAM)(HANDLE)hContact @@ -174,27 +181,6 @@ was invalid. */ #define MS_DB_CONTACT_GETSETTINGSTATIC "DB/Contact/GetSettingStatic" -/* DB/Contact/WriteSetting service -Change the value of, or create a new value with, a named setting for a specific -contact in the database to the given value - wParam = (WPARAM)(HANDLE)hContact - lParam = (LPARAM)(DBCONTACTWRITESETTING*)&dbcws -hContact should have been returned by find*contact or addcontact -Returns 0 on success or nonzero if hContact was invalid -Note that DBCONTACTGETSETTING takes a pointer to a DBVARIANT, whereas -DBCONTACTWRITESETTING contains a DBVARIANT. -Because this is such a common function there are some short helper function at -the bottom of this header that use it. -Triggers a db/contact/settingchanged event just before it returns. -*/ -typedef struct { - const char *szModule; // pointer to name of the module that wrote the - // setting to get - const char *szSetting; // pointer to name of the setting to get - DBVARIANT value; // variant containing the value to set -} DBCONTACTWRITESETTING; -#define MS_DB_CONTACT_WRITESETTING "DB/Contact/WriteSetting" - /* db/contact/enumsettings v0.1.0.1+ Lists all the settings a specific modules has stored in the database for a specific contact. -- cgit v1.2.3