summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/guids.h
blob: ae4d50552fa3c120c0b9b376b0f4778ff44f938a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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 */