summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/guids.h
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
commit48540940b6c28bb4378abfeb500ec45a625b37b6 (patch)
tree2ef294c0763e802f91d868bdef4229b6868527de /protocols/IcqOscarJ/guids.h
parent5c350913f011e119127baeb32a6aedeb4f0d33bc (diff)
initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/guids.h')
-rw-r--r--protocols/IcqOscarJ/guids.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/protocols/IcqOscarJ/guids.h b/protocols/IcqOscarJ/guids.h
new file mode 100644
index 0000000000..ae4d50552f
--- /dev/null
+++ b/protocols/IcqOscarJ/guids.h
@@ -0,0 +1,88 @@
+// ---------------------------------------------------------------------------80
+// ICQ plugin for Miranda Instant Messenger
+// ________________________________________
+//
+// Copyright © 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
+// Copyright © 2001-2002 Jon Keating, Richard Hughes
+// Copyright © 2002-2004 Martin Öberg, Sam Kothari, Robert Rainwater
+// Copyright © 2004-2010 Joe Kucera
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// -----------------------------------------------------------------------------
+//
+// File name : $URL: http://miranda.googlecode.com/svn/trunk/miranda/protocols/IcqOscarJ/guids.h $
+// Revision : $Revision: 11353 $
+// Last change on : $Date: 2010-03-10 02:21:03 +0200 (Ср, 10 мар 2010) $
+// Last change by : $Author: jokusoftware $
+//
+// DESCRIPTION:
+//
+// Contains helper functions to handle oscar message GUIDs.
+//
+// -----------------------------------------------------------------------------
+
+
+#ifndef __GUIDS_H
+#define __GUIDS_H
+
+
+typedef DWORD plugin_guid[4];
+
+// Message Capability GUIDs
+static const plugin_guid MCAP_SRV_RELAY_FMT = {MCAP_SRV_RELAY_FMT_s};
+static const plugin_guid MCAP_REVERSE_DC_REQ = {MCAP_REVERSE_DC_REQ_s};
+static const plugin_guid MCAP_FILE_TRANSFER = {MCAP_FILE_TRANSFER_s};
+static const plugin_guid MCAP_CONTACTS = {MCAP_CONTACTS_s};
+
+// Plugin GUIDs
+static const plugin_guid PSIG_MESSAGE = {PSIG_MESSAGE_s};
+static const plugin_guid PSIG_INFO_PLUGIN = {PSIG_INFO_PLUGIN_s};
+static const plugin_guid PSIG_STATUS_PLUGIN = {PSIG_STATUS_PLUGIN_s};
+
+// Plugin Message GUIDs
+static const plugin_guid PMSG_QUERY_INFO = {PMSG_QUERY_INFO_s};
+static const plugin_guid PMSG_QUERY_STATUS = {PMSG_QUERY_STATUS_s};
+
+// Message GUIDs
+static const plugin_guid MGTYPE_MESSAGE = {MGTYPE_MESSAGE_s};
+static const plugin_guid MGTYPE_STATUSMSGEXT = {MGTYPE_STATUSMSGEXT_s};
+static const plugin_guid MGTYPE_FILE = {MGTYPE_FILE_s};
+static const plugin_guid MGTYPE_WEBURL = {MGTYPE_WEBURL_s};
+static const plugin_guid MGTYPE_CONTACTS = {MGTYPE_CONTACTS_s};
+static const plugin_guid MGTYPE_GREETING_CARD = {MGTYPE_GREETING_CARD_s};
+static const plugin_guid MGTYPE_CHAT = {MGTYPE_CHAT_s};
+static const plugin_guid MGTYPE_SMS_MESSAGE = {MGTYPE_SMS_MESSAGE_s};
+static const plugin_guid MGTYPE_XTRAZ_SCRIPT = {MGTYPE_XTRAZ_SCRIPT_s};
+
+
+// make GUID checks easy
+static BOOL CompareGUIDs(DWORD q1,DWORD q2,DWORD q3,DWORD q4, const plugin_guid guid)
+{
+ return ((q1 == guid[0]) && (q2 == guid[1]) && (q3 == guid[2]) && (q4 == guid[3]))?TRUE:FALSE;
+}
+
+
+// pack entire GUID into icq packet
+static __inline void packGUID(icq_packet *packet, const plugin_guid guid)
+{
+ packDWord(packet, guid[0]);
+ packDWord(packet, guid[1]);
+ packDWord(packet, guid[2]);
+ packDWord(packet, guid[3]);
+}
+
+
+#endif /* __GUIDS_H */