JabChapter 9

From WikiContent

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
-
[http://prisonbreakmania.com/galeria/albums/userpics/10003/topic-579.htm norey] [http://drusillasbooks.com/images/inventory/pics/article151.html luxor writing instruments pvt. ltd] [http://canidra.org/img/bg/thumbs/article585.html jin rapping video] [http://westcoastbias.com/wp-content/uploads/2009/00/index.html index] [http://blogshoster.com/clientarea/downloads/media/topic1428.htm available bondage custom model video] [http://creating.com.ve/correo/data/files/article1364.htm sxga notebooks] [http://paroquiasaosimao.org/images/comunidades/pics/article619.html of mp3 mp3s music mp3] [http://naruto-chronicles.net/images/thumbs/index.html http] [http://silverglaze.com/wp-content/uploads/2009/06/news-480-2009-07-26.html scuba diving centers] [http://hamphauercanes.com/fax/files/article176.html add link manager movie reciprocal] [http://miteyriders.com/dev/wordpress/wp-content/images/news-2715-20090720.html coors field] [http://provobreastsurgeon.com/wp-content/gallery/breast/index.htm url] [http://www.bibliopolio.gr/images/banners/mini/topic-1088.htm the scooter store] [http://cleanairmakemore.com/orig/uploads/thumbs/topic-876.html adult laotian video] [http://cottagepirouette.com/director_test/css/news-1610-20090719.html splinter cell chaos theory co op video] [http://oliderdossonhos.com/wp-content/uploads/2009/02/news-1449.html help with troubled teen] [http://dragonballorigins.com/wordpress/wp-content/uploads/2009/comment-1508.html aol isp information] [http://evangelicalsformitt.org/mt/themes/styles/article-82.htm pinnacle pctv stereo serial] [http://abanganden.co.cc/wp-content/uploads/2008/11/article-1707.htm 100 1987 billboard top] [http://spnschoolchicago.org/emailforms/use/form/page-2067.html professional video cameras uk] [http://canidra.org/img/bg/thumbs/article2439.html tiny black tits] [http://www.juliensuvalde.com/skin1/pages/files/article916.html laura movie nubiles] [http://beeone4.co.cc/admin/areas/files/topic-1556.htm teacup puppy] [http://giiblog.com.br/wp-content/uploads/2008/09/text-1543.htm lady sonya movies] [http://paroquiasaosimao.org/images/comunidades/pics/article82.html aoxppr 2.42 serial] [http://nycity-hits.com/banners/small/comment-214.html nude women in showers] [http://kurosakiways.com/images/icons/article344.html cortislim] [http://elusivemoose.com/ssp_director/albums/album-25/page1616.html arthritis drug lawyer] [http://www.nature-museum.org/about/images10/article1756.html mine again lyrics mariah] [http://www.passiondates.com/Tips_and_Advice/Lifestyle/images/comment-1274.html hilton sisters] [http://dvfreelancer.com/forum/images/avatars/pics/2428.html kelly online r tape video] [http://www.bottlesandcans.com/uploads/images/resource-829.html taxes,laws,guide] [http://www.passiondates.com/Tips_and_Advice/Lifestyle/images/comment-904.html 13 year old nude] [http://thesmileshack.com/store/pub/files/sabugelq.htm opo3] [http://thesmileshack.com/store/pub/files/pasrolla.htm arizona home owners insurance] [http://gsazahar.org/ficheros/uploads/media/article1144.htm circuitcity.com] [http://dnsline.com/soporte/attachments/media/comment-644.html oscar nominated movie reviews] [http://kantutabolivia.net/grup/abdon/mp3/eltsar1513.htm aljazeera english version] [http://blognoviny.cz/images/pixels/239.html lake taho] [http://www.bottlesandcans.com/uploads/images/resource-1517.html champion shuffleboard manual] [http://dvfreelancer.com/forum/images/avatars/pics/558.html rucker park] [http://gurianinstruments.com/images/specials/thumbs/news-648-20090726.html outlaw josey wales movie quotes] [http://oliderdossonhos.com/wp-content/uploads/2009/02/news-1081.html online pharmacy tech course] [http://luxutah.com/wp-content/uploads/2009/02/article-1756.htm colombian models] [http://cbhr.com/dmdocuments/docs/article1478.html paris clip art] [http://cyberserg.com/e107_plugins/log/logs/cache/topic-1400.htm pliweb] [http://griffiths.com/blog/wp-content/uploads/2007/news-333-2009-07-25.html school teacher videos] [http://miteyriders.com/dev/wordpress/wp-content/images/sitemap.html links] [http://pihlweb.com/shopping/thumbs/news-1613-2009-07-18.html x man cartoon for sale] [http://vagoslatinamerica.com/site/slideshow/pics/article2431.html internet multicast video delivery]
+
 
-
[http://page.freett.com/nihuber/dover-education.html nutrition education games for elementary school] [http://wijossel.finito.fc2.com/zelrelfiw.html movie review spirit water] [http://wijossel.finito.fc2.com/eltreba.html the firm body sculpting system 3 review] [http://lahassel.finito.fc2.com/lonely-russian.html lonely russian woman] [http://page.freett.com/maalvey/topic-1314.html counter strike 1.6 maps to download] [http://lumuene.finito.fc2.com/britten-pears-school.html green hills school new jersey] [http://rohutson.finito.fc2.com/topic-45.html island marathon result tybee] [http://rohutson.finito-web.com/inter-tv-ukraine.html http] [http://divollme.myspace1.nazca.co.jp/991.html ohio pug rescue] [http://bajones.myspace1.nazca.co.jp/799.html new york blackout 1965] [http://hestaton.finito-web.com/1203.html turnaround management firms] [http://panyaj.netrend.jp/topic-384.html tego calderon lyrics we dont love them hoes] [http://rurambo.finito-web.com/38.html pelham school wimbledon] [http://wijossel.finito-web.com/eau-claire-express.html colfax iowa history] [http://s1.shard.jp/srwn2/123.html broadband optimizers] [http://page.freett.com/nihuber/central-council.html central council for education and training in social work] [http://deljaraa.strefa.pl/kobugrole.html georgia gymnastics academy lawrenceville] [http://s1.shard.jp/flaweddoll/topic-450.html belltech business card designer pro 1.0] [http://wifolkge.strefa.pl/alabama-girl-in.html texas ford dealership] [http://eleplro.strefa.pl/topic-104.html louisiana representative districts] [http://lahassel.finito.fc2.com/is-siberia-part.html is siberia part of russia] [http://bajones.myspace1.nazca.co.jp/1727.html new york state natural heritage trust] [http://s1.shard.jp/murasakineko/topic-412.html buy email link name phentermine.html soma.orxc.com] [http://bugvoufe.strefa.pl/henzarsi.html depot home improvement store] [http://wijossel.finito-web.com/whitefish-cell.html fillmore poster ties] [http://jmarina.netrend.jp/paul-smith-money.html amount of money spent on fast food] [http://wijossel.finito.fc2.com/mexbasc.html pny 6800gt review] [http://deljaraa.strefa.pl/golououca.html texas renegade] [http://lahassel.finito.fc2.com/crowne-plaza.html russian trilobites] [http://emrichar.myspace1.nazca.co.jp/topic-1131.html illinois historic site] [http://page.freett.com/mcholson/1718.html charlatte migennes france] [http://beadcock.finito.fc2.com/topic-3.html rock thr] [http://stbeals.myspace1.nazca.co.jp/topic-1341.html indiana jones music score] [http://shrochel.finito-web.com/system-of-a-down.html system of a down legend of zelda song] [http://hestaton.finito-web.com/267.html computer will not turn on] [http://rohutson.finito-web.com/cartoonnetworkcom.html links] [http://page.freett.com/hacapdow/1882.html baby cat phat star way] [http://eleplro.strefa.pl/topic-988.html ohio reptile rescue] [http://page.freett.com/headkin/159.html national personnel records center military personnel records] [http://rohutson.finito.fc2.com/topic-1897.html page] [http://bamcrae.myspace1.nazca.co.jp/323.html kansas city rap] [http://eleplro.strefa.pl/topic-766.html georgia job university] [http://s1.shard.jp/bigtyma/equity-bank.html governers job bank texas] [http://dashanno.finito-web.com/topic-302.html algarve travel] [http://mimannbe.myspace1.nazca.co.jp/dronbocb.html hawaii airline] [http://lumuene.finito.fc2.com/ballet-dance.html shiner high school] [http://rohutson.finito-web.com/inter-tv-ukraine.html index] [http://cryred.netrend.jp/375.html council of legal education victoria] [http://bamcrae.myspace1.nazca.co.jp/1847.html kansas city honda motorcycle] [http://page.freett.com/nihuber/educational-benchmarking.html education elementary resource school]
+
-
[http://aquisechatea.com/galeria/albums/userpics/10002/page115.html silent movie theater on fairfax] [http://woningpagina.com/pics/flash/comment-1097.html american express money wire] [http://appleturnover.tv/about/images/news-638-20090704.html las vegas poker tournaments february] [http://carpentercarpenter.ca/_doubletuttle/images/comment-1231.html printed sweatshirts] [http://aarh.net/generator/assets/gallery3/topic-61.html gazebo designs] [http://techwebcast.info/forum/attachments/files/page-347.html wwe diva stacy keibler.] [http://ackcsc.org/club.bak/media/flash/bascfu.htm razzle] [http://aarh.net/generator/assets/gallery3/index.html map] [http://tatlin.com/gallery/wp-content/uploads/2008/topic-17.htm iowa city entertainment] [http://caypkiwanis.org/main/wp-content/uploads/2007/09/article-2047.htm walley fishing manitoba] [http://tatlin.com/gallery/wp-content/uploads/2008/index.htm site] [http://casv.ca/secondary/class/install/1376.html indecent proposal video clip] [http://techwebcast.info/forum/attachments/files/page-1205.html free gd55 mobile panasonic ringtone] [http://beachcki.org/officers/wpThumbnails/pics/topic519.htm moms movies.com] [http://rvpark4u.com/weblog/skins/rsd/files/page181.html a perfect circle music video downloads] [http://carpentercarpenter.ca/_doubletuttle/images/comment-1169.html amateur submitted movies] [http://aarh.net/generator/assets/gallery3/topic-925.html auto nationwide watch.com] [http://techwebcast.info/forum/attachments/files/page-395.html marisa miller video] [http://aarh.net/generator/assets/gallery3/topic-1595.html free mobile panasonic ringtone] [http://caypkiwanis.org/main/wp-content/uploads/2007/09/article-1203.htm movie schedule tinseltown] [http://rubyarts.org/images/icons/news-486.html sponges phylum] [http://juliemorstad.com/contactform/forms/images/article1130.htm popup blockers] [http://brixhost.net/my/attachments/media/news-228-2009-07-02.html russian mature movies] [http://pixsoulmedia.com/dev/images/thumbs/article422.html secretely] [http://casv.ca/secondary/class/install/2418.html music roger video zapp] [http://cavaliersonline.com/photos/icons/text1385.htm nude madonna] [http://caypkiwanis.org/main/wp-content/uploads/2007/09/article-53.htm dan post boots] [http://beachcki.org/officers/wpThumbnails/pics/sitemap.html sitemap] [http://appleturnover.tv/about/images/news-2163-20090630.html annie lennox ringtone] [http://beachcki.org/officers/wpThumbnails/pics/topic777.htm framed photos] [http://pixsoulmedia.com/dev/images/thumbs/article2357.html movie clip heather graham] [http://ackcsc.org/club.bak/media/flash/index.htm link] [http://aquisechatea.com/galeria/albums/userpics/10002/page214.html mass transit magazines] [http://castlekeepcavaliers.com/generator/assets/files/page9.html coach replica] [http://appleturnover.tv/about/images/news-1467-20090629.html amr ringtones free download] [http://appleturnover.tv/about/images/news-955-20090622.html english to german] [http://thewholesaler.co.uk/newsletter/data/images/article1692.html masterbate clit] [http://aquisechatea.com/galeria/albums/userpics/10002/page1211.html electric burr grinder] [http://pixsoulmedia.com/dev/images/thumbs/article1923.html pharmacy] [http://pixsoulmedia.com/dev/images/thumbs/article946.html ethnic video] [http://rubyarts.org/images/icons/news-1767.html sexual intercourse photos] [http://cavalierpedigrees.com/XOOPS/images/text1216.htm deer hunting] [http://rvpark4u.com/weblog/skins/rsd/files/page21.html igrice video] [http://cavaliersonline.com/photos/icons/text1365.htm microsoft open license site] [http://caypkiwanis.org/main/wp-content/uploads/2007/09/article-2253.htm nostalgiques stickers] [http://rvpark4u.com/weblog/skins/rsd/files/page1677.html russian movie download] [http://thewholesaler.co.uk/newsletter/data/images/article792.html movie icon avatars] [http://capstonerealty.ph/gallery/Farm_Lots/mini/resource-1179.html anna ohura videos] [http://rubyarts.org/images/icons/news-60.html phentermine pharmacy biz] [http://cavalierpedigrees.com/XOOPS/images/text1532.htm wet nurses]
+
-
[http://brixhost.net/my/attachments/media/news-1356-2009-06-25.html white water rafting wales uk] [http://ackcsc.org/club.bak/media/flash/ricere.htm playstation3] [http://techwebcast.info/forum/attachments/files/page-2212.html merman movies] [http://arccc-cccaa.org/images/thumbs/topic-1515.htm ritalin adderall concerta] [http://cavalierpedigrees.com/XOOPS/images/sitemap.htm sitemap] [http://tatlin.com/gallery/wp-content/uploads/2008/topic-586.htm decadron] [http://aquisechatea.com/galeria/albums/userpics/10002/page111.html preview torrent file] [http://castlekeepcavaliers.com/generator/assets/files/page1490.html mpeg4 movie converter] [http://appleturnover.tv/about/images/news-2037-20090624.html asia movie trailer] [http://rubyarts.org/images/icons/news-730.html craigs list denver] [http://mdabc.net/test/files/new1844.htm irish drink mix] [http://vfcpug.org/meta/quad/images/text-772.htm 2005 draft nhl] [http://techwebcast.info/forum/attachments/files/page-1897.html media player movie trailors] [http://casv.ca/secondary/class/install/500.html leonard maltin movie reviews] [http://marja-leena-rathje.info/ssp_director/config/conf/article2112.html apache mysql php windows installer] [http://aarh.net/generator/assets/gallery3/topic-1025.html hohner] [http://vfcpug.org/meta/quad/images/text-1058.htm nik sharpener pro serial] [http://arccc-cccaa.org/images/thumbs/sitemap.htm index] [http://brixhost.net/my/attachments/media/index.html link] [http://carpentercarpenter.ca/_doubletuttle/images/comment-600.html penneys] [http://rubyarts.org/images/icons/news-41.html radiator hose] [http://caypkiwanis.org/main/wp-content/uploads/2007/09/article-2382.htm wu-tang clan] [http://paarc.ca/images/thumbs/article2179.html woman naked] [http://ackcsc.org/club.bak/media/flash/devarnoe.htm lowden guitar serial numbers] [http://techwebcast.info/forum/attachments/files/page-1136.html recurso humanos] [http://aquisechatea.com/galeria/albums/userpics/10002/page1224.html matthew perry drug addiction] [http://techwebcast.info/forum/attachments/files/page-1664.html kill myself] [http://mdabc.net/test/files/new771.htm eminem puke video] [http://atomized.ca/2006/12/news-2746-20090622.html easy producer video] [http://vfcpug.org/meta/quad/images/text-236.htm aspiration book guest] [http://castlekeepcavaliers.com/generator/assets/files/page370.html lex on blondes] [http://mdabc.net/test/files/sitemap.htm domain] [http://paarc.ca/images/thumbs/article1362.html oxycontin lil wyte lyrics] [http://appleturnover.tv/about/images/news-1073-20090628.html what is extacy drug] [http://mdabc.net/test/files/new422.htm pretty ricky video] [http://pixsoulmedia.com/dev/images/thumbs/article966.html total wine] [http://tatlin.com/gallery/wp-content/uploads/2008/topic-194.htm naked photo post] [http://pixsoulmedia.com/dev/images/thumbs/article2578.html adam brody jimmy kimmel] [http://arccc-cccaa.org/images/thumbs/topic-847.htm best way to lose weight] [http://appleturnover.tv/about/images/news-1792-20090705.html magnum movie p.i] [http://thewholesaler.co.uk/newsletter/data/images/article1266.html infant blood pressure normal] [http://woningpagina.com/pics/flash/comment-23.html plastic license plate blanks] [http://cavaliersonline.com/photos/icons/text1285.htm allfreegay] [http://brixhost.net/my/attachments/media/news-770-2009-06-23.html trackpad powerbook] [http://techwebcast.info/forum/attachments/files/page-187.html adobe photoshop 8 cs cracked] [http://arccc-cccaa.org/images/thumbs/topic-1083.htm interpreter] [http://woningpagina.com/pics/flash/comment-445.html memphis homes] [http://castlekeepcavaliers.com/generator/assets/files/page1309.html el nino] [http://castlekeepcavaliers.com/generator/assets/files/page1399.html red envolope] [http://techwebcast.info/forum/attachments/files/page-964.html irene hunt pictures]
+
-
[http://capstonerealty.ph/gallery/Farm_Lots/mini/resource-769.html pussy eating gallery] [http://marja-leena-rathje.info/ssp_director/config/conf/article1575.html free web design template] [http://appleturnover.tv/about/images/news-149-20090627.html pwl cracker download] [http://rubyarts.org/images/icons/news-1093.html activation end process product software] [http://arccc-cccaa.org/images/thumbs/topic-426.htm cell motorola phone razr ringtone] [http://thewholesaler.co.uk/newsletter/data/images/article376.html showplace 16 coon rapids mn] [http://rubyarts.org/images/icons/index.html url] [http://ackcsc.org/club.bak/media/flash/bugpaslet.htm in nevada pharmacy school] [http://rvpark4u.com/weblog/skins/rsd/files/page2269.html sexy seamed stockings] [http://paarc.ca/images/thumbs/article1087.html sample sex video and movie] [http://ackcsc.org/club.bak/media/flash/nrdron.htm speculumpages] [http://brixhost.net/my/attachments/media/news-361-2009-06-24.html archive video files] [http://casv.ca/secondary/class/install/1859.html free ringtones alltel audiovox] [http://appleturnover.tv/about/images/news-393-20090703.html nastyrat.com] [http://cavaliersonline.com/photos/icons/text1417.htm marmalade mr review] [http://capstonerealty.ph/gallery/Farm_Lots/mini/resource-942.html lolita index] [http://cavalierpedigrees.com/XOOPS/images/text1805.htm alive blaine clip david drowned video] [http://woningpagina.com/pics/flash/comment-236.html pioneer press] [http://arccc-cccaa.org/images/thumbs/sitemap.htm page] [http://caypkiwanis.org/main/wp-content/uploads/2007/09/article-446.htm aurora fox mall valley] [http://aarh.net/generator/assets/gallery3/topic-1709.html 2 best camera digital megapixel] [http://ackcsc.org/club.bak/media/flash/sitemap.htm links] [http://brixhost.net/my/attachments/media/news-314-2009-06-27.html eating a balanced diet] [http://cavaliersonline.com/photos/icons/text1196.htm adultactioncam.com] [http://paarc.ca/images/thumbs/article2649.html cardizem cd anabolic steroids actos altace] [http://beachcki.org/officers/wpThumbnails/pics/topic1242.htm robert palmer simply irresistible music video] [http://cavalierpedigrees.com/XOOPS/images/text395.htm girls messy cheerleader] [http://arccc-cccaa.org/images/thumbs/topic-1260.htm pacific assault no cd crack] [http://techwebcast.info/forum/attachments/files/page-1864.html shemale domination] [http://beachcki.org/officers/wpThumbnails/pics/topic228.htm lunchboxes] [http://beachcki.org/officers/wpThumbnails/pics/topic1028.htm live night rap saturday video] [http://rvpark4u.com/weblog/skins/rsd/files/page1867.html karate kata video free] [http://caypkiwanis.org/main/wp-content/uploads/2007/09/article-1435.htm ohiolottery] [http://tatlin.com/gallery/wp-content/uploads/2008/topic-869.htm rakuen movie 4 inuyasha] [http://carpentercarpenter.ca/_doubletuttle/images/comment-1352.html smoothmag] [http://kazak.ca/buzz/data/media/boclid1366.htm wholesale home tanning bed] [http://juliemorstad.com/contactform/forms/images/article1485.htm honda radiator] [http://sahardesign.com/files/styles/article89.html skydiving video clip] [http://capstonerealty.ph/gallery/Farm_Lots/mini/resource-1164.html movie lobby card] [http://juliemorstad.com/contactform/forms/images/index.htm index] [http://beachcki.org/officers/wpThumbnails/pics/topic1352.htm environmental sampling supplies] [http://tatlin.com/gallery/wp-content/uploads/2008/topic-1226.htm valassis] [http://marja-leena-rathje.info/ssp_director/config/conf/article2186.html ivp care pharmacy] [http://appleturnover.tv/about/images/news-341-20090630.html pure country movie quotes] [http://cavalierpedigrees.com/XOOPS/images/text335.htm student housing] [http://casv.ca/secondary/class/install/1589.html chicago cubs] [http://sahardesign.com/files/styles/sitemap.html index] [http://kazak.ca/buzz/data/media/acerko633.htm pictures of rainbows] [http://sahardesign.com/files/styles/sitemap.html top] [http://cavalierpedigrees.com/XOOPS/images/text1627.htm suffolk realty agents]
+
=Groupchat, : Components, and Event Models=
=Groupchat, : Components, and Event Models=
<br>By now, you should have a
<br>By now, you should have a
Line 14: Line 10:
conference room and alerts us to words and phrases that we want it to
conference room and alerts us to words and phrases that we want it to
listen for. There are two popular conference protocols, as mentioned in
listen for. There are two popular conference protocols, as mentioned in
-
Section 6.2.6—the presence-based Groupchat protocol, and the
+
Section 6.2.6 the presence-based Groupchat protocol, and the
<tt>jabber:iq:conference</tt>-based Conference protocol. The assistant
<tt>jabber:iq:conference</tt>-based Conference protocol. The assistant
recipe, a foray into the world of 'bots, takes a look at the original
recipe, a foray into the world of 'bots, takes a look at the original
Line 24: Line 20:
where this melding needs to happen. The first is a homage to the Trojan
where this melding needs to happen. The first is a homage to the Trojan
Room Coffee Machine (http://www.cl.cam.ac.uk/coffee/coffee.html), where
Room Coffee Machine (http://www.cl.cam.ac.uk/coffee/coffee.html), where
-
we give life, or at least presence, to a coffeepot, using LEGO®
+
we give life, or at least presence, to a coffeepot, using LEGO
-
MINDSTORMS™. The second is a Tk-based RSS headline viewer. Both the
+
MINDSTORMS. The second is a Tk-based RSS headline viewer. Both the
coffeepot and the Tk programming library have event loops of their own.
coffeepot and the Tk programming library have event loops of their own.
With the coffeepot, we need to have a loop that polls the coffeepot's
With the coffeepot, we need to have a loop that polls the coffeepot's
Line 49: Line 45:
between programming a client and programming a component in this chapter
between programming a client and programming a component in this chapter
and build a complete component that can be queried and interacted with
and build a complete component that can be queried and interacted with
-
using the third of Jabber's building blocks—the <tt>&lt;iq/&gt;</tt>
+
using the third of Jabber's building blocks the <tt>&lt;iq/&gt;</tt>
element.
element.
Line 92: Line 88:
becoming a conference user identified by a nickname that is chosen upon
becoming a conference user identified by a nickname that is chosen upon
entering that room. Nicknames are generally used in conference rooms to
entering that room. Nicknames are generally used in conference rooms to
-
provide a modicum of privacy—it is assumed that by default you don't
+
provide a modicum of privacy it is assumed that by default you don't
want to let the other conference room members know your real JID.
want to let the other conference room members know your real JID.
Line 98: Line 94:
interaction: a simple one that provides basic features and a more
interaction: a simple one that provides basic features and a more
complex one that provides the basic features plus facilities such as
complex one that provides the basic features plus facilities such as
-
password-protected rooms and room descriptions—Groupchat and Conference.
+
password-protected rooms and room descriptions Groupchat and Conference.
Line 248: Line 244:
: <tt>error</tt> and comes from the artificial JID constructed in the
: <tt>error</tt> and comes from the artificial JID constructed in the
: room entry attempt. The element is addressed to <tt>qmacro</tt>'s real
: room entry attempt. The element is addressed to <tt>qmacro</tt>'s real
-
: JID, of course—<tt>qmacro@jabber.com/jarltk</tt>—as otherwise it
+
: JID, of course<tt>qmacro@jabber.com/jarltk</tt> as otherwise it
: wouldn't reach him. : The error code 409 and text "Conflict" tells
: wouldn't reach him. : The error code 409 and text "Conflict" tells
: <tt>qmacro</tt> that the nickname conflicted with one already in the
: <tt>qmacro</tt> that the nickname conflicted with one already in the
Line 262: Line 258:
</code>
</code>
-
: This time, there is no conflictâÃÃÃ�
+
: This time, there is no conflict

Revision as of 13:31, 17 August 2009

Groupchat, : Components, and Event Models


By now, you should have a

good idea of how scripts interact with Jabber and how the core
elements such as <message/> and
<presence/> can be constructed and handled.

This chapter builds upon what we've already seen in Chapter 8 and introduces new concepts. We build a nosy assistant that joins a conference room and alerts us to words and phrases that we want it to listen for. There are two popular conference protocols, as mentioned in Section 6.2.6 the presence-based Groupchat protocol, and the jabber:iq:conference-based Conference protocol. The assistant recipe, a foray into the world of 'bots, takes a look at the original presence-based one.

As we've seen, programming within Jabber's event model is fairly straightforward. But what happens when you want to meld other components with event models of their own? We look at a couple of typical scenarios where this melding needs to happen. The first is a homage to the Trojan Room Coffee Machine (http://www.cl.cam.ac.uk/coffee/coffee.html), where we give life, or at least presence, to a coffeepot, using LEGO MINDSTORMS. The second is a Tk-based RSS headline viewer. Both the coffeepot and the Tk programming library have event loops of their own. With the coffeepot, we need to have a loop that polls the coffeepot's status, independently of the polling for incoming packets from the Jabber server. The Tk programming library's event model is similar to those of the Jabber programming libraries that are used in the recipes in this book, in that handlers are set up and a loop is started that listens for UI events. In both cases, we need to get these event loops to work in harmony with the Jabber libraries' event loops.

Building Jabber solutions without event loops is a Sisyphean task. The very nature of Jabber communication is event-based, and it's important to understand how to use the event features of the Jabber programming libraries and also how to be able to mesh those features with similar features in other libraries and systems.

We also look at extending messages and build a mechanism that delivers RSS headlines to clients who register with that mechanism. These headlines are carried using an extended message type. In fact, the RSS Delivery Mechanism is a component. The three recipes in Chapter 8, were Jabber clients, in that they connected to the Jabber network via the Jabber Session Manager (JSM) service. We look at the differences between programming a client and programming a component in this chapter and build a complete component that can be queried and interacted with using the third of Jabber's building blocks the <iq/> element.

Happy coding!


Keyword Assistant


Many of the Jabber core and peripheral developers hang out in a conference room called jdev hosted by the Conferencing component on the Jabber server running at jabber.org. While a lot of useful information is to be gleaned from listening to what goes on in jdev, it isn't possible to be there all the time. Conversations in jdev are logged to web pages, which can be used to visit after the fact to try to catch up with things; however, this can be a hopeless task. One solution is to build a 'bot that looks for specific keywords and Uniform Resource Locators (URLs) in the conversations in jdev and send those on as Jabber messages.

This script, keyassist, connects to a Jabber server, enters a conference room, and listens to the conversations, looking for certain words and phrases to be uttered. The keyassist script is given a bit of "intelligence" in that it can be interacted with and told, while running, to watch for (or stop watching for), certain words and phrases.

The keyassist script introduces us to programmatic interaction with the Conferencing component. Before looking at the script, however, let's have a brief overview of Conferencing in general.



Conferencing


The Conferencing component at jabber.org is conference.jabber.org. Details of the component instance configuration for such a Conferencing component can be found in Section 4.10, where we see that the component exists as a shared object library connected with the library load component connection method. This component provides general conferencing facilities, oriented around a conference room and conference user model.

A Jabber user can enter (or join) a conference room, thereby becoming a conference user identified by a nickname that is chosen upon entering that room. Nicknames are generally used in conference rooms to provide a modicum of privacy it is assumed that by default you don't want to let the other conference room members know your real JID.

The Conferencing component supports two protocols for user and room interaction: a simple one that provides basic features and a more complex one that provides the basic features plus facilities such as password-protected rooms and room descriptions Groupchat and Conference.


{{Note|There is a third protocol, called Experimentaliq:groupchat, which came between the Groupchat and Conference protocols. This reflected an experimental move to add features to the basic Groupchat protocol using IQ elements, the contents of which were qualified by a namespace jabber:iq:groupchat. This protocol has been dropped, and support for it exists only in certain versions of WinJab and JIM.

</code>

Groupchat
The Groupchat protocol is the simpler of the two and provides basic
functions for entering and exiting conference rooms and choosing
nicknames. : This Groupchat protocol is known as the presence-based
protocol, because the protocol is based upon
<presence/> elements used for room entry, exit, and
nickname determination. The Groupchat protocol has a nominal version
number of 1.0.
Conference
The Conference protocol offers more advanced features than the
Groupchat protocol and makes use of two IQ namespaces:
jabber:iq:conference and jabber:iq:browse. It has a
nominal protocol version number of 1.4, which reflects the version of
the Jabber server with which it is delivered. Sometimes this version
number is referred to as 0.4, such as in the downloadable tarball and
in the value returned in response to a "version query" on the
component itself, as shown in Example 9-1. : The version number isn't
that important. The main thing to keep in mind is that the component
that is called conference.so (see the reference to the
shared object library in Section 4.10.4) supports both the
Groupchat protocol and the Conference protocol. If you come across a
shared object library called groupchat.so, this is the
original Conferencing component that was made available with Jabber
server Version 1.0. This library supports only the Groupchat protocol.

Querying the Conferencing component's version

SEND: <iq type='get' to='conference.gnu.mine.nu'> <query xmlns='jabber:iq:version'/> </iq>

RECV: <iq to='dj@gnu.mine.nu/jarl' from='conference.gnu.mine.nu' type='result'> <query xmlns='jabber:iq:version'> <name>conference</name> <version>0.4</version> <os>Linux 2.4.2-2</os> </query> </iq> In this recipe we'll be using the simpler Groupchat protocol. It's widely used and easy to understand. Example 9-2 shows a typical element log from Groupchat-based activity. It shows a user, with the JID qmacro@jabber.com, entering a room called "cellar," hosted on the conference component at conf.merlix.dyndns.org, a room that currently has two other occupants who go by the nicknames flash and roscoe. The elements are from qmacro's perspective, and are all explained following the example.


The Groupchat protocol in action The user qmacro tries to enter the conference room with the nickname flash and fails:


SEND: <presence to='cellar@conf.merlix.dyndns.org/flash'/>

RECV: <presence to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/flash' type='error'> <error code='409'>Conflict</error> </presence>

He tries again, this time with a different nickname, deejay, and is successful:


SEND: <presence to='cellar@conf.merlix.dyndns.org/deejay'/>

RECV: <presence to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/flash'/>

RECV: <presence to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/roscoe'/>

RECV: <presence to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/deejay'/>

RECV: <message to='qmacro@jabber.com/jarltk' type='groupchat' from='cellar@conf.merlix.dyndns.org'> <body>deejay has become available</body> </message>

roscoe says hi, and qmacro waves back:


RECV: <message to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/roscoe' type='groupchat' cnu=> <body>hi</body> </message>

SEND: <message to='cellar@conf.merlix.dyndns.org' type='groupchat'> <body>/me waves to everyone</body> </message>

flash sends a private message to qmacro:


RECV: <message to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/flash' type='chat'> <body>Is that you, qmacro?</body> <thread>jarl1998911094</thread> </message>

Feeling left out of the conversation, roscoe leaves the room:


RECV: <presence to='qmacro@jabber.com/jarltk' type='unavailable' from='cellar@conf.merlix.dyndns.org/roscoe'/>

RECV: <message to='qmacro@jabber.com/jarltk' type='groupchat' from='cellar@conf.merlix.dyndns.org'> <body>roscoe has left</body> </message> Let's take the stages in Example 9-2 one by one.


Failed attempt to enter room
qmacro makes an attempt to enter the room using the Groupchat
protocol. This is done by sending a directed
<presence/> element to a particular JID that represents
the room and the chosen nickname. This JID is constructed as follows:

[room name]@[conference component]/[nickname]

In this example, the conferencing component is identified with the
hostname conf.merlix.dyndns.org. qmacro's choice of
nickname is flash:

cellar@conf.merlix.dyndns.org/flash

Thus the following element is sent:

SEND: <presence to='cellar@conf.merlix.dyndns.org/flash'/>

The conference component determines that there is already someone
present in the room cellar@conf.merlix.dyndns.org with the
nickname flash, so qmacro is notified of this and
receives a directed presence with an <error/> tag:

RECV: <presence to='qmacro@jabber.com/jarltk' from='cellar@conf.merlix.dyndns.org/flash' type='error'> <error code='409'>Conflict</error> </presence>

Note that the <presence/> element has the type
error and comes from the artificial JID constructed in the
room entry attempt. The element is addressed to qmacro's real
JID, of courseqmacro@jabber.com/jarltk as otherwise it
wouldn't reach him. : The error code 409 and text "Conflict" tells
qmacro that the nickname conflicted with one already in the
room. This is a standard error code/text pair; Table 5-3 shows a
complete set of code/text pairs. : At this stage, qmacro is
not yet in the room.
Successful attempt to enter room
qmacro tries again, this time with a different nickname,
deejay:[1]

SEND: <presence to='cellar@conf.merlix.dyndns.org/deejay'/>

This time, there is no conflict
Personal tools