summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/stdafx.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-04-13 17:54:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-04-13 17:54:12 +0300
commitccd1d2cf194034faa91ee353e544a9337d3fa993 (patch)
tree8721417a5d7217a0b71200a5f142507c5b3f0983 /protocols/JabberG/src/stdafx.h
parentfee3a74e7429552ebbfe7ae9c14a4f6c25156fb6 (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-xprotocols/JabberG/src/stdafx.h10
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*);