summaryrefslogtreecommitdiff
path: root/plugins/XSoundNotify/src/xsn_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/XSoundNotify/src/xsn_utils.cpp')
-rw-r--r--plugins/XSoundNotify/src/xsn_utils.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/XSoundNotify/src/xsn_utils.cpp b/plugins/XSoundNotify/src/xsn_utils.cpp
index 1e0ad8c57d..a4808dd775 100644
--- a/plugins/XSoundNotify/src/xsn_utils.cpp
+++ b/plugins/XSoundNotify/src/xsn_utils.cpp
@@ -19,7 +19,7 @@ bool isReceiveMessage(LPARAM event)
return !(((info.eventType != EVENTTYPE_MESSAGE) && !(info.flags & DBEF_READ)) || (info.flags & DBEF_SENT));
}
-xsn_string getContactSound(HANDLE contact)
+std::tstring getContactSound(HANDLE contact)
{
XSN_Variant sound;
DBGetContactSettingTString(contact, XSN_ModuleInfo::name(), XSN_ModuleInfo::soundSetting(), &sound);
@@ -28,26 +28,28 @@ xsn_string getContactSound(HANDLE contact)
ModuleString getContactModule(HANDLE contact)
{
- char * proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)contact, 0);
+ char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)contact, 0);
if (proto == nullptr)
throw std::runtime_error("MS_PROTO_GETCONTACTBASEPROTO failed");
return ModuleString(proto);
}
-xsn_string getIcqContactId(HANDLE contact, const ModuleString & module)
+std::tstring getIcqContactId(HANDLE contact, const ModuleString &module)
{
XSN_Variant nick;
DBGetContactSettingTString(contact, module.c_str(), "CustomNick", &nick);
if (nick.empty())
DBGetContactSettingTString(contact, module.c_str(), "Nick", &nick);
DWORD uin = DBGetContactSettingDword(contact, module.c_str(), "UIN", 0);
- xsn_string uinStr = boost::lexical_cast<xsn_string>(uin);
+ TCHAR tmpuin[10];
+ _itot_s(uin, tmpuin, 10);
+ std::tstring uinStr = tmpuin;
if (nick.empty())
return uinStr;
return nick.toString() + TEXT(" (") + uinStr + TEXT(")");
}
-xsn_string getJabberContactId(HANDLE contact, const ModuleString & module)
+std::tstring getJabberContactId(HANDLE contact, const ModuleString &module)
{
XSN_Variant jid, nick;
DBGetContactSettingTString(contact, module.c_str(), "jid", &jid);