diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-08-16 16:02:58 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-08-16 16:02:58 +0000 |
commit | 2e93497d5b19b4fc46f84cb18267bce357e48747 (patch) | |
tree | 32682bcd95fa505aec3e8cf16023e8babfb07829 /protocols/Tox/src/tox_netlib.cpp | |
parent | 5cbde68cad776dd10e36b72f030712abdf3f225a (diff) |
Tox:
- added netlib logging
- minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@10203 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_netlib.cpp')
-rw-r--r-- | protocols/Tox/src/tox_netlib.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_netlib.cpp b/protocols/Tox/src/tox_netlib.cpp new file mode 100644 index 0000000000..a2fea7a615 --- /dev/null +++ b/protocols/Tox/src/tox_netlib.cpp @@ -0,0 +1,22 @@ +#include "common.h"
+
+void CToxProto::InitNetlib()
+{
+ wchar_t name[128];
+ mir_sntprintf(name, SIZEOF(name), TranslateT("%s connection"), m_tszUserName);
+
+ NETLIBUSER nlu = {0};
+ nlu.cbSize = sizeof(nlu);
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
+ nlu.ptszDescriptiveName = name;
+ nlu.szSettingsModule = m_szModuleName;
+ hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
+
+ debugLogA("Setting protocol/module name to '%s'", m_szModuleName);
+}
+
+void CToxProto::UninitNetlib()
+{
+ Netlib_CloseHandle(hNetlibUser);
+ hNetlibUser = NULL;
+}
|