File: TelEngine__JGSession.html

package info (click to toggle)
yate 2.2.0-1~dfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 17,496 kB
  • ctags: 21,687
  • sloc: cpp: 126,248; ansic: 11,462; sh: 3,573; php: 3,229; python: 2,014; makefile: 1,504; perl: 465; awk: 8
file content (851 lines) | stat: -rw-r--r-- 50,565 bytes parent folder | download
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
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
<HTML>
<HEAD>
<TITLE>class JGSession</TITLE>

<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
	<TABLE BORDER="0">
		<TR><TD valign="top" align="left" cellspacing="10">
		<h1>class JGSession</h1>
		</TD>
		<TD valign="top" align="right" colspan="1">A basic Jingle session. <small><A HREF="#longdesc">More...</A></small></TD></TR>
	</TABLE>
	<HR>
	<TABLE BORDER="0">
		<TR><TH colspan="2">Contains pure virtuals</TH></TR><TR><TH>Full name</TH><TD><code><A HREF="TelEngine.html">TelEngine</A>::JGSession</code></TD></TR>
<TR><TH>Definition</TH><TD><code>#include &lt;<A HREF="libs___yjingle___yatejingle_h.html">libs/yjingle/yatejingle.h</A>&gt;</code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="TelEngine__Mutex.html">TelEngine::Mutex</A> <small>[public ]</small>, <A HREF="TelEngine__RefObject.html">TelEngine::RefObject</A> <small>[public ]</small></TD></TR>
<TR><TH>Inherited by</TH><TD><A HREF="TelEngine__JGSession0.html">JGSession0</A>, <A HREF="TelEngine__JGSession1.html">JGSession1</A></TD></TR>
<TR><TH><A HREF="full-list-TelEngine__JGSession.html">List of all Methods</A></TH></TR>
	</TABLE>
	</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Types</h4><ul><LI>enum <A HREF="#ref3">Version</A> {	Version0 = 0,
	Version1 = 1,
	VersionUnknown
    }
</LI>
<LI>enum <A HREF="#ref4">Reason</A> {	ReasonBusy,                      
	ReasonDecline,                   
	ReasonConn,                      
	ReasonMedia,                     
	ReasonTransport,                 
	ReasonNoError,                   
	ReasonOk,                        
	ReasonNoApp,                     
	ReasonAltSess,                   
	ReasonUnknown,                   
	ReasonTransfer,                  
	ReasonNone                       
    }
</LI>
<LI>enum <A HREF="#ref5">State</A> {	Idle    = 0,                     
	Pending = 1,                     
	Active  = 2,                     
	Ending  = 3,                     
	Destroy = 4,                     
    }
</LI>
<LI>enum <A HREF="#ref6">Action</A> {	ActAccept,                       
	ActInitiate,                     
	ActTerminate,                    
	ActInfo,                         
	ActTransportInfo,                
	ActTransportAccept,              
	ActTransportReject,              
	ActTransportReplace,             
	ActContentAccept,                
	ActContentAdd,                   
	ActContentModify,                
	ActContentReject,                
	ActContentRemove,                
	ActContentInfo,                  
	ActTransfer,                     
	ActRinging,                      
	ActTrying,                       
	ActReceived,                     
	ActHold,                         
	ActActive,                       
	ActMute,                         
	ActDtmf,                         
	ActStreamHost,
	ActCount,
    }
</LI>
</ul><h4>Public Methods</h4><ul><LI>virtual  &nbsp;<b><A HREF="#ref7">~JGSession</A></b> () 
</LI>
<LI>inline Version &nbsp;<b><A HREF="#ref8">version</A></b> ()  const
</LI>
<LI>inline bool &nbsp;<b><A HREF="#ref9">outgoing</A></b> ()  const
</LI>
<LI>inline const String& &nbsp;<b><A HREF="#ref10">sid</A></b> ()  const
</LI>
<LI>inline const JabberID& &nbsp;<b><A HREF="#ref11">local</A></b> ()  const
</LI>
<LI>inline const JabberID& &nbsp;<b><A HREF="#ref12">remote</A></b> ()  const
</LI>
<LI>inline State &nbsp;<b><A HREF="#ref13">state</A></b> ()  const
</LI>
<LI>inline const JBStream* &nbsp;<b><A HREF="#ref14">stream</A></b> ()  const
</LI>
<LI>inline void* &nbsp;<b><A HREF="#ref15">userData</A></b> () 
</LI>
<LI>inline void &nbsp;<b><A HREF="#ref16">userData</A></b> (void* userdata) 
</LI>
<LI>virtual  XMLElement* &nbsp;<b><A HREF="#ref17">checkJingle</A></b> (XMLElement* xml) 
</LI>
<LI>inline Action &nbsp;<b><A HREF="#ref18">getAction</A></b> (XMLElement* xml) 
</LI>
<LI>bool &nbsp;<b><A HREF="#ref19">acceptEvent</A></b> (JBEvent* event, const String& sid = String::empty()) 
</LI>
<LI>bool &nbsp;<b><A HREF="#ref20">confirm</A></b> (XMLElement* xml, XMPPError::Type error = XMPPError::NoError,
	const char* text = 0, XMPPError::ErrorType type = XMPPError::TypeModify) 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref21">accept</A></b> (const ObjList& contents, String* stanzaId = 0) 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref22">hangup</A></b> (int reason, const char* msg = 0) 
