diff options
author | George Hazan <ghazan@miranda.im> | 2019-04-13 17:54:12 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-04-13 17:54:12 +0300 |
commit | ccd1d2cf194034faa91ee353e544a9337d3fa993 (patch) | |
tree | 8721417a5d7217a0b71200a5f142507c5b3f0983 /protocols/JabberG/src/stdafx.h | |
parent | fee3a74e7429552ebbfe7ae9c14a4f6c25156fb6 (diff) |
Jabber:
- Miranda to generate globally unique packet ids;
- unused member IJabberInterface::AddTemporaryIqHandler removed;
- two rarely used params removed from CJabberProto::AddIQ && CJabberIqManager::AddHandler
- code cleaning
Diffstat (limited to 'protocols/JabberG/src/stdafx.h')
-rwxr-xr-x | protocols/JabberG/src/stdafx.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h index ecb24700bc..d7710f32a6 100755 --- a/protocols/JabberG/src/stdafx.h +++ b/protocols/JabberG/src/stdafx.h @@ -116,6 +116,8 @@ struct CJabberProto; struct CMPlugin : public ACCPROTOPLUGIN<CJabberProto>
{
+ char szRandom[17];
+
CMPlugin();
int Load() override;
@@ -147,11 +149,9 @@ protected: * Global constants
*******************************************************************/
-#define GLOBAL_SETTING_PREFIX "JABBER"
#define GLOBAL_SETTING_MODULE "JABBER"
#define JABBER_DEFAULT_PORT 5222
-#define JABBER_IQID "mir_"
#define JABBER_MAX_JID_LEN 1024
#define JABBER_GC_MSG_QUIT LPGEN("I'm happy Miranda NG user. Get it at https://miranda-ng.org/.")
@@ -747,9 +747,13 @@ void JabberHttpUrlDecode(wchar_t *str); int JabberCombineStatus(int status1, int status2);
time_t JabberIsoToUnixTime(const char *stamp);
char* JabberStripJid(const char *jid, char *dest, size_t destLen);
-int JabberGetPacketID(const TiXmlElement *n);
+int JabberGetPacketID(const char*);
char* JabberId2string(int id);
+__inline int JabberGetPacketID(const TiXmlElement *n)
+{ return JabberGetPacketID(XmlGetAttr(n, "id"));
+}
+
char* time2str(time_t _time, char *buf, size_t bufLen);
time_t str2time(const char*);
|