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 --- plugins/SMS/src/common.h | 2 -- plugins/SMS/src/functions.cpp | 30 ------------------------------ 2 files changed, 32 deletions(-) (limited to 'plugins/SMS/src') diff --git a/plugins/SMS/src/common.h b/plugins/SMS/src/common.h index e88b11c131..7c2eab9643 100644 --- a/plugins/SMS/src/common.h +++ b/plugins/SMS/src/common.h @@ -113,10 +113,8 @@ extern SMS_SETTINGS ssSMSSettings; #define DB_SMS_SetByte(Contact,valueName,parValue) db_set_b(Contact,PROTOCOL_NAMEA,valueName,parValue) BOOL DB_GetStaticStringW(HANDLE hContact,LPSTR lpszModule,LPSTR lpszValueName,LPWSTR lpszRetBuff,SIZE_T dwRetBuffSize,SIZE_T *pdwRetBuffSize); #define DB_SMS_GetStaticStringW(Contact,ValueName,Ret,RetBuffSize,pRetBuffSize) DB_GetStaticStringW(Contact,PROTOCOL_NAMEA,ValueName,Ret,RetBuffSize,pRetBuffSize) -BOOL DB_SetStringExW(HANDLE hContact,LPSTR lpszModule,LPSTR lpszValueName,LPWSTR lpwszValue,SIZE_T dwValueSize); #define DB_SetStringW(Contact,Module,valueName,parValue) db_set_ws(Contact,Module,valueName,parValue) #define DB_SMS_SetStringW(Contact,valueName,parValue) db_set_ws(Contact,PROTOCOL_NAMEA,valueName,parValue) -#define DB_SMS_SetStringExW(Contact,valueName,parValue,parValueSize) DB_SetStringExW(Contact,PROTOCOL_NAMEA,valueName,parValue,parValueSize) LRESULT CALLBACK MessageSubclassProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam); diff --git a/plugins/SMS/src/functions.cpp b/plugins/SMS/src/functions.cpp index 7eca077e23..f61e6ee67d 100644 --- a/plugins/SMS/src/functions.cpp +++ b/plugins/SMS/src/functions.cpp @@ -26,36 +26,6 @@ BOOL DB_GetStaticStringW(HANDLE hContact,LPSTR lpszModule,LPSTR lpszValueName,LP return(bRet); } - -BOOL DB_SetStringExW(HANDLE hContact,LPSTR lpszModule,LPSTR lpszValueName,LPWSTR lpwszValue,SIZE_T dwValueSize) -{ - BOOL bRet=FALSE; - - if (lpwszValue && dwValueSize) - { - LPWSTR lpwszValueLocal=(LPWSTR)MEMALLOC(((dwValueSize+MAX_PATH)*sizeof(WCHAR))); - - if (lpwszValueLocal) - { - DBCONTACTWRITESETTING cws={0}; - - cws.szModule=lpszModule; - cws.szSetting=lpszValueName; - cws.value.type=DBVT_WCHAR; - cws.value.pwszVal=(WCHAR*)lpwszValueLocal; - CopyMemory(lpwszValueLocal,lpwszValue,(dwValueSize*sizeof(WCHAR))); - bRet=(CallService(MS_DB_CONTACT_WRITESETTING,(WPARAM)hContact,(LPARAM)&cws)==0); - - MEMFREE(lpwszValueLocal); - } - }else{ - bRet=TRUE; - db_unset(hContact,lpszModule,lpszValueName); - } - return(bRet); -} - - LPSTR GetModuleName(HANDLE hContact) { LPSTR lpszRet; -- cgit v1.2.3