</LI>
<LI>virtual  XMLElement* &nbsp;<b><A HREF="#ref23">createHoldXml</A></b> () 
</LI>
<LI>virtual  XMLElement* &nbsp;<b><A HREF="#ref24">createActiveXml</A></b> () 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref25">sendContent</A></b> (Action action, const ObjList& contents, String* stanzaId = 0) 
</LI>
<LI>inline bool &nbsp;<b><A HREF="#ref26">sendContent</A></b> (Action action, const JGSessionContent* content,
	String* stanzaId = 0) 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref27">sendStreamHosts</A></b> (const ObjList& hosts, String* stanzaId = 0) 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref28">sendStreamHostUsed</A></b> (const char* jid, const char* stanzaId) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref29">buildSocksDstAddr</A></b> (String& buf) 
</LI>
<LI>bool &nbsp;<b><A HREF="#ref30">sendInfo</A></b> (XMLElement* xml, String* stanzaId = 0) 
</LI>
<LI>bool &nbsp;<b><A HREF="#ref31">sendDtmf</A></b> (const char* dtmf, unsigned int msDuration = 0, String* stanzaId = 0) 
</LI>
<LI>inline bool &nbsp;<b><A HREF="#ref32">sendMessage</A></b> (const char* msg) 
</LI>
<LI>bool &nbsp;<b><A HREF="#ref33">hasFeature</A></b> (XMPPNamespace::Type feature) 
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static  XMLElement* &nbsp;<b><A HREF="#ref34">buildTransfer</A></b> (const String& transferTo, const String& transferFrom,
	const String& sid = String::empty()) 
</LI>
<LI>static  inline Version &nbsp;<b><A HREF="#ref35">lookupVersion</A></b> (const char* value, Version def = VersionUnknown) 
</LI>
<LI>static  inline const char* &nbsp;<b><A HREF="#ref36">lookupVersion</A></b> (int value, const char* def = "unknown") 
</LI>
<LI>static  inline int &nbsp;<b><A HREF="#ref37">lookupReason</A></b> (const char* value, int def = ReasonOk) 
</LI>
<LI>static  inline const char* &nbsp;<b><A HREF="#ref38">lookupReason</A></b> (int value, const char* def = 0) 
</LI>
<LI>static  const char* &nbsp;<b><A HREF="#ref39">lookupState</A></b> (int state) 
</LI>
<LI>static  const char* &nbsp;<b><A HREF="#ref40">lookupAction</A></b> (int act, Version ver) 
</LI>
<LI>static  Action &nbsp;<b><A HREF="#ref41">lookupAction</A></b> (const char* str, Version ver) 
</LI>
</ul><h4>Public Members</h4><ul><LI>static TokenDict <b><A HREF="#ref42">s_versions[]</A></b></LI>
<LI>static TokenDict <b><A HREF="#ref43">s_reasons[]</A></b></LI>
<LI>static TokenDict <b><A HREF="#ref44">s_states[]</A></b></LI>
<LI>static TokenDict <b><A HREF="#ref45">s_actions0[]</A></b></LI>
<LI>static TokenDict <b><A HREF="#ref46">s_actions1[]</A></b></LI>
</ul><h4>Protected Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref47">JGSession</A></b> (Version ver, JGEngine* engine, JBStream* stream,
	const String& callerJID, const String& calledJID,
	const char* msg = 0) 
</LI>
<LI>&nbsp;<b><A HREF="#ref48">JGSession</A></b> (Version ver, JGEngine* engine, JBEvent* event, const String& id) 
</LI>
<LI>virtual  bool &nbsp;<b><i><A HREF="#ref49">initiate</A></i></b> (const ObjList& contents, XMLElement* extra,
	const char* subject = 0) 
</LI>
<LI>virtual  JGEvent* &nbsp;<b><A HREF="#ref50">getEvent</A></b> (<A HREF="#u_int64_t">u_int64_t</A> time) 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref51">destroyed</A></b> () 
</LI>
<LI>void &nbsp;<b><A HREF="#ref52">enqueue</A></b> (JBEvent* event) 
</LI>
<LI>bool &nbsp;<b><A HREF="#ref53">sendStanza</A></b> (XMLElement* stanza, String* stanzaId = 0, bool confirmation = true,
	bool ping = false) 
</LI>
<LI>bool &nbsp;<b><A HREF="#ref54">sendPing</A></b> (<A HREF="#u_int64_t">u_int64_t</A> msecNow) 
</LI>
<LI>virtual  JGEvent* &nbsp;<b><i><A HREF="#ref55">decodeJingle</A></i></b> (JBEvent* jbev) 
</LI>
<LI>virtual  XMLElement* &nbsp;<b><i><A HREF="#ref56">createJingle</A></i></b> (Action action, XMLElement* element1 = 0,
	XMLElement* element2 = 0, XMLElement* element3 = 0) 
</LI>
<LI>virtual  XMLElement* &nbsp;<b><i><A HREF="#ref57">createDtmf</A></i></b> (const char* dtmf, unsigned int msDuration = 0) 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref58">processJingleSetLastEvent</A></b> (JBEvent& ev) 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref59">processJabberIqResponse</A></b> (JBEvent& ev) 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref60">processJabberIqEvent</A></b> (JBEvent& ev) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref61">eventTerminated</A></b> (JGEvent* event) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref62">changeState</A></b> (State newState) 
</LI>
</ul><h4>Protected Members</h4><ul><LI>Version <b><A HREF="#ref63">m_version</A></b></LI>
<LI>State <b><A HREF="#ref64">m_state</A></b></LI>
<LI>u_int64_t <b><A HREF="#ref65">m_timeToPing</A></b></LI>
<LI>JGEngine* <b><A HREF="#ref66">m_engine</A></b></LI>
<LI>JBStream* <b><A HREF="#ref67">m_stream</A></b></LI>
<LI>bool <b><A HREF="#ref68">m_outgoing</A></b></LI>
<LI>String <b><A HREF="#ref69">m_sid</A></b></LI>
<LI>JabberID <b><A HREF="#ref70">m_localJID</A></b></LI>
<LI>JabberID <b><A HREF="#ref71">m_remoteJID</A></b></LI>
<LI>ObjList <b><A HREF="#ref72">m_events</A></b></LI>
<LI>JGEvent* <b><A HREF="#ref73">m_lastEvent</A></b></LI>
<LI>bool <b><A HREF="#ref74">m_recvTerminate</A></b></LI>
<LI>void* <b><A HREF="#ref75">m_private</A></b></LI>
<LI>String <b><A HREF="#ref76">m_localSid</A></b></LI>
<LI>u_int32_t <b><A HREF="#ref77">m_stanzaId</A></b></LI>
<LI>ObjList <b><A HREF="#ref78">m_sentStanza</A></b></LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
 This class is a base class for all specific jingle sessions
