summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/chat_resource.h2
-rw-r--r--include/delphi/custom_api.inc1
-rw-r--r--include/delphi/m_api.pas6
-rw-r--r--include/delphi/m_crypto.inc2
-rw-r--r--include/delphi/m_database.inc8
-rw-r--r--include/delphi/m_helpers.inc4
-rw-r--r--include/m_avatars.h4
-rw-r--r--include/m_awaymsg.h2
-rw-r--r--include/m_button.h2
-rw-r--r--include/m_button_int.h2
-rw-r--r--include/m_chat_int.h36
-rw-r--r--include/m_clc.h26
-rw-r--r--include/m_clist.h48
-rw-r--r--include/m_clistint.h67
-rw-r--r--include/m_cluiframes.h2
-rw-r--r--include/m_contacts.h12
-rw-r--r--include/m_core.h13
-rw-r--r--include/m_crypto.h2
-rw-r--r--include/m_database.h69
-rw-r--r--include/m_db_int.h5
-rw-r--r--include/m_descbutton.h2
-rw-r--r--include/m_email.h2
-rw-r--r--include/m_extraicons.h2
-rw-r--r--include/m_file.h5
-rw-r--r--include/m_findadd.h2
-rw-r--r--include/m_genmenu.h10
-rw-r--r--include/m_gui.h8
-rw-r--r--include/m_history.h2
-rw-r--r--include/m_hotkeys.h2
-rw-r--r--include/m_http.h2
-rw-r--r--include/m_icolib.h2
-rw-r--r--include/m_idle.h2
-rw-r--r--include/m_ignore.h9
-rw-r--r--include/m_imgsrvc.h2
-rw-r--r--include/m_import.h2
-rw-r--r--include/m_jabber.h2
-rw-r--r--include/m_json.h2
-rw-r--r--include/m_langpack.h2
-rw-r--r--include/m_message.h2
-rw-r--r--include/m_metacontacts.h2
-rw-r--r--include/m_netlib.h43
-rw-r--r--include/m_options.h2
-rw-r--r--include/m_protocols.h2
-rw-r--r--include/m_protoint.h11
-rw-r--r--include/m_protosvc.h3
-rw-r--r--include/m_regexp.h2
-rw-r--r--include/m_skin.h2
-rw-r--r--include/m_srmm_int.h22
-rw-r--r--include/m_string.h2
-rw-r--r--include/m_string.inl2
-rw-r--r--include/m_system.h7
-rw-r--r--include/m_timezones.h2
-rw-r--r--include/m_types.h2
-rw-r--r--include/m_userinfo.h2
-rw-r--r--include/m_utils.h27
-rw-r--r--include/m_xml.h2
-rw-r--r--include/m_xstatus.h2
-rw-r--r--include/newpluginapi.h2
-rw-r--r--include/statusmodes.h2
59 files changed, 290 insertions, 226 deletions
diff --git a/include/chat_resource.h b/include/chat_resource.h
index 09b9ee68f0..1ca739caed 100644
--- a/include/chat_resource.h
+++ b/include/chat_resource.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/delphi/custom_api.inc b/include/delphi/custom_api.inc
index 104c02cd76..e94fc29803 100644
--- a/include/delphi/custom_api.inc
+++ b/include/delphi/custom_api.inc
@@ -1,5 +1,4 @@
{$include m_actman.inc}
-{$include m_folders.inc}
{$include m_ieview.inc}
{$include m_msg_buttonsbar.inc}
{$include m_proto_listeningto.inc}
diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas
index 08142e8cc8..a44181771c 100644
--- a/include/delphi/m_api.pas
+++ b/include/delphi/m_api.pas
@@ -19,11 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
-{$A+,H+}
-{$IFNDEF VER130} // skip for delphi 5
- {$IFDEF WIN32}{$A4}{$ENDIF}
- {$IFDEF WIN64}{$A8}{$ENDIF}
-{$ENDIF}
+{$A+,H+,A8}
{$UNDEF AllowInline}
unit m_api;
diff --git a/include/delphi/m_crypto.inc b/include/delphi/m_crypto.inc
index 8df15a3397..12a83b8394 100644
--- a/include/delphi/m_crypto.inc
+++ b/include/delphi/m_crypto.inc
@@ -1,7 +1,7 @@
{
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc
index 909bc1ead5..aecccbf82e 100644
--- a/include/delphi/m_database.inc
+++ b/include/delphi/m_database.inc
@@ -28,6 +28,12 @@ const
DBEF_RTL = 8; // event contains the right-to-left aligned text
DBEF_UTF = 16; // event contains a text in utf-8
DBEF_ENCRYPTED = 32; // event is encrypted (never reported outside a driver)
+ DBEF_HAS_ID = 64;
+ DBEF_SECURE = 128;
+ DBEF_STRONG = 256;
+ DBEF_BOOKMARK = 512;
+ DBEF_JSON = 1024;
+ DBEF_MSEC = 2048;
const
EVENTTYPE_MESSAGE = 0;
@@ -40,7 +46,7 @@ type
PDBEVENTINFO = ^TDBEVENTINFO;
TDBEVENTINFO = record
szModule : PAnsiChar; // module that 'owns' this event and controls the data format
- timestamp: dword; // timestamp in UNIX time
+ timestamp: Int64; // timestamp in UNIX time
flags : dword; // the DBEF_* flags above
eventType: dword; // event type, such as message, can be module defined
hContact : TMCONTACT; // contact to which this event belongs
diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc
index d240073501..6906bd2d27 100644
--- a/include/delphi/m_helpers.inc
+++ b/include/delphi/m_helpers.inc
@@ -62,7 +62,7 @@ function Options_Open(group,page,tab:PWideChar):int_ptr;
function _Srmm_AddButton(bbdi:pBBButton; pPlugin:Pointer) : integer; stdcall;
external AppDll name 'Srmm_AddButton';
-function _AddMainMenuItem(mi:PMO_MenuItem) : HGENMENU; stdcall;
+function _AddMainMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall;
external AppDll name 'Menu_AddMainMenuItem';
function _AddContactMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall;
@@ -260,7 +260,7 @@ end;
function Menu_AddMainMenuItem(mi:PMO_MenuItem):HGENMENU;
begin
mi^.pPlugin:=@g_plugin;
- result:=_AddMainMenuItem(mi);
+ result:=_AddMainMenuItem(mi, nil);
end;
function Menu_AddContactMenuItem(mi:PMO_MenuItem):HGENMENU;
diff --git a/include/m_avatars.h b/include/m_avatars.h
index 25e9841959..8feedb5887 100644
--- a/include/m_avatars.h
+++ b/include/m_avatars.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-12 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -226,7 +226,7 @@ struct CONTACTAVATARCHANGEDNOTIFICATION
#define ME_AV_MYAVATARCHANGED "SV_Avatars/MyAvatarChanged"
// Service to be called by protocols to report an avatar has changed. Some avatar changes
-// can be detected automatically, but some not (by now only Skype ones)
+// can be detected automatically, but some not
// wParam = (char *)szProto (protocol for which a new avatar was set)
// lParam = 0
diff --git a/include/m_awaymsg.h b/include/m_awaymsg.h
index f847b8eb1e..2ed0f6c0bd 100644
--- a/include/m_awaymsg.h
+++ b/include/m_awaymsg.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_button.h b/include/m_button.h
index 23bec0cad5..5760c006cd 100644
--- a/include/m_button.h
+++ b/include/m_button.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_button_int.h b/include/m_button_int.h
index eb909b88d5..e6ff4f666b 100644
--- a/include/m_button_int.h
+++ b/include/m_button_int.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_chat_int.h b/include/m_chat_int.h
index a9a5d2a751..1cd4797197 100644
--- a/include/m_chat_int.h
+++ b/include/m_chat_int.h
@@ -2,7 +2,7 @@
Chat module interface for Miranda NG
-Copyright (c) 2014-24 George Hazan
+Copyright (c) 2014-25 George Hazan
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -137,10 +137,8 @@ struct MIR_APP_EXPORT LOGINFO : public MZeroedObject, public MNonCopyable
struct STATUSINFO
{
- wchar_t *pszGroup;
- int iIconIndex;
- int iStatus;
- STATUSINFO *next;
+ ptrW pszGroup;
+ int iIconIndex, iStatus;
};
struct MIR_APP_EXPORT SESSION_INFO : public MZeroedObject, public MNonCopyable
@@ -153,7 +151,6 @@ struct MIR_APP_EXPORT SESSION_INFO : public MZeroedObject, public MNonCopyable
bool bInitDone;
bool bHasToolTip;
bool bHasNicklist;
- bool bHistoryInit;
bool bIsDirty;
char* pszModule;
@@ -176,21 +173,21 @@ struct MIR_APP_EXPORT SESSION_INFO : public MZeroedObject, public MNonCopyable
CMsgDialog *pDlg;
USERINFO *pMe;
- STATUSINFO *pStatuses;
MODULEINFO *pMI;
SESSION_INFO *pParent;
- OBJLIST<USERINFO> arUsers;
OBJLIST<LOGINFO> arEvents;
+ OBJLIST<USERINFO> arUsers;
+ OBJLIST<STATUSINFO> arStatuses;
wchar_t pszLogFileName[MAX_PATH];
- __forceinline USERINFO* getMe() const
- { return (pParent != nullptr) ? pParent->pMe : pMe;
+ __forceinline USERINFO* getMe() const {
+ return (pParent != nullptr) ? pParent->pMe : pMe;
}
- __forceinline OBJLIST<USERINFO>& getUserList()
- { return (pParent != nullptr) ? pParent->arUsers : arUsers;
+ __forceinline OBJLIST<USERINFO>& getUserList() {
+ return (pParent != nullptr) ? pParent->arUsers : arUsers;
}
const char* getSoundName(int iEventType) const;
@@ -276,10 +273,6 @@ struct CHAT_MANAGER
void (*MM_IconsChanged)(void);
BOOL (*MM_RemoveAll)(void);
- STATUSINFO* (*TM_FindStatus)(STATUSINFO *pStatusList, const wchar_t *pszStatus);
- wchar_t* (*TM_WordToString)(STATUSINFO *pStatusList, uint16_t Status);
- BOOL (*TM_RemoveAll)(STATUSINFO** pStatusList);
-
int (*UM_CompareItem)(const USERINFO *u1, const USERINFO *u2);
USERINFO* (*UM_AddUser)(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, uint16_t wStatus);
USERINFO* (*UM_FindUser)(SESSION_INFO *si, const wchar_t *pszUID);
@@ -362,13 +355,16 @@ MIR_APP_DLL(void) Chat_EmptyHistory(SESSION_INFO *si);
// creates custom popup menu for a group chat
MIR_APP_DLL(void) Chat_CreateMenu(HMENU hMenu, SESSION_INFO *si, const wchar_t *pszUID);
-// calculates width or height of a string
-MIR_APP_DLL(int) Chat_GetTextPixelSize(const wchar_t *pszText, HFONT hFont, bool bWidth);
+// retrieves user's role/status
+MIR_APP_DLL(STATUSINFO*) Chat_GetStatus(SESSION_INFO *si, const USERINFO *pUser);
// creates a default description of a group chat event
// returns true if lin->ptszText is already utilized, you need to add it manually then otherwise
MIR_APP_DLL(bool) Chat_GetDefaultEventDescr(const SESSION_INFO *si, const LOGINFO *lin, CMStringW &res);
+// calculates width or height of a string
+MIR_APP_DLL(int) Chat_GetTextPixelSize(const wchar_t *pszText, HFONT hFont, bool bWidth);
+
// sets mute mode for a group chat
MIR_APP_DLL(int) Chat_IsMuted(MCONTACT hContact);
MIR_APP_DLL(void) Chat_Mute(MCONTACT hContact, int mode);
@@ -386,6 +382,7 @@ namespace Chat
{
extern MIR_APP_EXPORT CMOption<bool>
bShowNicklist,
+ bShowFormatting,
bFilterEnabled,
bTopicOnClist,
bPopupOnJoin,
@@ -401,8 +398,7 @@ namespace Chat
bDoubleClick4Privat,
bLogIndentEnabled,
bLogLimitNames,
- bStripFormat,
- bEnableCustomLogs;
+ bStripFormat;
extern MIR_APP_EXPORT CMOption<uint32_t>
iPopupFlags,
diff --git a/include/m_clc.h b/include/m_clc.h
index aa7d890e86..9239e2289c 100644
--- a/include/m_clc.h
+++ b/include/m_clc.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -28,18 +28,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define CLISTCONTROL_CLASS "CListControl"
#define CLISTCONTROL_CLASSW L"CListControl"
-//styles
-#define CLS_MANUALUPDATE 0x0001 //todo
-#define CLS_SHOWHIDDEN 0x0002
-#define CLS_HIDEOFFLINE 0x0004 //hides all offline users
-#define CLS_CHECKBOXES 0x0008
-#define CLS_MULTICOLUMN 0x0010 //not true multi-column, just for ignore/vis options
-#define CLS_HIDEEMPTYGROUPS 0x0020 //note: this flag will be spontaneously removed if the 'new subgroup' menu item is clicked, for obvious reasons
-#define CLS_USEGROUPS 0x0040
-#define CLS_NOHIDEOFFLINE 0x0080 //overrides CLS_HIDEOFFLINE and the per-group hideoffline setting
-#define CLS_GREYALTERNATE 0x0100 //make every other line slightly grey
-#define CLS_GROUPCHECKBOXES 0x0200 //put checkboxes on groups too (managed by CLC)
-#define CLS_CONTACTLIST 0x0400 //this control will be the main contact list (v. 0.3.4.3+ 2004/11/02)
+// styles
+#define CLS_MANUALUPDATE 0x0001 // todo
+#define CLS_SHOWHIDDEN 0x0002
+#define CLS_HIDEOFFLINE 0x0004 // hides all offline users
+#define CLS_CHECKBOXES 0x0008
+#define CLS_MULTICOLUMN 0x0010 // not true multi-column, just for ignore/vis options
+#define CLS_HIDEEMPTYGROUPS 0x0020 // note: this flag will be spontaneously removed if the 'new subgroup' menu item is clicked, for obvious reasons
+#define CLS_USEGROUPS 0x0040
+#define CLS_NOHIDEOFFLINE 0x0080 // overrides CLS_HIDEOFFLINE and the per-group hideoffline setting
+#define CLS_GREYALTERNATE 0x0100 // make every other line slightly grey
+#define CLS_GROUPCHECKBOXES 0x0200 // put checkboxes on groups too (managed by CLC)
+#define CLS_CONTACTLIST 0x0400 // this control will be the main contact list (v. 0.3.4.3+ 2004/11/02)
#define CLS_EX_DISABLEDRAGDROP 0x00000001
#define CLS_EX_EDITLABELS 0x00000002
diff --git a/include/m_clist.h b/include/m_clist.h
index 87976056ae..01579e34ed 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -78,7 +78,7 @@ EXTERN_C MIR_APP_DLL(bool) Clist_GetProtocolVisibility(const char *szModuleName)
// adds a new element into main menu
-EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi);
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi, const char *pszProto = nullptr);
// gets a handle to the main Miranda menu
// returns a HMENU. This need not to be freed since it's owned by clist
@@ -275,13 +275,6 @@ EXTERN_C MIR_APP_DLL(BOOL) Clist_MenuProcessCommand(int menu_id, int flags, MCON
EXTERN_C MIR_APP_DLL(BOOL) Clist_MenuProcessHotkey(unsigned hotkey);
/////////////////////////////////////////////////////////////////////////////////////////
-// determines whether the contact list is docked
-// wParam = lParam = 0
-// returns nonzero if the contact list is docked, of 0 if it is not
-
-EXTERN_C MIR_APP_DLL(BOOL) Clist_IsDocked(void);
-
-/////////////////////////////////////////////////////////////////////////////////////////
// Clist-related buttons management
/////////////////////////////////////////////////////////////////////////////////////////
// toggles the use groups mode of the contact list
@@ -357,13 +350,6 @@ EXTERN_C MIR_APP_DLL(MGROUP) Clist_GroupExists(LPCTSTR ptszGroupName);
EXTERN_C MIR_APP_DLL(MGROUP) Clist_GroupCreate(MGROUP hParent, const wchar_t *ptszGroupName);
/////////////////////////////////////////////////////////////////////////////////////////
-// a new group was created. Add it to the list
-// this is also called when the contact list is being rebuilt
-// new groups are always created with the name "New Group"
-
-EXTERN_C MIR_APP_DLL(void) Clist_GroupAdded(MGROUP hGroup);
-
-/////////////////////////////////////////////////////////////////////////////////////////
// deletes a group and calls CLUI to display the change
// returns 0 on success, nonzero on failure
@@ -380,6 +366,7 @@ EXTERN_C MIR_APP_DLL(int) Clist_GroupRename(MGROUP hGroup, const wchar_t *ptszNe
// returns a wchar_t* on success, NULL on failure
// if pdwFlags is not NULL, also stores group flags into it (one of GROUPF_* constants
+#define GROUPF_HIDDEN 0x02
#define GROUPF_EXPANDED 0x04
#define GROUPF_HIDEOFFLINE 0x08
#define GROUPF_SHOWOFFLINE 0x40
@@ -518,33 +505,4 @@ EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GetContactDisplayName(MCONTACT hContact, in
EXTERN_C MIR_APP_DLL(int) Clist_TrayNotifyA(const char *szProto, const char *szInfoTitle, const char *szInfo, uint32_t dwInfoFlags, UINT uTimeout);
EXTERN_C MIR_APP_DLL(int) Clist_TrayNotifyW(const char *szProto, const wchar_t *wszInfoTitle, const wchar_t *wszInfo, uint32_t dwInfoFlags, UINT uTimeout);
-/////////////////////////////////////////////////////////////////////////////////////////
-
-#define SETTING_TOOLWINDOW_DEFAULT 1
-#define SETTING_SHOWMAINMENU_DEFAULT 1
-#define SETTING_SHOWCAPTION_DEFAULT 1
-#define SETTING_CLIENTDRAG_DEFAULT 1
-#define SETTING_ONTOP_DEFAULT 1
-#define SETTING_MIN2TRAY_DEFAULT 1
-#define SETTING_SORTBYSTATUS_DEFAULT 0
-#define SETTING_SORTBYPROTO_DEFAULT 0
-#define SETTING_TRANSPARENT_DEFAULT 0
-#define SETTING_ALPHA_DEFAULT 200
-#define SETTING_AUTOALPHA_DEFAULT 150
-#define SETTING_AUTOHIDE_DEFAULT 0
-#define SETTING_HIDETIME_DEFAULT 30
-#define SETTING_CYCLETIME_DEFAULT 4
-#define SETTING_TRAYICON_DEFAULT SETTING_TRAYICON_SINGLE
-#define SETTING_ALWAYSMULTI_DEFAULT 0
-
-#define SETTING_TRAYICON_SINGLE 0
-#define SETTING_TRAYICON_CYCLE 1
-#define SETTING_TRAYICON_MULTI 2
-
-#define SETTING_STATE_HIDDEN 0
-#define SETTING_STATE_MINIMIZED 1
-#define SETTING_STATE_NORMAL 2
-
-#define SETTING_BRINGTOFRONT_DEFAULT 0
-
#endif // M_CLIST_H__
diff --git a/include/m_clistint.h b/include/m_clistint.h
index c8a45f52d7..49745c61ca 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -34,6 +34,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_clc.h>
#include <m_gui.h>
+#define SETTING_TRAYICON_SINGLE 0
+#define SETTING_TRAYICON_CYCLE 1
+#define SETTING_TRAYICON_MULTI 2
+
+#define SETTING_STATE_HIDDEN 0
+#define SETTING_STATE_MINIMIZED 1
+#define SETTING_STATE_NORMAL 2
+
#define HCONTACT_ISGROUP 0x80000000
#define HCONTACT_ISINFO 0xFFFF0000
#define IsHContactGroup(h) (((UINT_PTR)(h)^HCONTACT_ISGROUP)<(HCONTACT_ISGROUP^HCONTACT_ISINFO))
@@ -71,8 +79,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TIMERID_TRAYHOVER 16
#define TIMERID_TRAYHOVER_2 17
-#define GROUP_ALLOCATE_STEP 8
-
struct ClcContact;
struct ClcData;
struct ClcCacheEntry;
@@ -204,12 +210,13 @@ struct MenuProto
#define DRAGSTAGEF_MAYBERENAME 0x8000
#define DRAGSTAGEF_OUTSIDE 0x4000
-#define CONTACTF_ONLINE 1
-#define CONTACTF_INVISTO 2
-#define CONTACTF_VISTO 4
-#define CONTACTF_NOTONLIST 8
-#define CONTACTF_CHECKED 16
-#define CONTACTF_IDLE 32
+#define CONTACTF_ONLINE 0x01
+#define CONTACTF_INVISTO 0x02
+#define CONTACTF_VISTO 0x04
+#define CONTACTF_NOTONLIST 0x08
+#define CONTACTF_CHECKED 0x10
+#define CONTACTF_IDLE 0x20
+#define CONTACTF_HASMEMBERS 0x40
#define DROPTARGET_OUTSIDE 0
#define DROPTARGET_ONSELF 1
@@ -325,7 +332,7 @@ struct CLIST_INTERFACE
// clcidents.c
ClcContact* (*pfnFindItem)(uint32_t dwItem, ClcContact *contact);
- int (*pfnGetRowsPriorTo)(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
+ int (*pfnGetRowsPriorTo)(ClcData *dat, ClcGroup *subgroup, int contactIndex);
int (*pfnGetRowByIndex)(ClcData *dat, int testindex, ClcContact **contact, ClcGroup **subgroup);
int (*pfnGetContactHiddenStatus)(MCONTACT hContact, char *szProto, ClcData *dat);
int (*pfnIsVisibleContact)(ClcCacheEntry *pce, ClcGroup *group);
@@ -392,9 +399,6 @@ struct CLIST_INTERFACE
int (*pfnCompareContacts)(const ClcContact *contact1, const ClcContact *contact2);
int (*pfnSetHideOffline)(int newValue); // TRUE, FALSE or -1 to revert the current setting
- /* docking.c */
- int (*pfnDocking_ProcessWindowMessage)(WPARAM wParam, LPARAM lParam);
-
/*************************************************************************************
* version 2 - events processing
*************************************************************************************/
@@ -446,14 +450,37 @@ extern MIR_APP_EXPORT CLIST_INTERFACE g_clistApi;
namespace Clist
{
+ // CLUI
+ extern MIR_APP_EXPORT CMOption<bool>
+ bShowCaption,
+ bShowMainMenu,
+ bClientAreaDrag;
+
+ // CList
extern MIR_APP_EXPORT CMOption<bool>
- HideOffline,
- UseGroups,
- FilterSearch,
- HideEmptyGroups,
- ConfirmDelete,
- Tray1Click,
- TrayAlwaysStatus;
+ bOnTop,
+ bAutoHide,
+ bToolWindow,
+ bHideOffline,
+ bBringToFront,
+ bUseGroups,
+ bFilterSearch,
+ bHideEmptyGroups,
+ bMinimizeToTray,
+ bAlwaysMulti,
+ bConfirmDelete,
+ bTransparent,
+ bTray1Click,
+ bTrayAlwaysStatus;
+
+ extern MIR_APP_EXPORT CMOption<uint8_t>
+ iTrayIcon,
+ iAlpha,
+ iAutoAlpha;
+
+ extern MIR_APP_EXPORT CMOption<uint16_t>
+ iHideTime,
+ iCycleTime;
extern MIR_APP_EXPORT CMOption<uint32_t>
IconFlashTime,
diff --git a/include/m_cluiframes.h b/include/m_cluiframes.h
index 166800cb38..e91bef4e36 100644
--- a/include/m_cluiframes.h
+++ b/include/m_cluiframes.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-02 Richard Hughes, Roland Rabien & Tristan Van de Vreede
This program is free software; you can redistribute it and/or
diff --git a/include/m_contacts.h b/include/m_contacts.h
index f5decd61fb..540b620a2c 100644
--- a/include/m_contacts.h
+++ b/include/m_contacts.h
@@ -1,7 +1,7 @@
/*
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -82,12 +82,13 @@ namespace Contact
MCONTACT hContact, // contact id or NULL for the global data
const char *szProto = nullptr); // protocol for global data. if skipped, grabbed from hContact
- MIR_APP_DLL(int) GetStatus(MCONTACT hContact);
+ MIR_APP_DLL(int) GetStatus(MCONTACT hContact, const char *szProto = nullptr);
/////////////////////////////////////////////////////////////////////////////////////////
// if contact is a group chat
+ // returns GCW_* constant or 0 if it's not a group chat
- MIR_APP_DLL(bool) IsGroupChat(MCONTACT hContact, const char *szProto = nullptr);
+ MIR_APP_DLL(int) IsGroupChat(MCONTACT hContact, const char *szProto = nullptr);
/////////////////////////////////////////////////////////////////////////////////////////
// gets / sets hidden status for a contact
@@ -102,6 +103,11 @@ namespace Contact
MIR_APP_DLL(void) Readonly(MCONTACT hContact, bool bReadOnly = true);
/////////////////////////////////////////////////////////////////////////////////////////
+ // sets a birthday
+
+ MIR_APP_DLL(void) SetBirthday(MCONTACT hContact, int dd, int mm, int yy);
+
+ /////////////////////////////////////////////////////////////////////////////////////////
// checks / adds / removes a contact from list of contacts
// removed contacts would be physically deleted after restart
diff --git a/include/m_core.h b/include/m_core.h
index 3d78994229..2366a2fa85 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -48,16 +48,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef MIR_APP_EXPORTS
#define MIR_APP_EXPORT MIR_EXPORT
- typedef struct NetlibUser* HNETLIBUSER;
- typedef struct NetlibConnection* HNETLIBCONN;
- typedef struct NetlibBoundPort* HNETLIBBIND;
#else
#define MIR_APP_EXPORT MIR_IMPORT
- DECLARE_HANDLE(HNETLIBUSER);
- DECLARE_HANDLE(HNETLIBCONN);
- DECLARE_HANDLE(HNETLIBBIND);
#endif
+typedef struct NetlibUser* HNETLIBUSER;
+typedef struct NetlibBoundPort* HNETLIBBIND;
+typedef struct NetlibConnection* HNETLIBCONN;
+
typedef struct TMO_IntMenuItem* HGENMENU;
class CMPluginBase;
@@ -546,6 +544,7 @@ MIR_CORE_DLL(BOOL) IsWinVer7Plus();
MIR_CORE_DLL(BOOL) IsWinVer8Plus();
MIR_CORE_DLL(BOOL) IsWinVer81Plus();
MIR_CORE_DLL(BOOL) IsWinVer10Plus();
+MIR_CORE_DLL(BOOL) IsWine();
MIR_CORE_DLL(BOOL) IsFullScreen();
MIR_CORE_DLL(BOOL) IsWorkstationLocked();
diff --git a/include/m_crypto.h b/include/m_crypto.h
index 2250d7516b..57f2d93909 100644
--- a/include/m_crypto.h
+++ b/include/m_crypto.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_database.h b/include/m_database.h
index 9f3420d407..28489af914 100644
--- a/include/m_database.h
+++ b/include/m_database.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+// Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
// Copyright (c) 2000-08 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -191,10 +191,27 @@ struct DBVARIANT
struct DBEVENTINFO
{
const char *szModule; // pointer to name of the module that 'owns' this event
- uint32_t timestamp; // seconds since 00:00, 01/01/1970. Gives us times until 2106
- // unless you use the standard C library which is
- // signed and can only do until 2038. In GMT.
- uint32_t flags; // combination of DBEF_* flags
+ uint64_t iTimestamp; // seconds or milliseconds since 00:00, 01/01/1970. In GMT.
+
+ union {
+ uint32_t flags; // combination of DBEF_* flags
+ struct {
+ bool bTemporary: 1; // disable notifications about temporary database events
+ bool bSent : 1; // this event was sent by the user. If not set this event was received.
+ bool bRead : 1; // event has been read by the user. It does not need to be processed any more except for history.
+ bool bRtl : 1; // event contains the right-to-left aligned text
+ bool bUtf : 1; // event contains a text in utf-8
+ bool isEncrypted : 1; // event is encrypted (never reported outside a driver)
+ bool hasId : 1; // event has unique server id
+ bool bSecure : 1; // event is encrypted
+ bool bStrong : 1; // event is encrypted by the verified sender
+ bool isBookmark : 1; // event is bookmarked
+ bool isJson : 1; // event's body is a JSON structure
+ bool bMsec : 1; // event's timestamp is in milliseconds
+ bool bEdited : 1; // event was edited
+ };
+ };
+
uint32_t eventType; // module-defined event type field
MCONTACT hContact; // contact to which this event belongs
int cbBlob; // size of pBlob in bytes
@@ -203,12 +220,12 @@ struct DBEVENTINFO
const char *szUserId; // user id (for group chats only)
const char *szReplyId; // this message is a reply to a message with that server id
- bool __forceinline markedRead() const {
- return (flags & (DBEF_SENT | DBEF_READ)) != 0;
+ uint32_t __forceinline getUnixtime() const {
+ return bMsec ? (iTimestamp / 1000) : iTimestamp;
}
bool __forceinline operator==(const DBEVENTINFO &e) {
- return (timestamp == e.timestamp && eventType == e.eventType && cbBlob == e.cbBlob && (flags & DBEF_SENT) == (e.flags & DBEF_SENT));
+ return (iTimestamp == e.iTimestamp && eventType == e.eventType && cbBlob == e.cbBlob && bSent == e.bSent);
}
};
@@ -384,6 +401,7 @@ EXTERN_C MIR_CORE_DLL(MEVENT) db_event_getById(const char *szModule, const char
// Sets a value to the JSON field in the blob
MIR_CORE_DLL(int) db_event_setJson(MEVENT hDbEvent, const char *szSetting, DBVARIANT *dbv);
+MIR_CORE_DLL(int) db_event_setJson(MEVENT hDbEvent, const char *pBlob);
// Updates the server ID associated with an event
// Returns 0 on success or a failure otherwise
@@ -557,7 +575,7 @@ EXTERN_C MIR_APP_DLL(HICON) DbEvent_GetIcon(DBEVENTINFO *dbei, int flags);
// DB/Event/Added event
// Called when a new event has been added to the event chain for a contact
// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(HANDLE)hDbEvent
+// lParam = (HANDLE)hDbEvent
// hDbEvent is a valid handle to the event. hContact is a valid handle to the
// contact to which hDbEvent refers.
// Since events are sorted chronologically, you cannot guarantee that hDbEvent is
@@ -569,17 +587,34 @@ EXTERN_C MIR_APP_DLL(HICON) DbEvent_GetIcon(DBEVENTINFO *dbei, int flags);
// DB/Event/Edited event
// Called when the existing event was changed
// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(HANDLE)hDbEvent
+// lParam = (HANDLE)hDbEvent
// hDbEvent is a valid handle to the event. hContact is a valid handle to the
// contact to which hDbEvent refers.
#define ME_DB_EVENT_EDITED "DB/Event/Edited"
/////////////////////////////////////////////////////////////////////////////////////////
+// DB/Event/Reaction event
+// Called when the JSON part of an existing event was changed
+// wParam = (DB::EventInfo*)pEvent
+// lParam = (DBEventReaction*)pReaction
+// hDbEvent is a valid handle to the event. hContact is a valid handle to the
+// contact to which hDbEvent refers.
+
+struct DBEventReaction
+{
+ MCONTACT hContact;
+ BOOL bAdded;
+ const char *pszReaction;
+};
+
+#define ME_DB_EVENT_REACTION "DB/Event/Reaction"
+
+/////////////////////////////////////////////////////////////////////////////////////////
// DB/Event/SetJson event
// Called when the JSON part of an existing event was changed
// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(HANDLE)hDbEvent
+// lParam = (HANDLE)hDbEvent
// hDbEvent is a valid handle to the event. hContact is a valid handle to the
// contact to which hDbEvent refers.
@@ -606,7 +641,7 @@ EXTERN_C MIR_APP_DLL(HICON) DbEvent_GetIcon(DBEVENTINFO *dbei, int flags);
// DB/Event/Marked/Read event
// Called when an event is marked read
// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(HANDLE)hDbEvent
+// lParam = (HANDLE)hDbEvent
// hDbEvent is a valid handle to the event.
// hContact is a valid handle to the contact to which hDbEvent refers, and will remain valid.
@@ -616,7 +651,7 @@ EXTERN_C MIR_APP_DLL(HICON) DbEvent_GetIcon(DBEVENTINFO *dbei, int flags);
// DB/Event/Deleted event
// Called when an event is about to be deleted from the event chain for a contact
// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(HANDLE)hDbEvent
+// lParam = (HANDLE)hDbEvent
// hDbEvent is a valid handle to the event which is about to be deleted, but it
// won't be once your hook has returned.
// hContact is a valid handle to the contact to which hDbEvent refers, and will
@@ -630,7 +665,7 @@ EXTERN_C MIR_APP_DLL(HICON) DbEvent_GetIcon(DBEVENTINFO *dbei, int flags);
// DB/Event/Delivered event
// Called when the server confirms that an event was successfully delivered to server
// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(HANDLE)hDbEvent
+// lParam = (HANDLE)hDbEvent
// hDbEvent is a valid handle to the event.
// hContact is a valid handle to the contact to which hDbEvent refers, and will remain valid.
@@ -741,6 +776,7 @@ namespace DB
void addReaction(const char *emoji);
void delReaction(const char *emoji);
+ void setReactions(class JSONNode &pNode);
void flushJson();
JSONNode& setJson();
@@ -781,9 +817,10 @@ namespace DB
__forceinline bool isOffline() const { return m_szProtoString != nullptr; }
__forceinline void setUrl(const char *pszUrl) { m_szProtoString = mir_strdup(pszUrl); }
- __forceinline void setName(const wchar_t *pszFileName) { m_wszFileName = mir_wstrdup(pszFileName); }
+ __forceinline void setName(const wchar_t *pwszFileName) { m_wszFileName = mir_wstrdup(pwszFileName); }
__forceinline void setSize(int64_t iSize) { m_iFileSize = iSize; }
- __forceinline void setLocalName(const wchar_t *pszFileName) { m_wszLocalName = mir_wstrdup(pszFileName); }
+ __forceinline void setDescr(const wchar_t *pwszDescription) { m_wszDescription = mir_wstrdup(pwszDescription); }
+ __forceinline void setLocalName(const wchar_t *pwszFileName) { m_wszLocalName = mir_wstrdup(pwszFileName); }
__forceinline void setUserInfo(void *pUserInfo) { m_pUserInfo = pUserInfo; }
};
diff --git a/include/m_db_int.h b/include/m_db_int.h
index 75302a945c..f9aa88a479 100644
--- a/include/m_db_int.h
+++ b/include/m_db_int.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -132,7 +132,9 @@ interface MIR_APP_EXPORT MIDatabase
STDMETHOD_(MEVENT, FindLastEvent)(MCONTACT contactID) PURE;
STDMETHOD_(MEVENT, FindNextEvent)(MCONTACT contactID, MEVENT hDbEvent) PURE;
STDMETHOD_(MEVENT, FindPrevEvent)(MCONTACT contactID, MEVENT hDbEvent) PURE;
+
STDMETHOD_(int, SetEventJson)(MEVENT hDbEvent, const char *szSetting, DBVARIANT *dbv) PURE;
+ STDMETHOD_(int, SetEventJson)(MEVENT hDbEvent, const char *pBlob) PURE;
STDMETHOD_(BOOL, DeleteModule)(MCONTACT contactID, LPCSTR szModule) PURE;
STDMETHOD_(BOOL, EnumModuleNames)(DBMODULEENUMPROC pFunc, void *pParam) PURE;
@@ -226,6 +228,7 @@ public:
STDMETHODIMP_(BOOL) WriteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) override;
STDMETHODIMP_(int) SetEventJson(MEVENT hDbEvent, const char *szSetting, DBVARIANT *dbv) override;
+ STDMETHODIMP_(int) SetEventJson(MEVENT hDbEvent, const char *pBlob) override;
STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam) override;
STDMETHODIMP_(BOOL) SetSettingResident(BOOL bIsResident, const char *pszSettingName) override;
diff --git a/include/m_descbutton.h b/include/m_descbutton.h
index d9d9569ade..f49d844647 100644
--- a/include/m_descbutton.h
+++ b/include/m_descbutton.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2007-12 Miranda ICQ/IM project,
Copyright (c) 2007 Artem Shpynov
diff --git a/include/m_email.h b/include/m_email.h
index 35347fa00a..45d4dd275f 100644
--- a/include/m_email.h
+++ b/include/m_email.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_extraicons.h b/include/m_extraicons.h
index d4f523a26c..4a6c88b32c 100644
--- a/include/m_extraicons.h
+++ b/include/m_extraicons.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2009 Ricardo Pescuma Domenecci
This is free software; you can redistribute it and/or
diff --git a/include/m_file.h b/include/m_file.h
index 9dabf0dadf..9f7a59ebba 100644
--- a/include/m_file.h
+++ b/include/m_file.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -27,6 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace File
{
+ extern MIR_APP_EXPORT CMOption<bool> bOfflineAuto;
+ extern MIR_APP_EXPORT CMOption<uint32_t> iOfflineSize;
+
MIR_APP_DLL(wchar_t *) GetReceivedFolder(MCONTACT hContact, wchar_t *pwszDest, size_t cbDest, bool substVars = true);
// List of files should be null-terminated
diff --git a/include/m_findadd.h b/include/m_findadd.h
index 54f623d36c..8d6c06c2a8 100644
--- a/include/m_findadd.h
+++ b/include/m_findadd.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_genmenu.h b/include/m_genmenu.h
index a2979a8081..9072967baa 100644
--- a/include/m_genmenu.h
+++ b/include/m_genmenu.h
@@ -21,9 +21,8 @@
#define CMIF_UNMOVABLE 0x0080 // item's position cannot be changed
#define CMIF_SYSTEM 0x0100 // item's presence & position cannot be changed
#define CMIF_UNICODE 0x0200 // will use wchar_t* instead of char*
-#define CMIF_KEEPUNTRANSLATED 0x0400 // don't translate a menu item
-#define CMIF_CUSTOM 0x0800 // custom menu item. doesn't exist in a code
-#define CMIF_DEFAULT 0x1000 // this menu item is the default one
+#define CMIF_KEEPUNTRANSLATED 0x0400 // don't translate a menu item
+#define CMIF_DEFAULT 0x1000 // this menu item is the default one
struct TMO_MenuItem
{
@@ -209,11 +208,8 @@ EXTERN_C MIR_APP_DLL(int) Menu_RemoveObject(int hMenuObject);
// lParam = mi.ownerdata
#define MCO_OPT_FREE_SERVICE 2
-// Set onAddService for menuobject.
-#define MCO_OPT_ONADD_SERVICE 3
-
// Set menu check service
-#define MCO_OPT_CHECK_SERVICE 4
+#define MCO_OPT_CHECK_SERVICE 3
EXTERN_C MIR_APP_DLL(int) Menu_ConfigureObject(int hMenuObject, int iSetting, INT_PTR value);
diff --git a/include/m_gui.h b/include/m_gui.h
index 9f08d3d4f2..0b27cf431f 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -6,7 +6,7 @@ Copyright (c) 2002-04 Santithorn Bunchua
Copyright (c) 2005-12 George Hazan
Copyright (c) 2007-09 Maxim Mluhov
Copyright (c) 2007-09 Victor Pavlychko
-Copyright (C) 2012-24 Miranda NG team
+Copyright (C) 2012-25 Miranda NG team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -625,8 +625,8 @@ class MIR_CORE_EXPORT CCtrlMButton : public CCtrlButton
typedef CCtrlButton CSuper;
public:
- CCtrlMButton(CDlgBase *dlg, int ctrlId, HICON hIcon, const char* tooltip);
- CCtrlMButton(CDlgBase *dlg, int ctrlId, int iCoreIcon, const char* tooltip);
+ CCtrlMButton(CDlgBase *dlg, int ctrlId, HICON hIcon, const char* tooltip = nullptr);
+ CCtrlMButton(CDlgBase *dlg, int ctrlId, int iCoreIcon = -1, const char* tooltip = nullptr);
~CCtrlMButton();
void MakeFlat();
@@ -728,7 +728,7 @@ public:
uint32_t GetExStyle() const;
uint32_t GetExpand(HANDLE hItem) const;
int GetExtraColumns() const;
- uint8_t GetExtraImage(HANDLE hItem, int iColumn) const;
+ uint16_t GetExtraImage(HANDLE hItem, int iColumn) const;
HIMAGELIST GetExtraImageList() const;
HFONT GetFont(int iFontId) const;
bool GetHideOfflineRoot() const;
diff --git a/include/m_history.h b/include/m_history.h
index c63b63d621..38604e1d35 100644
--- a/include/m_history.h
+++ b/include/m_history.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h
index 52a633be40..7355937234 100644
--- a/include/m_hotkeys.h
+++ b/include/m_hotkeys.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_http.h b/include/m_http.h
index 11cd1fdb2d..3eeb24482e 100644
--- a/include/m_http.h
+++ b/include/m_http.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (c) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_icolib.h b/include/m_icolib.h
index 353a130702..9692bd59ea 100644
--- a/include/m_icolib.h
+++ b/include/m_icolib.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_idle.h b/include/m_idle.h
index 53514ff2ea..568cfe18c5 100644
--- a/include/m_idle.h
+++ b/include/m_idle.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-05 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_ignore.h b/include/m_ignore.h
index 00702e38b3..f40f26b946 100644
--- a/include/m_ignore.h
+++ b/include/m_ignore.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -36,9 +36,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define IGNOREEVENT_ALL (int)(-1)
#define IGNOREEVENT_MESSAGE 1
#define IGNOREEVENT_FILE 2
-#define IGNOREEVENT_USERONLINE 3
-#define IGNOREEVENT_AUTHORIZATION 4
-#define IGNOREEVENT_TYPINGNOTIFY 5
+#define IGNOREEVENT_OFFLINEFILE 3
+#define IGNOREEVENT_USERONLINE 4
+#define IGNOREEVENT_AUTHORIZATION 5
+#define IGNOREEVENT_TYPINGNOTIFY 6
// determines if a message type to a contact should be ignored
// mask is one of IGNOREEVENT_* constants
diff --git a/include/m_imgsrvc.h b/include/m_imgsrvc.h
index c9d5352ec4..910bc0661a 100644
--- a/include/m_imgsrvc.h
+++ b/include/m_imgsrvc.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-12 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_import.h b/include/m_import.h
index be46a8b288..525a23d281 100644
--- a/include/m_import.h
+++ b/include/m_import.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_jabber.h b/include/m_jabber.h
index 05d3663a1b..d9cad49786 100644
--- a/include/m_jabber.h
+++ b/include/m_jabber.h
@@ -6,7 +6,7 @@ Copyright (c) 2002-04 Santithorn Bunchua
Copyright (c) 2005-08 George Hazan
Copyright (c) 2007 Maxim Mluhov
Copyright (c) 2008-09 Dmitriy Chervov
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/include/m_json.h b/include/m_json.h
index 62f3126ad1..dfeff56a98 100644
--- a/include/m_json.h
+++ b/include/m_json.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_langpack.h b/include/m_langpack.h
index 0d363fdf96..c803ce9dda 100644
--- a/include/m_langpack.h
+++ b/include/m_langpack.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-12 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_message.h b/include/m_message.h
index 8523cc160a..3a9d9beac4 100644
--- a/include/m_message.h
+++ b/include/m_message.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_metacontacts.h b/include/m_metacontacts.h
index 74a5ab4751..31b754157e 100644
--- a/include/m_metacontacts.h
+++ b/include/m_metacontacts.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2004-07 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
Copyright (c) 2004 Universite Louis PASTEUR, STRASBOURG.
diff --git a/include/m_netlib.h b/include/m_netlib.h
index ad93fb4048..8ea5ee7b0d 100644
--- a/include/m_netlib.h
+++ b/include/m_netlib.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-12 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct MHttpRequest;
struct NETLIBOPENCONNECTION;
-#define NETLIB_USER_AGENT "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
+#define NETLIB_USER_AGENT "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
/////////////////////////////////////////////////////////////////////////////////////////
// Initialises the netlib for a set of connections
@@ -73,26 +73,6 @@ struct NETLIBUSER
EXTERN_C MIR_APP_DLL(HNETLIBUSER) Netlib_RegisterUser(const NETLIBUSER *pDescr);
-/////////////////////////////////////////////////////////////////////////////////////////
-// Assign a Netlib user handle a set of dynamic HTTP headers to be used with all
-//
-// HTTP connections that enable the HTTP-use-sticky headers flag.
-// The headers persist until cleared with lParam = NULL.
-//
-// All memory should be allocated by the caller using malloc() from MS_SYSTEM_GET_MMI
-// Once it has passed to Netlib, Netlib is the owner of it, the caller should not refer to the memory
-// In any way after this point.
-//
-// NOTE: The szHeaders parameter should be a NULL terminated string following the HTTP header syntax.
-// This string will be injected verbatim, thus the user should be aware of setting strings that are not
-// headers. This service is NOT THREAD SAFE, only a single thread is expected to set the headers and a single
-// thread reading the pointer internally, stopping race conditions and mutual exclusion don't happen.
-//
-// Version 0.3.2a+ (2003/10/27)
-//
-
-EXTERN_C MIR_APP_DLL(int) Netlib_SetStickyHeaders(HNETLIBUSER nlu, const char *szHeaders);
-
/* Notes on HTTP gateway usage
When a connection is initiated through an HTTP proxy using
MS_NETLIB_OPENCONNECTION, netlib will GET nlu.szHttpGatewayHello and read
@@ -503,6 +483,21 @@ public:
}
};
+class MIR_APP_EXPORT JsonReply : public MNonCopyable
+{
+protected:
+ class JSONNode *m_root = nullptr;
+ int m_errorCode = 0;
+
+public:
+ explicit JsonReply(MHttpResponse *response);
+ ~JsonReply();
+
+ __forceinline JSONNode &data() const { return *m_root; }
+ __forceinline int error() const { return m_errorCode; }
+ __forceinline operator bool() const { return m_errorCode == 200; }
+};
+
/////////////////////////////////////////////////////////////////////////////////////////
// Free the memory used by a MHttpRequest structure
//
@@ -525,11 +520,13 @@ public:
};
MIR_APP_DLL(MHttpRequest*) operator<<(MHttpRequest*, const INT_PARAM&);
+MIR_APP_DLL(MHttpRequest*) operator<<(MHttpRequest*, const BOOL_PARAM&);
MIR_APP_DLL(MHttpRequest*) operator<<(MHttpRequest*, const CHAR_PARAM&);
MIR_APP_DLL(MHttpRequest*) operator<<(MHttpRequest*, const INT64_PARAM&);
MIR_APP_DLL(MHttpRequest*) operator<<(MHttpRequest*, const WCHAR_PARAM&);
__forceinline MHttpRequest* operator<<(MHttpRequest &req, const INT_PARAM &param) { return &req << param; }
+__forceinline MHttpRequest* operator<<(MHttpRequest &req, const BOOL_PARAM &param) { return &req << param; }
__forceinline MHttpRequest* operator<<(MHttpRequest &req, const CHAR_PARAM &param) { return &req << param; }
__forceinline MHttpRequest* operator<<(MHttpRequest &req, const INT64_PARAM &param) { return &req << param; }
__forceinline MHttpRequest* operator<<(MHttpRequest &req, const WCHAR_PARAM &param) { return &req << param; }
@@ -770,6 +767,8 @@ public:
MWebSocket();
~MWebSocket();
+ __forceinline HNETLIBCONN getConn() const { return m_hConn; }
+
// packet processor
virtual void process(const uint8_t *buf, size_t cbLen) = 0;
diff --git a/include/m_options.h b/include/m_options.h
index e22f126f14..0e6cba16d4 100644
--- a/include/m_options.h
+++ b/include/m_options.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_protocols.h b/include/m_protocols.h
index 711cea1eff..407f296c14 100644
--- a/include/m_protocols.h
+++ b/include/m_protocols.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_protoint.h b/include/m_protoint.h
index 28343fe201..1e4fa8da62 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -89,7 +89,7 @@ public:
HGENMENU m_hmiMainMenu = 0; // if protocol menus are displayed in the main menu, this is the root
PROTO_INTERFACE(const char *pszModuleName, const wchar_t *ptszUserName);
- ~PROTO_INTERFACE();
+ virtual ~PROTO_INTERFACE();
//////////////////////////////////////////////////////////////////////////////////////
// Helpers
@@ -330,6 +330,13 @@ template<class T> struct PROTO : public PROTO_INTERFACE
typedef INT_PTR(MIR_CDECL T::*MyServiceFuncParam)(WPARAM, LPARAM, LPARAM);
__forceinline void CreateProtoServiceParam(const char *name, MyServiceFuncParam pFunc, LPARAM param) {
::ProtoCreateServiceParam(this, name, (ProtoServiceFuncParam)pFunc, param); }
+
+ template<INT_PTR(__cdecl T::*MyGlobalService)(WPARAM, LPARAM)>
+ static INT_PTR MIR_CDECL GlobalService(WPARAM hContact, LPARAM lParam)
+ {
+ T *proto = CMPlugin::getInstance((MCONTACT)hContact);
+ return proto ? (proto->*MyGlobalService)(hContact, lParam) : 0;
+ }
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/include/m_protosvc.h b/include/m_protosvc.h
index 95914f26b7..9b25141ef7 100644
--- a/include/m_protosvc.h
+++ b/include/m_protosvc.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-09 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -94,7 +94,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define PF2_HEAVYDND 0x00000020 // DND on ICQ
#define PF2_FREECHAT 0x00000040
#define PF2_IDLE 0x00000200
-#define PF2_NONE 0x10000000 // protocol has no statuses at all
///////////////////////////////////////////////////////////////////////////////
// the status modes that the protocol supports
diff --git a/include/m_regexp.h b/include/m_regexp.h
index 4cfa86de0e..0313340dff 100644
--- a/include/m_regexp.h
+++ b/include/m_regexp.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_skin.h b/include/m_skin.h
index 9a57f768b7..539b873580 100644
--- a/include/m_skin.h
+++ b/include/m_skin.h
@@ -1,6 +1,6 @@
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+// Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
// Copyright (c) 2000-08 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h
index a67645c47b..3b9e49b210 100644
--- a/include/m_srmm_int.h
+++ b/include/m_srmm_int.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -184,7 +184,7 @@ struct SrmmLogWindowClass
pfnSrmmLogCreator pfnBuilder;
};
-MIR_APP_DLL(SrmmLogWindowClass *) Srmm_GetWindowClass(CMsgDialog *pDlg);
+MIR_APP_DLL(SrmmLogWindowClass *) Srmm_GetWindowClass(bool bGC, MCONTACT hContact = INVALID_CONTACT_ID);
/////////////////////////////////////////////////////////////////////////////////////////
// Simple single-event based logger
@@ -308,6 +308,15 @@ class MIR_APP_EXPORT CSrmmBaseDialog : public CDlgBase
std::vector<MEVENT> m_arDisplayedEvents;
+ void onClick_BIU(CCtrlButton *);
+ void onClick_Color(CCtrlButton *);
+ void onClick_BkColor(CCtrlButton *);
+
+ void onClick_Filter(CCtrlButton *);
+ void onClick_ChanMgr(CCtrlButton *);
+ void onClick_History(CCtrlButton *);
+ void onClick_CloseQuote(CCtrlButton *);
+
protected:
CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, MCONTACT hContact);
@@ -352,14 +361,6 @@ protected:
CCtrlButton m_btnBold, m_btnItalic, m_btnUnderline, m_btnStrikeout;
CCtrlButton m_btnHistory, m_btnChannelMgr, m_btnNickList, m_btnFilter;
- void onClick_BIU(CCtrlButton *);
- void onClick_Color(CCtrlButton *);
- void onClick_BkColor(CCtrlButton *);
-
- void onClick_ChanMgr(CCtrlButton *);
- void onClick_History(CCtrlButton *);
- void onClick_CloseQuote(CCtrlButton *);
-
void onContextMenu(CContextMenuPos *);
void onDblClick_List(CCtrlListBox *);
@@ -373,6 +374,7 @@ public:
COLORREF m_iFG, m_iBG;
CTimer timerFlash, timerType, timerNickList, timerRedraw;
+ MWindow m_hwndFilter;
void ClearLog();
bool IsSuitableEvent(const LOGINFO &lin) const;
diff --git a/include/m_string.h b/include/m_string.h
index 26c3bdbf45..95a4559617 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_string.inl b/include/m_string.inl
index aa3ca19d10..289ce007ba 100644
--- a/include/m_string.inl
+++ b/include/m_string.inl
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_system.h b/include/m_system.h
index 3828b8e049..a3ccf37257 100644
--- a/include/m_system.h
+++ b/include/m_system.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -508,6 +508,11 @@ public:
// adds a buffer to the end
void append(const void *pBuf, size_t bufLen);
+ MBinBuffer& operator <<(uint8_t);
+ MBinBuffer& operator <<(uint16_t);
+ MBinBuffer& operator <<(uint32_t);
+ MBinBuffer& operator <<(uint64_t);
+
__forceinline void append(const MBinBuffer &buf)
{ append(buf.data(), buf.length());
}
diff --git a/include/m_timezones.h b/include/m_timezones.h
index 466774fd58..9b9af24a84 100644
--- a/include/m_timezones.h
+++ b/include/m_timezones.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-10 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_types.h b/include/m_types.h
index b1aa8b7478..619653f997 100644
--- a/include/m_types.h
+++ b/include/m_types.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_userinfo.h b/include/m_userinfo.h
index 33d0dd70e7..0a67a0f5da 100644
--- a/include/m_userinfo.h
+++ b/include/m_userinfo.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_utils.h b/include/m_utils.h
index 9ba9485c8c..3ce8b68de3 100644
--- a/include/m_utils.h
+++ b/include/m_utils.h
@@ -3,7 +3,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-12 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -435,6 +435,17 @@ EXTERN_C MIR_CORE_DLL(void) Utils_GetRandom(void *pszDest, size_t cbLen);
EXTERN_C MIR_CORE_DLL(bool) Utils_IsRtl(const wchar_t *pszwText);
/////////////////////////////////////////////////////////////////////////////////////////
+// Converts a timestamp in the ISO format to time_t
+
+EXTERN_C MIR_CORE_DLL(time_t) Utils_IsoToUnixTime(const char *pszIsoTimestamp);
+
+#ifdef _XSTRING_
+__forceinline time_t Utils_IsoToUnixTime(const std::string &str) {
+ return Utils_IsoToUnixTime(str.c_str());
+}
+#endif
+
+/////////////////////////////////////////////////////////////////////////////////////////
// UUID generator
MIR_CORE_DLL(CMStringA) Utils_GenerateUUID();
@@ -517,6 +528,20 @@ struct MIR_APP_EXPORT MAsyncObject : public MNonCopyable
MIR_APP_DLL(void) Utils_InvokeAsync(MAsyncObject *pObj);
/////////////////////////////////////////////////////////////////////////////////////////
+
+class MEventHandle
+{
+ HANDLE _hEvent;
+public:
+ __inline explicit MEventHandle() { _hEvent = CreateEvent(NULL, 0, 0, NULL); }
+ __inline explicit MEventHandle(HANDLE hEvent) : _hEvent(hEvent) {}
+ __inline ~MEventHandle() { CloseHandle(_hEvent); }
+ __inline void Set() { SetEvent(_hEvent); }
+ __inline void Wait(uint32_t dwMilliseconds = INFINITE) { WaitForSingleObject(_hEvent, dwMilliseconds); }
+ __inline operator HANDLE() { return _hEvent; }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
// compatibility functions
#ifndef _WINDOWS
diff --git a/include/m_xml.h b/include/m_xml.h
index b47efcf9eb..0c6c9776d6 100644
--- a/include/m_xml.h
+++ b/include/m_xml.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/m_xstatus.h b/include/m_xstatus.h
index 27c4fe563a..b04ab78e14 100644
--- a/include/m_xstatus.h
+++ b/include/m_xstatus.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/newpluginapi.h b/include/newpluginapi.h
index 3617925bd1..a17de2b208 100644
--- a/include/newpluginapi.h
+++ b/include/newpluginapi.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/include/statusmodes.h b/include/statusmodes.h
index 207655aab3..1f55782ac8 100644
--- a/include/statusmodes.h
+++ b/include/statusmodes.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.