diff options
Diffstat (limited to 'plugins/SeenPlugin/src')
| -rw-r--r-- | plugins/SeenPlugin/src/file.cpp | 2 | ||||
| -rw-r--r-- | plugins/SeenPlugin/src/history.cpp | 12 | ||||
| -rw-r--r-- | plugins/SeenPlugin/src/menu.cpp | 8 | ||||
| -rw-r--r-- | plugins/SeenPlugin/src/missed.cpp | 12 | ||||
| -rw-r--r-- | plugins/SeenPlugin/src/seen.h | 10 | ||||
| -rw-r--r-- | plugins/SeenPlugin/src/userinfo.cpp | 6 | ||||
| -rw-r--r-- | plugins/SeenPlugin/src/utils.cpp | 28 | 
7 files changed, 39 insertions, 39 deletions
diff --git a/plugins/SeenPlugin/src/file.cpp b/plugins/SeenPlugin/src/file.cpp index d049fda7d3..e6ce08c2ac 100644 --- a/plugins/SeenPlugin/src/file.cpp +++ b/plugins/SeenPlugin/src/file.cpp @@ -59,7 +59,7 @@ int InitFileOutput(void)  /*
  Writes a line into the log.
  */
 -void FileWrite(HCONTACT hcontact)
 +void FileWrite(MCONTACT hcontact)
  {
  	TCHAR szout[1024];
 diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp index 1d935e4d7b..e6faeb5ccb 100644 --- a/plugins/SeenPlugin/src/history.cpp +++ b/plugins/SeenPlugin/src/history.cpp @@ -31,7 +31,7 @@ char* BuildSetting(int historyLast) {  	return setting;
  }
 -void HistoryWrite(HCONTACT hContact)
 +void HistoryWrite(MCONTACT hContact)
  {
  	int historyMax = db_get_w(NULL, S_MOD, "HistoryMax", 10);
  	if (historyMax < 0)
 @@ -64,7 +64,7 @@ void HistoryWrite(HCONTACT hContact)  		db_set_w(hContact, S_MOD, "HistoryFirst", (historyFirst+1) % historyMax);
  }
 -void LoadHistoryList(HCONTACT hContact, HWND hwnd, int nList)
 +void LoadHistoryList(MCONTACT hContact, HWND hwnd, int nList)
  {
  	SendDlgItemMessage(hwnd, nList, LB_RESETCONTENT, 0, 0);
  	int historyMax = db_get_w(NULL,S_MOD,"HistoryMax",10);
 @@ -161,13 +161,13 @@ void MyResizeGetOffset (HWND hwndDlg, HWND hwndControl, int nWidth, int nHeight,  INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARAM lparam)
  {
 -	HCONTACT hContact;
 +	MCONTACT hContact;
  	TCHAR sztemp[1024];
  	switch(Message) {
  	case WM_INITDIALOG:
  		TranslateDialogDefault(hwndDlg);
 -		hContact = (HCONTACT)lparam;
 +		hContact = (MCONTACT)lparam;
  		SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lparam);
  		mir_sntprintf(sztemp, SIZEOF(sztemp), _T("%s: %s"),
  			CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR),
 @@ -199,7 +199,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA  		return CallService(MS_CLIST_MENUDRAWITEM,wparam,lparam);
  	case WM_COMMAND:
 -		hContact=(HCONTACT)GetWindowLongPtr(hwndDlg,GWLP_USERDATA);
 +		hContact=(MCONTACT)GetWindowLongPtr(hwndDlg,GWLP_USERDATA);
  		if (CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wparam),MPCF_CONTACTMENU),(LPARAM)hContact))
  			break;
 @@ -278,7 +278,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA  	return FALSE;
  }
 -void ShowHistory(HCONTACT hContact, BYTE isAlert)
 +void ShowHistory(MCONTACT hContact, BYTE isAlert)
  {
  	HWND hHistoryDlg = WindowList_Find(hWindowList,hContact);
  	if (hHistoryDlg == NULL) {
 diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp index 849c271dc6..575b232a43 100644 --- a/plugins/SeenPlugin/src/menu.cpp +++ b/plugins/SeenPlugin/src/menu.cpp @@ -30,14 +30,14 @@ Handles the messages sent by clicking the contact's menu item  */
  INT_PTR MenuitemClicked(WPARAM wparam,LPARAM)
  {
 -	ShowHistory((HCONTACT)wparam, 0);
 +	ShowHistory((MCONTACT)wparam, 0);
  	return 0;
  }
  int BuildContactMenu(WPARAM wparam,LPARAM)
  {
  	int id = -1, isetting;
 -	HCONTACT hContact = (HCONTACT)wparam;
 +	MCONTACT hContact = (MCONTACT)wparam;
  	char *szProto = GetContactProto(hContact);
  	CLISTMENUITEM cmi = { sizeof(cmi) };
 @@ -49,10 +49,10 @@ int BuildContactMenu(WPARAM wparam,LPARAM)  		DBVARIANT dbv;
  		if ( !db_get_ts(NULL, S_MOD, "MenuStamp", &dbv)) {
 -			cmi.ptszName = ParseString(dbv.ptszVal, (HCONTACT)wparam, 0);
 +			cmi.ptszName = ParseString(dbv.ptszVal, (MCONTACT)wparam, 0);
  			db_free(&dbv);
  		}
 -		else cmi.ptszName = ParseString(DEFAULT_MENUSTAMP, (HCONTACT)wparam, 0);
 +		else cmi.ptszName = ParseString(DEFAULT_MENUSTAMP, (MCONTACT)wparam, 0);
  		if ( !_tcscmp(cmi.ptszName, TranslateT("<unknown>"))) {	
  			if ( IsWatchedProtocol(szProto))
 diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp index 5746d0b647..6c32da815f 100644 --- a/plugins/SeenPlugin/src/missed.cpp +++ b/plugins/SeenPlugin/src/missed.cpp @@ -42,7 +42,7 @@ int RemoveUser(int pos)  int ResetMissed(void)
  {
 -	for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
 +	for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
  		db_set_b(hContact, S_MOD, "Missed", 0);
  	ZeroMemory(&mcs,sizeof(mcs));
 @@ -51,7 +51,7 @@ int ResetMissed(void)  int CheckIfOnline(void)
  {
 -	for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
 +	for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
  		if ( CallService(MS_CLIST_GETCONTACTICON, (WPARAM)hContact, 0) != ICON_OFFLINE)
  			db_set_b(hContact, S_MOD, "Missed", 2);
 @@ -128,12 +128,12 @@ int Test(WPARAM wparam,LPARAM lparam)  	if (CallService(MS_IGNORE_ISIGNORED,wparam,IGNOREEVENT_USERONLINE))
  		return 0;
 -	if ( db_get_b((HCONTACT)wparam,S_MOD,"Missed",0)==2)
 +	if ( db_get_b((MCONTACT)wparam,S_MOD,"Missed",0)==2)
  		return 0;
  	switch(lparam) {
  	case ICON_OFFLINE:
 -		if ( db_get_b((HCONTACT)wparam,S_MOD,"Missed",0) == 1) {
 +		if ( db_get_b((MCONTACT)wparam,S_MOD,"Missed",0) == 1) {
  			WORD missed = IsUserMissed(wparam);
  			if (!LOWORD(missed)) {
  				mcs.times[mcs.count]=1;
 @@ -141,7 +141,7 @@ int Test(WPARAM wparam,LPARAM lparam)  			}
  			else mcs.times[HIWORD(missed)]++;
 -			db_set_b((HCONTACT)wparam,S_MOD,"Missed",0);
 +			db_set_b((MCONTACT)wparam,S_MOD,"Missed",0);
  		}
  		break;
 @@ -152,7 +152,7 @@ int Test(WPARAM wparam,LPARAM lparam)  	case ICON_DND:
  	case ICON_FREE:
  	case ICON_INVIS:
 -		db_set_b((HCONTACT)wparam,S_MOD,"Missed",1);
 +		db_set_b((MCONTACT)wparam,S_MOD,"Missed",1);
  		break;
  	}
 diff --git a/plugins/SeenPlugin/src/seen.h b/plugins/SeenPlugin/src/seen.h index 15b357ac1f..fb548780f9 100644 --- a/plugins/SeenPlugin/src/seen.h +++ b/plugins/SeenPlugin/src/seen.h @@ -52,8 +52,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  #include "resource.h"
  #include "version.h"
 -WCHAR *any_to_IdleNotidleUnknown(HCONTACT hContact, const char *module_name, const char *setting_name, WCHAR *buff, int bufflen);
 -WCHAR *any_to_Idle(HCONTACT hContact, const char *module_name, const char *setting_name, WCHAR *buff, int bufflen);
 +WCHAR *any_to_IdleNotidleUnknown(MCONTACT hContact, const char *module_name, const char *setting_name, WCHAR *buff, int bufflen);
 +WCHAR *any_to_Idle(MCONTACT hContact, const char *module_name, const char *setting_name, WCHAR *buff, int bufflen);
  #define NUM100NANOSEC  116444736000000000
 @@ -94,7 +94,7 @@ typedef struct{  } MISSEDCONTACTS;
  int IsWatchedProtocol(const char* szProto);
 -TCHAR *ParseString(TCHAR*, HCONTACT, BYTE);
 +TCHAR *ParseString(TCHAR*, MCONTACT, BYTE);
  void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, DWORD colDword);
  DWORD GetDWordFromColors(COLORREF First, COLORREF Second);
  int OptionsInit(WPARAM,LPARAM);
 @@ -106,11 +106,11 @@ int ModeChange(WPARAM,LPARAM);  void SetOffline(void);
  int ModeChange_mo(WPARAM,LPARAM);
  int CheckIfOnline(void);
 -void ShowHistory(HCONTACT hContact, BYTE isAlert);
 +void ShowHistory(MCONTACT hContact, BYTE isAlert);
  struct logthread_info
  {
 -	HCONTACT hContact;
 +	MCONTACT hContact;
  	char   sProtoName[MAXMODULELABELLENGTH];
  	WORD   currStatus;
  };
 diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp index ddab491d6a..0f8ea6cc91 100644 --- a/plugins/SeenPlugin/src/userinfo.cpp +++ b/plugins/SeenPlugin/src/userinfo.cpp @@ -40,10 +40,10 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)  		{
  			TCHAR *szout;
  			if ( !db_get_ts(NULL, S_MOD, "UserStamp", &dbv)) {
 -				szout = ParseString(dbv.ptszVal, (HCONTACT)lparam, 0);
 +				szout = ParseString(dbv.ptszVal, (MCONTACT)lparam, 0);
  				db_free(&dbv);
  			}
 -			else szout = ParseString(DEFAULT_USERSTAMP, (HCONTACT)lparam, 0);
 +			else szout = ParseString(DEFAULT_USERSTAMP, (MCONTACT)lparam, 0);
  			SetDlgItemText(hdlg, IDC_INFOTEXT, szout);
  			if ( !lstrcmp(szout, TranslateT("<unknown>")))
 @@ -62,7 +62,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)  int UserinfoInit(WPARAM wparam,LPARAM lparam)
  {
 -	char *proto = GetContactProto((HCONTACT)lparam);
 +	char *proto = GetContactProto((MCONTACT)lparam);
  	if ( IsWatchedProtocol(proto)) {
  		OPTIONSDIALOGPAGE uip = { sizeof(uip) };
  		uip.hInstance = hInstance;
 diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 34c839d0d6..6b568cab30 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -20,8 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  #include "seen.h"
 -void FileWrite(HCONTACT);
 -void HistoryWrite(HCONTACT hcontact);
 +void FileWrite(MCONTACT);
 +void HistoryWrite(MCONTACT hcontact);
  extern HANDLE g_hShutdownEvent;
  char * courProtoName = 0;
 @@ -96,7 +96,7 @@ BOOL isMSN(char *protoname)  	return FALSE;
  }
 -DWORD isSeen(HCONTACT hcontact, SYSTEMTIME *st)
 +DWORD isSeen(MCONTACT hcontact, SYSTEMTIME *st)
  {
  	FILETIME ft;
  	ULONGLONG ll;
 @@ -142,7 +142,7 @@ TCHAR *wdays_short[] = { LPGENT("Sun."), LPGENT("Mon."), LPGENT("Tue."), LPGENT(  TCHAR *monthnames[] = { LPGENT("January"), LPGENT("February"), LPGENT("March"), LPGENT("April"), LPGENT("May"), LPGENT("June"), LPGENT("July"), LPGENT("August"), LPGENT("September"), LPGENT("October"), LPGENT("November"), LPGENT("December") };
  TCHAR *mnames_short[] = { LPGENT("Jan."), LPGENT("Feb."), LPGENT("Mar."), LPGENT("Apr."), LPGENT("May"), LPGENT("Jun."), LPGENT("Jul."), LPGENT("Aug."), LPGENT("Sep."), LPGENT("Oct."), LPGENT("Nov."), LPGENT("Dec.") };
 -TCHAR *ParseString(TCHAR *szstring, HCONTACT hcontact, BYTE isfile)
 +TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile)
  {
  #define MAXSIZE 1024
  	static TCHAR sztemp[MAXSIZE+1];
 @@ -386,7 +386,7 @@ LBL_charPtr:  	return sztemp;
  }
 -void _DBWriteTime(SYSTEMTIME *st, HCONTACT hcontact)
 +void _DBWriteTime(SYSTEMTIME *st, MCONTACT hcontact)
  {
  	db_set_w(hcontact,S_MOD,"Day",st->wDay);
  	db_set_w(hcontact,S_MOD,"Month",st->wMonth);
 @@ -398,7 +398,7 @@ void _DBWriteTime(SYSTEMTIME *st, HCONTACT hcontact)  }
 -void DBWriteTimeTS(DWORD t, HCONTACT hcontact){
 +void DBWriteTimeTS(DWORD t, MCONTACT hcontact){
  	SYSTEMTIME st;
  	FILETIME ft;
  	ULONGLONG ll = UInt32x32To64(CallService(MS_DB_TIME_TIMESTAMPTOLOCAL,t,0), 10000000) + NUM100NANOSEC;
 @@ -454,7 +454,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa  	switch(message) {
  		case WM_COMMAND: 
  			if (HIWORD(wParam) == STN_CLICKED){
 -				HCONTACT hContact = PUGetContact(hwnd);
 +				MCONTACT hContact = PUGetContact(hwnd);
  				if (hContact > 0) CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,0);
  			}
  		case WM_CONTEXTMENU:
 @@ -465,7 +465,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa  	return DefWindowProc(hwnd, message, wParam, lParam);
  };
 -void ShowPopup(HCONTACT hcontact, const char * lpzProto, int newStatus)
 +void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus)
  {
  	if ( CallService(MS_IGNORE_ISIGNORED, (WPARAM)hcontact, IGNOREEVENT_USERONLINE))
  		return;
 @@ -502,7 +502,7 @@ void ShowPopup(HCONTACT hcontact, const char * lpzProto, int newStatus)  	PUAddPopupT(&ppd);
  }
 -void myPlaySound(HCONTACT hcontact, WORD newStatus, WORD oldStatus)
 +void myPlaySound(MCONTACT hcontact, WORD newStatus, WORD oldStatus)
  {
  	if (CallService(MS_IGNORE_ISIGNORED,(WPARAM)hcontact,IGNOREEVENT_USERONLINE)) return;
  	//oldStatus and hcontact are not used yet
 @@ -548,7 +548,7 @@ int UpdateValues(WPARAM wparam,LPARAM lparam)  	// to make this code faster
  	if (!wparam) return 0;
 -	HCONTACT hContact = (HCONTACT)wparam;
 +	MCONTACT hContact = (MCONTACT)wparam;
  	DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING *)lparam;
  	//if (CallService(MS_IGNORE_ISIGNORED,(WPARAM)hContact,IGNOREEVENT_USERONLINE)) return 0;
  	BOOL isIdleEvent = includeIdle?(strcmp(cws->szSetting,"IdleTS")==0):0;
 @@ -642,7 +642,7 @@ static void cleanThread(void *param)  	// I hope in 10 secons all logged-in contacts will be listed
  	if ( WaitForSingleObject(g_hShutdownEvent, 10000) == WAIT_TIMEOUT) {
 -		for (HCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto)) {
 +		for (MCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto)) {
  			WORD oldStatus = db_get_w(hContact,S_MOD,"StatusTriger",ID_STATUS_OFFLINE) | 0x8000;
  			if (oldStatus > ID_STATUS_OFFLINE) {
  				if (db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)==ID_STATUS_OFFLINE){
 @@ -711,7 +711,7 @@ int ModeChange(WPARAM wparam,LPARAM lparam)  	return 0;
  }
 -short int isDbZero(HCONTACT hContact, const char *module_name, const char *setting_name)
 +short int isDbZero(MCONTACT hContact, const char *module_name, const char *setting_name)
  {
  	DBVARIANT dbv;
  	if ( !db_get(hContact, module_name, setting_name, &dbv)) {
 @@ -729,7 +729,7 @@ short int isDbZero(HCONTACT hContact, const char *module_name, const char *setti  	return -1;
  }
 -TCHAR *any_to_IdleNotidleUnknown(HCONTACT hContact, const char *module_name, const char *setting_name, TCHAR *buff, int bufflen) {
 +TCHAR *any_to_IdleNotidleUnknown(MCONTACT hContact, const char *module_name, const char *setting_name, TCHAR *buff, int bufflen) {
  	short int r = isDbZero(hContact, module_name, setting_name);
  	if (r==-1){
  		_tcsncpy(buff, TranslateT("Unknown"), bufflen);
 @@ -740,7 +740,7 @@ TCHAR *any_to_IdleNotidleUnknown(HCONTACT hContact, const char *module_name, con  	return buff;
  }
 -TCHAR *any_to_Idle(HCONTACT hContact, const char *module_name, const char *setting_name, TCHAR *buff, int bufflen) {
 +TCHAR *any_to_Idle(MCONTACT hContact, const char *module_name, const char *setting_name, TCHAR *buff, int bufflen) {
  	if (isDbZero(hContact, module_name, setting_name)==0) { //DB setting is NOT zero and exists
  		buff[0] = L'/';
  		_tcsncpy(&buff[1], TranslateT("Idle"), bufflen-1);
  | 