</p>
<A NAME="Version"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>Version</strong> {	Version0 = 0,
	Version1 = 1,
	VersionUnknown
    }
</td><td align="right"><h3><strong>Version</strong></h3></td></tr></table><p></p><p>
 Jingle session version
     </p>
<A NAME="Reason"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>Reason</strong> {	ReasonBusy,                      
	ReasonDecline,                   
	ReasonConn,                      
	ReasonMedia,                     
	ReasonTransport,                 
	ReasonNoError,                   
	ReasonOk,                        
	ReasonNoApp,                     
	ReasonAltSess,                   
	ReasonUnknown,                   
	ReasonTransfer,                  
	ReasonNone                       
    }
</td><td align="right"><h3><strong>Reason</strong></h3></td></tr></table><p></p><p>
 Jingle defined termination reasons
     </p>
<A NAME="State"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>State</strong> {	Idle    = 0,                     
	Pending = 1,                     
	Active  = 2,                     
	Ending  = 3,                     
	Destroy = 4,                     
    }
</td><td align="right"><h3><strong>State</strong></h3></td></tr></table><p></p><p>
 Session state enumeration
     </p>
<A NAME="Action"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>Action</strong> {	ActAccept,                       
	ActInitiate,                     
	ActTerminate,                    
	ActInfo,                         
	ActTransportInfo,                
	ActTransportAccept,              
	ActTransportReject,              
	ActTransportReplace,             
	ActContentAccept,                
	ActContentAdd,                   
	ActContentModify,                
	ActContentReject,                
	ActContentRemove,                
	ActContentInfo,                  
	ActTransfer,                     
	ActRinging,                      
	ActTrying,                       
	ActReceived,                     
	ActHold,                         
	ActActive,                       
	ActMute,                         
	ActDtmf,                         
	ActStreamHost,
	ActCount,
    }
</td><td align="right"><h3><strong>Action</strong></h3></td></tr></table><p></p><p>
 Jingle action enumeration
     </p>
<A NAME="~JGSession"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td> &nbsp;<strong>~JGSession</strong> ()
<br></td><td align="right"><h3><strong>~JGSession</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Destructor
     </p>
<A NAME="version"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline Version &nbsp;<strong>version</strong> ()
<br></td><td align="right"><h3><strong>version</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
 Get the session version
</p>
<p><b>Returns</b>: The session version
     </p>
<A NAME="outgoing"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline bool &nbsp;<strong>outgoing</strong> ()
<br></td><td align="right"><h3><strong>outgoing</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
 Get the session direction
</p>
<p><b>Returns</b>: True if it is an outgoing session
     </p>
<A NAME="sid"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline const String& &nbsp;<strong>sid</strong> ()
<br></td><td align="right"><h3><strong>sid</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
 Get the session id
</p>
<p><b>Returns</b>: The session id
     </p>
<A NAME="local"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline const JabberID& &nbsp;<strong>local</strong> ()
<br></td><td align="right"><h3><strong>local</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
 Get the local peer's JID
</p>
<p><b>Returns</b>: The local peer's JID
     </p>
<A NAME="remote"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline const JabberID& &nbsp;<strong>remote</strong> ()
<br></td><td align="right"><h3><strong>remote</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
 Get the remote peer's JID
</p>
<p><b>Returns</b>: The remote peer's JID
     </p>
<A NAME="state"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline State &nbsp;<strong>state</strong> ()
<br></td><td align="right"><h3><strong>state</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
 Get the session state.
</p>
<p><b>Returns</b>: The session state as enumeration.
     </p>
<A NAME="stream"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline const JBStream* &nbsp;<strong>stream</strong> ()
<br></td><td align="right"><h3><strong>stream</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
 Get the stream this session is bound to
</p>
<p><b>Returns</b>: The stream this session is bound to
     </p>
<A NAME="userData"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline void* &nbsp;<strong>userData</strong> ()
<br></td><td align="right"><h3><strong>userData</strong></h3></td></tr></table><p></p><p>
 Get the arbitrary user data of this session
</p>
<p><b>Returns</b>: The arbitrary user data of this session
     </p>
<A NAME="userData"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline void &nbsp;<strong>userData</strong> (void* userdata)
<br></td><td align="right"><h3><strong>userData</strong></h3></td></tr></table><p></p><p>
 Set the arbitrary user data of this session
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>userdata</i></TD><TD align="left" valign="top">The new arbitrary user data's value
     </TD></TR>
</TABLE></P>
<A NAME="checkJingle"></A><A NAME="ref17"></A><table width="100%"><tr bgcolor="#eeeeee"><td> XMLElement* &nbsp;<strong>checkJingle</strong> (XMLElement* xml)
<br></td><td align="right"><h3><strong>checkJingle</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Check if a given XML element is valid jingle one
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>xml</i></TD><TD align="left" valign="top">Element to check
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The given element if it's a valid jingle element, 0 otherwise
     </p>
