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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
{
Miranda IM: the free IM client for Microsoft Windows
Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
{$IFNDEF M_METACONTACTS}
{$DEFINE M_METACONTACTS}
const
{ gets the handle for the default contact
wParam=(HANDLE)hMetaContact
lParam=0
returns a handle to the default contact, or null on failure }
MS_MC_GETDEFAULTCONTACT = 'MetaContacts/GetDefault';
{ gets the contact number for the default contact
wParam=(HANDLE)hMetaContact
lParam=0
returns a DWORD contact number, or -1 on failure }
MS_MC_GETDEFAULTCONTACTNUM = 'MetaContacts/GetDefaultNum';
{ gets the handle for the 'most online' contact
wParam=(HANDLE)hMetaContact
lParam=0
returns a handle to the 'most online' contact }
MS_MC_GETMOSTONLINECONTACT = 'MetaContacts/GetMostOnline';
{ gets the number of subcontacts for a metacontact
wParam=(HANDLE)hMetaContact
lParam=0
returns a DWORD representing the number of subcontacts for the given metacontact }
MS_MC_GETNUMCONTACTS = 'MetaContacts/GetNumContacts';
{ gets the handle of a subcontact, using the subcontact's number
wParam=(HANDLE)hMetaContact
lParam=(DWORD)contact number
returns a handle to the specified subcontact }
MS_MC_GETSUBCONTACT = 'MetaContacts/GetSubContact';
{ sets the default contact, using the subcontact's contact number
wParam=(HANDLE)hMetaContact
lParam=(DWORD)contact number
returns 0 on success }
MS_MC_SETDEFAULTCONTACTNUM = 'MetaContacts/SetDefault';
{ sets the default contact, using the subcontact's handle
wParam=(HANDLE)hMetaContact
lParam=(HANDLE)hSubcontact
returns 0 on success }
MS_MC_SETDEFAULTCONTACT = 'MetaContacts/SetDefaultByHandle';
{ forces the metacontact to send using a specific subcontact, using the subcontact's contact number
wParam=(HANDLE)hMetaContact
lParam=(DWORD)contact number
returns 0 on success }
MS_MC_FORCESENDCONTACTNUM = 'MetaContacts/ForceSendContact';
{ forces the metacontact to send using a specific subcontact, using the subcontact's handle
wParam=(HANDLE)hMetaContact
lParam=(HANDLE)hSubcontact
returns 0 on success (will fail if 'force default' is in effect) }
MS_MC_FORCESENDCONTACT = 'MetaContacts/ForceSendContactByHandle';
{ 'unforces' the metacontact to send using a specific subcontact
wParam=(HANDLE)hMetaContact
lParam=0
returns 0 on success (will fail if 'force default' is in effect) }
MS_MC_UNFORCESENDCONTACT = 'MetaContacts/UnforceSendContact';
{ 'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
overrides (and clears) 'force send' above, and will even force use of offline contacts
will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
wParam=(HANDLE)hMetaContact
lParam=0
returns 1(true) or 0(false) representing new state of 'force default' }
MS_MC_FORCEDEFAULT = 'MetaContacts/ForceSendDefault';
{ method to get state of 'force' for a metacontact
wParam=(HANDLE)hMetaContact
lParam= (DWORD)&contact_number or NULL
if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
or if none is in force, the value (DWORD)-1 will be copied
(v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above) }
MS_MC_GETFORCESTATE = 'MetaContacts/GetForceState';
{ fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
wParam=(HANDLE)hMetaContact
lParam=(HANDLE)hDefaultContact }
ME_MC_DEFAULTTCHANGED = 'MetaContacts/DefaultChanged';
{ fired when a metacontact's subcontacts change (fired upon creation of
metacontact, when contacts are added or removed, and when contacts are
reordered) - a signal to re-read metacontact data
wParam=(HANDLE)hMetaContact
lParam=0 }
ME_MC_SUBCONTACTSCHANGED = 'MetaContacts/SubcontactsChanged';
{ fired when a metacontact is forced to send using a specific subcontact
wParam=(HANDLE)hMetaContact
lParam=(HANDLE)hForceContact }
ME_MC_FORCESEND = 'MetaContacts/ForceSend';
{ fired when a metacontact is 'unforced' to send using a specific subcontact
wParam=(HANDLE)hMetaContact
lParam=0 }
ME_MC_UNFORCESEND = 'MetaContacts/UnforceSend';
{ wParam=(HANDLE)hContact
lParam=0
convert a given contact into a metacontact
}
MS_MC_CONVERTTOMETA = 'MetaContacts/ConvertToMetacontact';
{ wParam=(HANDLE)hContact
lParam=(HANDLE)hMeta
add an existing contact to a metacontact
}
MS_MC_ADDTOMETA = 'MetaContacts/AddToMetacontact';
{ wParam=0
lParam=(HANDLE)hContact
remove a contact from a metacontact
}
MS_MC_REMOVEFROMMETA = 'MetaContacts/RemoveFromMetacontact';
{ wParam=(BOOL)disable
lParam=0
enable/disable the 'hidden group hack' - for clists that support subcontact
hiding using 'IsSubcontact' setting. Should be called once in the clist
'onmodulesloaded' event handler (which, since it's loaded after the db, will
be called before the metacontact onmodulesloaded handler where the subcontact
hiding is usually done)
}
MS_MC_DISABLEHIDDENGROUP = 'MetaContacts/DisableHiddenGroup';
const
META_PROTO = 'MetaContacts';
{ returns true if a contact is a metacontact or false otherwise
}
function db_mc_isMeta(hContact:MCONTACT):Integer; stdcall;
external CoreDLL name 'db_mc_isMeta';
{ returns true if a contact is a subcontact or false otherwise
}
function db_mc_isSub(hContact:MCONTACT):Integer; stdcall;
external CoreDLL name 'db_mc_isSub';
{ returns a meta contact for a subcontact or 0 otherwise
}
function db_mc_getMeta(hContact:MCONTACT):MCONTACT; stdcall;
external CoreDLL name 'db_mc_getMeta';
{$ENDIF}
|