From cbdcff1c9d14ff7f0fa88fdbde25968d69ec0520 Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Wed, 23 Nov 2011 18:26:27 +0000 Subject: ExternalAPI updated git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@202 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- ExternalAPI/m_historyevents.h | 39 +++++++++++++++--- ExternalAPI/m_historykeeper.h | 95 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 ExternalAPI/m_historykeeper.h (limited to 'ExternalAPI') diff --git a/ExternalAPI/m_historyevents.h b/ExternalAPI/m_historyevents.h index f73bf95..aa44637 100644 --- a/ExternalAPI/m_historyevents.h +++ b/ExternalAPI/m_historyevents.h @@ -128,8 +128,9 @@ Return: BOOL Get the icon for a history event type wParam: WORD - event type -lParam: ignored -Return: HICON - after use free with MS_HISTORYEVENTS_RELEASE_ICON +lParam: BOOL - TRUE to copy the icon (should be released with DestroyObject), + FALSE to use icolib one (should be released with MS_HISTORYEVENTS_RELEASE_ICON) +Return: HICON */ #define MS_HISTORYEVENTS_GET_ICON "HistoryEvents/GetIcon" @@ -179,6 +180,8 @@ typedef struct { PBYTE additionalData; int additionalDataSize; int flags; // Flags for the event type + DWORD timestamp; // 0 for now + BOOL addToMetaToo; } HISTORY_EVENT_ADD; /* @@ -349,10 +352,18 @@ static char * HistoryEvents_GetRichText(HANDLE hDbEvent, DBEVENTINFO *dbe) // CallService(MS_HISTORYEVENTS_RELEASE_TEXT, (WPARAM) str, 0); //} + +#ifdef __cplusplus static HANDLE HistoryEvents_AddToHistoryEx(HANDLE hContact, WORD eventType, int templateNum, TCHAR **variables, int numVariables, PBYTE additionalData, int additionalDataSize, - int flags) + int flags = 0, DWORD timestamp = 0, BOOL addToMetaToo = FALSE) +#else +static HANDLE HistoryEvents_AddToHistoryEx(HANDLE hContact, WORD eventType, int templateNum, + TCHAR **variables, int numVariables, + PBYTE additionalData, int additionalDataSize, + int flags, DWORD timestamp, BOOL addToMetaToo) +#endif { HISTORY_EVENT_ADD hea = {0}; @@ -368,13 +379,21 @@ static HANDLE HistoryEvents_AddToHistoryEx(HANDLE hContact, WORD eventType, int hea.additionalData = additionalData; hea.additionalDataSize = additionalDataSize; hea.flags = flags; + hea.timestamp = timestamp; + hea.addToMetaToo = addToMetaToo; return (HANDLE) CallService(MS_HISTORYEVENTS_ADD_TO_HISTORY, (WPARAM) &hea, 0); } +#ifdef __cplusplus static HANDLE HistoryEvents_AddToHistoryVars(HANDLE hContact, WORD eventType, int templateNum, TCHAR **variables, int numVariables, - int flags) + int flags = 0, DWORD timestamp = 0, BOOL addToMetaToo = FALSE) +#else +static HANDLE HistoryEvents_AddToHistoryVars(HANDLE hContact, WORD eventType, int templateNum, + TCHAR **variables, int numVariables, + int flags, DWORD timestamp, BOOL addToMetaToo) +#endif { HISTORY_EVENT_ADD hea = {0}; @@ -388,11 +407,19 @@ static HANDLE HistoryEvents_AddToHistoryVars(HANDLE hContact, WORD eventType, in hea.numVariables = numVariables; hea.variables = variables; hea.flags = flags; + hea.timestamp = timestamp; + hea.addToMetaToo = addToMetaToo; return (HANDLE) CallService(MS_HISTORYEVENTS_ADD_TO_HISTORY, (WPARAM) &hea, 0); } -static HANDLE HistoryEvents_AddToHistorySimple(HANDLE hContact, WORD eventType, int templateNum, int flags) +#ifdef __cplusplus +static HANDLE HistoryEvents_AddToHistorySimple(HANDLE hContact, WORD eventType, int templateNum, + int flags = 0, DWORD timestamp = 0, BOOL addToMetaToo = FALSE) +#else +static HANDLE HistoryEvents_AddToHistorySimple(HANDLE hContact, WORD eventType, int templateNum, + int flags, DWORD timestamp, BOOL addToMetaToo) +#endif { HISTORY_EVENT_ADD hea = {0}; @@ -404,6 +431,8 @@ static HANDLE HistoryEvents_AddToHistorySimple(HANDLE hContact, WORD eventType, hea.eventType = eventType; hea.templateNum = templateNum; hea.flags = flags; + hea.timestamp = timestamp; + hea.addToMetaToo = addToMetaToo; return (HANDLE) CallService(MS_HISTORYEVENTS_ADD_TO_HISTORY, (WPARAM) &hea, 0); } diff --git a/ExternalAPI/m_historykeeper.h b/ExternalAPI/m_historykeeper.h new file mode 100644 index 0000000..7c4a25d --- /dev/null +++ b/ExternalAPI/m_historykeeper.h @@ -0,0 +1,95 @@ +/* +Copyright (C) 2006-2009 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + + +#ifndef __M_HISTORYKEEPER_H__ +# define __M_HISTORYKEEPER_H__ + + +#define MIID_STATUS_MESSAGE_CHANGE_LOGGER { 0x821be252, 0xe20b, 0x41e7, { 0xa5, 0x1d, 0x3c, 0x34, 0x2e, 0x38, 0xae, 0x22 } } +#define MIID_STATUS_MESSAGE_CHANGE_NOTIFIER { 0xb628b23b, 0x47ae, 0x430e, { 0x94, 0x81, 0x15, 0x9f, 0xa7, 0x26, 0xc4, 0x3a } } +#define MIID_NICKNAME_CHANGE_LOGGER { 0x478be45e, 0xd331, 0x4d63, { 0xa6, 0x57, 0x85, 0xda, 0x45, 0xf8, 0xc, 0xe0 } } +#define MIID_NICKNAME_CHANGE_NOTIFIER { 0xc749d46a, 0x885e, 0x46bf, { 0xaa, 0x4c, 0xe1, 0xae, 0xc5, 0xc9, 0xd0, 0x93 } } + +#define EVENTTYPE_STATUSCHANGE 25368 +#define EVENTTYPE_NICKNAME_CHANGE 9001 +#define EVENTTYPE_STATUSMESSAGE_CHANGE 9002 +#define EVENTTYPE_CLIENT_CHANGE 9005 +#define EVENTTYPE_XSTATUS_CHANGE 9006 +#define EVENTTYPE_LISTENINGTO_CHANGE 9007 +#define EVENTTYPE_XSTATUS_MESSAGE_CHANGE 9008 +#define EVENTTYPE_IDLE_CHANGE 9009 + + +/* +Return TRUE is Status Message History is enabled for this contact + +wParam: hContact +lParam: ignored +*/ +#define MS_SMH_ENABLED "SMH/Enabled" + + +/* +Enable Status Message History for a contact + +wParam: hContact +lParam: ignored +*/ +#define MS_SMH_ENABLE "SMH/Enable" + + +/* +Disable Status Message History for a contact + +wParam: hContact +lParam: ignored +*/ +#define MS_SMH_DISABLE "SMH/Disable" + + +/* +Return TRUE is Nick History is enabled for this contact + +wParam: hContact +lParam: ignored +*/ +#define MS_NICKHISTORY_ENABLED "NickHistory/Enabled" + + +/* +Enable Nick History for a contact + +wParam: hContact +lParam: ignored +*/ +#define MS_NICKHISTORY_ENABLE "NickHistory/Enable" + + +/* +Disable Nick History for a contact + +wParam: hContact +lParam: ignored +*/ +#define MS_NICKHISTORY_DISABLE "NickHistory/Disable" + + + +#endif // __M_HISTORYKEEPER_H__ -- cgit v1.2.3