diff options
Diffstat (limited to 'plugins/BasicHistory')
| -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 | 30 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/EventList.h | 18 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/ExportManager.cpp | 8 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/ExportManager.h | 6 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/HistoryWindow.cpp | 76 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/HistoryWindow.h | 16 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/IImport.h | 2 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/Options.cpp | 16 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/Options.h | 2 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/Scheduler.cpp | 12 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/SearchContext.h | 4 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/Searcher.cpp | 4 | ||||
| -rw-r--r-- | plugins/BasicHistory/src/Searcher.h | 2 | 
18 files changed, 110 insertions, 110 deletions
| diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index c02fe931d7..b12e7c8347 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((HCONTACT)wParam);
 +	int count = EventList::GetContactMessageNumber((MCONTACT)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)
  {
 -	HCONTACT hContact = (HCONTACT)wParam;
 +	MCONTACT hContact = (MCONTACT)wParam;
  	HistoryWindow::Open(hContact);
  	return 0;
  }
 @@ -210,7 +210,7 @@ int PreShutdownHistoryModule(WPARAM, LPARAM)  int HistoryContactDelete(WPARAM wParam, LPARAM)
  {
 -	HistoryWindow::Close((HCONTACT)wParam);
 +	HistoryWindow::Close((MCONTACT)wParam);
  	return 0;
  }
 diff --git a/plugins/BasicHistory/src/BinaryExport.cpp b/plugins/BasicHistory/src/BinaryExport.cpp index 5a506d9791..b1dfa52047 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(HCONTACT hContact);
 -std::wstring GetContactId(HCONTACT hContact);
 +std::wstring GetProtocolName(MCONTACT hContact);
 +std::wstring GetContactId(MCONTACT hContact);
  #pragma pack(push, 1)
 @@ -158,7 +158,7 @@ bool ReadHeader(BinaryFileHeader& header, std::istream* stream)  	return true;
  }
 -int BinaryExport::IsContactInFile(const std::vector<HCONTACT>& contacts)
 +int BinaryExport::IsContactInFile(const std::vector<MCONTACT>& contacts)
  {
  	BinaryFileHeader header;
  	if (!ReadHeader(header, IImport::stream))
 diff --git a/plugins/BasicHistory/src/BinaryExport.h b/plugins/BasicHistory/src/BinaryExport.h index 493e707088..974ac83b7b 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<HCONTACT>& contacts);
 +	virtual int IsContactInFile(const std::vector<MCONTACT>& 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 c0882ddc61..43809f6f58 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(HCONTACT hContact);
 -std::wstring GetContactId(HCONTACT hContact);
 +std::wstring GetProtocolName(MCONTACT hContact);
 +std::wstring GetContactId(MCONTACT hContact);
  #pragma pack(push, 1)
 @@ -128,7 +128,7 @@ bool ReadHeader(MCHeader& header, std::istream* stream)  	return true;
  }
 -int DatExport::IsContactInFile(const std::vector<HCONTACT>& contacts)
 +int DatExport::IsContactInFile(const std::vector<MCONTACT>& contacts)
  {
  	MCHeader header;
  	if (!ReadHeader(header, IImport::stream))
 diff --git a/plugins/BasicHistory/src/DatExport.h b/plugins/BasicHistory/src/DatExport.h index 9609a994f6..745626d02b 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<HCONTACT>& contacts);
 +	virtual int IsContactInFile(const std::vector<MCONTACT>& contacts);
  	virtual bool GetEventList(std::vector<IImport::ExternalMessage>& eventList);
  	DatExport()
 @@ -45,7 +45,7 @@ public:  	virtual ~DatExport();
  private:
  	int dataSize;
 -	HCONTACT hContact;
 +	MCONTACT 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 e354353c89..d0f63d679e 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -40,7 +40,7 @@ EventList::EventList()  	goldBlobSize = 0;
  }
 -EventList::EventList(HCONTACT _hContact, int filter)
 +EventList::EventList(MCONTACT _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, HCONTACT _hContact)
 +void EventList::GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, MCONTACT _hContact)
  {
  	bool isWndLocal = isWnd;
  	EventTempIndex ti;
 @@ -237,7 +237,7 @@ void EventList::RefreshEventList()  		std::vector<IImport::ExternalMessage> messages;
  		EnterCriticalSection(&criticalSection);
 -		std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
 +		std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
  		if (it != contactFileMap.end()) {
  			ExportManager imp(hWnd, hContact, 1);
  			imp.SetAutoImport(it->second.file);
 @@ -299,7 +299,7 @@ void EventList::RefreshEventList()  	}
  }
 -bool EventList::SearchInContact(HCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun)
 +bool EventList::SearchInContact(MCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun)
  {
  	InitFilters();
 @@ -307,7 +307,7 @@ bool EventList::SearchInContact(HCONTACT hContact, TCHAR *strFind, ComparatorInt  		std::vector<IImport::ExternalMessage> messages;
  		EnterCriticalSection(&criticalSection);
 -		std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
 +		std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
  		if (it != contactFileMap.end()) {
  			ExportManager imp(hWnd, hContact, 1);
  			imp.SetAutoImport(it->second.file);
 @@ -431,7 +431,7 @@ std::wstring EventList::GetMyName()  	return myName;
  }
 -inline std::wstring GetProtocolName(HCONTACT hContact)
 +inline std::wstring GetProtocolName(MCONTACT 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(HCONTACT hContact)
 +inline std::wstring GetContactId(MCONTACT hContact)
  {
  	std::wstring id;
  	CONTACTINFO ci;
 @@ -640,10 +640,10 @@ void EventList::RebuildGroup(int selected)  }
  CRITICAL_SECTION EventList::criticalSection;
 -std::map<HCONTACT, EventList::ImportDiscData> EventList::contactFileMap;
 +std::map<MCONTACT, EventList::ImportDiscData> EventList::contactFileMap;
  std::wstring EventList::contactFileDir;
 -void EventList::AddImporter(HCONTACT hContact, IImport::ImportType type, const std::wstring& file)
 +void EventList::AddImporter(MCONTACT hContact, IImport::ImportType type, const std::wstring& file)
  {
  	EnterCriticalSection(&criticalSection);
  	TCHAR buf[32];
 @@ -673,11 +673,11 @@ void EventList::Deinit()  	DeleteCriticalSection(&EventList::criticalSection);
  }
 -int EventList::GetContactMessageNumber(HCONTACT hContact)
 +int EventList::GetContactMessageNumber(MCONTACT hContact)
  {
  	int count = db_event_count(hContact);
  	EnterCriticalSection(&criticalSection);
 -	std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
 +	std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
  	if (it != contactFileMap.end())
  		++count;
 @@ -685,11 +685,11 @@ int EventList::GetContactMessageNumber(HCONTACT hContact)  	return count;
  }
 -bool EventList::IsImportedHistory(HCONTACT hContact)
 +bool EventList::IsImportedHistory(MCONTACT hContact)
  {
  	bool count = false;
  	EnterCriticalSection(&criticalSection);
 -	std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
 +	std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
  	if (it != contactFileMap.end())
  		count = true;
 @@ -697,10 +697,10 @@ bool EventList::IsImportedHistory(HCONTACT hContact)  	return count;
  }
 -void EventList::DeleteImporter(HCONTACT hContact)
 +void EventList::DeleteImporter(MCONTACT hContact)
  {
  	EnterCriticalSection(&criticalSection);
 -	std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
 +	std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
  	if (it != contactFileMap.end()) {
  		DeleteFile(it->second.file.c_str());
  		contactFileMap.erase(it);
 diff --git a/plugins/BasicHistory/src/EventList.h b/plugins/BasicHistory/src/EventList.h index 35d675e4d4..d2640a185e 100644 --- a/plugins/BasicHistory/src/EventList.h +++ b/plugins/BasicHistory/src/EventList.h @@ -72,7 +72,7 @@ private:  		std::wstring file;
  	};
 -	static std::map<HCONTACT, ImportDiscData> contactFileMap;
 +	static std::map<MCONTACT, ImportDiscData> contactFileMap;
  	static std::wstring contactFileDir;
  	bool CanShowHistory(DBEVENTINFO* dbei);
 @@ -80,7 +80,7 @@ private:  	void InitFilters();
  	void InitNames();
  	void AddGroup(const EventIndex& ev);
 -	void GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, HCONTACT _hContact);
 +	void GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, MCONTACT _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(HCONTACT _hContact, int filter);
 +	EventList(MCONTACT _hContact, int filter);
  	~EventList();
  	HWND hWnd;
 -	HCONTACT hContact;
 +	MCONTACT hContact;
  	std::vector<std::deque<EventIndex> > eventList;
  	bool useImportedMessages;
 @@ -116,7 +116,7 @@ public:  	int GetFilterNr();
  	std::wstring GetFilterName();
  	void RefreshEventList();
 -	bool SearchInContact(HCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun);
 +	bool SearchInContact(MCONTACT 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(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 AddImporter(MCONTACT hContact, IImport::ImportType type, const std::wstring& file);
 +	static int GetContactMessageNumber(MCONTACT hContact);
 +	static bool IsImportedHistory(MCONTACT hContact);
 +	static void DeleteImporter(MCONTACT 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 30453b10a9..bbe33581a0 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.  #include "Options.h"
  #include "codecvt_CodePage.h"
 -ExportManager::ExportManager(HWND _hwnd, HCONTACT _hContact, int filter) :
 +ExportManager::ExportManager(HWND _hwnd, MCONTACT _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<HCONTACT>& contacts)
 +int ExportManager::Import(IImport::ImportType type, const std::vector<MCONTACT>& contacts)
  {
  	IImport* imp = NULL;
  	switch(type) {
 @@ -233,7 +233,7 @@ int ExportManager::Import(IImport::ImportType type, const std::vector<HCONTACT>&  	return t;
  }
 -bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err, bool* differentContact, std::vector<HCONTACT>* contacts)
 +bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err, bool* differentContact, std::vector<MCONTACT>* 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<HCONTACT> v;
 +	std::vector<MCONTACT> 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 c0a3a8acf7..09fa0c697b 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, HCONTACT _hContact, int filter);
 +	ExportManager(HWND _hwnd, MCONTACT _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<HCONTACT>& contacts);
 -	bool Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err = NULL, bool* differentContact = NULL, std::vector<HCONTACT>* contacts = NULL);
 +	int Import(IImport::ImportType type, const std::vector<MCONTACT>& contacts);
 +	bool Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err = NULL, bool* differentContact = NULL, std::vector<MCONTACT>* contacts = NULL);
  	static const TCHAR* GetExt(IImport::ImportType type);
  };
 diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 7d95ac81e7..4d1687a101 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(HCONTACT _hContact) :
 +HistoryWindow::HistoryWindow(MCONTACT _hContact) :
  	isDestroyed(true),
  	splitterY(0),
  	splitterOrgY(0),
 @@ -112,23 +112,23 @@ HistoryWindow::~HistoryWindow()  		DeleteObject(bkFindBrush);
  }
 -std::map<HCONTACT, HistoryWindow*> HistoryWindow::windows;
 +std::map<MCONTACT, HistoryWindow*> HistoryWindow::windows;
  std::vector<HistoryWindow*> HistoryWindow::freeWindows;
  void HistoryWindow::Deinit()
  {
  	bool destroyed = true;
 -	std::vector<HCONTACT> keys;
 -	for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
 +	std::vector<MCONTACT> keys;
 +	for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
  	{
  		if (!it->second->isDestroyed)
  		{
  			keys.push_back(it->first);
  		}
  	}
 -	for (std::vector<HCONTACT>::iterator it = keys.begin(); it != keys.end(); ++it)
 +	for (std::vector<MCONTACT>::iterator it = keys.begin(); it != keys.end(); ++it)
  	{
 -		std::map<HCONTACT, HistoryWindow*>::iterator it1 = windows.find(*it);
 +		std::map<MCONTACT, HistoryWindow*>::iterator it1 = windows.find(*it);
  		if (it1 != windows.end())
  		{
  			DestroyWindow(it1->second->hWnd);
 @@ -160,7 +160,7 @@ void HistoryWindow::Deinit()  	if (destroyed)
  	{
 -		for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
 +		for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
  		{
  			delete it->second;
  		}
 @@ -176,7 +176,7 @@ void HistoryWindow::Deinit()  	}
  }
 -void HistoryWindow::Open(HCONTACT hContact)
 +void HistoryWindow::Open(MCONTACT hContact)
  {
  	if (hContact == NULL)
  	{
 @@ -186,7 +186,7 @@ void HistoryWindow::Open(HCONTACT hContact)  	}
  	else
  	{
 -		std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
 +		std::map<MCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
  		if (it != windows.end())
  		{
  			it->second->Focus();
 @@ -199,9 +199,9 @@ void HistoryWindow::Open(HCONTACT hContact)  	}
  }
 -void HistoryWindow::Close(HCONTACT hContact)
 +void HistoryWindow::Close(MCONTACT hContact)
  {
 -	std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
 +	std::map<MCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
  	if (it != windows.end())
  	{
  		if (it->second->isDestroyed)
 @@ -223,7 +223,7 @@ void  HistoryWindow::Close(HistoryWindow* historyWindow)  		DestroyWindow(historyWindow->hWnd);
  		return;
  	}
 -	std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
 +	std::map<MCONTACT, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
  	if (it != windows.end() && it->second == historyWindow)
  	{
  		delete it->second;
 @@ -243,11 +243,11 @@ void  HistoryWindow::Close(HistoryWindow* historyWindow)  	}
  }
 -void HistoryWindow::RebuildEvents(HCONTACT hContact)
 +void HistoryWindow::RebuildEvents(MCONTACT hContact)
  {
  	if (hContact != NULL)
  	{
 -		std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
 +		std::map<MCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
  		if (it != windows.end() && !it->second->isDestroyed)
  		{
  			SendMessage(it->second->hWnd,DM_HREBUILD,0,0);
 @@ -265,7 +265,7 @@ void HistoryWindow::RebuildEvents(HCONTACT hContact)  void HistoryWindow::ChangeToFreeWindow(HistoryWindow* historyWindow)
  {
 -	std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
 +	std::map<MCONTACT, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
  	if (it != windows.end() && it->second == historyWindow)
  	{
  		windows.erase(it);
 @@ -294,7 +294,7 @@ void HistoryWindow::Focus()  int HistoryWindow::FontsChanged(WPARAM wParam, LPARAM lParam)
  {
 -	for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
 +	for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
  	{
  		if (!it->second->isDestroyed)
  		{
 @@ -345,7 +345,7 @@ void OptionsGroupChanged()  void HistoryWindow::OptionsGroupChanged()
  {
 -	for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
 +	for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
  	{
  		if (!it->second->isDestroyed)
  		{
 @@ -371,7 +371,7 @@ void OptionsMainChanged()  void HistoryWindow::OptionsMainChanged()
  {
 -	for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
 +	for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
  	{
  		if (!it->second->isDestroyed)
  		{
 @@ -406,7 +406,7 @@ void OptionsSearchingChanged()  void HistoryWindow::OptionsSearchingChanged()
  {
 -	for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
 +	for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
  	{
  		if (!it->second->isDestroyed)
  		{
 @@ -427,7 +427,7 @@ void HistoryWindow::OptionsSearchingChanged()  INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM)
  {
 -	HCONTACT hContact = (HCONTACT)wParam;
 +	MCONTACT hContact = (MCONTACT)wParam;
  	HWND hWnd = NULL;
  	int start = 0;
  	int end = 0;
 @@ -435,7 +435,7 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM)  	if (!count)
  		return FALSE;
 -	for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
 +	for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
  	{
  		if (!it->second->isDestroyed)
  		{
 @@ -495,7 +495,7 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM)  bool HistoryWindow::IsInList(HWND hWnd)
  {
 -	for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
 +	for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
  		if (!it->second->isDestroyed)
  			if (it->second->hWnd == hWnd)
  				return true;
 @@ -568,18 +568,18 @@ void OpenOptions(char* group, char* page, char* tab = NULL)  class ShowMessageData
  {
  public:
 -	ShowMessageData(HCONTACT _hContact)
 +	ShowMessageData(MCONTACT _hContact)
  		:hContact(_hContact)
  	{
  	}
 -	ShowMessageData(HCONTACT _hContact, const std::wstring &_str)
 +	ShowMessageData(MCONTACT _hContact, const std::wstring &_str)
  		:hContact(_hContact),
  		str(_str)
  	{
  	}
 -	HCONTACT hContact;
 +	MCONTACT hContact;
  	std::wstring str;
  };
 @@ -1643,7 +1643,7 @@ void HistoryWindow::ReloadContacts()  			cii.cbSize = sizeof(cii);
  			cii.flags = CLCIIF_GROUPFONT | CLCIIF_BELOWCONTACTS;
  			cii.pszText = TranslateT("System");
 -			hSystem = (HCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
 +			hSystem = (MCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
  		}
  	}
  	else
 @@ -1655,7 +1655,7 @@ void HistoryWindow::ReloadContacts()  		}
  	}
 -	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 (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()
  {
 -	HCONTACT contactToLoad = hContact;
 +	MCONTACT 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)
  {
 -	HCONTACT contactToSave = hContact;
 +	MCONTACT contactToSave = hContact;
  	if (all) {
 -		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_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<HCONTACT> contacts;
 +	std::vector<MCONTACT> contacts;
 -	for (HCONTACT _hContact = db_find_first(); _hContact != NULL; _hContact = db_find_next(_hContact))
 +	for (MCONTACT _hContact = db_find_first(); _hContact != NULL; _hContact = db_find_next(_hContact))
  		contacts.push_back(_hContact);
  	bool changeContact = false;
 -	HCONTACT lastContact = hContact;
 +	MCONTACT lastContact = hContact;
  	int i = 1;
  	do
  	{
 @@ -2173,7 +2173,7 @@ bool HistoryWindow::ContactChanged(bool sync)  {
  	if (!isLoading)
  	{
 -		HCONTACT hItem = (HCONTACT)SendDlgItemMessage(hWnd, IDC_LIST_CONTACTS, CLM_GETSELECTION, 0, 0);
 +		MCONTACT hItem = (MCONTACT)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) {
 @@ -2256,11 +2256,11 @@ void HistoryWindow::FormatQuote(std::wstring& quote, const MessageData& md, cons  		while(f > 0 && f < (int)msg.length());
  }
 -HCONTACT HistoryWindow::GetNextContact(HCONTACT hContact, int adder)
 +MCONTACT HistoryWindow::GetNextContact(MCONTACT hContact, int adder)
  {
  	HWND contactList = GetDlgItem(hWnd,IDC_LIST_CONTACTS);
  	bool find = false;
 -	HCONTACT _hContact;
 +	MCONTACT _hContact;
  	if (adder > 0) {
  		if (hContact != NULL) {
  			_hContact = db_find_next(hContact);
 @@ -2294,7 +2294,7 @@ HCONTACT HistoryWindow::GetNextContact(HCONTACT hContact, int adder)  		}
  	}
  	else {
 -		HCONTACT lastContact = NULL;
 +		MCONTACT lastContact = NULL;
  		_hContact = db_find_first();
  		while(_hContact && _hContact != hContact) {
  			HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
 @@ -2333,7 +2333,7 @@ HCONTACT HistoryWindow::GetNextContact(HCONTACT hContact, int adder)  	return hContact;
  }
 -void HistoryWindow::SelectContact(HCONTACT _hContact)
 +void HistoryWindow::SelectContact(MCONTACT _hContact)
  {
  	if (hContact != _hContact) {
  		HWND contactList = GetDlgItem(hWnd,IDC_LIST_CONTACTS);
 diff --git a/plugins/BasicHistory/src/HistoryWindow.h b/plugins/BasicHistory/src/HistoryWindow.h index 339866edf4..d21403f421 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(HCONTACT _hContact);
 +	HistoryWindow(MCONTACT _hContact);
  	void Initialise();
  	void Destroy();
  	void SplitterMoved(HWND splitter, LONG pos, bool screenPos);
 @@ -49,7 +49,7 @@ private:  	void ReloadMainOptions();
  	void DoImport(IImport::ImportType type);
 -	static std::map<HCONTACT, HistoryWindow*> windows;
 +	static std::map<MCONTACT, HistoryWindow*> windows;
  	static std::vector<HistoryWindow*> freeWindows;
  	bool isDestroyed;
  	LONG splitterY;
 @@ -67,7 +67,7 @@ private:  	HIMAGELIST himlSmall, himlNone;
  	HBRUSH bkBrush;
  	HBRUSH bkFindBrush;
 -	HCONTACT hSystem;
 +	MCONTACT hSystem;
  	HWND splitterXhWnd, splitterYhWnd;
  	bool isStartSelect;
  protected:
 @@ -75,9 +75,9 @@ protected:  public:
  	~HistoryWindow();
  	static void Deinit();
 -	static void Open(HCONTACT hContact);
 -	static void Close(HCONTACT hContact);
 -	static void RebuildEvents(HCONTACT hContact);
 +	static void Open(MCONTACT hContact);
 +	static void Close(MCONTACT hContact);
 +	static void RebuildEvents(MCONTACT 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 HCONTACT GetNextContact(HCONTACT hContact, int adder);
 -	virtual void SelectContact(HCONTACT _hContact);
 +	virtual MCONTACT GetNextContact(MCONTACT hContact, int adder);
 +	virtual void SelectContact(MCONTACT _hContact);
  };
 diff --git a/plugins/BasicHistory/src/IImport.h b/plugins/BasicHistory/src/IImport.h index 6fc3b6f340..84a65c15f2 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<HCONTACT>& contacts) = 0;
 +	virtual int IsContactInFile(const std::vector<MCONTACT>& 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 f61be22121..202f25e69c 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 (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
 +		for (MCONTACT 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 (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
 +		for (MCONTACT 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 (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
 +		for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
  			if (db_get_b(hContact, MODULE, buf, 0) == 1)
  				to.contacts.push_back(hContact);
 @@ -1568,7 +1568,7 @@ void ResetListOptions(HWND hwnd)  		SendMessage(hwnd, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
  }
 -void RebuildList(HWND hwnd, HCONTACT hSystem, TaskOptions* to)
 +void RebuildList(HWND hwnd, MCONTACT hSystem, TaskOptions* to)
  {
  	HANDLE hItem;
  	if (to->isSystem && hSystem)
 @@ -1581,13 +1581,13 @@ void RebuildList(HWND hwnd, HCONTACT hSystem, TaskOptions* to)  	}
  }
 -void SaveList(HWND hwnd, HCONTACT hSystem, TaskOptions* to)
 +void SaveList(HWND hwnd, MCONTACT hSystem, TaskOptions* to)
  {
  	to->contacts.clear();
  	if (hSystem)
  		to->isSystem = SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM)hSystem, 0) != 0;
 -	for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
 +	for (MCONTACT 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);
 @@ -1602,7 +1602,7 @@ bool IsValidTask(TaskOptions& to, std::list<TaskOptions>* top = NULL, std::wstri  INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
  {
 -	static HCONTACT hSystem;
 +	static MCONTACT hSystem;
  	switch(msg) {
  	case WM_INITDIALOG:
  		TranslateDialogDefault(hwndDlg);
 @@ -1738,7 +1738,7 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam,  			cii.cbSize = sizeof(cii);
  			cii.flags = CLCIIF_GROUPFONT | CLCIIF_CHECKBOX | CLCIIF_BELOWCONTACTS;
  			cii.pszText = TranslateT("System");
 -			hSystem = (HCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
 +			hSystem = (MCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
  			SendMessage(contactList, CLM_AUTOREBUILD, 0, 0);
  			ResetListOptions(contactList);
  			RebuildList(contactList, hSystem, to);
 diff --git a/plugins/BasicHistory/src/Options.h b/plugins/BasicHistory/src/Options.h index 99da9d7908..d4e13a60d4 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<HCONTACT> contacts;
 +	std::vector<MCONTACT> contacts;
  	TaskOptions()
  	{
  		forceExecute = false;
 diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index dcd9dd5593..4b18ae58c3 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)
  {
 -	HCONTACT *contacts = (HCONTACT*)dwParam;
 +	MCONTACT *contacts = (MCONTACT*)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<HCONTACT> contacts;
 +		std::vector<MCONTACT> 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<HCONTACT> contactList;
 +			std::list<MCONTACT> contactList;
  			for (std::list<std::wstring>::iterator it = files.begin(); it != files.end(); ++it) {
  				mExp.SetAutoImport(*it);
  				int ret = mExp.Import(to.importType, contacts);
 @@ -410,10 +410,10 @@ bool DoTask(TaskOptions& to)  			}
  			if (contactList.size() > 0) {
 -				HCONTACT *contacts = new HCONTACT[contactList.size() + 1];
 -				contacts[0] = (HCONTACT)contactList.size();
 +				MCONTACT *contacts = new MCONTACT[contactList.size() + 1];
 +				contacts[0] = (MCONTACT)contactList.size();
  				int i = 1;
 -				for (std::list<HCONTACT>::iterator it = contactList.begin(); it != contactList.end(); ++it)
 +				for (std::list<MCONTACT>::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 4c9e6f04dc..3e26475e2f 100644 --- a/plugins/BasicHistory/src/SearchContext.h +++ b/plugins/BasicHistory/src/SearchContext.h @@ -29,8 +29,8 @@ public:  	int selected;
  	virtual void SelectEventGroup(int sel) = 0;
 -	virtual HCONTACT GetNextContact(HCONTACT hContact, int adder) = 0;
 -	virtual void SelectContact(HCONTACT _hContact) = 0;
 +	virtual MCONTACT GetNextContact(MCONTACT hContact, int adder) = 0;
 +	virtual void SelectContact(MCONTACT _hContact) = 0;
  	struct MessageData
  	{
 diff --git a/plugins/BasicHistory/src/Searcher.cpp b/plugins/BasicHistory/src/Searcher.cpp index 4a1ed6dce1..1e78b2750e 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) {
 -						HCONTACT hNext = context->hContact;
 +						MCONTACT 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) {
 -						HCONTACT hNext = context->hContact;
 +						MCONTACT hNext = context->hContact;
  						do
  						{
  							hNext = context->GetNextContact(hNext, adder2);
 diff --git a/plugins/BasicHistory/src/Searcher.h b/plugins/BasicHistory/src/Searcher.h index e8ce263f11..a3229da1f5 100644 --- a/plugins/BasicHistory/src/Searcher.h +++ b/plugins/BasicHistory/src/Searcher.h @@ -26,7 +26,7 @@ private:  	int lastFindSelection;
  	int startFindPos;
  	int startFindSel;
 -	HCONTACT startFindContact;
 +	MCONTACT startFindContact;
  	bool isFindSelChanged;
  	bool isFindContactChanged;
  	bool findBack, matchCase, matchWholeWords, onlyIn, onlyOut, onlyGroup, allUsers, searchForInLG, searchForInMes;
 | 
