summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ICQCorp/src/corp.h1
-rw-r--r--protocols/ICQCorp/src/protocol.cpp4
-rw-r--r--protocols/ICQCorp/src/transfer.cpp2
-rw-r--r--protocols/IcqOscarJ/src/dlgproc.cpp4
-rw-r--r--protocols/IcqOscarJ/src/editlist.cpp4
-rw-r--r--protocols/IcqOscarJ/src/init.cpp2
-rw-r--r--protocols/JabberG/src/jabber.cpp2
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp6
-rw-r--r--protocols/MSN/src/msn.cpp2
-rw-r--r--protocols/MSN/src/msn_auth.cpp4
-rw-r--r--protocols/SkypeWeb/src/main.cpp2
11 files changed, 13 insertions, 20 deletions
diff --git a/protocols/ICQCorp/src/corp.h b/protocols/ICQCorp/src/corp.h
index c703ee04ea..999ccaed64 100644
--- a/protocols/ICQCorp/src/corp.h
+++ b/protocols/ICQCorp/src/corp.h
@@ -39,6 +39,7 @@
#include <statusmodes.h>
#include <m_clist.h>
#include <m_userinfo.h>
+#include <m_timezones.h>
#include "user.h"
#include "transfer.h"
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp
index 8a4967f5f1..76350c4f18 100644
--- a/protocols/ICQCorp/src/protocol.cpp
+++ b/protocols/ICQCorp/src/protocol.cpp
@@ -719,7 +719,7 @@ unsigned short ICQ::processUdpPacket(Packet &packet)
>> newCommand;
timeStampLastMessage = timedataStamp;
- timedataStamp = CallService(MS_DB_TIME_TIMESTAMPTOLOCAL, timedataStamp, 0);
+ timedataStamp = TimeZone_ToLocal(timedataStamp);
processSystemMessage(packet, checkUin, newCommand, timedataStamp);
break;
@@ -806,7 +806,7 @@ unsigned short ICQ::processUdpPacket(Packet &packet)
>> newCommand;
db_set_dw(NULL, protoName, "LastBroadcastTime", timedataStamp);
- timedataStamp = CallService(MS_DB_TIME_TIMESTAMPTOLOCAL, timedataStamp, 0);
+ timedataStamp = TimeZone_ToLocal(timedataStamp);
processSystemMessage(packet, checkUin, newCommand, timedataStamp);
break;
diff --git a/protocols/ICQCorp/src/transfer.cpp b/protocols/ICQCorp/src/transfer.cpp
index c864c6b3e9..32058cc1f9 100644
--- a/protocols/ICQCorp/src/transfer.cpp
+++ b/protocols/ICQCorp/src/transfer.cpp
@@ -326,7 +326,7 @@ void ICQTransfer::ack(unsigned int result)
fts.szCurrentFile = fileName;
fts.currentFileSize = fileSize;
fts.currentFileProgress = fileProgress;
- fts.currentFileTime = CallService(MS_DB_TIME_TIMESTAMPTOLOCAL, fileDate, 0);
+ fts.currentFileTime = TimeZone_ToLocal(fileDate);
/*
switch (session->status)
{
diff --git a/protocols/IcqOscarJ/src/dlgproc.cpp b/protocols/IcqOscarJ/src/dlgproc.cpp
index 517463bfd8..704764c848 100644
--- a/protocols/IcqOscarJ/src/dlgproc.cpp
+++ b/protocols/IcqOscarJ/src/dlgproc.cpp
@@ -77,8 +77,8 @@ char* ChangeInfoData::GetItemSettingText(int i, char *buf, size_t bufsize)
FieldNamesItem *list = (FieldNamesItem*)si.pList;
if (list == timezonesField) {
- HANDLE tz = tmi.createByContact(NULL, ppro->m_szModuleName, 0);
- text = make_utf8_string_static(tmi.getTzDescription(tmi.getTzName(tz)), buf, bufsize);
+ HANDLE tz = TimeZone_CreateByContact(NULL, ppro->m_szModuleName, 0);
+ text = make_utf8_string_static(TimeZone_GetDescription(TimeZone_GetName(tz)), buf, bufsize);
break;
}
diff --git a/protocols/IcqOscarJ/src/editlist.cpp b/protocols/IcqOscarJ/src/editlist.cpp
index da04c5efc1..df632256d5 100644
--- a/protocols/IcqOscarJ/src/editlist.cpp
+++ b/protocols/IcqOscarJ/src/editlist.cpp
@@ -99,7 +99,7 @@ void ChangeInfoData::BeginListEdit(int iItem, RECT *rc, int iSetting, WORD wVKey
}
if (list == timezonesField) {
- tmi.prepareList(NULL, ppro->m_szModuleName, hwndListEdit, TZF_PLF_LB);
+ TimeZone_PrepareList(NULL, ppro->m_szModuleName, hwndListEdit, TZF_PLF_LB);
}
else {
int j, n = ListBoxAddStringUtf(hwndListEdit, "Unspecified");
@@ -149,7 +149,7 @@ void ChangeInfoData::EndListEdit(int save)
if (iItem != -1 && i != -1) {
FieldNamesItem *list = (FieldNamesItem*)si.pList;
if (list == timezonesField) {
- tmi.storeListResults(NULL, ppro->m_szModuleName, hwndListEdit, TZF_PLF_LB);
+ TimeZone_StoreListResult(NULL, ppro->m_szModuleName, hwndListEdit, TZF_PLF_LB);
list[i = 0].code = ppro->getDword("Timezone", 0);
}
diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp
index ddaec0e16c..e922d09cfa 100644
--- a/protocols/IcqOscarJ/src/init.cpp
+++ b/protocols/IcqOscarJ/src/init.cpp
@@ -30,7 +30,6 @@
HINSTANCE hInst;
int hLangpack;
-TIME_API tmi;
CLIST_INTERFACE *pcli;
bool g_bTerminated;
@@ -96,7 +95,6 @@ extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
mir_getCLI();
- mir_getTMI(&tmi);
srand(time(NULL));
_tzset();
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index caedaddab5..697dcfa3da 100644
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -59,7 +59,6 @@ PLUGININFOEX pluginInfo = {
};
XML_API xi;
-TIME_API tmi;
CLIST_INTERFACE* pcli;
FI_INTERFACE *FIP = NULL;
@@ -184,7 +183,6 @@ extern "C" int __declspec(dllexport) Load()
{
// set the memory, lists & utf8 managers
mir_getXI(&xi);
- mir_getTMI(&tmi);
mir_getLP(&pluginInfo);
mir_getCLI();
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp
index d239ae052c..c2b6dc5c67 100644
--- a/protocols/JabberG/src/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/src/jabber_iq_handlers.cpp
@@ -393,7 +393,7 @@ BOOL CJabberProto::OnIqRequestTime(HXML, CJabberIqInfo *pInfo)
TCHAR stime[100];
TCHAR szTZ[10];
- tmi.printDateTime(UTC_TIME_HANDLE, _T("I"), stime, SIZEOF(stime), 0);
+ TimeZone_PrintDateTime(UTC_TIME_HANDLE, _T("I"), stime, SIZEOF(stime), 0);
int nGmtOffset = GetGMTOffset();
mir_sntprintf(szTZ, SIZEOF(szTZ), _T("%+03d:%02d"), nGmtOffset / 60, nGmtOffset % 60);
@@ -401,7 +401,7 @@ BOOL CJabberProto::OnIqRequestTime(HXML, CJabberIqInfo *pInfo)
XmlNodeIq iq(_T("result"), pInfo);
HXML timeNode = iq << XCHILDNS(_T("time"), JABBER_FEAT_ENTITY_TIME);
timeNode << XCHILD(_T("utc"), stime); timeNode << XCHILD(_T("tzo"), szTZ);
- LPCTSTR szTZName = tmi.getTzName(NULL);
+ LPCTSTR szTZName = TimeZone_GetName(NULL);
if (szTZName)
timeNode << XCHILD(_T("tz"), szTZName);
m_ThreadInfo->send(iq);
@@ -426,7 +426,7 @@ BOOL CJabberProto::OnIqProcessIqOldTime(HXML, CJabberIqInfo *pInfo)
XmlNodeIq iq(_T("result"), pInfo);
HXML queryNode = iq << XQUERY(JABBER_FEAT_ENTITY_TIME_OLD);
queryNode << XCHILD(_T("utc"), stime);
- LPCTSTR szTZName = tmi.getTzName(NULL);
+ LPCTSTR szTZName = TimeZone_GetName(NULL);
if (szTZName)
queryNode << XCHILD(_T("tz"), szTZName);
queryNode << XCHILD(_T("display"), dtime);
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp
index ec7f204449..1b0f0b43a6 100644
--- a/protocols/MSN/src/msn.cpp
+++ b/protocols/MSN/src/msn.cpp
@@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
HINSTANCE hInst;
int hLangpack;
-TIME_API tmi;
/////////////////////////////////////////////////////////////////////////////////////////
// Initialization routines
@@ -111,7 +110,6 @@ static int msnProtoUninit(CMsnProto* ppro)
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getTMI(&tmi);
mir_getLP(&pluginInfo);
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp
index 4dbd10237a..c6c9209b89 100644
--- a/protocols/MSN/src/msn_auth.cpp
+++ b/protocols/MSN/src/msn_auth.cpp
@@ -153,8 +153,8 @@ int CMsnProto::MSN_GetPassportAuth(void)
time_t ts = time(NULL);
TCHAR szTs1[64], szTs2[64];
- tmi.printTimeStamp(UTC_TIME_HANDLE, ts, _T("I"), szTs1, SIZEOF(szTs1), 0);
- tmi.printTimeStamp(UTC_TIME_HANDLE, ts + 20 * 60, _T("I"), szTs2, SIZEOF(szTs2), 0);
+ TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts, _T("I"), szTs1, SIZEOF(szTs1), 0);
+ TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts + 20 * 60, _T("I"), szTs2, SIZEOF(szTs2), 0);
CMStringA szAuthInfo(FORMAT, authPacket, int(ts), MyOptions.szEmail, ptrA(HtmlEncode(szPassword)), szTs1, szTs2);
diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp
index 103306d981..0d09d03e32 100644
--- a/protocols/SkypeWeb/src/main.cpp
+++ b/protocols/SkypeWeb/src/main.cpp
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
int hLangpack;
XML_API xi;
-TIME_API tmi = { 0 };
HINSTANCE g_hInstance;
CLIST_INTERFACE *pcli;
char g_szMirVer[100];
@@ -55,7 +54,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getTMI(&tmi);
mir_getLP(&pluginInfo);
mir_getXI(&xi);
mir_getCLI();