<A NAME="getAction"></A><A NAME="ref18"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline Action &nbsp;<strong>getAction</strong> (XMLElement* xml)
<br></td><td align="right"><h3><strong>getAction</strong></h3></td></tr></table><p></p><p>
 Get an action (jingle element type) from a jingle element
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>xml</i></TD><TD align="left" valign="top">Element to check
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The found action, ActCount if not found or unknown
     </p>
<A NAME="acceptEvent"></A><A NAME="ref19"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool &nbsp;<strong>acceptEvent</strong> (JBEvent* event, const String& sid = String::empty())
<br></td><td align="right"><h3><strong>acceptEvent</strong></h3></td></tr></table><p></p><p>
 Ask this session to accept an event
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>event</i></TD><TD align="left" valign="top">The event to accept
</TD></TR>
<TR><TD align="left" valign="top"><i>sid</i></TD><TD align="left" valign="top">The session id if this is a request
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if accepted (the event was enqueued), false if not
     </p>
<A NAME="confirm"></A><A NAME="ref20"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool &nbsp;<strong>confirm</strong> (XMLElement* xml, XMPPError::Type error = XMPPError::NoError,
	const char* text = 0, XMPPError::ErrorType type = XMPPError::TypeModify)
<br></td><td align="right"><h3><strong>confirm</strong></h3></td></tr></table><p></p><p>
 Confirm a received element. If the error is NoError a result stanza will be sent.
  Otherwise, an error stanza will be created and sent and the received element is
  consumed (attached to the sent error stanza)
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>xml</i></TD><TD align="left" valign="top">The element to confirm
</TD></TR>
<TR><TD align="left" valign="top"><i>error</i></TD><TD align="left" valign="top">The error condition
</TD></TR>
<TR><TD align="left" valign="top"><i>text</i></TD><TD align="left" valign="top">Optional text to add to the error element
</TD></TR>
<TR><TD align="left" valign="top"><i>type</i></TD><TD align="left" valign="top">Error type
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False if send failed or element is 0
     </p>
<A NAME="accept"></A><A NAME="ref21"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>accept</strong> (const ObjList& contents, String* stanzaId = 0)
<br></td><td align="right"><h3><strong>accept</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Accept a Pending incoming session.
 This method is thread safe
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>contents</i></TD><TD align="left" valign="top">The list of accepted contents
</TD></TR>
<TR><TD align="left" valign="top"><i>stanzaId</i></TD><TD align="left" valign="top">Optional string to be filled with sent stanza id (used to track the response)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False if send failed
     </p>
<A NAME="hangup"></A><A NAME="ref22"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>hangup</strong> (int reason, const char* msg = 0)
<br></td><td align="right"><h3><strong>hangup</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Close a Pending or Active session
 This method is thread safe
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>reason</i></TD><TD align="left" valign="top">Termination reason
</TD></TR>
<TR><TD align="left" valign="top"><i>msg</i></TD><TD align="left" valign="top">Optional termination message
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False if send failed
     </p>
<A NAME="createHoldXml"></A><A NAME="ref23"></A><table width="100%"><tr bgcolor="#eeeeee"><td> XMLElement* &nbsp;<strong>createHoldXml</strong> ()
<br></td><td align="right"><h3><strong>createHoldXml</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Create a 'hold' child to be added to a session-info element
</p>
<p><b>Returns</b>: Valid XMLElement pointer or 0
     </p>
<A NAME="createActiveXml"></A><A NAME="ref24"></A><table width="100%"><tr bgcolor="#eeeeee"><td> XMLElement* &nbsp;<strong>createActiveXml</strong> ()
<br></td><td align="right"><h3><strong>createActiveXml</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Create an 'active' child to be added to a session-info element
</p>
<p><b>Returns</b>: Valid XMLElement pointer or 0
     </p>
<A NAME="sendContent"></A><A NAME="ref25"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>sendContent</strong> (Action action, const ObjList& contents, String* stanzaId = 0)
<br></td><td align="right"><h3><strong>sendContent</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Send a stanza with session content(s)
 This method is thread safe
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>action</i></TD><TD align="left" valign="top">Must be a transport- or content- action
</TD></TR>
<TR><TD align="left" valign="top"><i>contents</i></TD><TD align="left" valign="top">Non empty list with content(s) to send
</TD></TR>
<TR><TD align="left" valign="top"><i>stanzaId</i></TD><TD align="left" valign="top">Optional string to be filled with sent
  stanza id (used to track the response)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False if send failed
     </p>
<A NAME="sendContent"></A><A NAME="ref26"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline bool &nbsp;<strong>sendContent</strong> (Action action, const JGSessionContent* content,
	String* stanzaId = 0)
<br></td><td align="right"><h3><strong>sendContent</strong></h3></td></tr></table><p></p><p>
 Send a stanza with a session content
 This method is thread safe
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>action</i></TD><TD align="left" valign="top">Must be a transport- or content- action
</TD></TR>
<TR><TD align="left" valign="top"><i>content</i></TD><TD align="left" valign="top">The content to send
</TD></TR>
<TR><TD align="left" valign="top"><i>stanzaId</i></TD><TD align="left" valign="top">Optional string to be filled with sent
  stanza id (used to track the response)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False if send failed
     </p>
