summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-08-14 14:55:43 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-08-14 14:55:43 +0000
commit88fdd523bdf7cd891dbbac4b1ae7fb2ff597cea3 (patch)
tree9401068579f21f8336e56189de0e3065c2789ff6 /protocols/JabberG
parentf4a0cae037bc54f6e14aee7366ee9c635ac7df81 (diff)
MS_SYSTEM_GETFILEVERSION added
git-svn-id: http://svn.miranda-ng.org/main/trunk@1454 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/jabber.cpp7
-rw-r--r--protocols/JabberG/jabber.h2
-rw-r--r--protocols/JabberG/jabber_caps.cpp7
-rw-r--r--protocols/JabberG/jabber_iq_handlers.cpp2
-rw-r--r--protocols/JabberG/jabber_util.cpp2
5 files changed, 11 insertions, 9 deletions
diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp
index 950ffb6edb..5ea6fc7b84 100644
--- a/protocols/JabberG/jabber.cpp
+++ b/protocols/JabberG/jabber.cpp
@@ -43,7 +43,7 @@ int hLangpack;
int g_cbCountries;
struct CountryListEntry* g_countries;
-char szCoreVersion[200];
+TCHAR szCoreVersion[100];
PLUGININFOEX pluginInfo = {
sizeof( PLUGININFOEX ),
@@ -223,7 +223,10 @@ extern "C" int __declspec( dllexport ) Load()
mir_getTMI( &tmi );
mir_getLP( &pluginInfo );
- JCallService( MS_SYSTEM_GETVERSIONTEXT, SIZEOF(szCoreVersion), (LPARAM)szCoreVersion);
+ WORD v[4];
+ JCallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)v);
+ mir_sntprintf(szCoreVersion, SIZEOF(szCoreVersion), _T("%d.%d.%d.%d"), v[0], v[1], v[2], v[3]);
+
JCallService( MS_UTILS_GETCOUNTRYLIST, ( WPARAM )&g_cbCountries, ( LPARAM )&g_countries );
setlocale(LC_ALL, "");
diff --git a/protocols/JabberG/jabber.h b/protocols/JabberG/jabber.h
index 5620c17696..f9ffdda8a6 100644
--- a/protocols/JabberG/jabber.h
+++ b/protocols/JabberG/jabber.h
@@ -576,7 +576,7 @@ extern BOOL (WINAPI *JabberIsThemeActive)();
extern HRESULT (WINAPI *JabberDrawThemeParentBackground)(HWND, HDC, RECT *);
extern const TCHAR xmlnsOwner[];
-extern char szCoreVersion[];
+extern TCHAR szCoreVersion[];
extern int g_cbCountries;
extern struct CountryListEntry* g_countries;
diff --git a/protocols/JabberG/jabber_caps.cpp b/protocols/JabberG/jabber_caps.cpp
index 85f1c52b88..380cf03087 100644
--- a/protocols/JabberG/jabber_caps.cpp
+++ b/protocols/JabberG/jabber_caps.cpp
@@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "jabber_iq.h"
#include "jabber_caps.h"
#include "version.h"
-#include <m_version.h>
const JabberFeatCapPair g_JabberFeatCapPairs[] = {
{ _T(JABBER_FEAT_DISCO_INFO), JABBER_CAPS_DISCO_INFO, _T("Supports Service Discovery info"), },
@@ -82,7 +81,7 @@ const JabberFeatCapPair g_JabberFeatCapPairsExt[] = {
{ _T(JABBER_EXT_USER_ACTIVITY), JABBER_CAPS_USER_ACTIVITY_NOTIFY },
{ _T(JABBER_EXT_GTALK_PMUC), JABBER_CAPS_GTALK_PMUC },
{ _T(JABBER_EXT_MIR_NOTES), JABBER_CAPS_MIRANDA_NOTES, },
- { _T(MIRANDA_VERSION_DISPLAY), JABBER_CAPS_MIRANDA_PARTIAL },
+ { szCoreVersion, JABBER_CAPS_MIRANDA_PARTIAL },
{ NULL, 0 }
};
@@ -549,7 +548,7 @@ CJabberClientCaps * CJabberClientCapsManager::FindClient( const TCHAR *szNode )
}
void CJabberClientCapsManager::AddDefaultCaps() {
- SetClientCaps( _T(JABBER_CAPS_MIRANDA_NODE), _A2T(szCoreVersion), JABBER_CAPS_MIRANDA_ALL );
+ SetClientCaps( _T(JABBER_CAPS_MIRANDA_NODE), szCoreVersion, JABBER_CAPS_MIRANDA_ALL );
for ( int i = 0; g_JabberFeatCapPairsExt[i].szFeature; i++ )
SetClientCaps( _T(JABBER_CAPS_MIRANDA_NODE), g_JabberFeatCapPairsExt[i].szFeature, g_JabberFeatCapPairsExt[i].jcbCap );
@@ -689,7 +688,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest( HXML, CJabberIqInfo* pInfo, co
form << XCHILD( _T("field")) << XATTR( _T("var"), _T("os_version")) << XCHILD( _T("value"), os );
}
form << XCHILD( _T("field")) << XATTR( _T("var"), _T("software")) << XCHILD( _T("value"), _T("Miranda NG Jabber Protocol"));
- form << XCHILD( _T("field")) << XATTR( _T("var"), _T("software_version")) << XCHILD( _T("value"), _A2T(szCoreVersion));
+ form << XCHILD( _T("field")) << XATTR( _T("var"), _T("software_version")) << XCHILD( _T("value"), szCoreVersion);
}
ppro->m_ThreadInfo->send( iq );
diff --git a/protocols/JabberG/jabber_iq_handlers.cpp b/protocols/JabberG/jabber_iq_handlers.cpp
index 6846d0d477..0ae93ec014 100644
--- a/protocols/JabberG/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/jabber_iq_handlers.cpp
@@ -293,7 +293,7 @@ BOOL CJabberProto::OnIqRequestVersion( HXML, CJabberIqInfo* pInfo )
XmlNodeIq iq( _T("result"), pInfo );
HXML query = iq << XQUERY( _T(JABBER_FEAT_VERSION));
query << XCHILD( _T("name"), _T("Miranda NG Jabber"));
- query << XCHILD( _T("version"), _A2T(szCoreVersion));
+ query << XCHILD( _T("version"), szCoreVersion);
if ( m_options.ShowOSVersion )
{
diff --git a/protocols/JabberG/jabber_util.cpp b/protocols/JabberG/jabber_util.cpp
index 8f2eaed3c3..eaf277099f 100644
--- a/protocols/JabberG/jabber_util.cpp
+++ b/protocols/JabberG/jabber_util.cpp
@@ -809,7 +809,7 @@ void CJabberProto::SendPresenceTo( int status, TCHAR* to, HXML extra, const TCHA
// XEP-0115:Entity Capabilities
HXML c = p << XCHILDNS( _T("c"), _T(JABBER_FEAT_ENTITY_CAPS)) << XATTR( _T("node"), _T(JABBER_CAPS_MIRANDA_NODE))
- << XATTR( _T("ver"), _A2T(szCoreVersion));
+ << XATTR( _T("ver"), szCoreVersion);
TCHAR szExtCaps[ 512 ] = _T("");