summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-16 18:07:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-16 18:07:34 +0000
commitb3783bb50a312fa59d302aeede929377c18a6ec1 (patch)
tree30fafd914f38d378a3f472615a6cc3a9392e06e4 /include
parenta30dc859cf649443bf90da9ead7c110a63e7725e (diff)
timezone api extended to support global settings
git-svn-id: http://svn.miranda-ng.org/main/trunk@8139 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_timezones.inc28
-rw-r--r--include/m_timezones.h31
2 files changed, 22 insertions, 37 deletions
diff --git a/include/delphi/m_timezones.inc b/include/delphi/m_timezones.inc
index 927d24c277..b669d7386e 100644
--- a/include/delphi/m_timezones.inc
+++ b/include/delphi/m_timezones.inc
@@ -43,17 +43,17 @@ type
cbSize:size_t;
createByName :function (tszName:TChar; dwFlags:dword):THANDLE; cdecl;
- createByContact:function (hContact:HCONTACT; dwFlags:dword):THANDLE;
- storeByContact :procedure(hContact:HCONTACT; hTZ:THANDLE); cdecl;
+ createByContact:function (hContact:HCONTACT; szModule:pAnsiChar; dwFlags:dword):THANDLE;
+ storeByContact :procedure(hContact:HCONTACT; szModule:pAnsiChar; hTZ:THANDLE); cdecl;
printDateTime:function(hTZ:THANDLE; szFormat:TChar; szDest:TChar;
cbDest:int; dwFlags:dword):int; cdecl;
printTimeStamp:function(hTZ:THANDLE; ts:mir_time; szFormat:TChar; szDest:TChar;
cbDest:int; dwFlags:dword):int; cdecl;
- prepareList :function (hContact:HCONTACT; hWnd:HWND; dwFlags:dword):int; cdecl;
- selectListItem :function (hContact:HCONTACT; hWnd:HWND; dwFlags:dword):int; cdecl;
- storeListResults:procedure(hContact:HCONTACT; hWnd:HWND; dwFlags:dword); cdecl;
+ prepareList :function (hContact:HCONTACT; szModule:pAnsiChar; hWnd:HWND; dwFlags:dword):int; cdecl;
+ selectListItem :function (hContact:HCONTACT; szModule:pAnsiChar; hWnd:HWND; dwFlags:dword):int; cdecl;
+ storeListResults:procedure(hContact:HCONTACT; szModule:pAnsiChar; hWnd:HWND; dwFlags:dword); cdecl;
getTimeZoneTime:function(hTZ:THANDLE; var st:SYSTEMTIME):int; cdecl;
timeStampToTimeZoneTimeStamp:function(hTZ:THANDLE; ts:mir_time):time_t; cdecl;
@@ -61,29 +61,13 @@ type
getTzi :function(hTZ:THANDLE):PTimeZoneInformation; cdecl;
getTzName :function(hTZ:THANDLE):TChar; cdecl;
getTzDescription:function(TZName:TChar):TChar; cdecl;
-(*
- int printDateTimeByContact (HCONTACT hContact, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags)
- { return printDateTime(createByContact(hContact, dwFlags), szFormat, szDest, cbDest, dwFlags); }
-
- int printTimeStampByContact(HCONTACT hContact, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags)
- { return printTimeStamp(createByContact(hContact, dwFlags), ts, szFormat, szDest, cbDest, dwFlags); }
-
- LPTIME_ZONE_INFORMATION getTziByContact(HCONTACT hContact)
- { return getTzi(createByContact(hContact, 0)); }
-
- int getTimeZoneTimeByContact(HCONTACT hContact, SYSTEMTIME *st)
- { return getTimeZoneTime(createByContact(hContact, 0), st); }
-
- mir_time timeStampToTimeZoneTimeStampByContact(HCONTACT hContact, mir_time ts)
- { return timeStampToTimeZoneTimeStamp(createByContact(hContact, 0), ts); }
-*)
end;
// every protocol should declare this variable to use the Time API
//extern TIME_API tmi;
{
-a service to obtain the Time API
+a service to obtain the Time API
wParam = 0;
lParam = (LPARAM)(TIME_API*).
diff --git a/include/m_timezones.h b/include/m_timezones.h
index 0072c1ab74..57ae348dd4 100644
--- a/include/m_timezones.h
+++ b/include/m_timezones.h
@@ -43,19 +43,19 @@ typedef struct
{
size_t cbSize;
- HANDLE (*createByName)(LPCTSTR tszName, DWORD dwFlags);
- HANDLE (*createByContact)(MCONTACT hContact, DWORD dwFlags);
- void (*storeByContact)(MCONTACT hContact, HANDLE hTZ);
+ HANDLE (*createByName)(LPCTSTR tszName, DWORD dwFlags);
+ HANDLE (*createByContact)(MCONTACT hContact, LPCSTR szModule, DWORD dwFlags);
+ void (*storeByContact)(MCONTACT hContact, LPCSTR szModule, HANDLE hTZ);
- int (*printDateTime)(HANDLE hTZ, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags);
- int (*printTimeStamp)(HANDLE hTZ, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags);
+ int (*printDateTime)(HANDLE hTZ, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags);
+ int (*printTimeStamp)(HANDLE hTZ, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags);
- int (*prepareList)(MCONTACT hContact, HWND hWnd, DWORD dwFlags);
- int (*selectListItem)(MCONTACT hContact, HWND hWnd, DWORD dwFlags);
- void (*storeListResults)(MCONTACT hContact, HWND hWnd, DWORD dwFlags);
+ int (*prepareList)(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags);
+ int (*selectListItem)(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags);
+ void (*storeListResults)(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags);
- int (*getTimeZoneTime)(HANDLE hTZ, SYSTEMTIME *st);
- mir_time (*timeStampToTimeZoneTimeStamp)(HANDLE hTZ, mir_time ts);
+ int (*getTimeZoneTime)(HANDLE hTZ, SYSTEMTIME *st);
+ mir_time (*timeStampToTimeZoneTimeStamp)(HANDLE hTZ, mir_time ts);
LPTIME_ZONE_INFORMATION (*getTzi)(HANDLE hTZ);
LPCTSTR (*getTzName)(HANDLE hTZ);
@@ -63,19 +63,20 @@ typedef struct
#ifdef __cplusplus
int printDateTimeByContact (MCONTACT hContact, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags)
- { return printDateTime(createByContact(hContact, dwFlags), szFormat, szDest, cbDest, dwFlags); }
+ { return printDateTime(createByContact(hContact, 0, dwFlags), szFormat, szDest, cbDest, dwFlags); }
int printTimeStampByContact(MCONTACT hContact, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags)
- { return printTimeStamp(createByContact(hContact, dwFlags), ts, szFormat, szDest, cbDest, dwFlags); }
+ { return printTimeStamp(createByContact(hContact, 0, dwFlags), ts, szFormat, szDest, cbDest, dwFlags);
+ }
LPTIME_ZONE_INFORMATION getTziByContact(MCONTACT hContact)
- { return getTzi(createByContact(hContact, 0)); }
+ { return getTzi(createByContact(hContact, 0, 0)); }
int getTimeZoneTimeByContact(MCONTACT hContact, SYSTEMTIME *st)
- { return getTimeZoneTime(createByContact(hContact, 0), st); }
+ { return getTimeZoneTime(createByContact(hContact, 0, 0), st); }
mir_time timeStampToTimeZoneTimeStampByContact(MCONTACT hContact, mir_time ts)
- { return timeStampToTimeZoneTimeStamp(createByContact(hContact, 0), ts); }
+ { return timeStampToTimeZoneTimeStamp(createByContact(hContact, 0, 0), ts); }
#endif
} TIME_API;