<A NAME="sendStreamHosts"></A><A NAME="ref27"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>sendStreamHosts</strong> (const ObjList& hosts, String* stanzaId = 0)
<br></td><td align="right"><h3><strong>sendStreamHosts</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Send a stanza with stream hosts
 This method is thread safe
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>hosts</i></TD><TD align="left" valign="top">The list of hosts to send
</TD></TR>
<TR><TD align="left" valign="top"><i>stanzaId</i></TD><TD align="left" valign="top">Optional string to be filled with sent
  stanza id (used to track the response)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False if send failed
     </p>
<A NAME="sendStreamHostUsed"></A><A NAME="ref28"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>sendStreamHostUsed</strong> (const char* jid, const char* stanzaId)
<br></td><td align="right"><h3><strong>sendStreamHostUsed</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Send a stanza with a stream host used. If the jid is empty, send an
  item-not-found error response
 This method is thread safe
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>jid</i></TD><TD align="left" valign="top">The stream host to send
</TD></TR>
<TR><TD align="left" valign="top"><i>stanzaId</i></TD><TD align="left" valign="top">The id of the stanza to confirm
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False if send failed
     </p>
<A NAME="buildSocksDstAddr"></A><A NAME="ref29"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>buildSocksDstAddr</strong> (String& buf)
<br></td><td align="right"><h3><strong>buildSocksDstAddr</strong></h3></td></tr></table><p></p><p>
 Build SOCKS SHA1 dst.addr used by file transfer
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>buf</i></TD><TD align="left" valign="top">Destination string
     </TD></TR>
</TABLE></P>
<A NAME="sendInfo"></A><A NAME="ref30"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool &nbsp;<strong>sendInfo</strong> (XMLElement* xml, String* stanzaId = 0)
<br></td><td align="right"><h3><strong>sendInfo</strong></h3></td></tr></table><p></p><p>
 Send a session info element to the remote peer.
 This method is thread safe
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>xml</i></TD><TD align="left" valign="top">The XMLElement carried by the session info element
</TD></TR>
<TR><TD align="left" valign="top"><i>stanzaId</i></TD><TD align="left" valign="top">Optional string to be filled with sent stanza id (used to track the response)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False on failure
     </p>
<A NAME="sendDtmf"></A><A NAME="ref31"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool &nbsp;<strong>sendDtmf</strong> (const char* dtmf, unsigned int msDuration = 0, String* stanzaId = 0)
<br></td><td align="right"><h3><strong>sendDtmf</strong></h3></td></tr></table><p></p><p>
 Send a dtmf string to remote peer. If the string's length is greater then 1, each
  character is added as a 'dtmf' child of the jingle element
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>dtmf</i></TD><TD align="left" valign="top">The dtmf string
</TD></TR>
<TR><TD align="left" valign="top"><i>msDuration</i></TD><TD align="left" valign="top">The tone duration in miliseconds. Ignored if 0
</TD></TR>
<TR><TD align="left" valign="top"><i>stanzaId</i></TD><TD align="left" valign="top">Optional string to be filled with sent stanza id (used to track the response)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False if send failed
     </p>
<A NAME="sendMessage"></A><A NAME="ref32"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline bool &nbsp;<strong>sendMessage</strong> (const char* msg)
<br></td><td align="right"><h3><strong>sendMessage</strong></h3></td></tr></table><p></p><p>
 Send a message to the remote peer.
 This method is thread safe
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>msg</i></TD><TD align="left" valign="top">The message to send
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False on socket error
     </p>
<A NAME="hasFeature"></A><A NAME="ref33"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool &nbsp;<strong>hasFeature</strong> (XMPPNamespace::Type feature)
<br></td><td align="right"><h3><strong>hasFeature</strong></h3></td></tr></table><p></p><p>
 Check if the remote party supports a given feature
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>feature</i></TD><TD align="left" valign="top">The requested feature
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if the remote party supports the given feature
     </p>
<A NAME="buildTransfer"></A><A NAME="ref34"></A><table width="100%"><tr bgcolor="#eeeeee"><td> XMLElement* &nbsp;<strong>buildTransfer</strong> (const String& transferTo, const String& transferFrom,
	const String& sid = String::empty())
<br></td><td align="right"><h3><strong>buildTransfer</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
 Build a transfer element
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>transferTo</i></TD><TD align="left" valign="top">The JID to transfer to
</TD></TR>
<TR><TD align="left" valign="top"><i>transferFrom</i></TD><TD align="left" valign="top">The transferror's JID
</TD></TR>
<TR><TD align="left" valign="top"><i>sid</i></TD><TD align="left" valign="top">Optional session id used for attended transfer (empty for unattended transfer)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Valid XMLElement pointer
     </p>
<A NAME="lookupVersion"></A><A NAME="ref35"></A><table width="100%"><tr bgcolor="#eeeeee"><td> inline Version &nbsp;<strong>lookupVersion</strong> (const char* value, Version def = VersionUnknown)
<br></td><td align="right"><h3><strong>lookupVersion</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
 Get the session version associated with a text
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>value</i></TD><TD align="left" valign="top">The version text
</TD></TR>
<TR><TD align="left" valign="top"><i>def</i></TD><TD align="left" valign="top">Default value to return if not found
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Session Version value
     </p>
<A NAME="lookupVersion"></A><A NAME="ref36"></A><table width="100%"><tr bgcolor="#eeeeee"><td> inline const char* &nbsp;<strong>lookupVersion</strong> (int value, const char* def = "unknown")
<br></td><td align="right"><h3><strong>lookupVersion</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
 Get the session version name
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>value</i></TD><TD align="left" valign="top">The version value
</TD></TR>
<TR><TD align="left" valign="top"><i>def</i></TD><TD align="left" valign="top">Default value to return if not found
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Session version name or the default value if not found
     </p>
