diff options
Diffstat (limited to 'plugins/BasicHistory/src')
| -rw-r--r-- | plugins/BasicHistory/src/BasicHistory.cpp | 6 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/BinaryExport.cpp | 6 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/BinaryExport.h | 2 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/DatExport.cpp | 6 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/DatExport.h | 4 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/EventList.cpp | 18 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/EventList.h | 16 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/ExportManager.cpp | 10 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/ExportManager.h | 6 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/HistoryWindow.cpp | 53 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/HistoryWindow.h | 10 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/IImport.h | 2 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/Options.cpp | 8 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/Options.h | 2 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/Scheduler.cpp | 10 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/SearchContext.h | 2 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/Searcher.cpp | 4 | 
17 files changed, 80 insertions, 85 deletions
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 2542a43364..c02fe931d7 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -76,7 +76,7 @@ INT_PTR ExecuteTaskService(WPARAM wParam, LPARAM lParam);  int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
  {
 -	int count = EventList::GetContactMessageNumber((HANDLE)wParam);
 +	int count = EventList::GetContactMessageNumber((HCONTACT)wParam);
  	bool isInList = HistoryWindow::IsInList(GetForegroundWindow());
  	Menu_ShowItem(hContactMenu, count != 0);
 @@ -196,7 +196,7 @@ HICON LoadIconEx(int iconId, int big)  INT_PTR ShowContactHistory(WPARAM wParam, LPARAM lParam)
  {
 -	HANDLE hContact = (HANDLE)wParam;
 +	HCONTACT hContact = (HCONTACT)wParam;
  	HistoryWindow::Open(hContact);
  	return 0;
  }
 @@ -210,7 +210,7 @@ int PreShutdownHistoryModule(WPARAM, LPARAM)  int HistoryContactDelete(WPARAM wParam, LPARAM)
  {
 -	HistoryWindow::Close((HANDLE)wParam);
 +	HistoryWindow::Close((HCONTACT)wParam);
  	return 0;
  }
 diff --git a/plugins/BasicHistory/src/BinaryExport.cpp b/plugins/BasicHistory/src/BinaryExport.cpp index 0e1636af2f..5a506d9791 100644 --- a/plugins/BasicHistory/src/BinaryExport.cpp +++ b/plugins/BasicHistory/src/BinaryExport.cpp @@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.  #define EXP_FILE (*((std::ofstream*)IExport::stream))
  #define IMP_FILE (*((std::ifstream*)IImport::stream))
 -std::wstring GetProtocolName(HANDLE hContact);
 -std::wstring GetContactId(HANDLE hContact);
 +std::wstring GetProtocolName(HCONTACT hContact);
 +std::wstring GetContactId(HCONTACT hContact);
  #pragma pack(push, 1)
 @@ -158,7 +158,7 @@ bool ReadHeader(BinaryFileHeader& header, std::istream* stream)  	return true;
  }
 -int BinaryExport::IsContactInFile(const std::vector<HANDLE>& contacts)
 +int BinaryExport::IsContactInFile(const std::vector<HCONTACT>& contacts)
  {
  	BinaryFileHeader header;
  	if (!ReadHeader(header, IImport::stream))
 diff --git a/plugins/BasicHistory/src/BinaryExport.h b/plugins/BasicHistory/src/BinaryExport.h index 386625226f..493e707088 100644 --- a/plugins/BasicHistory/src/BinaryExport.h +++ b/plugins/BasicHistory/src/BinaryExport.h @@ -34,7 +34,7 @@ public:  	virtual void WriteFooter();
  	virtual void WriteGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText);
  	virtual void WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO& dbei);
 -	virtual int IsContactInFile(const std::vector<HANDLE>& contacts);
 +	virtual int IsContactInFile(const std::vector<HCONTACT>& contacts);
  	virtual bool GetEventList(std::vector<IImport::ExternalMessage>& eventList);
  	virtual ~BinaryExport();
 diff --git a/plugins/BasicHistory/src/DatExport.cpp b/plugins/BasicHistory/src/DatExport.cpp index 491f446560..c0882ddc61 100644 --- a/plugins/BasicHistory/src/DatExport.cpp +++ b/plugins/BasicHistory/src/DatExport.cpp @@ -23,8 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.  #define EXP_FILE (*((std::ofstream*)IExport::stream))
  #define IMP_FILE (*((std::ifstream*)IImport::stream))
 -std::wstring GetProtocolName(HANDLE hContact);
 -std::wstring GetContactId(HANDLE hContact);
 +std::wstring GetProtocolName(HCONTACT hContact);
 +std::wstring GetContactId(HCONTACT hContact);
  #pragma pack(push, 1)
 @@ -128,7 +128,7 @@ bool ReadHeader(MCHeader& header, std::istream* stream)  	return true;
  }
 -int DatExport::IsContactInFile(const std::vector<HANDLE>& contacts)
 +int DatExport::IsContactInFile(const std::vector<HCONTACT>& contacts)
  {
  	MCHeader header;
  	if (!ReadHeader(header, IImport::stream))
 diff --git a/plugins/BasicHistory/src/DatExport.h b/plugins/BasicHistory/src/DatExport.h index 980a12d148..9609a994f6 100644 --- a/plugins/BasicHistory/src/DatExport.h +++ b/plugins/BasicHistory/src/DatExport.h @@ -34,7 +34,7 @@ public:  	virtual void WriteFooter();
  	virtual void WriteGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText);
  	virtual void WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO& dbei);
 -	virtual int IsContactInFile(const std::vector<HANDLE>& contacts);
 +	virtual int IsContactInFile(const std::vector<HCONTACT>& contacts);
  	virtual bool GetEventList(std::vector<IImport::ExternalMessage>& eventList);
  	DatExport()
 @@ -45,7 +45,7 @@ public:  	virtual ~DatExport();
  private:
  	int dataSize;
 -	HANDLE hContact;
 +	HCONTACT hContact;
  	std::string memBuf;
  	inline int WriteString(const std::wstring &str);
  	//inline bool ReadString(std::wstring &str, int size);
 diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index 0ec5f8b5c0..044b32e3e5 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -40,7 +40,7 @@ EventList::EventList()  	goldBlobSize = 0;
  }
 -EventList::EventList(HANDLE _hContact, int filter)
 +EventList::EventList(HCONTACT _hContact, int filter)
  	:hWnd(NULL),
  	isWnd(false),
  	hContact(_hContact),
 @@ -188,7 +188,7 @@ std::wstring EventList::GetFilterName()  	return filterName;
  }
 -void EventList::GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, HANDLE _hContact)
 +void EventList::GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, HCONTACT _hContact)
  {
  	bool isWndLocal = isWnd;
  	EventTempIndex ti;
 @@ -299,7 +299,7 @@ void EventList::RefreshEventList()  	}
  }
 -bool EventList::SearchInContact(HANDLE hContact, TCHAR *strFind, ComparatorInterface* compFun)
 +bool EventList::SearchInContact(HCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun)
  {
  	InitFilters();
 @@ -431,7 +431,7 @@ std::wstring EventList::GetMyName()  	return myName;
  }
 -inline std::wstring GetProtocolName(HANDLE hContact)
 +inline std::wstring GetProtocolName(HCONTACT hContact)
  {
  	char* ac = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)hContact, 0);
  	std::wstring proto1;
 @@ -471,7 +471,7 @@ std::wstring EventList::GetMyId()  	return myId;
  }
 -inline std::wstring GetContactId(HANDLE hContact)
 +inline std::wstring GetContactId(HCONTACT hContact)
  {
  	std::wstring id;
  	CONTACTINFO ci;
 @@ -643,7 +643,7 @@ CRITICAL_SECTION EventList::criticalSection;  std::map<HANDLE, EventList::ImportDiscData> EventList::contactFileMap;
  std::wstring EventList::contactFileDir;
 -void EventList::AddImporter(HANDLE hContact, IImport::ImportType type, const std::wstring& file)
 +void EventList::AddImporter(HCONTACT hContact, IImport::ImportType type, const std::wstring& file)
  {
  	EnterCriticalSection(&criticalSection);
  	TCHAR buf[32];
 @@ -673,7 +673,7 @@ void EventList::Deinit()  	DeleteCriticalSection(&EventList::criticalSection);
  }
 -int EventList::GetContactMessageNumber(HANDLE hContact)
 +int EventList::GetContactMessageNumber(HCONTACT hContact)
  {
  	int count = db_event_count(hContact);
  	EnterCriticalSection(&criticalSection);
 @@ -685,7 +685,7 @@ int EventList::GetContactMessageNumber(HANDLE hContact)  	return count;
  }
 -bool EventList::IsImportedHistory(HANDLE hContact)
 +bool EventList::IsImportedHistory(HCONTACT hContact)
  {
  	bool count = false;
  	EnterCriticalSection(&criticalSection);
 @@ -697,7 +697,7 @@ bool EventList::IsImportedHistory(HANDLE hContact)  	return count;
  }
 -void EventList::DeleteImporter(HANDLE hContact)
 +void EventList::DeleteImporter(HCONTACT hContact)
  {
  	EnterCriticalSection(&criticalSection);
  	std::map<HANDLE, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
 diff --git a/plugins/BasicHistory/src/EventList.h b/plugins/BasicHistory/src/EventList.h index a32ff92b9c..6a3327760c 100644 --- a/plugins/BasicHistory/src/EventList.h +++ b/plugins/BasicHistory/src/EventList.h @@ -80,7 +80,7 @@ private:  	void InitFilters();
  	void InitNames();
  	void AddGroup(const EventIndex& ev);
 -	void GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, HANDLE _hContact);
 +	void GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, HCONTACT _hContact);
  	void ImportMessages(const std::vector<IImport::ExternalMessage>& messages);
  protected:
  	TCHAR contactName[256];
 @@ -102,11 +102,11 @@ protected:  	void RebuildGroup(int selected);
  public:
  	EventList();
 -	EventList(HANDLE _hContact, int filter);
 +	EventList(HCONTACT _hContact, int filter);
  	~EventList();
  	HWND hWnd;
 -	HANDLE hContact;
 +	HCONTACT hContact;
  	std::vector<std::deque<EventIndex> > eventList;
  	bool useImportedMessages;
 @@ -116,7 +116,7 @@ public:  	int GetFilterNr();
  	std::wstring GetFilterName();
  	void RefreshEventList();
 -	bool SearchInContact(HANDLE hContact, TCHAR *strFind, ComparatorInterface* compFun);
 +	bool SearchInContact(HCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun);
  	std::wstring GetContactName();
  	std::wstring GetMyName();
  	std::wstring GetProtocolName();
 @@ -124,10 +124,10 @@ public:  	std::wstring GetContactId();
  	std::string GetBaseProtocol();
  	void MargeMessages(const std::vector<IImport::ExternalMessage>& messages);
 -	static void AddImporter(HANDLE hContact, IImport::ImportType type, const std::wstring& file);
 -	static int GetContactMessageNumber(HANDLE hContact);
 -	static bool IsImportedHistory(HANDLE hContact);
 -	static void DeleteImporter(HANDLE hContact);
 +	static void AddImporter(HCONTACT hContact, IImport::ImportType type, const std::wstring& file);
 +	static int GetContactMessageNumber(HCONTACT hContact);
 +	static bool IsImportedHistory(HCONTACT hContact);
 +	static void DeleteImporter(HCONTACT hContact);
  	static void GetObjectDescription( DBEVENTINFO *dbei, TCHAR* str, int cbStr );
  	bool GetEventData(const EventIndex& ev, EventData& data);
  	void GetExtEventDBei(const EventIndex& ev);
 diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index 05edac8053..30453b10a9 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -26,8 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.  #include "Options.h"
  #include "codecvt_CodePage.h"
 -ExportManager::ExportManager(HWND _hwnd, HANDLE _hContact, int filter)
 -	:EventList(_hContact, filter),
 +ExportManager::ExportManager(HWND _hwnd, HCONTACT _hContact, int filter) :
 +	EventList(_hContact, filter),
  	hwnd(_hwnd),
  	oldOnTop(false)
  {
 @@ -196,7 +196,7 @@ const TCHAR* ExportManager::GetExt(IImport::ImportType type)  	return ext;
  }
 -int ExportManager::Import(IImport::ImportType type, const std::vector<HANDLE>& contacts)
 +int ExportManager::Import(IImport::ImportType type, const std::vector<HCONTACT>& contacts)
  {
  	IImport* imp = NULL;
  	switch(type) {
 @@ -233,7 +233,7 @@ int ExportManager::Import(IImport::ImportType type, const std::vector<HANDLE>& c  	return t;
  }
 -bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err, bool* differentContact, std::vector<HANDLE>* contacts)
 +bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err, bool* differentContact, std::vector<HCONTACT>* contacts)
  {
  	IImport* imp = NULL;
  	switch(type) {
 @@ -258,7 +258,7 @@ bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::Extern  		return false;
  	imp->SetStream(stream);
 -	std::vector<HANDLE> v;
 +	std::vector<HCONTACT> v;
  	v.push_back(hContact);
  	bool ret = true;
  	int contInFile = imp->IsContactInFile(v);
 diff --git a/plugins/BasicHistory/src/ExportManager.h b/plugins/BasicHistory/src/ExportManager.h index 17ed0bb8ef..c0a3a8acf7 100644 --- a/plugins/BasicHistory/src/ExportManager.h +++ b/plugins/BasicHistory/src/ExportManager.h @@ -30,7 +30,7 @@ private:  protected:
  	virtual void AddGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText, int ico);
  public:
 -	ExportManager(HWND _hwnd, HANDLE _hContact, int filter);
 +	ExportManager(HWND _hwnd, HCONTACT _hContact, int filter);
  	void SetAutoExport(const std::wstring _file, int _deltaTime, DWORD _now)
  	{
 @@ -52,8 +52,8 @@ public:  	bool Export(IExport::ExportType type);
  	void SetDeleteWithoutExportEvents(int _deltaTime, DWORD _now);
  	void DeleteExportedEvents();
 -	int Import(IImport::ImportType type, const std::vector<HANDLE>& contacts);
 -	bool Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err = NULL, bool* differentContact = NULL, std::vector<HANDLE>* contacts = NULL);
 +	int Import(IImport::ImportType type, const std::vector<HCONTACT>& contacts);
 +	bool Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err = NULL, bool* differentContact = NULL, std::vector<HCONTACT>* contacts = NULL);
  	static const TCHAR* GetExt(IImport::ImportType type);
  };
 diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 0e998322e7..766b8805d6 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -38,7 +38,7 @@ extern IconItem iconList[];  void ResetCList(HWND hWnd);
 -HistoryWindow::HistoryWindow(HANDLE _hContact) :
 +HistoryWindow::HistoryWindow(HCONTACT _hContact) :
  	isDestroyed(true),
  	splitterY(0),
  	splitterOrgY(0),
 @@ -176,7 +176,7 @@ void HistoryWindow::Deinit()  	}
  }
 -void HistoryWindow::Open(HANDLE hContact)
 +void HistoryWindow::Open(HCONTACT hContact)
  {
  	if (hContact == NULL)
  	{
 @@ -199,7 +199,7 @@ void HistoryWindow::Open(HANDLE hContact)  	}
  }
 -void HistoryWindow::Close(HANDLE hContact)
 +void HistoryWindow::Close(HCONTACT hContact)
  {
  	std::map<HANDLE, HistoryWindow*>::iterator it = windows.find(hContact);
  	if (it != windows.end())
 @@ -243,7 +243,7 @@ void  HistoryWindow::Close(HistoryWindow* historyWindow)  	}
  }
 -void HistoryWindow::RebuildEvents(HANDLE hContact)
 +void HistoryWindow::RebuildEvents(HCONTACT hContact)
  {
  	if (hContact != NULL)
  	{
 @@ -427,7 +427,7 @@ void HistoryWindow::OptionsSearchingChanged()  INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM)
  {
 -	HANDLE hContact = (HANDLE)wParam;
 +	HCONTACT hContact = (HCONTACT)wParam;
  	HWND hWnd = NULL;
  	int start = 0;
  	int end = 0;
 @@ -568,18 +568,18 @@ void OpenOptions(char* group, char* page, char* tab = NULL)  class ShowMessageData
  {
  public:
 -	ShowMessageData(HANDLE _hContact)
 +	ShowMessageData(HCONTACT _hContact)
  		:hContact(_hContact)
  	{
  	}
 -	ShowMessageData(HANDLE _hContact, const std::wstring &_str)
 +	ShowMessageData(HCONTACT _hContact, const std::wstring &_str)
  		:hContact(_hContact),
  		str(_str)
  	{
  	}
 -	HANDLE hContact;
 +	HCONTACT hContact;
  	std::wstring str;
  };
 @@ -1655,7 +1655,7 @@ void HistoryWindow::ReloadContacts()  		}
  	}
 -	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 (EventList::GetContactMessageNumber(_hContact) && (metaContactProto == NULL || db_get_b(_hContact, metaContactProto, "IsSubcontact", 0) == 0)) {
  			HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
  			if (hItem == NULL)
 @@ -1779,7 +1779,7 @@ bool HistoryWindow::DoHotkey(UINT msg, LPARAM lParam, WPARAM wParam, int window)  void HistoryWindow::RestorePos()
  {
 -	HANDLE contactToLoad = hContact;
 +	HCONTACT contactToLoad = hContact;
  	if (hContact == NULL) {
  		Utils_RestoreWindowPosition(hWnd,NULL,MODULE,"history_");
  		contactToLoad = NULL;
 @@ -1803,9 +1803,9 @@ void HistoryWindow::RestorePos()  void HistoryWindow::SavePos(bool all)
  {
 -	HANDLE contactToSave = hContact;
 +	HCONTACT contactToSave = hContact;
  	if (all) {
 -		for (HANDLE _hContact = db_find_first(); _hContact; _hContact = db_find_next(_hContact)) {
 +		for (HCONTACT _hContact = db_find_first(); _hContact; _hContact = db_find_next(_hContact)) {
  			db_unset(_hContact, MODULE, "history_x");
  			db_unset(_hContact, MODULE, "history_y");
  			db_unset(_hContact, MODULE, "history_width");
 @@ -2027,13 +2027,13 @@ void HistoryWindow::DoImport(IImport::ImportType type)  	ExportManager exp(hWnd, hContact, GetFilterNr());
  	std::vector<IImport::ExternalMessage> messages;
  	std::wstring err;
 -	std::vector<HANDLE> contacts;
 +	std::vector<HCONTACT> contacts;
 -	for (HANDLE _hContact = db_find_first(); _hContact != NULL; _hContact = db_find_next(_hContact))
 +	for (HCONTACT _hContact = db_find_first(); _hContact != NULL; _hContact = db_find_next(_hContact))
  		contacts.push_back(_hContact);
  	bool changeContact = false;
 -	HANDLE lastContact = hContact;
 +	HCONTACT lastContact = hContact;
  	int i = 1;
  	do
  	{
 @@ -2173,14 +2173,11 @@ bool HistoryWindow::ContactChanged(bool sync)  {
  	if (!isLoading)
  	{
 -		HANDLE hItem = (HANDLE)SendDlgItemMessage(hWnd, IDC_LIST_CONTACTS, CLM_GETSELECTION, 0, 0);
 -		if (hItem != NULL)
 -		{
 +		HCONTACT hItem = (HCONTACT)SendDlgItemMessage(hWnd, IDC_LIST_CONTACTS, CLM_GETSELECTION, 0, 0);
 +		if (hItem != NULL) {
  			int typeOf = SendDlgItemMessage(hWnd, IDC_LIST_CONTACTS, CLM_GETITEMTYPE,(WPARAM)hItem,0);
 -			if (typeOf == CLCIT_CONTACT)
 -			{
 -				if (hContact != hItem)
 -				{
 +			if (typeOf == CLCIT_CONTACT) {
 +				if (hContact != hItem) {
  					ChangeToFreeWindow(this);
  					isLoading = true;
  					hContact = hItem;
 @@ -2192,10 +2189,8 @@ bool HistoryWindow::ContactChanged(bool sync)  					return true;
  				}
  			}
 -			else if (typeOf == CLCIT_INFO && hSystem == hItem)
 -			{
 -				if (hContact != NULL)
 -				{
 +			else if (typeOf == CLCIT_INFO && hSystem == hItem) {
 +				if (hContact != NULL) {
  					ChangeToFreeWindow(this);
  					isLoading = true;
  					hContact = NULL;
 @@ -2261,11 +2256,11 @@ void HistoryWindow::FormatQuote(std::wstring& quote, const MessageData& md, cons  		while(f > 0 && f < (int)msg.length());
  }
 -HANDLE HistoryWindow::GetNextContact(HANDLE hContact, int adder)
 +HCONTACT HistoryWindow::GetNextContact(HCONTACT hContact, int adder)
  {
  	HWND contactList = GetDlgItem(hWnd,IDC_LIST_CONTACTS);
  	bool find = false;
 -	HANDLE _hContact;
 +	HCONTACT _hContact;
  	if (adder > 0) {
  		if (hContact != NULL) {
  			_hContact = db_find_next(hContact);
 @@ -2299,7 +2294,7 @@ HANDLE HistoryWindow::GetNextContact(HANDLE hContact, int adder)  		}
  	}
  	else {
 -		HANDLE lastContact = NULL;
 +		HCONTACT lastContact = NULL;
  		_hContact = db_find_first();
  		while(_hContact && _hContact != hContact) {
  			HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
 diff --git a/plugins/BasicHistory/src/HistoryWindow.h b/plugins/BasicHistory/src/HistoryWindow.h index 66202937b4..4bebe0e738 100644 --- a/plugins/BasicHistory/src/HistoryWindow.h +++ b/plugins/BasicHistory/src/HistoryWindow.h @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.  class HistoryWindow : public SearchContext
  {
  private:
 -	HistoryWindow(HANDLE _hContact);
 +	HistoryWindow(HCONTACT _hContact);
  	void Initialise();
  	void Destroy();
  	void SplitterMoved(HWND splitter, LONG pos, bool screenPos);
 @@ -75,9 +75,9 @@ protected:  public:
  	~HistoryWindow();
  	static void Deinit();
 -	static void Open(HANDLE hContact);
 -	static void Close(HANDLE hContact);
 -	static void RebuildEvents(HANDLE hContact);
 +	static void Open(HCONTACT hContact);
 +	static void Close(HCONTACT hContact);
 +	static void RebuildEvents(HCONTACT hContact);
  	static bool IsInList(HWND hWnd);
  	static int FontsChanged(WPARAM wParam, LPARAM lParam);
  	static INT_PTR DeleteAllUserHistory(WPARAM wParam, LPARAM lParam);
 @@ -89,7 +89,7 @@ public:  	// SearchContext interface
  	virtual void SelectEventGroup(int sel);
 -	virtual HANDLE GetNextContact(HANDLE hContact, int adder);
 +	virtual HCONTACT GetNextContact(HCONTACT hContact, int adder);
  	virtual void SelectContact(HANDLE _hContact);
  };
 diff --git a/plugins/BasicHistory/src/IImport.h b/plugins/BasicHistory/src/IImport.h index aef3b35179..6fc3b6f340 100644 --- a/plugins/BasicHistory/src/IImport.h +++ b/plugins/BasicHistory/src/IImport.h @@ -43,7 +43,7 @@ public:  	}
  	virtual const TCHAR* GetExt() = 0;
 -	virtual int IsContactInFile(const std::vector<HANDLE>& contacts) = 0;
 +	virtual int IsContactInFile(const std::vector<HCONTACT>& contacts) = 0;
  	virtual bool GetEventList(std::vector<ExternalMessage>& eventList) = 0;
  	virtual ~IImport()
 diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index a8db8de746..bd563ed046 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -562,7 +562,7 @@ void Options::SaveTasks(std::list<TaskOptions>* tasks)  		db_set_s(0, MODULE, buf, it->zipPassword.c_str());
  		mir_snprintf(buf, SIZEOF(buf), "IsInTask_%d", i);
 -		for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
 +		for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
  			db_unset(hContact, MODULE, buf);
  		for (size_t j = 0; j < it->contacts.size(); ++j)
 @@ -617,7 +617,7 @@ void Options::SaveTasks(std::list<TaskOptions>* tasks)  		db_unset(NULL, MODULE, buf);
  		mir_snprintf(buf, SIZEOF(buf), "IsInTask_%d", i);
 -		for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
 +		for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
  			db_unset(hContact, MODULE, buf);
  	}
 @@ -705,7 +705,7 @@ void Options::LoadTasks()  		}
  		mir_snprintf(buf, SIZEOF(buf), "IsInTask_%d", i);
 -		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, buf, 0) == 1)
  				to.contacts.push_back(hContact);
 @@ -1587,7 +1587,7 @@ void SaveList(HWND hwnd, HANDLE hSystem, TaskOptions* to)  	if (hSystem)
  		to->isSystem = SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM) hSystem, 0) != 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) SendMessage(hwnd, CLM_FINDCONTACT, (WPARAM) hContact, 0);
  		if (hItem && SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM) hItem, 0))
  			to->contacts.push_back(hContact);
 diff --git a/plugins/BasicHistory/src/Options.h b/plugins/BasicHistory/src/Options.h index 21a0976d9d..99da9d7908 100644 --- a/plugins/BasicHistory/src/Options.h +++ b/plugins/BasicHistory/src/Options.h @@ -92,7 +92,7 @@ struct TaskOptions  	std::wstring filePath;
  	std::wstring taskName;
  	std::string zipPassword; // char* because zip file using ANSI password
 -	std::vector<HANDLE> contacts;
 +	std::vector<HCONTACT> contacts;
  	TaskOptions()
  	{
  		forceExecute = false;
 diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index 25d6e61053..9f52474d35 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -219,7 +219,7 @@ bool IsValidTask(TaskOptions& to, std::list<TaskOptions>* top, std::wstring* err  static void CALLBACK DoRebuildEventsInMainAPCFunc(ULONG_PTR dwParam)
  {
 -	HANDLE* contacts = (HANDLE*) dwParam;
 +	HCONTACT *contacts = (HCONTACT*)dwParam;
  	size_t size = (size_t)contacts[0];
  	for (size_t i = 1; i <= size; ++i)
  		HistoryWindow::RebuildEvents(contacts[i]);
 @@ -277,7 +277,7 @@ bool DoTask(TaskOptions& to)  		std::wstring filePath = to.filePath;
  		std::wstring dir;
  		std::list<std::wstring> files;
 -		std::vector<HANDLE> contacts;
 +		std::vector<HCONTACT> contacts;
  		if (to.useFtp || to.compress) {
  			std::map<std::wstring, bool> existingContacts;
  			TCHAR temp[MAX_PATH];
 @@ -352,7 +352,7 @@ bool DoTask(TaskOptions& to)  		}
  		if (!error) {
 -			std::list<HANDLE> contactList;
 +			std::list<HCONTACT> contactList;
  			for (std::list<std::wstring>::iterator it = files.begin(); it != files.end(); ++it) {
  				mExp.SetAutoImport(*it);
  				int ret = mExp.Import(to.importType, contacts);
 @@ -377,7 +377,7 @@ bool DoTask(TaskOptions& to)  				}
  				if (ret >= 0) {
 -					mExp.hContact =  contacts[ret];
 +					mExp.hContact = contacts[ret];
  					if (to.type == TaskOptions::Import) {
  						EventList::AddImporter(mExp.hContact, to.importType, *it);
  						contactList.push_back(mExp.hContact);
 @@ -413,7 +413,7 @@ bool DoTask(TaskOptions& to)  				HANDLE* contacts = new HANDLE[contactList.size() + 1];
  				contacts[0] = (HANDLE)contactList.size();
  				int i = 1;
 -				for (std::list<HANDLE>::iterator it = contactList.begin(); it != contactList.end(); ++it)
 +				for (std::list<HCONTACT>::iterator it = contactList.begin(); it != contactList.end(); ++it)
  					contacts[i++] = *it;
  				QueueUserAPC(DoRebuildEventsInMainAPCFunc, g_hMainThread, (ULONG_PTR) contacts);
 diff --git a/plugins/BasicHistory/src/SearchContext.h b/plugins/BasicHistory/src/SearchContext.h index 6b1655d857..dd16d95d79 100644 --- a/plugins/BasicHistory/src/SearchContext.h +++ b/plugins/BasicHistory/src/SearchContext.h @@ -29,7 +29,7 @@ public:  	int selected;
  	virtual void SelectEventGroup(int sel) = 0;
 -	virtual HANDLE GetNextContact(HANDLE hContact, int adder) = 0;
 +	virtual HCONTACT GetNextContact(HCONTACT hContact, int adder) = 0;
  	virtual void SelectContact(HANDLE _hContact) = 0;
  	struct MessageData
 diff --git a/plugins/BasicHistory/src/Searcher.cpp b/plugins/BasicHistory/src/Searcher.cpp index 0c9091e4f6..4a1ed6dce1 100644 --- a/plugins/BasicHistory/src/Searcher.cpp +++ b/plugins/BasicHistory/src/Searcher.cpp @@ -223,7 +223,7 @@ void Searcher::Find()  				if (sel < 0) {
  					isFindContactChanged = true;
  					if (allUsers) {
 -						HANDLE hNext = context->hContact; 
 +						HCONTACT hNext = context->hContact;
  						do
  						{
  							hNext = context->GetNextContact(hNext, adder2);
 @@ -237,7 +237,7 @@ void Searcher::Find()  				else if (sel >= (int)context->eventList.size()) {
  					isFindContactChanged = true;
  					if (allUsers) {
 -						HANDLE hNext = context->hContact;
 +						HCONTACT hNext = context->hContact;
  						do
  						{
  							hNext = context->GetNextContact(hNext, adder2);
  | 
