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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0097)http://agent.mail.ru/protocol.html?Submit=%CF%F0%E8%ED%E8%EC%E0%FE+%F1%EE%E3%EB%E0%F8%E5%ED%E8%E5 -->
<!--//--><HTML><HEAD><TITLE>Mail.ru Àãåíò</TITLE>
<SCRIPT src="Mail.ru Agent.files/WindowOpen.js"></SCRIPT>
<!--//-->
<SCRIPT>PrxModAtr=1;</SCRIPT>
<!--//-->
<SCRIPT> function NoError(){return(true);} onerror=NoError; </SCRIPT>
<!--//-->
<SCRIPT> function moveTo(){return true;}function resizeTo(){return true;}</SCRIPT>
<META
content="Íàöèîíàëüíàÿ ïî÷òîâàÿ ñëóæáà @Mail.ru - ëó÷øàÿ áåñïëàòíàÿ ïî÷òà. Äîñòóï ê ïî÷òå ÷åðåç POP/SMTP, âåá- è wap-èíòåðôåéñ. Òàêæå íà ïîðòàëå: àâòî, íîâîñòè, ñïîðò, ìóçûêà, ðàáîòà, çíàêîìñòâà, àíåêäîòû, îòêðûòêè, ïîãîäà"
name=DESCRIPTION>
<META
content="ïî÷òà, áåñïëàòíàÿ ýëåêòðîííàÿ ïî÷òà, àâòî, íîâîñòè, ñïîðò, ìóçûêà, ðàáîòà, çíàêîìñòâà, àíåêäîòû, îòêðûòêè, ïîãîäà"
name=Keywords>
<META http-equiv=content-type content="text/html; charset=windows-1251"><LINK
href="Mail.ru Agent.files/index.css" type=text/css rel=stylesheet><LINK
href="Mail.ru Agent.files/proto.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY bottomMargin=0 bgColor=white leftMargin=0 topMargin=0 rightMargin=0
marginwidth="0" marginheight="0">
<CENTER>
<TABLE class=top_menu cellSpacing=0 cellPadding=0 width="90%" border=0>
<TBODY>
<TR>
<TD class=bord_l><IMG height=1 src="Mail.ru Agent.files/0.gif"
width=11></TD>
<TD noWrap><A href="http://r.mail.ru/cln2759/go.mail.ru" target=_top><IMG
height=16 alt=Ïîèñê src="Mail.ru Agent.files/go-all.gif" width=16
align=absMiddle border=0></A> <A
href="http://r.mail.ru/cln2759/go.mail.ru/" target=_top>Ïîèñê</A></TD>
<TD width="5%"><IMG height=1 src="Mail.ru Agent.files/0.gif" width=7></TD>
<TD noWrap><A href="http://r.mail.ru/cln2760/love.mail.ru"
target=_top><IMG height=16 alt=Çíàêîìñòâà
src="Mail.ru Agent.files/love-all.gif" width=16 align=absMiddle
border=0></A> <A href="http://r.mail.ru/cln2760/love.mail.ru"
target=_top>Çíàêîìñòâà</A></TD>
<TD width="5%"><IMG height=1 src="Mail.ru Agent.files/0.gif" width=7></TD>
<TD noWrap><A href="http://r.mail.ru/cln2761/cards.mail.ru"
target=_top><IMG height=16 alt=Îòêðûòêè
src="Mail.ru Agent.files/cards-all.gif" width=16 align=absMiddle
border=0></A> <A href="http://r.mail.ru/cln2761/cards.mail.ru"
target=_top>Îòêðûòêè</A></TD>
<TD width="5%"><IMG height=1 src="Mail.ru Agent.files/0.gif" width=7></TD>
<TD noWrap><A href="http://r.mail.ru/cln2762/chat.mail.ru"
target=_top><IMG height=16 alt=×àòû src="Mail.ru Agent.files/chat-all.gif"
width=16 align=absMiddle border=0></A> <A
href="http://r.mail.ru/cln2762/chat.mail.ru" target=_top>×àòû</A></TD>
<TD width="5%"><IMG height=1 src="Mail.ru Agent.files/0.gif" width=7></TD>
<TD noWrap><A href="http://r.mail.ru/cln2763/content.mail.ru/"
target=_top><IMG height=16 alt=Ðàññûëêè
src="Mail.ru Agent.files/content-all.gif" width=16 align=absMiddle
border=0></A> <A href="http://r.mail.ru/cln2763/content.mail.ru/"
target=_top>Ðàññûëêè</A></TD>
<TD width="5%"><IMG height=1 src="Mail.ru Agent.files/0.gif" width=7></TD>
<TD noWrap><A href="http://r.mail.ru/cln2764/molotok.ru/" target=_top><IMG
height=16 alt=Ìîëîòîê src="Mail.ru Agent.files/molotok-all.gif" width=16
align=absMiddle border=0></A> <A
href="http://r.mail.ru/cln2764/molotok.ru/" target=_top>Ìîëîòîê</A></TD>
<TD width="5%"><IMG height=1 src="Mail.ru Agent.files/0.gif" width=7></TD>
<TD noWrap><A href="http://r.mail.ru/cln2765/tour.torg.ru/"
target=_top><IMG height=16 alt=Ïóòåøåñòâèÿ
src="Mail.ru Agent.files/tour-all.gif" width=16 align=absMiddle
border=0></A> <A href="http://r.mail.ru/cln2765/travel.mail.ru/"
target=_top>Ïóòåøåñòâèÿ</A></TD>
<TD width="5%"><IMG height=1 src="Mail.ru Agent.files/0.gif" width=7></TD>
<TD noWrap><A href="http://r.mail.ru/cln2766/auto.mail.ru/"
target=_top><IMG height=16 alt=Àâòî src="Mail.ru Agent.files/cars-all.gif"
width=16 align=absMiddle border=0></A> <A
href="http://r.mail.ru/cln2766/auto.mail.ru/" target=_top>Àâòî</A></TD>
<TD width="5%"><IMG height=1 src="Mail.ru Agent.files/0.gif" width=9></TD>
<TD noWrap><IMG height=16 src="Mail.ru Agent.files/0.gif" width=16
align=absMiddle border=0><A href="http://r.mail.ru/cln2767/mail.ru/all/"
target=_top><B>Âñå ïðîåêòû</B></A></TD>
<TD class=bord_r><IMG height=1 src="Mail.ru Agent.files/0.gif"
width=10></TD></TR>
<TR>
<TD class=bord_b noWrap width="100%" colSpan=19><IMG height=1
src="Mail.ru Agent.files/1.gif" width=1></TD></TR></TBODY></TABLE><!-- JS Banner blocked -->
<SCRIPT language=ShonenScript><!--
d=document;a='';a+=';r='+escape(d.referrer)
js=10
//--></SCRIPT>
<SCRIPT language=JavaScript1.1><!--
a+=';j='+navigator.javaEnabled()
js=11
//--></SCRIPT>
<SCRIPT language=JavaScript1.2><!--
s=screen;a+=';s='+s.width+'*'+s.height
a+=';d='+(s.colorDepth?s.colorDepth:s.pixelDepth)
js=12
//--></SCRIPT>
<SCRIPT language=JavaScript1.3><!--
js=13
//--></SCRIPT>
<SCRIPT language=JavaScript><!--
d.write('<img src="http://top.list.ru/counter'+
'?id=575536;js='+js+a+';rand='+Math.random()+
'" height=1 width=1><br>')
if(js>11)d.write('<'+'!-- ')
//--></SCRIPT>
<NOSCRIPT><IMG height=1 src="" width=1><BR></NOSCRIPT>
<SCRIPT language=JavaScript><!--
if(js>11)d.write('--'+'>')
//--></SCRIPT>
<!--/TopList COUNTER-->
<CENTER><A href="http://top100.rambler.ru/top100/" target=_top><FONT color=red
size=1>[Rambler's Top100]</FONT><BR></A></CENTER>
<TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
<TBODY>
<TR>
<TD class=header width="100%">
<DIV class=cor><IMG height=1 src="Mail.ru Agent.files/1.gif"
width=1></DIV>
<TABLE height=45 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=head height=44><A href="http://agent.mail.ru/"
target=_top><IMG height=20 alt=Àãåíò
src="Mail.ru Agent.files/agentlogo.gif" width=59 border=0></A><A
href="http://mail.ru/" target=_top><IMG height=20 alt=mail.ru
src="Mail.ru Agent.files/_mail.gif" width=104 border=0></A></TD>
<TD width=00%>
<P class=button2><A class=but title=çàãðóçèòü
href="http://agent.mail.ru/magent.exe"
target=_top>çàãðóçèòü</A></P></TD>
<TD>
<P class=sog><A href="http://www.mail.ru/pages/help/182.html"
target=_top>Ïîëüçîâàòåëüñêîå<BR>ñîãëàøåíèå</A></P></TD></TR></TBODY></TABLE><IMG
height=1 src="Mail.ru Agent.files/0.gif" width=760><BR>
<DIV class=cor><IMG height=1 src="Mail.ru Agent.files/1.gif"
width=1></DIV></TD></TR>
<TR>
<TD colSpan=3><IMG height=10 src="Mail.ru Agent.files/0.gif"
width=1></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="90%" border=0>
<TBODY>
<TR><!-- START: LeftCell -->
<TD vAlign=top width="23%">
<TABLE class=frame cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=cor align=right height=1><IMG height=1
src="Mail.ru Agent.files/1.gif" width=1></TD></TR>
<TR>
<TD class=cont>
<UL class=mmenu>
<LI><A href="http://agent.mail.ru/pusk.html">Çàãðóçêà è
óñòàíîâêà</A>
<LI><A href="http://agent.mail.ru/setting.html">Íàñòðîéêà êîíòàêò
ëèñòà</A>
<LI><SPAN class=speak>Îáùåíèå</SPAN>
<UL class=smenu type=disc>
<LI><A href="http://agent.mail.ru/mess.html">Ïåðåïèñêà</A>
<LI><A href="http://agent.mail.ru/chat.html">Îáùåíèå â ÷àòå</A>
<LI><A href="http://agent.mail.ru/voice.html">Ãîëîñîâîå
îáùåíèå</A>
<LI><A href="http://agent.mail.ru/avatar.html">Îáðàçû</A>
</LI></UL>
<LI><A href="http://agent.mail.ru/notifs.html">Îïîâåùåíèÿ</A>
<LI><A href="http://agent.mail.ru/games.html">Èãðû</A>
<LI><A href="http://agent.mail.ru/help.html">×àñòûå âîïðîñû</A>
<LI class=ai>Ðàçðàáîò÷èêàì </LI></UL></TD></TR>
<TR>
<TD class=cor align=right height=1><IMG height=1
src="Mail.ru Agent.files/1.gif" width=1></TD></TR></TBODY></TABLE><IMG
height=10 src="Mail.ru Agent.files/0.gif" width=195><BR></TD><!-- END: LeftCell -->
<TD width="2%"><IMG height=1 src="Mail.ru Agent.files/0.gif" width=10></TD><!-- START: MainCell -->
<TD class=text vAlign=top width="75%">
<H1>Îïèñàíèå ïðîòîêîëà</H1>
<P>MMP - ïðîòîêîë ñîåäèíåíèÿ Mail.Ru Àãåíòà ñ îáùåé ñåòüþ Mail.Ru.
Ðåêîìåíäîâàííûé äëÿ ñîåäèíåíèÿ ñåðâåð â ëþáîé ìîìåíò âðåìåíè ìîæíî
ïîëó÷èòü â òåêñòîâîì ôîðìàòå <I>ip:port</I> ïî àäðåñó <B
class=blue>mrim.mail.ru:443</B> è <B class=blue>mrim.mail.ru:2042</B>.
Âçàèìîäåéñòâèå ñ ñåðâåðîì ïðîèñõîäèò ïîâåðõ ïîñòîÿííî óñòàíîâëåííîãî
tcp-ñîåäèíåíèÿ ïîñðåäñòâîì àñèíõðîííîãî îáìåíà êîìàíäàìè. Èíèöèàòîðîì
óñòàíîâëåíèÿ ñîåäèíåíèÿ ìîæåò áûòü òîëüêî êëèåíò, êîìàíäû ìîãóò ïîñûëàòüñÿ
êàê êëèåíòîì, òàê è ñåðâåðîì.</P>
<P>MMP áèíàðíûé ïðîòîêîë. Âñå ÷èñëîâûå äàííûå ïåðåäàþòñÿ êàê
÷åòûðåõáàéòíûå öåëûå ÍÅ â ñåòåâîì ôîðìàòå, ò. å. ïåðâûì èäåò ñòàðøèé áàéò,
ïîñëåäíèì ìëàäøèé. ×åòûðåõáàéòîâûå áåççíàêîâûå öåëûå îáîçíà÷àþòñÿ
<B>UL</B>.</P>
<P>Òåêñòîâûå äàííûå ïåðåäàþòñÿ ñ ïðåôåêñèðîâàííîé äëèíîé, ò. å. ñíà÷àëà
<B>UL</B>, à ïîòîì ñòðîêà (â êîäèðîâêå windows-1251) äëèíû <B>UL</B> áåç
çàâåðøàþùåãî íóëÿ. Îáîçíà÷åíèå â äàëüíåéøåì - <B>LPS</B>.</P>
<P>Òèï äàííûõ <B>UIDL</B> èñïîëüçóåòñÿ òîëüêî ïðè ðàáîòå ñ îñòàâëåííûìè íà
ñåðâåðå ñîîáùåíèÿìè. <B>UIDL</B> - ïîñëåäîâàòåëüíîñòü èç 8 ñèìâîëîâ èç
ìíîæåñòâà <SPAN class=c>[a-z A-Z 0-9 _ - = +]</SPAN>.</P>
<P>Êàæäàÿ êîìàíäà èëè îòâåò íà íåå íà÷èíàþòñÿ ñ çàãîëîâêà. Ïîëÿ
óêàçûâàåìûå â çàãîëîâêå:
<UL>
<LI>âîëøåáíûé êëþ÷, óêàçûâàþùèé íà òî, ÷òî ýòî äåéñòâèòåëüíî ïàêåò MMP -
âåðñèÿ MMP, ïîääåðæèâàåìàÿ îòïðàâèòåëåì ïàêåòà (òåêóùàÿ âåðñèÿ - 1.7)
<LI>íîìåð îòïðàâëÿåìîé êîìàíäû â òåêóùåì ñîåäèíåíèè. Îòâåò íà êîìàíäó
äîëæåí èìåòü òîò æå íîìåð, ÷òî è ñàìà êîìàíäà.
<LI>òèï ïàêåòà, íîìåð êîìàíäû è/èëè îòâåòà
<LI>äëèííà äàííûõ ïàêåòà (áåç ó÷åòà çàãîëîâêà). Ïðè îáðàáîòêå ïîñûëàåìûõ
ñåðâåðîì äàííûõ äëèíà ïàêåòà äîëæíà èìåòü ïðèîðèòåò ïåðåä ñïèñêîì åãî
ïàðàìåòðîâ, ò. ê. â ñëåäóþùèõ âåðñèÿõ ïðîòîêîëà ìîãóò ïîÿâëÿòüñÿ íîâûå
ïàðàìåòðû è âñå îíè áóäóò äîïèñûâàòüñÿ â êîíåö ïàêåòà.
<LI>ïîðò è ip (â <I>inet_aton()</I> ôîðìàòå) ñ êîòîðûõ óñòàíîâëåíî
ñîåäèíåíèå </LI></UL>
<P></P><BR>
<P>Â ñèíòàêñèñå ÿçûêà Ñ: <PRE style="MARGIN-TOP: 8px">Çàãîëîâîê ïàêåòà
{
u_long magic;
u_long proto;
u_long seq;
u_long msg;
u_long dlen;
u_long from;
u_long fromport;
u_char reserved[16];
}
</PRE>
<P>Âàì ïîíàäîáèòñÿ çàãîëîâî÷íûé ôàéë íà ÿçûêå C. Âçÿòü åãî ìîæíî <A
href="http://agent.mail.ru/proto.h" target=_top>çäåñü</A>. </P>
<P> </P>
<H2>Ïîñëåäîâàòåëüíîñòü êîìàíä</H2>
<P>Ïîñëå óñòàíîâêè tcp-ñîåäèíåíèÿ êëèåíò îáÿçàí ñðàçó ïîñëàòü <SPAN
class=c>MRIM_CS_HELLO</SPAN>, äîæäàòüñÿ <SPAN
class=c>MRIM_CS_HELLO_ACK</SPAN>, ïîñëå ÷åãî îòïðàâèòü <SPAN
class=c>MRIM_CS_LOGIN2</SPAN> è íà÷àòü ïîñûëàòü <SPAN
class=c>MRIM_CS_PING</SPAN> ñ óñòàíîâëåííûì â <SPAN
class=c>MRIM_CS_HELLO_ACK</SPAN> èíòåðâàëîì.  ñëó÷àå óñïåøíîé àâòîðèçàöèè
äàëüíåéøèå ïàêåòû (êðîìå <SPAN class=c>MRIM_CS_PING</SPAN>) äîëæíû
îòïðàâëÿòüñÿ òîëüêî â ñëó÷àå ïîëüçîâàòåëüñêèõ äåéñòâèé (íàïèñàíèÿ íîâûõ
ñîîáùåíèé è ò. ï.) èëè îòâåòà íà ïàêåòû ïîëó÷àåìûå îò ñåðâåðà.</P>
<H2 class=pt10>Òèïû ïàêåòîâ</H2>
<P class=pack2><U>Òèï ïàêåòà:</U> cs - Client -> Server<BR><U>Òèï
ïàêåòà:</U> sc - Server -> Client</P>
<H2 class=pt10>Ïàêåòû</H2>
<UL class=pack>
<LI><U>Ïàêåò:</U> <B>Óñòàíîâêà ñîåäèíåíèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_HELLO</SPAN><BR><U>Îòâåò:</U> <SPAN
class=c>MRIM_CS_HELLO_ACK</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Îïèñàíèå:</U> Ïåðâûé ïàêåò, îòïðàâëÿåìûé íà ñåðâåð. </P>
<LI><U>Ïàêåò:</U> <B>Ïîäòâåðæäåíèå óñòàíîâêè ñîåäèíåíèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_HELLO_ACK</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## ping_period ## Îæèäàåìàÿ ÷àñòîòà ïîäòâåðæäåíèÿ
ñîåäèíåíèÿ (â ñåêóíäàõ)</P>
<P class=pack2><U>Îïèñàíèå:</U> Ïîäòâåðæäàåò âîçìîæíîñòü ñîåäèíåíèÿ è
ñîîáùàåò êëèåíòó èíòåðâàë, ñ êîòîðûì íàäî îòïðàâëÿòü ïàêåòû êîíòðîëÿ
ñîåäèíåíèÿ. </P>
<LI><U>Ïàêåò:</U> <B>Óñïåøíàÿ àâòîðèçàöèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_LOGIN_ACK</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Îïèñàíèå:</U> Ñîîáùàåò, ÷òî ïàðà ëîãèí-ïàðîëü áûëà âåðíà è
êëèåíò óñïåøíî àâòîðèçîâàëñÿ â ñåòè àãåíòà. </P>
<LI><U>Ïàêåò:</U> <B>Íåâåðíàÿ àâòîðèçàöèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_LOGIN_REJ</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>LPS ## reason ## ïðè÷èíà îòêàçà</P>
<P class=pack2><U>Îïèñàíèå:</U> Ñîîáùàåò, ÷òî ïàðà ëîãèí-ïàðîëü áûëà
íåâåðíà, è ñîåäèíåíèå áóäåò çàâåðøåíî. </P>
<LI><U>Ïàêåò:</U> <B>Êîíòðîëü ñîåäèíåíèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_PING</SPAN><BR><U>Òèï ïàêåòà:</U> cs<BR><U>Îïèñàíèå:</U>
Îòïðàâêà ýòîãî ïàêåòà ïîäòâåðæäàåò äëÿ ñåðâåðà, ÷òî êëèåíò àêòèâåí.
Ïàêåò äîëæåí îòïðàâëÿòüñÿ ñ èíòåðâàëîì, îïðåäåëåííûì â <SPAN
class=c>MRIM_CS_HELLO_ACK.</SPAN> </P>
<LI><U>Ïàêåò:</U> <B>Ñîîáùåíèå</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_MESSAGE</SPAN><BR><U>Òèï ïàêåòà:</U> cs<BR>ïîëå seq
äîëæíî ñîäåðæàòü íîìåð, êîòîðûé â ïîñëåäñòâèè áóäåò ñîäåðæàòüñÿ â
çàãîëîâêå ïàêåòà <SPAN class=c>MRIM_CS_MESSAGE_STATUS</SPAN>,
îïîâåùàþùåì êëèåíòà î ñòàòóñå äîñòàâêè äàííîãî
ñîîáùåíèÿ.<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## flags ## ôëàãè ##</P>
<P class=code style="MARGIN-LEFT: 20px">MESSAGE_FLAG_OFFLINE ##
Ñîîáùåíèå ïðèøëî, ïîêà êëèåíò áûë îòêëþ÷åí<BR>MESSAGE_FLAG_NORECV ##
Îòïðàâèòåëþ ñîîáùåíèÿ íå òðåáóåòñÿ ïîäòâåðæäåíèÿ
äîñòàâêè<BR>MESSAGE_FLAG_AUTHORIZE ## Ñîîáùåíèå ÿâëÿåòñÿ çàïðîñîì íà
àâòîðèçàöèþ<BR>MESSAGE_FLAG_SYSTEM ## Ñîîáùåíèå ÿâëÿåòñÿ ñèñòåìíûì
óâåäîìëåíèåì àäìèíèñòðàöèè<BR>MESSAGE_FLAG_RTF ## Â ñîîáùåíèè ñîäåðæèòñÿ
ôîðìàòèðîâàííàÿ ÷àñòü<BR>MESSAGE_FLAG_CONTACT ## Ñîîáùåíèå ïðåäñòàâëÿåò
èç ñåáÿ ïåðåñëàííûé ñïèñîê êîíòàêòîâ. Òåêñò ñîîáùåíèÿ â ýòîì ñëó÷àå
äîëæåí ïðåäñòàâëÿòü èç ñåáÿ ñïèñîê àäðåñîâ è íèêîâ ïåðåñûëàåìûõ
êîíòàêòîâ, ïåðå÷èñëåííûõ ÷åðåç òî÷êó ñ çàïÿòîé.
<àäðåñ1>;<íèê1>;<àäðåñ2>;<íèê2>;<àäðåñ3>;<íèê3>;...<BR>MESSAGE_FLAG_NOTIFY
## Ýòî ñîîáùåíèå-óâåäîìëåíèå "Âàì ïèøóò". Äîëæíî ïîñûëàòüñÿ êàæäûå 10
ñåêóíä, ïðè áîëåå äëèííîé ïàóçå êëèåíò-ïîëó÷àòåëü äîëæåí ñ÷èòàòü, ÷òî
îòïðàâèòåëü ïðåêðàòèë íàïèñàíèå. Òåêñò òàêîãî ñîîáùåíèÿ äîëæåí ñîñòîÿòü
èç îäíîãî ïðîáåëà.<BR>MESSAGE_FLAG_MULTICAST ## Ñîîáùåíèå íàïðàâëåíî
ñïèñêó ïîëó÷àòåëåé, à íå îäíîìó. Ïîëå to â òàêîì ñëó÷àå ñîñòîèò èç
ñïèñêà ïîëó÷àòåëåé, ïåðå÷èñëåííûõ ÷åðåç çàïÿòóþ. Ìàêñèìàëüíàÿ äëèíà
ñïèñêà - 50 àäðåñîâ.</P>
<P class=code>LPS ## to ## email ïîëó÷àòåëÿ<BR>LPS ## message ##
òåêñòîâàÿ âåðñèÿ îòïðàâëÿåìîãî ñîîáùåíèÿ<BR>LPS ## rtf-message ##
îòôîðìàòèðîâàííàÿ âåðñèÿ îòïðàâëÿåìîãî ñîîáùåíèÿ, â ñëó÷àå íàëè÷èÿ îáîèõ
âåðñèé ñîîáùåíèÿ ïðèîðèòåò èìååò rtf-âåðñèÿ. Îíà äîëæíà ñîäåðæàòü
rtf-òåêñò óïàêîâàííûé gzip â base64 ïðåäñòàâëåíèè. Òî åñòü: <PRE style="MARGIN: 0px 0px 0px 10px">BASE64(
GZIP(
UL êîëè÷åñòâî LPS (äîëæíî áûòü íå ìåíåå 2)
LPS rtf_text_with_all_rtf_headers_and_tags
LPS öâåò ôîíà â âèäå UL
)
)
</PRE>
<P></P>
<P class=pack2><U>Îïèñàíèå:</U> Îñíîâíîé ïàêåò âçàèìîäåéñòâèÿ ìåæäó
äâóìÿ êëèåíòàìè. Ìîæåò áûòü îòïðàâëåíî â ëþáîé ìîìåíò ïî èíèöèàòèâå
êëèåíòà. Íè òåêñòîâàÿ, íè rtf ÷àñòè ñîîáùåíèé íå ìîãóò áûòü ïóñòûìè, ïðè
íåîáõîäèìîñòè ñëåäóåò èñïîëüçîâàòü ñòðîêó èç îäíîãî ïðîáåëà.</P>
<LI><U>Ïàêåò:</U> <B>Äîñòàâêà ñîîáùåíèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_MESSAGE_ACK</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## msg_id ## Íîìåð ïàêåòà (Sequence) ýòîãî ñîîáùåíèÿ
äëÿ îòïðàâèòåëÿ<BR>UL ## flags ## Âîçìîæíûå çíà÷åíèÿ îïèñàíû â
MRIM_CS_MESSAGE<BR>LPS ## from ## Àäðåñ îòïðàâèòåëÿ<BR>LPS ## message ##
òåêñòîâàÿ âåðñèÿ ñîîáùåíèÿ<BR>LPS ## rtf-message ## ôîðìàòèðîâàííàÿ
âåðñèÿ ñîîáùåíèÿ</P>
<P class=pack2><U>Îïèñàíèå:</U> </P>
<LI><U>Ïàêåò:</U> <B>Ïîäòâåðæäåíèå ïîëó÷åíèÿ ñîîáùåíèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_MESSAGE_RECV</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>LPS ## from ##<BR>UL ## msg_id ##</P>
<P class=pack2><U>Îïèñàíèå:</U> Îòïðàâëÿåòñÿ ïîëó÷àòåëåì ñîîáùåíèÿ ñðàçó
ïîñëå ïðèõîäà <SPAN class=c>MRIM_CS_MESSAGE_ACK</SPAN>, åñëè ôëàãè <SPAN
class=c>MRIM_CS_MESSAGE_ACK</SPAN> íå ñîäåðæàëè <SPAN
class=c>MESSAGE_FLAG_NORECV</SPAN>. <SPAN class=c>from</SPAN> è <SPAN
class=c>msg_id</SPAN> äîëæíû áûòü ñêîïèðîâàíû èç <SPAN
class=c>MRIM_CS_MESSAGE_ACK</SPAN> è èìåþò òî æå çíà÷åíèå. </P>
<LI><U>Ïàêåò:</U> <B>Ïîäòâåðæäåíèå äîñòàâêè ñîîáùåíèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_MESSAGE_STATUS</SPAN><BR><U>Òèï ïàêåòà:</U> sc<BR>Ïîëå
seq ÷èñëåííî ðàâíî ïîëþ seq ïàêåòà <SPAN
class=c>MRIM_CS_MESSAGE</SPAN><BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## status ## ñòàòóñ äîñòàâêè ##</P>
<P class=code style="MARGIN-LEFT: 20px">MESSAGE_DELIVERED ## Ñîîáùåíèå
óñïåøíî äîñòàâëåíî<BR>MESSAGE_REJECTED_INTERR ## Ïðîèçîøëà âíóòðåííÿÿ
îøèáêà<BR>MESSAGE_REJECTED_NOUSER ## Íå ñóùåñòâóåò
ïîëüçîâàòåëÿ-ïîëó÷àòåëÿ ñîîáùåíèÿ<BR>MESSAGE_REJECTED_LIMIT_EXCEEDED ##
Ïîëüçîâàòåëü-ïîëó÷àòåëü â äàííûé ìîìåíò îòêëþ÷åí îò ñåòè, è ñîîáùåíèå íå
ïîìåùàåòñÿ â åãî ïî÷òîâûé ÿùèê<BR>MESSAGE_REJECTED_TOO_LARGE ## Ðàçìåð
ñîîáùåíèÿ ïðåâûøàåò ìàêñèìàëüíî
äîïóñòèìûé<BR>MESSAGE_REJECTED_DENY_OFFMSG ## Ïîëüçîâàòåëü-ïîëó÷àòåëü â
äàííûé ìîìåíò îòêëþ÷åí îò ñåòè, à íàñòðîéêè åãî ïî÷òîâîãî ÿùèêà íå
äîïóñêàþò íàëè÷èå îôôëàéíîâûõ ñîîáùåíèé àãåíòà</P>
<P class=pack2><U>Îïèñàíèå:</U> Îòïðàâëåííîå ñîîáùåíèå ñ÷èòàåòñÿ
äîñòàâëåííûì òîëüêî ïîñëå ïîëó÷åíèÿ ýòîãî îòâåòà ñåðâåðà. Ñåðâåð ÍÅ
ÃÀÐÀÍÒÈÐÓÅÒ äîñòàâêó ñîîáùåíèÿ.  ñëó÷àå îòñòóòñòâèÿ <SPAN
class=c>MRIM_CS_MESSAGE_STATUS</SPAN> áîëåå èíòåðâàëà ïîäòâåðæäåíèÿ
ñîåäèíåíèÿ, ïðîãðàììà êëèåíò äîëæíà ïîñëàòü ñîîáùåíèå ïîâòîðíî èëè
ïðîèíôîðìèðîâàòü ïîëüçîâàòåëÿ î íåâîçìîæíîñòè äîñòàâêè èç-çà ïðîáëåì
ñâÿçè ïîëó÷àòåëÿ. </P>
<LI><U>Ïàêåò:</U> <B>Ñìåíà ñòàòóñà äðóãîãî ïîëüçîâàòåëÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_USER_STATUS</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## status ## íîâûé ñòàòóñ ïîëüçîâàòåëÿ ##</P>
<P class=code style="MARGIN-LEFT: 20px">STATUS_OFFLINE ## Ïîëüçîâàòåëü
îòêëþ÷åí îò ñåòè Àãåíòà<BR>STATUS_ONLINE ## Ïîëüçîâàòåëü íàõîäèòñÿ â
ñåòè<BR>STATUS_AWAY ## Ïîëüçîâàòåëü â ñåòè, íî îòîøåë îò
êîìïüþòåðà<BR>STATUS_UNDETERMINATED ## Íàñòðîéêè ïîëüçîâàòåëÿ çàïðåùàþò
ïîêàçûâàòü åãî ñòàòóñ<BR>STATUS_FLAG_INVISIBLE ## Ïîëüçîâàòåëü íàõîäèòñÿ
â ñåòè, íî íåâèäèì äëÿ âñåõ, êðîìå ïðèâèëåãèðîâàííûõ ïîëüçîâàòåëåé èç
åãî ñïèñêà âèäèìîñòè.</P>LPS ## user ## email ñìåíèâøåãî ñâîé ñòàòóñ
ïîëüçîâàòåëÿ
<P></P>
<P class=pack2><U>Îïèñàíèå:</U> Ýòî ñîîáùåíèå îòïðàâëÿåòñÿ ñåðâåðîì ïðè
ñìåíå ñòàòóñà ïîëüçîâàòåëÿì âñåì òåì, ó êîãî îí íàõîäèòñÿ â
êîíòàêò-ëèñòå (çà èñêëþ÷åíèåì ãðóïïû "Æäó Àâòîðèçàöèè" è òåõ, êîãî îí
âêëþ÷èë â ñïèñîê èãíîðèðóåìûõ èëè íåâèäÿùèõ). Äàííîå ñîîáùåíèå ìîæåò
áûòü äîñòàâëåíî êëèåíòó ÄÎ ïîëó÷åíèÿ èì êîíòàêò-ëèñòà.  òàêîé ñèòóàöèè
îíî äîëæíî èãíîðèðîâàòüñÿ. </P>
<LI><U>Ïàêåò:</U> <B>Çàêðûòèå ñîåäèíåíèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_LOGOUT</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## reason ## ïðè÷èíà îòêëþ÷åíèÿ ##</P>
<P class=code style="MARGIN-LEFT: 20px">LOGOUT_NO_RELOGIN_FLAG ##
Ïîëüçîâàòåëü îòêëþ÷åí èç-çà ïàðàëëåëüíîãî âõîäà ñ åãî ëîãèíîì. Êëèåíò íå
äîëæåí îñóùåñòâëÿòü àâòîìàòè÷åñêèé ïåðåçàõîä â ýòîì ñëó÷àå.</P>
<LI><U>Ïàêåò:</U> <B>Èçìåíåíèå ïàðàìåòðîâ ñîåäèíåíèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_CONNECTION_PARAM</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## ping_period ## íîâàÿ îæèäàåìàÿ ÷àñòîòà ïîäòâåðæäåíèÿ
ñîåäèíåíèÿ</P>
<P class=pack2><U>Îïèñàíèå:</U> Áëèæàéøèé <SPAN
class=c>MRIM_CS_PING</SPAN> ñëåäóåò îòïðàâëÿòü óæå èñõîäÿ èç íîâîé
÷àñòîòû. </P>
<LI><U>Ïàêåò:</U> <B>Äîáàâëåíèå íîâîãî êîíòàêòà</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_ADD_CONTACT</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## flags ## ôëàãè ##</P>
<P class=code style="MARGIN-LEFT: 20px">CONTACT_FLAG_GROUP ##
Äîáàâëÿåòñÿ íîâàÿ ãðóïïà, à íå êîíòàêò (íåñîâìåñòèì ñ îñòàëüíûìè).
Âåðõíèé áàéò ñîäåðæèò êîëè÷åñòâî óæå èìåþùèõñÿ ãðóïï â
êîíòàêò-ëèñòå<BR>CONTACT_FLAG_INVISIBLE ## Êîíòàêò äîëæåí ïîïàñòü â
ñïèñîê "ß âñåãäà íåâèäèì äëÿ"<BR>CONTACT_FLAG_VISIBLE ## Êîíòàêò äîëæåí
ïîïàñòü â ñïèñîê "ß âñåãäà âèäèì äëÿ"<BR>CONTACT_FLAG_IGNORE ## Êîíòàêò
äîëæåí ïîïàñòü â ñïèñîê èãíîðèðóåìûõ<BR>CONTACT_FLAG_SHADOW ## Êîíòàêò
íå äîëæåí ïîïàñòü â îñíîâíîé êîíòàêò-ëèñò (ïðèìåíÿåòñÿ â ïàðå ñ îäíèì èç
òðåõ ïðåäûäóùèõ)<BR>CONTACT_FLAG_REMOVED ## Êîíòàêò óäàëåí</P>
<P class=code>UL ## group_id ## ãðóïïà, â êîòîðóþ äîëæåí áûòü äîáàâëåí
êîíòàêò (äëÿ CONTACT_FLAG_GROUP ðàâíî 0)<BR>LPS ## email ## äîáàâëÿåìûé
àäðåñ (èìÿ ãðóïïû äëÿ CONTACT_FLAG_GROUP)<BR>LPS ## name ## íèê
äîáàâëÿåìîãî ïîëüçîâàòåëÿ (äëÿ îòîáðàæåíèÿ â êîíòàêò-ëèñòå, íå
ïîñûëàåòñÿ äëÿ CONTACT_FLAG_GROUP) LPS ## unused ## íåèñïîëüçóåìûé
ïàðàìåòð </P>
<LI><U>Ïàêåò:</U> <B>Ïîäòâåðæäåíèå äîáàâëåíèÿ êîíòàêòà</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_ADD_CONTACT_ACK</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## status ## ðåçóëüòàò îïåðàöèè ##</P>
<P class=code style="MARGIN-LEFT: 20px">CONTACT_OPER_SUCCESS ##
äîáàâëåíèå ïðîèçâåäåíî óñïåøíî<BR>CONTACT_OPER_ERROR ## ïåðåäàííûå
äàííûå áûëè íåêîððåêòíû<BR>CONTACT_OPER_INTERR ## ïðè îáðàáîòêå çàïðîñà
ïðîèçîøëà âíóòðåííÿÿ îøèáêà<BR>CONTACT_OPER_NO_SUCH_USER ## äîáàâëÿåìîãî
ïîëüçîâàòåëÿ íå ñóùåñòâóåò â ñèñòåìå<BR>CONTACT_OPER_INVALID_INFO ##
íåêîððåêòíîå èìÿ ïîëüçîâàòåëÿ<BR>CONTACT_OPER_USER_EXISTS ##
ïîëüçîâàòåëü óæå åñòü â êîíòàêò-ëèñòå<BR>CONTACT_OPER_GROUP_LIMIT ##
ïðåâûøåíî ìàêñèìàëüíî äîïóñòèìîå êîëè÷åñòâî ãðóïï (20)</P>
<P class=code>## UL ## contact_id ## ïðèñâîåííûé íîâîìó êîíòàêòó
íîìåð</P>
<P class=pack2><U>Îïèñàíèå:</U> Ïðèõîäèò â îòâåò íà <SPAN
class=c>MRIM_CS_ADD_CONTACT</SPAN>. -1 åñëè <SPAN class=c>status</SPAN>
íå ðàâåí <SPAN class=c>CONTACT_OPER_SUCCESS</SPAN>. </P>
<LI><U>Ïàêåò:</U> <B>Èçìåíåíèå êîíòàêòà</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_MODIFY_CONTACT</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## id ## íîìåð ìîäèôèöèðóåìîãî êîíòàêòà<BR>UL ## flags
##<BR>UL ## group_id ## Ðàâíî 0 äëÿ ãðóïïû<BR>LPS ## contact ## Åñëè
ãðóïïà, òî èìÿ ãðóïïû<BR>LPS ## name ## Åñëè ãðóïïà, òî èìÿ ãðóïïû</P>
<P class=pack2><U>Îïèñàíèå:</U> Ïàðàìåòðû òå æå, ÷òî è ó <SPAN
class=c>MRIM_CS_ADD_CONTACT</SPAN>. <SPAN class=c>contact</SPAN> äî è
ïîñëå èçìåíåíèÿ îáÿçàíû ñîâïàäàòü. </P>
<LI><U>Ïàêåò:</U> <B>Ïîäòâåðæäåíèå èçìåíåíèÿ êîíòàêòà</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_MODIFY_CONTACT_ACK</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## status ## Ðåçóëüòàò îïåðàöèè. Çíà÷åíèÿ èìåþò òîò æå
ñìûñë, ÷òî è â MRIM_CS_ADD_CONTACT_ACK</P>
<LI><U>Ïàêåò:</U> <B>Ñîîáùåíèå äîñòàâëåííîå, ïîêà ïîëüçîâàòåëü íå áûë
ïîäêëþ÷åí ê ñåòè</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_OFFLINE_MESSAGE_ACK</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UIDL ## uidl ## id ñîîáùåíèÿ<BR>LPS ## message ##
ñîîáùåíèå. Ñîîáùåíèå ïðèõîäèò â ôîðìàòå RFC/822 ïèñüìà. Îòïðàâèòåëü
ñîîáùåíèÿ õðàíèòñÿ â çàãîëîâêå From, äàòà â çàãîëîâêå Date, ôëàãè
ñîîáùåíèÿ â X-MRIM-FLAGS, òåêñòîâàÿ è ôîðìàòèðîâàííàÿ âåðñèè ñîîáùåíèÿ
ñîñòàâëÿþò òåêñò ïèñüìà è ðàçäåëÿþòñÿ ìåæäó ñîáîé ðàçäåëèòåëåì èç
çàãîëîâêà Boundary.</P>
<P class=pack2><U>Îïèñàíèå:</U> Êàæäîå ïîëó÷åííîå çà âðåìÿ îòñóòñòâèÿ
ñîîáùåíèå ïðèõîäèò îòäåëüíûì ïàêåòîì â òîì ïîðÿäêå, â êàêîì îíè
ïîñòóïàëè íà ñåðâåð. </P>
<LI><U>Ïàêåò:</U> <B>Óäàëåíèå ñîõðàíåííîãî ñîîáùåíèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_OFFLINE_MESSAGE_DEL</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UIDL ## uidl</P>
<P class=pack2><U>Îïèñàíèå:</U> Íà êàæäûé ïîëó÷åííûé <SPAN
class=c>MRIM_CS_OFFLINE_MESSAGE_ACK</SPAN> êëèåíò îáÿçàí îòïðàâèòü <SPAN
class=c>MRIM_CS_OFFLINE_MESSAGE_DEL</SPAN> ñ òåì æå <SPAN
class=c>uidl</SPAN>, ïîäòâåðæäàþùèé ïîëó÷åíèå äàííîãî ñîîáùåíèÿ.
Ñîîáùåíèå ñòèðàåòñÿ íà ñåðâåðå òîëüêî ïðè ïîëó÷åíèè ýòîé êîìàíäû.</P>
<LI><U>Ïàêåò:</U> <B>Àâòîðèçàöèÿ ïîëüçîâàòåëÿ íà äîáàâëåíèå â
êîíòàêò-ëèñò</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_AUTHORIZE</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>LPS ## user ## email ïîëüçîâàòåëÿ</P>
<P class=pack2><U>Îïèñàíèå:</U> Îòïðàâëÿåòñÿ, ÷òîáû ðàçðåøèòü <SPAN
class=c>user</SPAN> äîáàâëåíèå ïîëüçîâàòåëÿ â êîíòàêò-ëèñò è íàáëþäåíèå
çà åãî ñòàòóñîì. </P>
<LI><U>Ïàêåò:</U> <B>Èíôîðìàöèÿ îá àâòîðèçàöèè</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_AUTHORIZE_ACK</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>LPS ## user ## email àâòîðèçîâàâøåãî ïîëüçîâàòåëÿ</P>
<P class=pack2><U>Îïèñàíèå:</U> Îòñûëàåòñÿ ñåðâåðîì ïîñëå ïîëó÷åíèåì èì
<SPAN class=c>MRIM_CS_AUTHORIZE</SPAN> îò <SPAN class=c>user</SPAN>
òîìó, êîãî <SPAN class=c>user</SPAN> àâòîðèçîâàë. </P>
<LI><U>Ïàêåò:</U> <B>Èçìåíåíèå ñòàòóñà</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_CHANGE_STATUS</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## status ## âîçìîæíûå çíà÷åíèÿ ñîâïàäàþò ñ
MRIM_CS_USER_STATUS, íî íå ìîãóò ïîñûëàòüñÿ ñòàòóñû
STATUS_UNDETERMINATED è STATUS_OFFLINE</P>
<LI><U>Ïàêåò:</U> <B>Òðåáîâàíèå êëþ÷à äëÿ web-àâòîðèçàöèè</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_GET_MPOP_SESSION</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Îïèñàíèå:</U> Ïîëüçîâàòåëü àãåíòà ìîæåò çàõîäèòü â ïî÷òîâûé
ÿùèê Mail.Ru áåç äîïîëíèòåëüíîé àâòîðèçàöèè è íå ïåðåäàâàÿ ñâîé ïàðîëü â
GET-çàïðîñå, äëÿ ýòîãî èñïîëüçóåòñÿ ìåõàíèçì êëþ÷åé. </P>
<LI><U>Ïàêåò:</U> <B>Êëþ÷ äëÿ web-àâòîðèçàöèè</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_GET_MPOP_SESSION_ACK</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## status ## óñïåøíîñòü îïåðàöèè (1 - êëþ÷ ïîëó÷åí, 0 -
ïðîèçîøëà îøèáêà)<BR>LPS ## session ## ñàì êëþ÷</P>
<P class=pack2><U>Îïèñàíèå:</U> Äëÿ âõîäà â ÿùèê ìîæíî èñïîëüçîâàòü URL
win.mail.ru/cgi-bin/auth?Login=email&agent=êëþ÷. </P>
<LI><U>Ïàêåò:</U> <B>Ïîèñê êîíòàêòà</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_WP_REQUEST</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## field ## ïàðàìåòð ïîèñêà ##</P>
<P class=code style="MARGIN-LEFT: 20px">MRIM_CS_WP_REQUEST_PARAM_USER ##
ëîãèí (áåç äîìåíà), îáÿçàí êîìáèíèðîâàòüñÿ ñ
äîìåíîì<BR>MRIM_CS_WP_REQUEST_PARAM_DOMAIN ## ïî÷òîâûé
äîìåí<BR>MRIM_CS_WP_REQUEST_PARAM_NICKNAME ##
íèê<BR>MRIM_CS_WP_REQUEST_PARAM_FIRSTNAME ## èìÿ
<BR>MRIM_CS_WP_REQUEST_PARAM_LASTNAME ## ôàìèëèÿ, * â êîíöå
íèêà/èìåíè/ôàìèëèè óêàçûâàåò íà âîçìîæíîñòü ëþáîãî ïðîäîëæåíèÿ
èìåíè<BR>MRIM_CS_WP_REQUEST_PARAM_SEX ## ïîë. 1 - ìóæñêîé, 2 -
æåíñêèé<BR>MRIM_CS_WP_REQUEST_PARAM_DATE1 ## ìèíèìàëüíûé âîçðàñò (â
ãîäàõ)<BR>MRIM_CS_WP_REQUEST_PARAM_DATE2 ## ìàêñèìàëüíûé âîçðàñò (â
ãîäàõ)<BR>MRIM_CS_WP_REQUEST_PARAM_CITY_ID ## ID ðåãèîíà ïðîæèâàíèÿ
<BR>MRIM_CS_WP_REQUEST_PARAM_ZODIAC ## Çíàê çîäèàêà (Îâåí - 1, ..., Ðûáû
- 12)<BR>MRIM_CS_WP_REQUEST_PARAM_BIRTHDAY_MONTH ## Ìåñÿö ðîæäåíèÿ
(ßíâàðü - 1, ..., Äåêàáðü - 12)<BR>MRIM_CS_WP_REQUEST_PARAM_BIRTHDAY_DAY
## Äåíü ðîæäåíèÿ (îáÿçàí êîìáèíèðîâàòüñÿ ñ ìåñÿöåì
ðîæäåíèÿ)<BR>MRIM_CS_WP_REQUEST_PARAM_COUNTRY_ID ## ID ñòðàíû
ïðîæèâàíèÿ<BR>MRIM_CS_WP_REQUEST_PARAM_ONLINE ## èùåì ëè ìû òîëüêî
ïîäêëþ÷åííûõ â äàííûé ìîìåíò ïîëüçîâàòåëåé (1)</P>
<P class=code>LPS ## value âñå ïàðàìåòðû â ñòðîêîâîì ôîðìàòå, âêëþ÷àÿ
÷èñëà</P>
<P class=pack2><U>Îïèñàíèå:</U> Ïîèñê êîíòàêòîâ â áàçå àãåíòà. Ïàðàìåòðû
ïîèñêà ïåðåäàþòñÿ ïàðàìè ïàðàìåòð-çíà÷åíèå. Ïåðåäà÷à íåñêîëüêèõ
ïàðàìåòðîâ èìååò ñåìàíòèêó "è", ò. å. âñå íàéäåííûå ðåçóëüòàòû äîëæíû
ñîîòâåòñòâîâàòü âñåì ïåðåäàííûì ïàðàìåòðàì. Êîìáèíèðîâàòüñÿ ìîãóò âñå
ïàðàìåòðû çà èñêëþ÷åíèåì ëîãèíà è äîìåíà (îíè îáÿçàíû èäòè ïàðîé è íå
ìîãóò êîìáèíèðîâàòüñÿ ñ äðóãèìè ïàðàìåòðàìè) â ïîðÿäêå ñîîòâåòñòâóþùåì
ïîðÿäêó îïèñàíèÿ (çà èñêëþ÷åíèåì òðåáîâàíèÿ äëÿ <SPAN
class=c>MRIM_CS_WP_REQUEST_PARAM_ONLINE</SPAN> áûòü ïîñëåäíèì â ñïèñêå).
</P>
<LI><U>Ïàêåò:</U> <B>Íàéäåííûå ïîëüçîâàòåëè</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_ANKETA_INFO</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## status ## óñïåøíîñòü çàïðîñà ##</P>
<P class=code style="MARGIN-LEFT: 20px">MRIM_ANKETA_INFO_STATUS_OK ##
ïîèñê óñïåøíî çàâåðøåí<BR>MRIM_ANKETA_INFO_STATUS_NOUSER ## íå íàéäåíî
íè îäíîé ïîäõîäÿùåé çàïèñè<BR>MRIM_ANKETA_INFO_STATUS_RATELIMERR ##
ñëèøêîì ìíîãî çàïðîñîâ, ïîèñê âðåìåííî çàïðåùåí</P>
<P class=code>UL ## fields_num ## êîëè÷åñòâî ïîëåé â àíêåòå êàæäîãî
ïîëüçîâàòåëÿ<BR>UL ## max_rows ## òåêóùåå îãðàíè÷åíèå íà êîëè÷åñòâî
ðåçóëüòàòîâ ïîèñêà (ìîæåò áûòü áîëüøå, ÷åì êîëè÷åñòâî ñòðîê â äàííîì
îòâåòå)<BR>UL ## server_time ## òåêóùåå âðåìÿ íà ñåðâåðå (äîëæíî
èñïîëüçîâàòüñÿ äëÿ âû÷èñëåíèÿ âîçðàñòà). Ôîðìàò âðåìåíè: Êîëè÷åñòâî
ñåêóíä ñ 00:00:00 1 ÿíâàðÿ 1970 ãîäà.<BR>LPS, LPS, ... ## fields ##
íàçâàíèÿ ïîëåé òåêóùåé àíêåòû (âñåãî fields_num øòóê)<BR>LPS, LPS, ...
## values ## çíà÷åíèÿ ïîëåé àíêåòû äëÿ êàæäîãî íàéäåííîãî ïî çàïðîñó
ïîëüçîâàòåëÿ â òîì æå ïîðÿäêå, ÷òî â ñïèñêå ïîëåé, ïî fields_num øòóê íà
êàæäîãî</P>
<P class=pack2><U>Îïèñàíèå:</U> Ðåçóëüòàò ïîèñêà êîíòàêòîâ. Âîçâðàùàåò
àíêåòû íàéäåííûõ ïîëüçîâàòåëåé (èõ àäðåñà ÿâëÿþòñÿ ïîëÿìè àíêåòû). </P>
<LI><U>Ïàêåò:</U> <B>Êîëè÷åñòâî ïèñåì â ïî÷òîâîì ÿùèêå</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_MAILBOX_STATUS</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## status ## êîëè÷åñòâî íåïðî÷èòàííûõ ïèñåì</P>
<P class=pack2><U>Îïèñàíèå:</U> Ïðèõîäèò ïðè ïîëó÷åíèè íîâîé ïî÷òû èëè
ëþáîì äðóãîì èçìåíåíèè ÷èñëà íåïðî÷èòàííûõ ïèñåì â ÿùèêå. </P>
<LI><U>Ïàêåò:</U> <B>Êîíòàêò-ëèñò</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_CONTACT_LIST2</SPAN><BR><U>Òèï ïàêåòà:</U>
sc<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>UL ## status ## ðåçóëüòàò çàïðîñà êîíòàêò-ëèñòà</P>
<P class=code style="MARGIN-LEFT: 20px">GET_CONTACTS_OK ## ïîèñê
âûïîëíåí óñïåøíî<BR>GET_CONTACTS_ERROR ## íàéäåííûé êîíòàêò-ëèñò
íåêîððåêòåí<BR>GET_CONTACTS_INTERR ## ïðîèçîøëà âíóòðåííÿÿ îøèáêà</P>
<P class=code>UL ## groups_number ## êîëè÷åñòâî ãðóïï â
êîíòàêò-ëèñòå<BR>LPS ## group_mask ## ìàñêà-îïèñàíèå ãðóïïû, ñîñòîèò èç
ñèìâîëîâ 's' (LPS),'u' (UL),'z' (ñòðîêà îêàí÷èâàþùàÿñÿ áèíàðíûì íóëåì, â
äàííûé ìîìåíò íå èñïîëüçóåòñÿ), ñåé÷àñ "us" - ôëàãè è íàçâàíèå, ïðè
ðàñøèðåíèè îïèñàíèÿ ñòàðûå ïîëÿ ñîõðàíÿò ñâîå ðàñïîëîæåíèå<BR>LPS ##
contacts_mask ## ìàñêà-îïèñàíèå ïîëüçîâàòåëÿ (ñèíòàêñèñ òàêîé æå êàê è ó
group_mask), ñåé÷àñ uussuu (ôëàãè, ãðóïïà, àäðåñ, íèê, ñåðâåðíûå ôëàãè,
òåêóùèé ñòàòóñ â ñåòè)<BR>## groups ## ãðóïïû (âñåãî groups_number
øòóê)<BR>## contacts ## êîíòàêòû</P>
<P class=pack2><U>Îïèñàíèå:</U> Êîíòàêò-ëèñò ïîëüçîâàòåëÿ õðàíèòñÿ íà
ñåðâåðå. Êëèåíò ìîæåò õðàíèòü ëîêàëüíóþ êîïèþ êîíòàêò-ëèñòà, íî
ñåðâåðíàÿ äîëæíà èìåòü ïðèîðèòåò. Ôëàãè êîíòàêòà èìåþò òîò æå ñìûñë, ÷òî
â <SPAN class=c>MRIM_CS_ADD_CONTACT</SPAN>, ñòàòóñ - òîò æå ñìûñë, ÷òî â
<SPAN class=c>MRIM_CS_USER_STATUS</SPAN>. Ñåðâåðíûé ôëàã â äàííûé ìîìåíò
îïðåäåë¸í îäèí - <SPAN class=c>CONTACT_INTFLAG_NOT_AUTHORIZED</SPAN>
îçíà÷àåò, ÷òî êîíòàêò åùå íå àâòîðèçîâàë ïîëüçîâàòåëÿ è íàõîäèòñÿ â
ãðóïïå "Æäó àâòîðèçàöèè". Åñëè ìàñêà êîíòàêòà èëè ãðóïïû ñîäåðæèò áîëüøå
ñèìâîëîâ, ÷åì íåîáõîäèìî, êëèåíò äîëæåí ïðî÷èòàòü çíà÷åíèÿ ýòèõ ïîëåé è
ïðîèãíîðèðîâàòü èõ. </P>
<LI><U>Ïàêåò:</U> <B>Àâòîðèçàöèÿ</B>
<P class=pack2><U>Èìÿ ïàêåòà:</U> <SPAN
class=c>MRIM_CS_LOGIN2</SPAN><BR><U>Òèï ïàêåòà:</U>
cs<BR><U>Ïàðàìåòðû:</U></P>
<P class=code>LPS ## login ## email àâòîðèçóþùåãîñÿ ïîëüçîâàòåëÿ<BR>LPS
## password ## ïàðîëü<BR>UL ## status ## ñòàòóñ (ñì.
MRIM_CS_CHANGE_STATUS)<BR>LPS ## user_agent ## òåêñòîâîå îïèñàíèå
êëèåíòà ïîëüçîâàòåëÿ, íàïðèìåð "Mail.Ru Miranda Plugin v
1.0"</P></LI></UL><IMG height=10 src="Mail.ru Agent.files/0.gif"
width=555><BR></TD><!-- END: MainCell --></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
<TBODY>
<TR>
<TD align=middle width="100%">
<DIV class=plash>
<DIV class=cor><IMG height=1 src="Mail.ru Agent.files/1.gif"
width=1></DIV>
<TABLE class=footer cellSpacing=0 cellPadding=0 width="96%" border=0>
<TBODY>
<TR>
<TD width="27%" height=20>© 1999-2004, <A href="http://www.mail.ru/"
target=_blank>Mail.Ru</A></TD>
<TD align=middle width="37%"><A
href="http://win.mail.ru/cgi-bin/support_mra?version=www"
target=_blank>Ñëóæáà ïîääåðæêè</A></TD>
<TD align=right width="30%" height=20><A
href="http://sales.mail.ru/" target=_top>Ðåêëàìà íà Mail.ru</A>
<B>·</B> <A href="http://corp.mail.ru/" target=_top>Î
êîìïàíèè</A></TD></TR></TBODY></TABLE><IMG height=1
src="Mail.ru Agent.files/0.gif" width=760><BR>
<DIV class=cor><IMG height=1 src="Mail.ru Agent.files/1.gif"
width=1></DIV></DIV></TD></TR></TBODY></TABLE><BR
style="LINE-HEIGHT: 30px"></CENTER><!--//-->
<SCRIPT>PrxRST();</SCRIPT>
</BODY></HTML>
|