<A NAME="lookupReason"></A><A NAME="ref37"></A><table width="100%"><tr bgcolor="#eeeeee"><td> inline int &nbsp;<strong>lookupReason</strong> (const char* value, int def = ReasonOk)
<br></td><td align="right"><h3><strong>lookupReason</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
 Get the termination code associated with a text
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>value</i></TD><TD align="left" valign="top">The termination text
</TD></TR>
<TR><TD align="left" valign="top"><i>def</i></TD><TD align="left" valign="top">Default value to return if not found
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Termination code
     </p>
<A NAME="lookupReason"></A><A NAME="ref38"></A><table width="100%"><tr bgcolor="#eeeeee"><td> inline const char* &nbsp;<strong>lookupReason</strong> (int value, const char* def = 0)
<br></td><td align="right"><h3><strong>lookupReason</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
 Get the termination code associated with a text
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>value</i></TD><TD align="left" valign="top">The termination code
</TD></TR>
<TR><TD align="left" valign="top"><i>def</i></TD><TD align="left" valign="top">Default value to return if not found
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Termination text
     </p>
<A NAME="lookupState"></A><A NAME="ref39"></A><table width="100%"><tr bgcolor="#eeeeee"><td> const char* &nbsp;<strong>lookupState</strong> (int state)
<br></td><td align="right"><h3><strong>lookupState</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
 Get the name of a session state
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>state</i></TD><TD align="left" valign="top">The state to find
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The name of a session state
     </p>
<A NAME="lookupAction"></A><A NAME="ref40"></A><table width="100%"><tr bgcolor="#eeeeee"><td> const char* &nbsp;<strong>lookupAction</strong> (int act, Version ver)
<br></td><td align="right"><h3><strong>lookupAction</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
 Get the name of an action
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>act</i></TD><TD align="left" valign="top">The action to find
</TD></TR>
<TR><TD align="left" valign="top"><i>ver</i></TD><TD align="left" valign="top">Session version to use
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The name of an action
     </p>
<A NAME="lookupAction"></A><A NAME="ref41"></A><table width="100%"><tr bgcolor="#eeeeee"><td> Action &nbsp;<strong>lookupAction</strong> (const char* str, Version ver)
<br></td><td align="right"><h3><strong>lookupAction</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
 Get the action associated with a given string
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">The action name
</TD></TR>
<TR><TD align="left" valign="top"><i>ver</i></TD><TD align="left" valign="top">Session version to use
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The name of an action
     </p>
<A NAME="s_versions[]"></A><A NAME="ref42"></A><table width="100%"><tr bgcolor="#eeeeee"><td>static TokenDict  <strong>s_versions[]</strong>
</td><td align="right"><h3><strong>s_versions[]</strong></h3></td></tr></table><p></p><A NAME="s_reasons[]"></A><A NAME="ref43"></A><table width="100%"><tr bgcolor="#eeeeee"><td>static TokenDict  <strong>s_reasons[]</strong>
</td><td align="right"><h3><strong>s_reasons[]</strong></h3></td></tr></table><p></p><A NAME="s_states[]"></A><A NAME="ref44"></A><table width="100%"><tr bgcolor="#eeeeee"><td>static TokenDict  <strong>s_states[]</strong>
</td><td align="right"><h3><strong>s_states[]</strong></h3></td></tr></table><p></p><A NAME="s_actions0[]"></A><A NAME="ref45"></A><table width="100%"><tr bgcolor="#eeeeee"><td>static TokenDict  <strong>s_actions0[]</strong>
</td><td align="right"><h3><strong>s_actions0[]</strong></h3></td></tr></table><p></p><A NAME="s_actions1[]"></A><A NAME="ref46"></A><table width="100%"><tr bgcolor="#eeeeee"><td>static TokenDict  <strong>s_actions1[]</strong>
</td><td align="right"><h3><strong>s_actions1[]</strong></h3></td></tr></table><p></p><A NAME="JGSession"></A><A NAME="ref47"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>JGSession</strong> (Version ver, JGEngine* engine, JBStream* stream,
	const String& callerJID, const String& calledJID,
	const char* msg = 0)
<br></td><td align="right"><h3><strong>JGSession</strong></h3></td></tr></table><p> <small>[protected]</small></p><p>
 Constructor. Create an outgoing session
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>ver</i></TD><TD align="left" valign="top">The session version
</TD></TR>
<TR><TD align="left" valign="top"><i>engine</i></TD><TD align="left" valign="top">The engine that owns this session
</TD></TR>
<TR><TD align="left" valign="top"><i>stream</i></TD><TD align="left" valign="top">The stream this session is bound to
</TD></TR>
<TR><TD align="left" valign="top"><i>callerJID</i></TD><TD align="left" valign="top">The caller's full JID
</TD></TR>
<TR><TD align="left" valign="top"><i>calledJID</i></TD><TD align="left" valign="top">The called party's full JID
</TD></TR>
<TR><TD align="left" valign="top"><i>msg</i></TD><TD align="left" valign="top">Optional message to be sent before session initiate
     </TD></TR>
</TABLE></P>
<A NAME="JGSession"></A><A NAME="ref48"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>JGSession</strong> (Version ver, JGEngine* engine, JBEvent* event, const String& id)
<br></td><td align="right"><h3><strong>JGSession</strong></h3></td></tr></table><p> <small>[protected]</small></p><p>
 Constructor. Create an incoming session.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>ver</i></TD><TD align="left" valign="top">The session version
