diff options
author | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2008-11-17 00:13:41 +0000 |
---|---|---|
committer | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2008-11-17 00:13:41 +0000 |
commit | 6b5a5851340510255cde717b74697fa693679732 (patch) | |
tree | 03ae8e960f6b2d770c9c9a413b9beb819c731aea | |
parent | 94fba6baef938a3bf4669daa59d9267e5ee294a3 (diff) |
HistoryLog: 0.0.0.4
+ Added option to speak texts
* Per default disk log is disabled
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@114 c086bb3d-8645-0410-b8da-73a8550f86e7
-rw-r--r-- | Plugins/historylog/Docs/historylog_changelog.txt | 4 | ||||
-rw-r--r-- | Plugins/historylog/Docs/historylog_readme.txt | 8 | ||||
-rw-r--r-- | Plugins/historylog/Docs/historylog_version.txt | 2 | ||||
-rw-r--r-- | Plugins/historylog/commons.h | 28 | ||||
-rw-r--r-- | Plugins/historylog/historylog.cpp | 344 | ||||
-rw-r--r-- | Plugins/historylog/options.cpp | 88 | ||||
-rw-r--r-- | Plugins/historylog/options.h | 2 | ||||
-rw-r--r-- | Plugins/historylog/resource.h | 4 | ||||
-rw-r--r-- | Plugins/historylog/resource.rc | 15 | ||||
-rw-r--r-- | Plugins/historylog/sdk/m_speak.h | 278 |
10 files changed, 589 insertions, 184 deletions
diff --git a/Plugins/historylog/Docs/historylog_changelog.txt b/Plugins/historylog/Docs/historylog_changelog.txt index e28771b..c9a3560 100644 --- a/Plugins/historylog/Docs/historylog_changelog.txt +++ b/Plugins/historylog/Docs/historylog_changelog.txt @@ -2,6 +2,10 @@ History Log Changelog:
+. 0.0.0.4
+ + Added option to speak texts
+ * Per default disk log is disabled
+
. 0.0.0.3
+ Added BOM to files (editors should work better with this) - only for new files
+ Added group chat logging (dll needed to be renamed for this to work)
diff --git a/Plugins/historylog/Docs/historylog_readme.txt b/Plugins/historylog/Docs/historylog_readme.txt index 38bedd0..3df3842 100644 --- a/Plugins/historylog/Docs/historylog_readme.txt +++ b/Plugins/historylog/Docs/historylog_readme.txt @@ -23,6 +23,14 @@ The group chat filename pattern accepts the following vars: (also, it support va %month_name%
%day%
+It also register itself with meSpeak and allows reading of messages (chat, url, fileand group chat events).
+
This plugin requires at least Miranda 0.7 and needs History Events to work.
To report bugs/make suggestions, go to the forum thread: http://forums.miranda-im.org/showthread.php?t=18488
+
+
+TODO
+-----
+- In group chat, disconnects and renames are not logged
+
diff --git a/Plugins/historylog/Docs/historylog_version.txt b/Plugins/historylog/Docs/historylog_version.txt index 883a1a1..c86db41 100644 --- a/Plugins/historylog/Docs/historylog_version.txt +++ b/Plugins/historylog/Docs/historylog_version.txt @@ -1 +1 @@ -HistoryLog 0.0.0.3
\ No newline at end of file +HistoryLog 0.0.0.4
\ No newline at end of file diff --git a/Plugins/historylog/commons.h b/Plugins/historylog/commons.h index 0559573..7f67a8a 100644 --- a/Plugins/historylog/commons.h +++ b/Plugins/historylog/commons.h @@ -49,11 +49,13 @@ Boston, MA 02111-1307, USA. #include <m_protocols.h>
#include <m_protosvc.h>
#include <m_chat.h>
+#include <m_speak.h>
#include "../utils/mir_memory.h"
#include "../utils/mir_options.h"
#include "../utils/mir_icons.h"
#include "../utils/mir_buffer.h"
+#include "../utils/mir_scope.h"
#include "../utils/ContactAsyncQueue.h"
#include "resource.h"
@@ -91,4 +93,30 @@ BOOL IsChatEventEnabled(WORD type); void SetChatEventEnabled(WORD type, BOOL enable);
+static struct
+{
+ int type;
+ TCHAR *name;
+ TCHAR *templ;
+ TCHAR *templ_notext;
+ TCHAR *templ_nonick;
+}
+CHAT_EVENTS[] =
+{
+ { GC_EVENT_MESSAGE, _T("Message"), _T("* %nick%: %text%") },
+ { GC_EVENT_ACTION, _T("Action"), _T("* %nick% %text%") },
+ { GC_EVENT_JOIN, _T("User joined"), _T("> %nick% has joined") },
+ { GC_EVENT_PART, _T("User left"), _T("< %nick% has left (%text_sl%)"), _T("< %nick% has left") },
+ { GC_EVENT_QUIT, _T("User disconnected"), _T("< %nick% has disconnected (%text_sl%)"), _T("< %nick% has disconnected") },
+ { GC_EVENT_KICK, _T("User kicked"), _T("~ %status% kicked %nick% (%text_sl%)"), _T("~ %status% kicked %nick%") },
+ { GC_EVENT_NICK, _T("Nickname change"), _T("^ %nick% is now known as %text%") },
+ { GC_EVENT_NOTICE, _T("Notice"), _T("¤ Notice from %nick%: %text%") },
+ { GC_EVENT_TOPIC, _T("Topic change"), _T("# The topic is \'%text_sl%\' (set by %nick%)"), NULL, _T("# The topic is \'%text_sl%\'") },
+ { GC_EVENT_INFORMATION, _T("Information message"), _T("! %text_sl%") },
+ { GC_EVENT_ADDSTATUS, _T("Status enabled"), _T("+ %text% enables \'%status%\' status for %nick%") },
+ { GC_EVENT_REMOVESTATUS, _T("Status disabled"), _T("- %text% disables \'%status%\' status for %nick%") }
+};
+
+
+
#endif // __COMMONS_H__
diff --git a/Plugins/historylog/historylog.cpp b/Plugins/historylog/historylog.cpp index 0d1bc49..4360a7f 100644 --- a/Plugins/historylog/historylog.cpp +++ b/Plugins/historylog/historylog.cpp @@ -33,8 +33,8 @@ PLUGININFOEX pluginInfo={ #else
"History Log",
#endif
- PLUGIN_MAKE_VERSION(0,0,0,3),
- "Logs history events to disk on the fly",
+ PLUGIN_MAKE_VERSION(0,0,0,4),
+ "Logs history events to disk on the fly and speaks then",
"Ricardo Pescuma Domenecci",
"",
"© 2008 Ricardo Pescuma Domenecci",
@@ -173,6 +173,45 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) CallService(MS_UPDATE_REGISTER, 0, (LPARAM)&upd);
}
+ {
+ Buffer<char> tmps[MAX_REGS(CHAT_EVENTS)];
+ char *templates[MAX_REGS(CHAT_EVENTS)];
+ for(int i = 0; i < MAX_REGS(CHAT_EVENTS); i++)
+ {
+ tmps[i].append(CHAT_EVENTS[i].name);
+ tmps[i].append('\n');
+ tmps[i].append("%session%: ");
+ tmps[i].append(&(CHAT_EVENTS[i].templ[2]));
+ tmps[i].append('\n');
+ tmps[i].append("%nick%\tNickname\n%status%\tStatus message\n%text%\tTest\n%text_sl%\tText as single line\n"
+ "%protocol%\tProtocol\n%year%\tYear\n%month%\tMonth\n%month_name%\tMonth name\n%day%\tDay\n%session%\tSession");
+ tmps[i].pack();
+ templates[i] = tmps[i].str;
+ }
+ Speak_RegisterWT(MODULE_NAME, "groupchat", "Group chat", "core_main_1", templates, MAX_REGS(templates));
+ }
+ {
+ char *templates[] = {
+ "Sent\nto %contact%: %text%\n%text%\tMessage text\n%nick%\tNickname\n%msg_date%\tDate of message\n%protocol%\tProtocol\n%year%\tYear\n%month%\tMonth\n%month_name%\tMonth name\n%day%\tDay",
+ "Received\nfrom %contact%: %text%\n%text%\tMessage text\n%nick%\tNickname\n%msg_date%\tDate of message%protocol%\tProtocol\n%year%\tYear\n%month%\tMonth\n%month_name%\tMonth name\n%day%\tDay"
+ };
+ Speak_RegisterWT(MODULE_NAME, "message", "Message", "core_main_1", templates, MAX_REGS(templates));
+ }
+ {
+ char *templates[] = {
+ "Sent\nto %contact%: %text%\n%text%\tURL\n%msg_date%\tDate of message\n%protocol%\tProtocol\n%year%\tYear\n%month%\tMonth\n%month_name%\tMonth name\n%day%\tDay",
+ "Received\nfrom %contact%: %text%\n%text%\tURL\n%msg_date%\tDate of message\n%protocol%\tProtocol\n%year%\tYear\n%month%\tMonth\n%month_name%\tMonth name\n%day%\tDay"
+ };
+ Speak_RegisterWT(MODULE_NAME, "url", "URL", "core_main_2", templates, MAX_REGS(templates));
+ }
+ {
+ char *templates[] = {
+ "Sent\nSent file to %contact%: %text%\n%text%\tFilename\n%description%\tDescription\n%msg_date%\tDate of message\n%protocol%\tProtocol\n%year%\tYear\n%month%\tMonth\n%month_name%\tMonth name\n%day%\tDay",
+ "Received\nReceived file from %contact%: %text%\n%text%\tFilename\n%description%\tDescription\n%msg_date%\tDate of message\n%protocol%\tProtocol\n%year%\tYear\n%month%\tMonth\n%month_name%\tMonth name\n%day%\tDay"
+ };
+ Speak_RegisterWT(MODULE_NAME, "file", "File Transfer", "core_main_3", templates, MAX_REGS(templates));
+ }
+
return 0;
}
@@ -537,6 +576,33 @@ void AppendKeepingIndentation(Buffer<TCHAR> &text, TCHAR *eventText, BOOL ident) }
}
+void GetNick(Buffer<TCHAR> &nick, HANDLE hContact, char *proto)
+{
+ if (hContact == NULL)
+ {
+ CONTACTINFO ci;
+ ZeroMemory(&ci, sizeof(ci));
+ ci.cbSize = sizeof(ci);
+ ci.hContact = NULL;
+ ci.szProto = proto;
+ ci.dwFlag = CNF_DISPLAY;
+
+#ifdef UNICODE
+ ci.dwFlag |= CNF_UNICODE;
+#endif
+
+ if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) & ci))
+ {
+ nick.append(ci.pszVal);
+ mir_free(ci.pszVal);
+ }
+ }
+ else
+ {
+ nick.append((TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, GCDNF_TCHAR | GCDNF_NOCACHE));
+ }
+}
+
void ProcessEvent(HANDLE hDbEvent, void *param)
{
@@ -545,26 +611,16 @@ void ProcessEvent(HANDLE hDbEvent, void *param) if (hContact == NULL)
return;
- char *proto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if (!IsProtocolEnabled(proto))
- return;
-
- if (metacontacts_proto != NULL)
- {
- BOOL isSub = (GetMetaContact(hContact) != NULL);
- if (isSub && IsProtocolEnabled(metacontacts_proto))
- return;
- }
-
DBEVENTINFO dbe = {0};
dbe.cbSize = sizeof(dbe);
if (CallService(MS_DB_EVENT_GET, (WPARAM) hDbEvent, (LPARAM) &dbe) != 0)
return;
- if (!IsEventEnabled(dbe.eventType))
+ char *proto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ if (proto == NULL)
return;
- TCHAR *eventText = HistoryEvents_GetTextT(hDbEvent, NULL);
+ scope<TCHAR *> eventText = HistoryEvents_GetTextT(hDbEvent, NULL);
int flags = HistoryEvents_GetFlags(dbe.eventType);
TCHAR date[128];
@@ -574,42 +630,8 @@ void ProcessEvent(HANDLE hDbEvent, void *param) tst.cbDest = 128;
CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, (WPARAM) dbe.timestamp, (LPARAM) &tst);
- Buffer<TCHAR> text;
- text.append(_T("["));
- text.append(date);
- text.append(_T("] "));
-
- if (flags & HISTORYEVENTS_FLAG_EXPECT_CONTACT_NAME_BEFORE)
- {
- if (dbe.flags & DBEF_SENT)
- {
- CONTACTINFO ci;
- ZeroMemory(&ci, sizeof(ci));
- ci.cbSize = sizeof(ci);
- ci.hContact = NULL;
- ci.szProto = proto;
- ci.dwFlag = CNF_DISPLAY;
-
-#ifdef UNICODE
- ci.dwFlag |= CNF_UNICODE;
-#endif
-
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) & ci))
- {
- text.append(ci.pszVal);
- mir_free(ci.pszVal);
- }
- }
- else
- {
- text.append((TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, GCDNF_TCHAR | GCDNF_NOCACHE));
- }
- text.append(_T(": "));
- }
-
- AppendKeepingIndentation(text, eventText, opts.ident_multiline_msgs);
-
- text.pack();
+ Buffer<TCHAR> nick;
+ GetNick(nick, dbe.flags & DBEF_SENT ? NULL : hContact, proto);
TCHAR year[16];
TCHAR month[16];
@@ -617,15 +639,18 @@ void ProcessEvent(HANDLE hDbEvent, void *param) TCHAR day[16];
GetDateTexts(dbe.timestamp, year, month, month_name, day);
- TCHAR *protocol = mir_a2t(proto);
- TCHAR *group = GetContactGroup(hContact);
+ scope<TCHAR *> protocol = mir_a2t(proto);
+ scope<TCHAR *> group = GetContactGroup(hContact);
TCHAR cid[512];
GetUIDFromHContact(hContact, cid, MAX_REGS(cid));
TCHAR *vars[] = {
+ _T("text"), eventText,
+ _T("nick"), nick.str,
_T("group"), group == NULL ? _T("") : group,
_T("protocol"), protocol,
+ _T("msg_date"), date,
_T("year"), year,
_T("month"), month,
_T("month_name"), month_name,
@@ -633,11 +658,40 @@ void ProcessEvent(HANDLE hDbEvent, void *param) _T("contact_id"), cid
};
- AppendToFile(opts.filename_pattern, vars, MAX_REGS(vars), hContact, text.str);
+ if (dbe.eventType == EVENTTYPE_MESSAGE)
+ Speak_SayExWT("message", hContact, dbe.flags & DBEF_SENT ? 0 : 1, vars, MAX_REGS(vars));
+ else if (dbe.eventType == EVENTTYPE_URL)
+ Speak_SayExWT("url", hContact, dbe.flags & DBEF_SENT ? 0 : 1, vars, MAX_REGS(vars));
+ else if (dbe.eventType == EVENTTYPE_FILE)
+ Speak_SayExWT("file", hContact, dbe.flags & DBEF_SENT ? 0 : 1, vars, MAX_REGS(vars));
+
+ if (!IsProtocolEnabled(proto))
+ return;
+
+ if (metacontacts_proto != NULL)
+ {
+ BOOL isSub = (GetMetaContact(hContact) != NULL);
+ if (isSub && IsProtocolEnabled(metacontacts_proto))
+ return;
+ }
+
+ if (!IsEventEnabled(dbe.eventType))
+ return;
+
+ Buffer<TCHAR> text;
+ text.append(_T("["));
+ text.append(date);
+ text.append(_T("] "));
- mir_free(protocol);
- mir_free(group);
- mir_free(eventText);
+ if (flags & HISTORYEVENTS_FLAG_EXPECT_CONTACT_NAME_BEFORE)
+ {
+ text.append(nick);
+ text.append(_T(": "));
+ }
+
+ AppendKeepingIndentation(text, eventText, opts.ident_multiline_msgs);
+
+ AppendToFile(opts.filename_pattern, vars, MAX_REGS(vars), hContact, text.str);
}
@@ -650,13 +704,13 @@ GETEVENTFUNC originalAddEvent = NULL; struct ChatMsg
{
int type;
- char *proto;
- TCHAR *name;
+ Buffer<char> proto;
+ Buffer<TCHAR> name;
DWORD time;
- TCHAR *nick;
- TCHAR *status;
- TCHAR *text;
- TCHAR *userInfo;
+ Buffer<TCHAR> nick;
+ Buffer<TCHAR> status;
+ Buffer<TCHAR> text;
+ Buffer<TCHAR> userInfo;
};
int ChatAddEvent(WPARAM wParam, LPARAM lParam)
@@ -702,23 +756,23 @@ int ChatAddEvent(WPARAM wParam, LPARAM lParam) msg->type = gcd->iType;
msg->time = gce->time;
- msg->proto = mir_strdup(gcd->pszModule);
+ msg->proto = gcd->pszModule;
if (gce->dwFlags & GC_UNICODE)
{
- msg->name = mir_u2t((WCHAR *) gcd->pszID);
- msg->nick = mir_u2t((WCHAR *) gce->pszNick);
- msg->status = mir_u2t((WCHAR *) gce->pszStatus);
- msg->text = mir_u2t((WCHAR *) gce->pszText);
- msg->userInfo = mir_u2t((WCHAR *) gce->pszUserInfo);
+ msg->name = (WCHAR *) gcd->pszID;
+ msg->nick = (WCHAR *) gce->pszNick;
+ msg->status = (WCHAR *) gce->pszStatus;
+ msg->text = (WCHAR *) gce->pszText;
+ msg->userInfo = (WCHAR *) gce->pszUserInfo;
}
else
{
- msg->name = mir_a2t(gce->pszUID);
- msg->nick = mir_a2t(gce->pszNick);
- msg->status = mir_a2t(gce->pszStatus);
- msg->text = mir_a2t(gce->pszText);
- msg->userInfo = mir_a2t(gce->pszUserInfo);
+ msg->name = gce->pszUID;
+ msg->nick = gce->pszNick;
+ msg->status = gce->pszStatus;
+ msg->text = gce->pszText;
+ msg->userInfo = gce->pszUserInfo;
}
chatQueue->Add(500, 0, msg);
@@ -735,60 +789,86 @@ void ProcessChat(HANDLE hDummy, void *param) ChatMsg *msg = (ChatMsg *) param;
msg->type = msg->type & ~GC_EVENT_HIGHLIGHT;
- if (IsChatProtocolEnabled(msg->proto) && IsChatEventEnabled(msg->type))
+ msg->text.trim();
+ msg->name.trim();
+
+ TCHAR date[128];
+ DBTIMETOSTRINGT tst = {0};
+ tst.szFormat = _T("d s");
+ tst.szDest = date;
+ tst.cbDest = 128;
+ CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, (WPARAM) msg->time, (LPARAM) &tst);
+
+ Buffer<TCHAR> nick;
+ if (msg->nick.len > 0)
+ {
+ nick = msg->nick;
+ if (msg->userInfo.len > 0)
+ {
+ nick += _T(" (");
+ nick += msg->userInfo;
+ nick += _T(")");
+ }
+ }
+
+ Buffer<TCHAR> plain;
+ if (msg->text.len > 0)
{
- int i;
- for(i = lstrlen(msg->name) - 1; i > 0
- && (msg->name[i] == _T(' ') || msg->name[i] == _T('\t') || msg->name[i] == _T('-')); i--);
- msg->name[i+1] = _T('\0');
-
- TCHAR date[128];
- DBTIMETOSTRINGT tst = {0};
- tst.szFormat = _T("d s");
- tst.szDest = date;
- tst.cbDest = 128;
- CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, (WPARAM) msg->time, (LPARAM) &tst);
+ AppendKeepingIndentationRemovingFormatting(plain, msg->text.str, FALSE);
+ plain.replaceAll('\r', ' ');
+ plain.replaceAll('\n', ' ');
+ plain.trim();
+ }
+
+ TCHAR year[16];
+ TCHAR month[16];
+ TCHAR month_name[32];
+ TCHAR day[16];
+ GetDateTexts(msg->time, year, month, month_name, day);
+
+ scope<TCHAR *> protocol = mir_a2t(msg->proto.str);
+
+ TCHAR *vars[] = {
+ _T("nick"), nick.str,
+ _T("status"), msg->status.str,
+ _T("text"), msg->text.str,
+ _T("text_sl"), plain.str,
+ _T("protocol"), protocol,
+ _T("msg_date"), date,
+ _T("year"), year,
+ _T("month"), month,
+ _T("month_name"), month_name,
+ _T("day"), day,
+ _T("session"), msg->name.str
+ };
+
+ int i;
+ for(i = 0; i < MAX_REGS(CHAT_EVENTS); i++)
+ if (msg->type == CHAT_EVENTS[i].type)
+ break;
+ if (i < MAX_REGS(CHAT_EVENTS))
+ Speak_SayExWT("groupchat", NULL, i, vars, MAX_REGS(vars));
+ if (IsChatProtocolEnabled(msg->proto.str) && IsChatEventEnabled(msg->type))
+ {
Buffer<TCHAR> text;
text.append(_T("["));
text.append(date);
text.append(_T("] "));
- Buffer<TCHAR> nick;
- if (msg->nick != NULL)
- {
- nick.append(msg->nick);
- if (msg->userInfo)
- {
- nick.append(_T(" ("));
- nick.append(msg->userInfo);
- nick.append(_T(")"));
- }
- }
- nick.pack();
-
- Buffer<TCHAR> plain;
- if (msg->text != NULL)
- {
- AppendKeepingIndentationRemovingFormatting(plain, msg->text, FALSE);
- plain.replaceAll('\r', ' ');
- plain.replaceAll('\n', ' ');
- }
- plain.pack();
-
switch (msg->type)
{
case GC_EVENT_MESSAGE:
text.append(_T("* "));
text.append(nick);
text.append(_T(": "));
- AppendKeepingIndentationRemovingFormatting(text, msg->text, opts.chat_ident_multiline_msgs);
+ AppendKeepingIndentationRemovingFormatting(text, msg->text.str, opts.chat_ident_multiline_msgs);
break;
case GC_EVENT_ACTION:
text.append(_T("* "));
text.append(nick);
text.append(_T(" "));
- AppendKeepingIndentationRemovingFormatting(text, msg->text, opts.chat_ident_multiline_msgs);
+ AppendKeepingIndentationRemovingFormatting(text, msg->text.str, opts.chat_ident_multiline_msgs);
break;
case GC_EVENT_JOIN:
text.append(_T("> "));
@@ -796,28 +876,28 @@ void ProcessChat(HANDLE hDummy, void *param) break;
case GC_EVENT_PART:
text.append(_T("< "));
- if (msg->text == NULL)
+ if (plain.len <= 0)
text.appendPrintf(TranslateT("%s has left"), nick.str);
else
text.appendPrintf(TranslateT("%s has left (%s)"), nick.str, plain.str);
break;
case GC_EVENT_QUIT:
text.append(_T("< "));
- if (msg->text == NULL)
+ if (plain.len <= 0)
text.appendPrintf(TranslateT("%s has disconnected"), nick.str);
else
text.appendPrintf(TranslateT("%s has disconnected (%s)"), nick.str, plain.str);
break;
case GC_EVENT_NICK:
text.append(_T("^ "));
- text.appendPrintf(TranslateT("%s is now known as %s"), nick.str, msg->text);
+ text.appendPrintf(TranslateT("%s is now known as %s"), nick.str, msg->text.str);
break;
case GC_EVENT_KICK:
text.append(_T("~ "));
- if (msg->text == NULL)
- text.appendPrintf(TranslateT("%s kicked %s"), msg->status, nick.str);
+ if (plain.len <= 0)
+ text.appendPrintf(TranslateT("%s kicked %s"), msg->status.str, nick.str);
else
- text.appendPrintf(TranslateT("%s kicked %s (%s)"), msg->status, nick.str, plain.str);
+ text.appendPrintf(TranslateT("%s kicked %s (%s)"), msg->status.str, nick.str, plain.str);
break;
case GC_EVENT_NOTICE:
text.append(_T("¤ "));
@@ -825,7 +905,7 @@ void ProcessChat(HANDLE hDummy, void *param) break;
case GC_EVENT_TOPIC:
text.append(_T("# "));
- if (msg->nick == NULL)
+ if (nick.len <= 0)
text.appendPrintf(TranslateT("The topic is \'%s\'"), plain.str);
else
text.appendPrintf(TranslateT("The topic is \'%s\' (set by %s)"), plain.str, nick.str);
@@ -836,44 +916,18 @@ void ProcessChat(HANDLE hDummy, void *param) break;
case GC_EVENT_ADDSTATUS:
text.append(_T("+ "));
- text.appendPrintf(TranslateT("%s enables \'%s\' status for %s"), msg->text, msg->status, nick.str);
+ text.appendPrintf(TranslateT("%s enables \'%s\' status for %s"), msg->text.str, msg->status.str, nick.str);
break;
case GC_EVENT_REMOVESTATUS:
text.append(_T("- "));
- text.appendPrintf(TranslateT("%s disables \'%s\' status for %s"), msg->text, msg->status, nick.str);
+ text.appendPrintf(TranslateT("%s disables \'%s\' status for %s"), msg->text.str, msg->status.str, nick.str);
break;
}
- text.pack();
-
- TCHAR year[16];
- TCHAR month[16];
- TCHAR month_name[32];
- TCHAR day[16];
- GetDateTexts(msg->time, year, month, month_name, day);
-
- TCHAR *protocol = mir_a2t(msg->proto);
-
- TCHAR *vars[] = {
- _T("protocol"), protocol,
- _T("year"), year,
- _T("month"), month,
- _T("month_name"), month_name,
- _T("day"), day,
- _T("session"), msg->name
- };
-
AppendToFile(opts.chat_filename_pattern, vars, MAX_REGS(vars), NULL, text.str);
- mir_free(protocol);
}
- mir_free(msg->proto);
- mir_free(msg->name);
- mir_free(msg->nick);
- mir_free(msg->status);
- mir_free(msg->text);
- mir_free(msg->userInfo);
delete msg;
}
diff --git a/Plugins/historylog/options.cpp b/Plugins/historylog/options.cpp index 3ce843e..f4505d8 100644 --- a/Plugins/historylog/options.cpp +++ b/Plugins/historylog/options.cpp @@ -51,6 +51,7 @@ BOOL ChatAllowProtocol(const char *proto) static OptPageControl optionsControls[] = {
+ { &opts.disk_log_enabled, CONTROL_CHECKBOX, IDC_ENABLED, "DiskLogEnabled", FALSE },
{ &opts.filename_pattern, CONTROL_TEXT, IDC_FILENAME, "FilenamePattern", (DWORD) _T("Log\\%group%\\%contact%.msgs") },
{ &opts.ident_multiline_msgs, CONTROL_CHECKBOX, IDC_IDENT_MULTILINE,"IdentMultilineMsgs", TRUE },
{ NULL, CONTROL_PROTOCOL_LIST, IDC_PROTOCOLS, "Enable%s", TRUE, (int)AllowProtocol }
@@ -58,6 +59,7 @@ static OptPageControl optionsControls[] = { static OptPageControl chatControls[] = {
+ { &opts.chat_disk_log_enabled, CONTROL_CHECKBOX, IDC_ENABLED, "ChatDiskLogEnabled", FALSE },
{ &opts.chat_filename_pattern, CONTROL_TEXT, IDC_FILENAME, "ChatFilenamePattern", (DWORD) _T("Log\\Group Chats\\%session%.msgs") },
{ &opts.chat_ident_multiline_msgs, CONTROL_CHECKBOX, IDC_IDENT_MULTILINE,"ChatIdentMultilineMsgs", TRUE },
{ NULL, CONTROL_PROTOCOL_LIST, IDC_PROTOCOLS, "ChatEnable%s", TRUE, (int)ChatAllowProtocol }
@@ -151,6 +153,33 @@ static void GetTextMetric(HFONT hFont, TEXTMETRIC *tm) }
+void EnableDisableControls(HWND hwndDlg, int eventTypeCount)
+{
+ BOOL enabled = IsDlgButtonChecked(hwndDlg, IDC_ENABLED);
+
+ EnableWindow(GetDlgItem(hwndDlg,IDC_FILENAME_L), enabled);
+ EnableWindow(GetDlgItem(hwndDlg,IDC_FILENAME), enabled);
+ EnableWindow(GetDlgItem(hwndDlg,IDC_IDENT_MULTILINE), enabled);
+ EnableWindow(GetDlgItem(hwndDlg,IDC_PROTOCOLS_L), enabled);
+ EnableWindow(GetDlgItem(hwndDlg,IDC_PROTOCOLS), enabled);
+ EnableWindow(GetDlgItem(hwndDlg,IDC_EVENT_TYPES), enabled);
+
+ int id = IDC_EVENT_TYPES + 100;
+ for (int k = 0; k < eventTypeCount; k++)
+ {
+ HWND ctrl = GetDlgItem(hwndDlg,id++);
+ if (ctrl)
+ EnableWindow(ctrl, enabled);
+ ctrl = GetDlgItem(hwndDlg,id++);
+ if (ctrl)
+ EnableWindow(ctrl, enabled);
+ ctrl = GetDlgItem(hwndDlg,id++);
+ if (ctrl)
+ EnableWindow(ctrl, enabled);
+ }
+}
+
+
static BOOL CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int avaiable = 0;
@@ -159,6 +188,8 @@ static BOOL CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA static int lineHeigth = 0;
static int eventTypeCount = 0;
+ BOOL ret = SaveOptsDlgProc(optionsControls, MAX_REGS(optionsControls), MODULE_NAME, hwndDlg, msg, wParam, lParam);
+
switch (msg)
{
case WM_INITDIALOG:
@@ -201,15 +232,17 @@ static BOOL CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA id ++;
HWND icon = CreateWindow(_T("STATIC"), _T(""), WS_CHILD | WS_VISIBLE | SS_ICON | SS_CENTERIMAGE,
- x, pt.y + (height - 16) / 2, 16, 16, hwndDlg, NULL, hInst, NULL);
+ x, pt.y + (height - 16) / 2, 16, 16, hwndDlg, (HMENU) id, hInst, NULL);
x += 20;
+ id ++;
SendMessage(icon, STM_SETICON, (WPARAM) CallService(MS_HISTORYEVENTS_GET_ICON, heh->eventType, TRUE), 0);
HWND tmp = CreateWindowA("STATIC", heh->description, WS_CHILD | WS_VISIBLE,
x, pt.y + (height - font.tmHeight) / 2, width - (x - pt.x), font.tmHeight,
- hwndDlg, NULL, hInst, NULL);
+ hwndDlg, (HMENU) id, hInst, NULL);
SendMessage(tmp, WM_SETFONT, (WPARAM) hFont, FALSE);
+ id ++;
pt.y += height;
}
@@ -227,6 +260,8 @@ static BOOL CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA si.nPos = current;
SetScrollInfo(hwndDlg, SB_VERT, &si, TRUE);
+ EnableDisableControls(hwndDlg, eventTypeCount);
+
break;
}
@@ -295,8 +330,13 @@ static BOOL CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA break;
int id = LOWORD(wParam);
- if (id >= IDC_EVENT_TYPES + 100 && id < IDC_EVENT_TYPES + 100 + eventTypeCount)
+
+ if (id == IDC_ENABLED)
+ EnableDisableControls(hwndDlg, eventTypeCount);
+
+ else if (id >= IDC_EVENT_TYPES + 100 && id < IDC_EVENT_TYPES + 100 + 3 * eventTypeCount)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+
break;
}
@@ -312,7 +352,7 @@ static BOOL CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA {
const HISTORY_EVENT_HANDLER *heh = (const HISTORY_EVENT_HANDLER *) CallService(MS_HISTORYEVENTS_GET_EVENT, k, -1);
SetEventEnabled(heh->eventType, IsDlgButtonChecked(hwndDlg, id));
- id ++;
+ id += 3;
}
break;
@@ -320,32 +360,10 @@ static BOOL CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
- return SaveOptsDlgProc(optionsControls, MAX_REGS(optionsControls), MODULE_NAME, hwndDlg, msg, wParam, lParam);
+ return ret;
}
-
-struct
-{
- int type;
- TCHAR *name;
-}
-CHAT_EVENTS[] =
-{
- { GC_EVENT_MESSAGE, _T("Message") },
- { GC_EVENT_ACTION, _T("Action") },
- { GC_EVENT_JOIN, _T("User joined") },
- { GC_EVENT_PART, _T("User left") },
- { GC_EVENT_QUIT, _T("User disconnected") },
- { GC_EVENT_KICK, _T("User kicked") },
- { GC_EVENT_NICK, _T("Nickname change") },
- { GC_EVENT_NOTICE, _T("Notice") },
- { GC_EVENT_TOPIC, _T("Topic change") },
- { GC_EVENT_INFORMATION, _T("Information message") },
- { GC_EVENT_ADDSTATUS, _T("Status enabled") },
- { GC_EVENT_REMOVESTATUS, _T("Status disabled") }
-};
-
static BOOL CALLBACK ChatDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int avaiable = 0;
@@ -354,6 +372,8 @@ static BOOL CALLBACK ChatDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l static int lineHeigth = 0;
static int eventTypeCount = 0;
+ BOOL ret = SaveOptsDlgProc(chatControls, MAX_REGS(chatControls), MODULE_NAME, hwndDlg, msg, wParam, lParam);
+
switch (msg)
{
case WM_INITDIALOG:
@@ -390,7 +410,7 @@ static BOOL CALLBACK ChatDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l x, pt.y, width - (x - pt.x), height, hwndDlg, (HMENU) id, hInst, NULL);
SendMessage(chk, WM_SETFONT, (WPARAM) hFont, FALSE);
SendMessage(chk, BM_SETCHECK, IsChatEventEnabled(CHAT_EVENTS[k].type) ? BST_CHECKED : BST_UNCHECKED, 0);
- id ++;
+ id += 3;
pt.y += height;
}
@@ -408,6 +428,8 @@ static BOOL CALLBACK ChatDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l si.nPos = current;
SetScrollInfo(hwndDlg, SB_VERT, &si, TRUE);
+ EnableDisableControls(hwndDlg, eventTypeCount);
+
break;
}
@@ -476,7 +498,11 @@ static BOOL CALLBACK ChatDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l break;
int id = LOWORD(wParam);
- if (id >= IDC_EVENT_TYPES + 100 && id < IDC_EVENT_TYPES + 100 + eventTypeCount)
+
+ if (id == IDC_ENABLED)
+ EnableDisableControls(hwndDlg, eventTypeCount);
+
+ else if (id >= IDC_EVENT_TYPES + 100 && id < IDC_EVENT_TYPES + 100 + 3 * eventTypeCount)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
}
@@ -492,7 +518,7 @@ static BOOL CALLBACK ChatDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l for (int k = 0; k < eventTypeCount; k++)
{
SetChatEventEnabled(CHAT_EVENTS[k].type, IsDlgButtonChecked(hwndDlg, id));
- id ++;
+ id += 3;
}
break;
@@ -500,5 +526,5 @@ static BOOL CALLBACK ChatDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
- return SaveOptsDlgProc(chatControls, MAX_REGS(chatControls), MODULE_NAME, hwndDlg, msg, wParam, lParam);
+ return ret;
}
diff --git a/Plugins/historylog/options.h b/Plugins/historylog/options.h index 9d50762..fe8f08b 100644 --- a/Plugins/historylog/options.h +++ b/Plugins/historylog/options.h @@ -27,9 +27,11 @@ Boston, MA 02111-1307, USA. typedef struct
{
+ BOOL disk_log_enabled;
TCHAR filename_pattern[1024];
BYTE ident_multiline_msgs;
+ BOOL chat_disk_log_enabled;
TCHAR chat_filename_pattern[1024];
BYTE chat_ident_multiline_msgs;
diff --git a/Plugins/historylog/resource.h b/Plugins/historylog/resource.h index c7ebaea..2481732 100644 --- a/Plugins/historylog/resource.h +++ b/Plugins/historylog/resource.h @@ -76,6 +76,8 @@ #define IDC_FILENAME 1104
#define IDC_CHECK1 1105
#define IDC_IDENT_MULTILINE 1105
+#define IDC_ENABLED 1107
+#define IDC_FILENAME_L 1108
#define IDC_STATIC -1
// Next default values for new objects
@@ -86,7 +88,7 @@ #define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 126
#define _APS_NEXT_COMMAND_VALUE 40004
-#define _APS_NEXT_CONTROL_VALUE 1107
+#define _APS_NEXT_CONTROL_VALUE 1109
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/Plugins/historylog/resource.rc b/Plugins/historylog/resource.rc index 70a6d49..d10bbb3 100644 --- a/Plugins/historylog/resource.rc +++ b/Plugins/historylog/resource.rc @@ -32,15 +32,18 @@ STYLE DS_FIXEDSYS | WS_CHILD | WS_VISIBLE | WS_VSCROLL EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Filename pattern:",IDC_STATIC,5,9,76,11
- EDITTEXT IDC_FILENAME,87,7,193,14,ES_AUTOHSCROLL
- LTEXT "Only log for these protocols:",IDC_STATIC,5,46,275,9
+ CONTROL "Enabled",IDC_ENABLED,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,5,5,280,11
+ LTEXT "Filename pattern:",IDC_FILENAME_L,18,24,76,11
+ EDITTEXT IDC_FILENAME,100,22,185,14,ES_AUTOHSCROLL
+ LTEXT "Only log for these protocols:",IDC_PROTOCOLS_L,18,61,
+ 263,9
CONTROL "",IDC_PROTOCOLS,"SysListView32",LVS_REPORT |
LVS_SINGLESEL | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER |
- LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,13,58,142,55
- LTEXT "Only these event types:",IDC_EVENT_TYPES,5,124,275,10
+ LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,26,73,142,55
+ LTEXT "Only these event types:",IDC_EVENT_TYPES,18,139,263,10
CONTROL "Ident multi-line messages",IDC_IDENT_MULTILINE,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,5,27,275,12
+ BS_AUTOCHECKBOX | WS_TABSTOP,18,42,263,12
END
diff --git a/Plugins/historylog/sdk/m_speak.h b/Plugins/historylog/sdk/m_speak.h new file mode 100644 index 0000000..78b46c8 --- /dev/null +++ b/Plugins/historylog/sdk/m_speak.h @@ -0,0 +1,278 @@ +/*
+Copyright (C) 2007 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_SPEAK_H__
+# define __M_SPEAK_H__
+
+
+/*
+There is 2 ways of using the speak plugin:
+
+1. Older and simple way: just call
+ Speak_Say(hContact, _T("text to speak"))
+and the text will be spoken using contact settings. If hContact is NULL, it will use
+system settings.
+Previous versions only had an ascii version, so if you want to support then you need
+to call
+ Speak_SayA(hContact, "text to speak")
+
+
+2. Integrating with meSpeak GUI: for that you have first to register a speak type and
+then call the speak functions. In both case you have 2 options:
+
+2.1 Sending the full text: meSpeak GUI will only allow to enable/disable the type.
+To register call (in modules loaded):
+ Speak_Register("PluginName (DB key)", "name", "Prety name for GUI", "icon_xyz")
+And to speak call:
+ Speak_SayEx("name", hContact, _T("text to speak"))
+
+2.2 Using templates: you will not pass the text, but some variables. meSpeak handles
+the GUI to allow the user to create the text for those variables. These functions
+end with WT (with templates).
+To register call (in modules loaded):
+ char *templates[] = { "Name\nDefault\n%var1%\tDescription 1\n%var2%\tDescription2\n%var3%\tDescription 3" };
+ Speak_RegisterWT("PluginName (DB key)", "name", "Prety name for GUI", "icon_xyz",
+ templates, 1);
+And to speak call:
+ TCHAR *variables[] = { _T("var1"), _T("Value 1"), _T("var2"), _T("Value 2"), _T("var3"), _T("Value 3") };
+ Speak_SayExWT("name", hContact, 0, variables, 3);
+*/
+
+
+#define MIID_SPEAK { 0x1ef72725, 0x6a83, 0x483b, { 0xaa, 0x50, 0x89, 0x53, 0xe3, 0x59, 0xee, 0xad } }
+
+
+/*
+Speak a text
+
+wParam: (HANDLE) hContact
+lParam: (char *) text
+return: 0 on success
+*/
+#define MS_SPEAK_SAY_A "Speak/Say"
+
+
+/*
+Speak a unicode text
+
+wParam: (HANDLE) hContact
+lParam: (WCHAR *) text
+return: 0 on success
+*/
+#define MS_SPEAK_SAY_W "Speak/SayW"
+
+
+typedef struct {
+ int cbSize;
+
+ const char *module;
+ const char *name; // Internal type name
+ const char *description; // Will be translated
+ const char *icon; // Name off icolib icon
+
+ // Aditional data if wants to use add to history services
+ char **templates; // Each entry is: "Name\nDefault\n%var%\tDescription\n%var%\tDescription\n%var%\tDescription"
+ int numTemplates;
+
+} SPEAK_TYPE;
+
+
+/*
+Register and speak type
+
+wParam: (SPEAK_TYPE *) type
+lParam: 0
+return: 0 on success
+*/
+#define MS_SPEAK_REGISTER "Speak/Register"
+
+
+#define SPEAK_CHAR 1
+#define SPEAK_WCHAR 2
+
+typedef struct {
+ int cbSize;
+
+ const char *type; // Internal type name
+ HANDLE hContact;
+ int flags; // SPEAK_*
+
+ int templateNum; // -1 to use text
+ union
+ {
+ const void *text;
+
+ struct
+ {
+ void *variables;
+ int numVariables;
+ };
+ };
+
+} SPEAK_ITEM;
+
+
+/*
+Speak a text
+
+wParam: (SPEAK_ITEM *) Item
+lParam: 0
+return: 0 on success
+*/
+#define MS_SPEAK_SAYEX "Speak/SayEx"
+
+
+
+// Helper functions
+
+static int Speak_SayA(HANDLE hContact, const char *text)
+{
+ return CallService(MS_SPEAK_SAY_A, (WPARAM) hContact, (LPARAM) text);
+}
+
+static int Speak_SayW(HANDLE hContact, const WCHAR *text)
+{
+ return CallService(MS_SPEAK_SAY_W, (WPARAM) hContact, (LPARAM) text);
+}
+
+static int Speak_Register(char *module, char *name, char *description, char *icon)
+{
+ SPEAK_TYPE type;
+
+ if (!ServiceExists(MS_SPEAK_REGISTER))
+ return -1;
+
+ type.cbSize = sizeof(type);
+ type.module = module;
+ type.name = name;
+ type.description = description;
+ type.icon = icon;
+ type.templates = NULL;
+ type.numTemplates = 0;
+
+ return CallService(MS_SPEAK_REGISTER, (WPARAM) &type, 0);
+}
+
+static int Speak_RegisterWT(const char *module, const char *name, const char *description,
+ const char *icon, char **templates, int numTemplates)
+{
+ SPEAK_TYPE type;
+
+ if (!ServiceExists(MS_SPEAK_REGISTER))
+ return -1;
+
+ type.cbSize = sizeof(type);
+ type.module = module;
+ type.name = name;
+ type.description = description;
+ type.icon = icon;
+ type.templates = templates;
+ type.numTemplates = numTemplates;
+
+ return CallService(MS_SPEAK_REGISTER, (WPARAM) &type, 0);
+}
+
+static int Speak_SayExA(char *type, HANDLE hContact, const char *text)
+{
+ SPEAK_ITEM item;
+
+ if (!ServiceExists(MS_SPEAK_SAYEX))
+ // Try old service
+ return Speak_SayA(hContact, text);
+
+ item.cbSize = sizeof(item);
+ item.flags = SPEAK_CHAR;
+ item.type = type;
+ item.hContact = hContact;
+ item.templateNum = -1;
+ item.text = text;
+
+ return CallService(MS_SPEAK_SAYEX, (WPARAM) &item, 0);
+}
+
+static int Speak_SayExW(char *type, HANDLE hContact, const WCHAR *text)
+{
+ SPEAK_ITEM item;
+
+ if (!ServiceExists(MS_SPEAK_SAYEX))
+ // Try old service
+ return Speak_SayW(hContact, text);
+
+ item.cbSize = sizeof(item);
+ item.flags = SPEAK_WCHAR;
+ item.type = type;
+ item.hContact = hContact;
+ item.templateNum = -1;
+ item.text = text;
+
+ return CallService(MS_SPEAK_SAYEX, (WPARAM) &item, 0);
+}
+
+static int Speak_SayExWTA(char *type, HANDLE hContact, int templateNum, char **variables, int numVariables)
+{
+ SPEAK_ITEM item;
+
+ if (!ServiceExists(MS_SPEAK_SAYEX))
+ return -1;
+
+ item.cbSize = sizeof(item);
+ item.flags = SPEAK_CHAR;
+ item.type = type;
+ item.hContact = hContact;
+ item.templateNum = templateNum;
+ item.variables = variables;
+ item.numVariables = numVariables;
+
+ return CallService(MS_SPEAK_SAYEX, (WPARAM) &item, 0);
+}
+
+static int Speak_SayExWTW(char *type, HANDLE hContact, int templateNum, WCHAR **variables, int numVariables)
+{
+ SPEAK_ITEM item;
+
+ if (!ServiceExists(MS_SPEAK_SAYEX))
+ return -1;
+
+ item.cbSize = sizeof(item);
+ item.flags = SPEAK_WCHAR;
+ item.type = type;
+ item.hContact = hContact;
+ item.templateNum = templateNum;
+ item.variables = variables;
+ item.numVariables = numVariables;
+
+ return CallService(MS_SPEAK_SAYEX, (WPARAM) &item, 0);
+}
+
+
+#ifdef UNICODE
+# define MS_SPEAK_SAY MS_SPEAK_SAY_W
+# define Speak_Say Speak_SayW
+# define Speak_SayEx Speak_SayExW
+# define Speak_SayExWT Speak_SayExWTW
+#else
+# define MS_SPEAK_SAY MS_SPEAK_SAY_A
+# define Speak_Say Speak_SayA
+# define Speak_SayEx Speak_SayExA
+# define Speak_SayExWT Speak_SayExWTA
+#endif
+
+
+#endif // __M_SPEAK_H__
|