diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
commit | ddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch) | |
tree | 5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/TipperYM | |
parent | c39340bf493a1745a41317bbf937fc7eb6cbb26a (diff) |
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts
git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r-- | plugins/TipperYM/src/message_pump.cpp | 24 | ||||
-rw-r--r-- | plugins/TipperYM/src/options.cpp | 4 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 6 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.h | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.cpp | 56 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.h | 14 | ||||
-rw-r--r-- | plugins/TipperYM/src/tipper.cpp | 4 | ||||
-rw-r--r-- | plugins/TipperYM/src/translations.cpp | 46 | ||||
-rw-r--r-- | plugins/TipperYM/src/translations.h | 6 |
9 files changed, 78 insertions, 84 deletions
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index 3377994eb6..dd0ffc75d4 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -48,14 +48,14 @@ bool NeedWaitForContent(CLCINFOTIPEX *clcitex) if (opt.bWaitForContent && IsContactTooltip(clcitex))
{
- char *szProto = GetContactProto(clcitex->hItem);
+ char *szProto = GetContactProto((HCONTACT)clcitex->hItem);
if (!szProto) return false;
if (opt.bWaitForStatusMsg && !bStatusMsgReady)
{
- db_unset(clcitex->hItem, MODULE, "TempStatusMsg");
- if (CanRetrieveStatusMsg(clcitex->hItem, szProto) &&
- CallContactService(clcitex->hItem, PSS_GETAWAYMSG, 0, 0))
+ db_unset((HCONTACT)clcitex->hItem, MODULE, "TempStatusMsg");
+ if (CanRetrieveStatusMsg((HCONTACT)clcitex->hItem, szProto) &&
+ CallContactService((HCONTACT)clcitex->hItem, PSS_GETAWAYMSG, 0, 0))
{
if (WaitForContentTimerID)
KillTimer(0, WaitForContentTimerID);
@@ -69,7 +69,7 @@ bool NeedWaitForContent(CLCINFOTIPEX *clcitex) CallProtoService(szProto, PS_GETAVATARCAPS, AF_ENABLED, 0))
{
DBVARIANT dbv;
- if (!db_get_s(clcitex->hItem, "ContactPhoto", "File", &dbv))
+ if (!db_get_s((HCONTACT)clcitex->hItem, "ContactPhoto", "File", &dbv))
{
if (!strstr(dbv.pszVal, ".xml"))
{
@@ -137,14 +137,12 @@ unsigned int CALLBACK MessagePumpThread(void *param) }
case MUM_DELETEPOPUP:
{
- if (hwndTip)
- {
+ if (hwndTip) {
MyDestroyWindow(hwndTip);
hwndTip = 0;
}
- if (clcitex)
- {
+ if (clcitex) {
mir_free(clcitex);
clcitex = 0;
}
@@ -155,7 +153,7 @@ unsigned int CALLBACK MessagePumpThread(void *param) }
case MUM_GOTSTATUS:
{
- HANDLE hContact = (HANDLE)hwndMsg.wParam;
+ HCONTACT hContact = (HCONTACT)hwndMsg.wParam;
TCHAR *swzMsg = (TCHAR *)hwndMsg.lParam;
if (opt.bWaitForContent &&
@@ -171,7 +169,7 @@ unsigned int CALLBACK MessagePumpThread(void *param) if (swzMsg)
{
- db_set_ts(clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
+ db_set_ts((HCONTACT)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
mir_free(swzMsg);
}
@@ -193,7 +191,7 @@ unsigned int CALLBACK MessagePumpThread(void *param) }
case MUM_GOTAVATAR:
{
- HANDLE hContact = (HANDLE)hwndMsg.wParam;
+ HCONTACT hContact = (HCONTACT)hwndMsg.wParam;
if (opt.bWaitForContent &&
bAvatarReady == false &&
@@ -352,7 +350,7 @@ int ProtoAck(WPARAM wParam, LPARAM lParam) int AvatarChanged(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
PostMPMessage(MUM_GOTAVATAR, (WPARAM)hContact, 0);
return 0;
}
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 2d9c01ed4d..ed49ccb962 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -2101,7 +2101,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
{
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && db_get_b(hContact, MODULE, "FavouriteContact", 0))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -2118,7 +2118,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, BYTE isChecked;
int count = 0;
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
isChecked = (BYTE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index c2b01d3bf8..b9c3d80277 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -305,7 +305,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pwd->bIsTextTip = false;
pwd->iIndent = opt.iTextIndent;
pwd->iSidebarWidth= opt.iSidebarWidth;
- pwd->hContact = pwd->clcit.hItem;
+ pwd->hContact = (HCONTACT)pwd->clcit.hItem;
pwd->iIconIndex = (int)CallService(MS_CLIST_GETCONTACTICON, (WPARAM)pwd->hContact, 0);
// don't use stored status message
@@ -1528,7 +1528,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (dwItems & TRAYTIP_NUMCONTACTS) {
int iCount = 0, iCountOnline = 0;
- for (HANDLE hContact = db_find_first(pa->szModuleName); hContact; hContact = db_find_next(hContact, pa->szModuleName)) {
+ for (HCONTACT hContact = db_find_first(pa->szModuleName); hContact; hContact = db_find_next(hContact, pa->szModuleName)) {
if (db_get_w(hContact, pa->szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
iCountOnline++;
iCount++;
@@ -1646,7 +1646,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa bool bTitlePainted = false;
int iCount = 0, iCountOnline = 0;
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_b(hContact, MODULE, "FavouriteContact", 0)) {
char *proto = GetContactProto(hContact);
if (proto == NULL)
diff --git a/plugins/TipperYM/src/popwin.h b/plugins/TipperYM/src/popwin.h index 81d36b0210..64e8df08ce 100644 --- a/plugins/TipperYM/src/popwin.h +++ b/plugins/TipperYM/src/popwin.h @@ -107,7 +107,7 @@ typedef struct { HPEN hpenBorder, hpenDivider;
int iTitleHeight, iAvatarHeight, iIconsHeight, iTextHeight, iLabelWidth;
int iRealAvatarWidth, iRealAvatarHeight;
- HANDLE hContact;
+ HCONTACT hContact;
int iIconIndex;
CLCINFOTIPEX clcit;
TCHAR swzTitle[TITLE_TEXT_LEN];
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 74d6990c98..77938b3d62 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. #include "common.h"
-bool DBGetContactSettingAsString(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+bool DBGetContactSettingAsString(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
buff[0] = 0;
@@ -63,7 +63,7 @@ bool DBGetContactSettingAsString(HANDLE hContact, const char *szModuleName, cons return buff[0] ? true : false;
}
-bool CheckContactType(HANDLE hContact, const DISPLAYITEM &di)
+bool CheckContactType(HCONTACT hContact, const DISPLAYITEM &di)
{
if (di.type == DIT_ALL)
return true;
@@ -127,7 +127,7 @@ void StripBBCodesInPlace(TCHAR *swzText) }
}
-DWORD LastMessageTimestamp(HANDLE hContact)
+DWORD LastMessageTimestamp(HCONTACT hContact)
{
HANDLE hDbEvent = db_event_last(hContact);
while (hDbEvent) {
@@ -153,7 +153,7 @@ void FormatTimestamp(DWORD ts, char *szFormat, TCHAR *buff, int bufflen) CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, (WPARAM)ts, (LPARAM)&dbt);
}
-bool Uid(HANDLE hContact, char *szProto, TCHAR *buff, int bufflen)
+bool Uid(HCONTACT hContact, char *szProto, TCHAR *buff, int bufflen)
{
char *tmpProto = NULL;
@@ -184,7 +184,7 @@ bool UidName(char *szProto, TCHAR *buff, int bufflen) return false;
}
-TCHAR *GetLastMessageText(HANDLE hContact)
+TCHAR *GetLastMessageText(HCONTACT hContact)
{
HANDLE hDbEvent = db_event_last(hContact);
while (hDbEvent) {
@@ -210,7 +210,7 @@ TCHAR *GetLastMessageText(HANDLE hContact) return 0;
}
-bool CanRetrieveStatusMsg(HANDLE hContact, char *szProto)
+bool CanRetrieveStatusMsg(HCONTACT hContact, char *szProto)
{
if (opt.bGetNewStatusMsg)
{
@@ -242,26 +242,21 @@ bool CanRetrieveStatusMsg(HANDLE hContact, char *szProto) return false;
}
-TCHAR *GetStatusMessageText(HANDLE hContact)
+TCHAR *GetStatusMessageText(HCONTACT hContact)
{
TCHAR *swzMsg = 0;
DBVARIANT dbv;
char *szProto = GetContactProto(hContact);
- if (szProto)
- {
+ if (szProto) {
if (!strcmp(szProto, szMetaModuleName))
- {
- hContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
- }
- else
- {
+ hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ else {
WORD wStatus = (int)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
if (wStatus == ID_STATUS_OFFLINE)
return NULL;
- if (!db_get_ts(hContact, MODULE, "TempStatusMsg", &dbv))
- {
+ if (!db_get_ts(hContact, MODULE, "TempStatusMsg", &dbv)) {
if (_tcslen(dbv.ptszVal) != 0)
swzMsg = mir_tstrdup(dbv.ptszVal);
db_free(&dbv);
@@ -291,7 +286,7 @@ TCHAR *GetStatusMessageText(HANDLE hContact) return swzMsg;
}
-bool GetSysSubstText(HANDLE hContact, TCHAR *swzRawSpec, TCHAR *buff, int bufflen)
+bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int bufflen)
{
if (!_tcscmp(swzRawSpec, _T("uid")))
{
@@ -366,14 +361,15 @@ bool GetSysSubstText(HANDLE hContact, TCHAR *swzRawSpec, TCHAR *buff, int buffle }
else if (!_tcscmp(swzRawSpec, _T("meta_subuid")))
{
- HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
- if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND) return false;
+ HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND)
+ return false;
return Uid(hSubContact, 0, buff, bufflen);
}
else if (!_tcscmp(swzRawSpec, _T("meta_subproto")))
{
// get protocol of active subcontact
- HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND)
return false;
return GetSysSubstText(hSubContact, _T("account"), buff, bufflen);
@@ -413,18 +409,18 @@ bool GetSysSubstText(HANDLE hContact, TCHAR *swzRawSpec, TCHAR *buff, int buffle DWORD dwLastTs, dwNewTs, dwRecountTs;
DWORD dwTime, dwDiff;
int iNumber = 1;
- HANDLE hTmpContact = hContact;
+ HCONTACT hTmpContact = hContact;
char *szProto = GetContactProto(hContact);
if (szProto && !strcmp(szProto, szMetaModuleName))
{
iNumber = CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0);
- hTmpContact = (HANDLE)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, 0);
+ hTmpContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, 0);
}
for (int i = 0; i < iNumber; i++) {
if (i > 0)
- hTmpContact = (HANDLE)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
+ hTmpContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
dwRecountTs = db_get_dw(hTmpContact, MODULE, "LastCountTS", 0);
dwTime = (DWORD)time(0);
dwDiff = (dwTime - dwRecountTs);
@@ -478,7 +474,7 @@ bool GetSysSubstText(HANDLE hContact, TCHAR *swzRawSpec, TCHAR *buff, int buffle return false;
}
-bool GetSubstText(HANDLE hContact, const DISPLAYSUBST &ds, TCHAR *buff, int bufflen)
+bool GetSubstText(HCONTACT hContact, const DISPLAYSUBST &ds, TCHAR *buff, int bufflen)
{
TranslateFunc *transFunc = 0;
for (int i = 0; i < iTransFuncsCount; i++)
@@ -513,7 +509,7 @@ bool GetSubstText(HANDLE hContact, const DISPLAYSUBST &ds, TCHAR *buff, int buff return false;
}
-bool GetRawSubstText(HANDLE hContact, char *szRawSpec, TCHAR *buff, int bufflen)
+bool GetRawSubstText(HCONTACT hContact, char *szRawSpec, TCHAR *buff, int bufflen)
{
size_t lenght = strlen(szRawSpec);
for (size_t i = 0; i < lenght; i++)
@@ -545,7 +541,7 @@ bool GetRawSubstText(HANDLE hContact, char *szRawSpec, TCHAR *buff, int bufflen) return false;
}
-bool ApplySubst(HANDLE hContact, const TCHAR *swzSource, bool parseTipperVarsFirst, TCHAR *swzDest, int iDestLen)
+bool ApplySubst(HCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsFirst, TCHAR *swzDest, int iDestLen)
{
// hack - allow empty strings before passing to variables (note - zero length strings return false after this)
if (swzDest && swzSource && _tcslen(swzSource) == 0) {
@@ -789,12 +785,12 @@ error: return true;
}
-bool GetLabelText(HANDLE hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
+bool GetLabelText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
{
return ApplySubst(hContact, di.swzLabel, false, buff, bufflen);
}
-bool GetValueText(HANDLE hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
+bool GetValueText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
{
return ApplySubst(hContact, di.swzValue, di.bParseTipperVarsFirst, buff, bufflen);
}
@@ -893,7 +889,7 @@ TCHAR *GetProtoExtraStatusMessage(char *szProto) db_free(&dbv);
if (ServiceExists(MS_VARS_FORMATSTRING)) {
- HANDLE hContact = db_find_first();
+ HCONTACT hContact = db_find_first();
char *proto = GetContactProto(hContact);
while(!proto) {
hContact = db_find_next(hContact);
@@ -961,7 +957,7 @@ TCHAR *GetJabberAdvStatusText(char *szProto, const char *szSlot, const char *szV return swzText;
}
-HICON GetJabberActivityIcon(HANDLE hContact, char *szProto)
+HICON GetJabberActivityIcon(HCONTACT hContact, char *szProto)
{
DBVARIANT dbv;
HICON hIcon = NULL;
diff --git a/plugins/TipperYM/src/subst.h b/plugins/TipperYM/src/subst.h index 7df4a13cca..05e62014da 100644 --- a/plugins/TipperYM/src/subst.h +++ b/plugins/TipperYM/src/subst.h @@ -21,25 +21,25 @@ Boston, MA 02111-1307, USA. #ifndef _SUBST_INC
#define _SUBST_INC
-bool GetLabelText(HANDLE hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
-bool GetValueText(HANDLE hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
+bool GetLabelText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
+bool GetValueText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
-bool CheckContactType(HANDLE hContact, const DISPLAYITEM &di);
+bool CheckContactType(HCONTACT hContact, const DISPLAYITEM &di);
void StripBBCodesInPlace(TCHAR *text);
// can be used with hContact == 0 to get uid for a given proto
bool UidName(char *szProto, TCHAR *buff, int bufflen);
-bool Uid(HANDLE hContact, char *szProto, TCHAR *buff, int bufflen);
+bool Uid(HCONTACT hContact, char *szProto, TCHAR *buff, int bufflen);
// get info for status and tray tooltip
-bool DBGetContactSettingAsString(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
-bool CanRetrieveStatusMsg(HANDLE hContact, char *szProto);
+bool DBGetContactSettingAsString(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+bool CanRetrieveStatusMsg(HCONTACT hContact, char *szProto);
TCHAR *GetProtoStatusMessage(char *szProto, WORD status);
TCHAR *GetProtoExtraStatusTitle(char *szProto);
TCHAR *GetProtoExtraStatusMessage(char *szProto);
TCHAR *GetListeningTo(char *szProto);
TCHAR *GetJabberAdvStatusText(char *szProto, const char *szSlot, const char *szValue);
-HICON GetJabberActivityIcon(HANDLE hContact, char *szProto);
+HICON GetJabberActivityIcon(HCONTACT hContact, char *szProto);
#endif
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index c3161b17dc..91ef259fa6 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -111,9 +111,9 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) int EventDeleted(WPARAM wParam, LPARAM lParam)
{
DBEVENTINFO dbei = { sizeof(dbei) };
- if ( !db_event_get((HANDLE)lParam, &dbei))
+ if (!db_event_get((HANDLE)lParam, &dbei))
if (dbei.eventType == EVENTTYPE_MESSAGE)
- db_unset((HANDLE)wParam, MODULE, "LastCountTS");
+ db_unset((HCONTACT)wParam, MODULE, "LastCountTS");
return 0;
}
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 24276afbbe..5fcb384aa4 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -61,14 +61,14 @@ void AddTranslation(DBVTranslation *newTrans) mir_free(szName);
}
-TCHAR *NullTranslation(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *NullTranslation(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
if (DBGetContactSettingAsString(hContact, szModuleName, szSettingName, buff, bufflen))
return buff;
return NULL;
}
-TCHAR *TimestampToShortDate(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToShortDate(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -81,7 +81,7 @@ TCHAR *TimestampToShortDate(HANDLE hContact, const char *szModuleName, const cha return buff;
}
-TCHAR *TimestampToLongDate(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToLongDate(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -94,7 +94,7 @@ TCHAR *TimestampToLongDate(HANDLE hContact, const char *szModuleName, const char return buff;
}
-TCHAR *TimestampToTime(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToTime(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -107,7 +107,7 @@ TCHAR *TimestampToTime(HANDLE hContact, const char *szModuleName, const char *sz return buff;
}
-TCHAR *TimestampToTimeNoSecs(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToTimeNoSecs(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -120,7 +120,7 @@ TCHAR *TimestampToTimeNoSecs(HANDLE hContact, const char *szModuleName, const ch return buff;
}
-TCHAR *TimestampToTimeDifference(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
DWORD t = (DWORD)time(0);
@@ -140,7 +140,7 @@ TCHAR *TimestampToTimeDifference(HANDLE hContact, const char *szModuleName, cons return buff;
}
-TCHAR *SecondsToTimeDifference(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *SecondsToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD diff = db_get_dw(hContact, szModuleName, szSettingName, 0);
int d = (diff / 60 / 60 / 24);
@@ -156,7 +156,7 @@ TCHAR *SecondsToTimeDifference(HANDLE hContact, const char *szModuleName, const return buff;
}
-TCHAR *WordToStatusDesc(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *WordToStatusDesc(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
WORD wStatus = db_get_w(hContact, szModuleName, szSettingName, ID_STATUS_OFFLINE);
TCHAR *szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
@@ -164,7 +164,7 @@ TCHAR *WordToStatusDesc(HANDLE hContact, const char *szModuleName, const char *s return buff;
}
-TCHAR *ByteToYesNo(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToYesNo(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
@@ -184,7 +184,7 @@ TCHAR *ByteToYesNo(HANDLE hContact, const char *szModuleName, const char *szSett return 0;
}
-TCHAR *ByteToGender(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToGender(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
BYTE val = (BYTE)db_get_b(hContact, szModuleName, szSettingName, 0);
if (val == 'F')
@@ -198,7 +198,7 @@ TCHAR *ByteToGender(HANDLE hContact, const char *szModuleName, const char *szSet return buff;
}
-TCHAR *WordToCountry(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *WordToCountry(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
char *szCountryName = 0;
WORD cid = (WORD)db_get_w(hContact, szModuleName, szSettingName, (WORD)-1);
@@ -213,7 +213,7 @@ TCHAR *WordToCountry(HANDLE hContact, const char *szModuleName, const char *szSe return 0;
}
-TCHAR *DwordToIp(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *DwordToIp(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ip = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ip) {
@@ -243,7 +243,7 @@ bool GetInt(const DBVARIANT &dbv, int *iVal) return false;
}
-TCHAR *DayMonthYearToDate(HANDLE hContact, const char *szModuleName, const char *prefix, TCHAR *buff, int bufflen)
+TCHAR *DayMonthYearToDate(HCONTACT hContact, const char *szModuleName, const char *prefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -291,7 +291,7 @@ TCHAR *DayMonthYearToDate(HANDLE hContact, const char *szModuleName, const char return 0;
}
-TCHAR *DayMonthYearToAge(HANDLE hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *DayMonthYearToAge(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -340,7 +340,7 @@ TCHAR *DayMonthYearToAge(HANDLE hContact, const char *szModuleName, const char * return 0;
}
-TCHAR *HoursMinutesSecondsToTime(HANDLE hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *HoursMinutesSecondsToTime(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -384,7 +384,7 @@ TCHAR *HoursMinutesSecondsToTime(HANDLE hContact, const char *szModuleName, cons return 0;
}
-TCHAR *HoursMinutesToTime(HANDLE hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *HoursMinutesToTime(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -420,7 +420,7 @@ TCHAR *HoursMinutesToTime(HANDLE hContact, const char *szModuleName, const char return 0;
}
-TCHAR *DmyToTimeDifference(HANDLE hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *DmyToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -522,7 +522,7 @@ TCHAR *DmyToTimeDifference(HANDLE hContact, const char *szModuleName, const char return 0;
}
-TCHAR *DayMonthToDaysToNextBirthday(HANDLE hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *DayMonthToDaysToNextBirthday(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -575,7 +575,7 @@ TCHAR *DayMonthToDaysToNextBirthday(HANDLE hContact, const char *szModuleName, c }
-TCHAR *EmptyXStatusToDefaultName(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *EmptyXStatusToDefaultName(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
TCHAR szDefaultName[1024];
CUSTOM_STATUS xstatus = {0};
@@ -615,7 +615,7 @@ TCHAR *EmptyXStatusToDefaultName(HANDLE hContact, const char *szModuleName, cons return 0;
}
-TCHAR *TimezoneToTime(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimezoneToTime(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int timezone = db_get_b(hContact,szModuleName,szSettingName,256);
if (timezone==256 || (char)timezone==-100)
@@ -640,7 +640,7 @@ TCHAR *TimezoneToTime(HANDLE hContact, const char *szModuleName, const char *szS return buff;
}
-TCHAR *ByteToDay(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToDay(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int iDay = db_get_w(hContact, szModuleName, szSettingName, -1);
if (iDay > -1 && iDay < 7)
@@ -653,7 +653,7 @@ TCHAR *ByteToDay(HANDLE hContact, const char *szModuleName, const char *szSettin return 0;
}
-TCHAR *ByteToMonth(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToMonth(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int iMonth = db_get_w(hContact, szModuleName, szSettingName, 0);
if (iMonth > 0 && iMonth < 13)
@@ -666,7 +666,7 @@ TCHAR *ByteToMonth(HANDLE hContact, const char *szModuleName, const char *szSett return 0;
}
-TCHAR *ByteToLanguage(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToLanguage(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int iLang = db_get_b(hContact, szModuleName, szSettingName, 0);
if (iLang)
diff --git a/plugins/TipperYM/src/translations.h b/plugins/TipperYM/src/translations.h index 985920054e..7f09002bad 100644 --- a/plugins/TipperYM/src/translations.h +++ b/plugins/TipperYM/src/translations.h @@ -117,9 +117,9 @@ static char *months[12] = { void InitTranslations();
void DeinitTranslations();
-TCHAR *TimestampToTimeDifference(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
-TCHAR *EmptyXStatusToDefaultName(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
-TCHAR *WordToStatusDesc(HANDLE hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+TCHAR *TimestampToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+TCHAR *EmptyXStatusToDefaultName(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+TCHAR *WordToStatusDesc(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
#endif
|