</TD></TR>
<TR><TD align="left" valign="top"><i>engine</i></TD><TD align="left" valign="top">The engine that owns this session
</TD></TR>
<TR><TD align="left" valign="top"><i>event</i></TD><TD align="left" valign="top">A valid Jabber Jingle event with action session initiate
</TD></TR>
<TR><TD align="left" valign="top"><i>id</i></TD><TD align="left" valign="top">Session id
     </TD></TR>
</TABLE></P>
<A NAME="initiate"></A><A NAME="ref49"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<i><strong>initiate</strong></i> (const ObjList& contents, XMLElement* extra,
	const char* subject = 0)
<br></td><td align="right"><h3><i><strong>initiate</strong></i></h3></td></tr></table><p> <small>[protected pure virtual]</small></p><p>
 Build and send the initial message on an outgoing session
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>contents</i></TD><TD align="left" valign="top">The session contents to be sent with session initiate element
</TD></TR>
<TR><TD align="left" valign="top"><i>extra</i></TD><TD align="left" valign="top">Optional extra child to be added to the session initiate element
</TD></TR>
<TR><TD align="left" valign="top"><i>subject</i></TD><TD align="left" valign="top">Optional session subject
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True on success
     </p>
<A NAME="getEvent"></A><A NAME="ref50"></A><table width="100%"><tr bgcolor="#eeeeee"><td> JGEvent* &nbsp;<strong>getEvent</strong> (<A HREF="#u_int64_t">u_int64_t</A> time)
<br></td><td align="right"><h3><strong>getEvent</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
 Get a Jingle event from the queue.
 This method is thread safe
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>time</i></TD><TD align="left" valign="top">Current time in miliseconds
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: JGEvent pointer or 0
     </p>
<A NAME="destroyed"></A><A NAME="ref51"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>destroyed</strong> ()
<br></td><td align="right"><h3><strong>destroyed</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
 Release this session and its memory
     </p>
<p>Reimplemented from <A HREF="TelEngine__RefObject.html#destroyed">RefObject</A>.</p>
<A NAME="enqueue"></A><A NAME="ref52"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>enqueue</strong> (JBEvent* event)
<br></td><td align="right"><h3><strong>enqueue</strong></h3></td></tr></table><p> <small>[protected]</small></p><p>
 Enqueue a Jabber engine event.
 This method is thread safe
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>event</i></TD><TD align="left" valign="top">The event event to process
     </TD></TR>
</TABLE></P>
<A NAME="sendStanza"></A><A NAME="ref53"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool &nbsp;<strong>sendStanza</strong> (XMLElement* stanza, String* stanzaId = 0, bool confirmation = true,
	bool ping = false)
<br></td><td align="right"><h3><strong>sendStanza</strong></h3></td></tr></table><p> <small>[protected]</small></p><p>
 Send a stanza to the remote peer
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>stanza</i></TD><TD align="left" valign="top">The stanza to send
</TD></TR>
<TR><TD align="left" valign="top"><i>stanzaId</i></TD><TD align="left" valign="top">Optional string to be filled with sent stanza id (used to track the response)
</TD></TR>
<TR><TD align="left" valign="top"><i>confirmation</i></TD><TD align="left" valign="top">True if the stanza needs confirmation (add 'id' attribute)
</TD></TR>
<TR><TD align="left" valign="top"><i>ping</i></TD><TD align="left" valign="top">True if the stanza is a ping one
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True on success
     </p>
<A NAME="sendPing"></A><A NAME="ref54"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool &nbsp;<strong>sendPing</strong> (<A HREF="#u_int64_t">u_int64_t</A> msecNow)
<br></td><td align="right"><h3><strong>sendPing</strong></h3></td></tr></table><p> <small>[protected]</small></p><p>
 Send a ping (empty session info) stanza to the remote peer if it's time to do it
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>msecNow</i></TD><TD align="left" valign="top">The current time
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if a ping was succesfully sent
     </p>
<A NAME="decodeJingle"></A><A NAME="ref55"></A><table width="100%"><tr bgcolor="#eeeeee"><td> JGEvent* &nbsp;<i><strong>decodeJingle</strong></i> (JBEvent* jbev)
<br></td><td align="right"><h3><i><strong>decodeJingle</strong></i></h3></td></tr></table><p> <small>[protected pure virtual]</small></p><p>
 Decode a valid jingle set event. Set the event's data on success
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>jbev</i></TD><TD align="left" valign="top">The event to decode
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: JGEvent pointer or 0
     </p>
<A NAME="createJingle"></A><A NAME="ref56"></A><table width="100%"><tr bgcolor="#eeeeee"><td> XMLElement* &nbsp;<i><strong>createJingle</strong></i> (Action action, XMLElement* element1 = 0,
	XMLElement* element2 = 0, XMLElement* element3 = 0)
<br></td><td align="right"><h3><i><strong>createJingle</strong></i></h3></td></tr></table><p> <small>[protected pure virtual]</small></p><p>
 Create an 'iq' of type 'set' with a 'jingle' child
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>action</i></TD><TD align="left" valign="top">The action of the Jingle stanza
</TD></TR>
<TR><TD align="left" valign="top"><i>element1</i></TD><TD align="left" valign="top">Optional child element
</TD></TR>
<TR><TD align="left" valign="top"><i>element2</i></TD><TD align="left" valign="top">Optional child element
</TD></TR>
<TR><TD align="left" valign="top"><i>element3</i></TD><TD align="left" valign="top">Optional child element
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Valid XMLElement pointer
     </p>
