summaryrefslogtreecommitdiff
path: root/plugins/Weather/src/weather_update.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Weather/src/weather_update.cpp')
-rw-r--r--plugins/Weather/src/weather_update.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp
index a951d5980b..3736b1a87f 100644
--- a/plugins/Weather/src/weather_update.cpp
+++ b/plugins/Weather/src/weather_update.cpp
@@ -34,7 +34,7 @@ UPDATELIST *UpdateListTail;
// retrieve weather info and display / log them
// hContact = current contact
-int UpdateWeather(HCONTACT hContact)
+int UpdateWeather(MCONTACT hContact)
{
TCHAR str[256], str2[MAX_TEXT_SIZE];
DBVARIANT dbv;
@@ -219,7 +219,7 @@ int UpdateWeather(HCONTACT hContact)
// a linked list queue for updating weather station
// this function add a weather contact to the end of queue for update
// hContact = current contact
-void UpdateListAdd(HCONTACT hContact)
+void UpdateListAdd(MCONTACT hContact)
{
UPDATELIST *newItem = (UPDATELIST*)mir_alloc(sizeof(UPDATELIST));
newItem->hContact = hContact;
@@ -236,9 +236,9 @@ void UpdateListAdd(HCONTACT hContact)
// get the first item from the update queue and remove it from the queue
// return value = the contact for next update
-HCONTACT UpdateGetFirst()
+MCONTACT UpdateGetFirst()
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
WaitForSingleObject(hUpdateMutex, INFINITE);
@@ -283,10 +283,10 @@ void DestroyUpdateList(void)
void UpdateAll(BOOL AutoUpdate, BOOL RemoveData)
{
// add all weather contact to the update queue list
- for (HCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
+ for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
if ( !db_get_b(hContact,WEATHERPROTONAME, "AutoUpdate",FALSE) || !AutoUpdate) {
if (RemoveData)
- DBDataManage((HCONTACT)hContact, WDBM_REMOVE, 0, 0);
+ DBDataManage((MCONTACT)hContact, WDBM_REMOVE, 0, 0);
UpdateListAdd(hContact);
}
@@ -300,9 +300,9 @@ void UpdateAll(BOOL AutoUpdate, BOOL RemoveData)
// wParam = handle for the weather station that is going to be updated
INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM lParam)
{
- if (IsMyContact((HCONTACT)wParam)) {
+ if (IsMyContact((MCONTACT)wParam)) {
// add the station to the end of the update queue
- UpdateListAdd((HCONTACT)wParam);
+ UpdateListAdd((MCONTACT)wParam);
// if it is not updating, then start the update thread process
// if it is updating, the stations just added to the queue will get
@@ -318,10 +318,10 @@ INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM lParam)
// wParam = handle for the weather station that is going to be updated
INT_PTR UpdateSingleRemove(WPARAM wParam, LPARAM lParam)
{
- if (IsMyContact((HCONTACT)wParam)) {
+ if (IsMyContact((MCONTACT)wParam)) {
// add the station to the end of the update queue, and also remove old data
- DBDataManage((HCONTACT)wParam, WDBM_REMOVE, 0, 0);
- UpdateListAdd((HCONTACT)wParam);
+ DBDataManage((MCONTACT)wParam, WDBM_REMOVE, 0, 0);
+ UpdateListAdd((MCONTACT)wParam);
// if it is not updating, then start the update thread process
// if it is updating, the stations just added to the queue will get updated by the already-running process
@@ -373,7 +373,7 @@ INT_PTR UpdateAllRemove(WPARAM wParam,LPARAM lParam) {
// getting weather data and save them into the database
// hContact = the contact to get the data
-int GetWeatherData(HCONTACT hContact)
+int GetWeatherData(MCONTACT hContact)
{
// get eacnh part of the id's
TCHAR id[256];