<A NAME="createDtmf"></A><A NAME="ref57"></A><table width="100%"><tr bgcolor="#eeeeee"><td> XMLElement* &nbsp;<i><strong>createDtmf</strong></i> (const char* dtmf, unsigned int msDuration = 0)
<br></td><td align="right"><h3><i><strong>createDtmf</strong></i></h3></td></tr></table><p> <small>[protected pure virtual]</small></p><p>
 Create a dtmf XML element
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>dtmf</i></TD><TD align="left" valign="top">The dtmf string
</TD></TR>
<TR><TD align="left" valign="top"><i>msDuration</i></TD><TD align="left" valign="top">The tone duration in miliseconds. Ignored if 0
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Valid XMLElement pointer or 0
     </p>
<A NAME="processJingleSetLastEvent"></A><A NAME="ref58"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>processJingleSetLastEvent</strong> (JBEvent& ev)
<br></td><td align="right"><h3><strong>processJingleSetLastEvent</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
 Method called in getEvent() to process a last event set from a
  jingle set jabber event
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>ev</i></TD><TD align="left" valign="top">The event to process
     </TD></TR>
</TABLE></P>
<A NAME="processJabberIqResponse"></A><A NAME="ref59"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>processJabberIqResponse</strong> (JBEvent& ev)
<br></td><td align="right"><h3><strong>processJabberIqResponse</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
 Method called in getEvent() to process a jabber event carrying a response
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>ev</i></TD><TD align="left" valign="top">The event to process
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False to stop further processing
     </p>
<A NAME="processJabberIqEvent"></A><A NAME="ref60"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>processJabberIqEvent</strong> (JBEvent& ev)
<br></td><td align="right"><h3><strong>processJabberIqEvent</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
 Method called in getEvent() to process a generic jabber iq event
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>ev</i></TD><TD align="left" valign="top">The event to process
     </TD></TR>
</TABLE></P>
<A NAME="eventTerminated"></A><A NAME="ref61"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>eventTerminated</strong> (JGEvent* event)
<br></td><td align="right"><h3><strong>eventTerminated</strong></h3></td></tr></table><p> <small>[protected]</small></p><p>
 Terminate notification from an event. Reset the last generated event
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>event</i></TD><TD align="left" valign="top">Terminated (processed) event
     </TD></TR>
</TABLE></P>
<A NAME="changeState"></A><A NAME="ref62"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>changeState</strong> (State newState)
<br></td><td align="right"><h3><strong>changeState</strong></h3></td></tr></table><p> <small>[protected]</small></p><p>
 Changed session state
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>newState</i></TD><TD align="left" valign="top">Session new state
     </TD></TR>
</TABLE></P>
<A NAME="m_version"></A><A NAME="ref63"></A><table width="100%"><tr bgcolor="#eeeeee"><td>Version  <strong>m_version</strong>
</td><td align="right"><h3><strong>m_version</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_state"></A><A NAME="ref64"></A><table width="100%"><tr bgcolor="#eeeeee"><td>State  <strong>m_state</strong>
</td><td align="right"><h3><strong>m_state</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_timeToPing"></A><A NAME="ref65"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="#u_int64_t">u_int64_t</A>  <strong>m_timeToPing</strong>
</td><td align="right"><h3><strong>m_timeToPing</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_engine"></A><A NAME="ref66"></A><table width="100%"><tr bgcolor="#eeeeee"><td>JGEngine*  <strong>m_engine</strong>
</td><td align="right"><h3><strong>m_engine</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_stream"></A><A NAME="ref67"></A><table width="100%"><tr bgcolor="#eeeeee"><td>JBStream*  <strong>m_stream</strong>
</td><td align="right"><h3><strong>m_stream</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_outgoing"></A><A NAME="ref68"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool  <strong>m_outgoing</strong>
</td><td align="right"><h3><strong>m_outgoing</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_sid"></A><A NAME="ref69"></A><table width="100%"><tr bgcolor="#eeeeee"><td>String  <strong>m_sid</strong>
</td><td align="right"><h3><strong>m_sid</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_localJID"></A><A NAME="ref70"></A><table width="100%"><tr bgcolor="#eeeeee"><td>JabberID  <strong>m_localJID</strong>
</td><td align="right"><h3><strong>m_localJID</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_remoteJID"></A><A NAME="ref71"></A><table width="100%"><tr bgcolor="#eeeeee"><td>JabberID  <strong>m_remoteJID</strong>
</td><td align="right"><h3><strong>m_remoteJID</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_events"></A><A NAME="ref72"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList  <strong>m_events</strong>
</td><td align="right"><h3><strong>m_events</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_lastEvent"></A><A NAME="ref73"></A><table width="100%"><tr bgcolor="#eeeeee"><td>JGEvent*  <strong>m_lastEvent</strong>
</td><td align="right"><h3><strong>m_lastEvent</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_recvTerminate"></A><A NAME="ref74"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool  <strong>m_recvTerminate</strong>
</td><td align="right"><h3><strong>m_recvTerminate</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_private"></A><A NAME="ref75"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void*  <strong>m_private</strong>
</td><td align="right"><h3><strong>m_private</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_localSid"></A><A NAME="ref76"></A><table width="100%"><tr bgcolor="#eeeeee"><td>String  <strong>m_localSid</strong>
</td><td align="right"><h3><strong>m_localSid</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_stanzaId"></A><A NAME="ref77"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="#u_int32_t">u_int32_t</A>  <strong>m_stanzaId</strong>
</td><td align="right"><h3><strong>m_stanzaId</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_sentStanza"></A><A NAME="ref78"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList  <strong>m_sentStanza</strong>
</td><td align="right"><h3><strong>m_sentStanza</strong></h3></td></tr></table><p> <small>[protected]</small></p><HR>
	<table>
	<tr><td><small>Generated by: paulc on bussard on Mon Mar  8 12:18:15 2010, using kdoc 2.0a54.</small></td></tr>
	</table>
</BODY>
</HTML>