mack-notifier 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (288) hide show
  1. data/lib/gems.rb +13 -0
  2. data/lib/gems/tmail-1.2.3.1/ext/Makefile +20 -0
  3. data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/MANIFEST +4 -0
  4. data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/depend +1 -0
  5. data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/extconf.rb +33 -0
  6. data/lib/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.c +583 -0
  7. data/lib/gems/tmail-1.2.3.1/lib/tmail.rb +5 -0
  8. data/lib/gems/tmail-1.2.3.1/lib/tmail/Makefile +18 -0
  9. data/lib/gems/tmail-1.2.3.1/lib/tmail/address.rb +426 -0
  10. data/lib/gems/tmail-1.2.3.1/lib/tmail/attachments.rb +46 -0
  11. data/lib/gems/tmail-1.2.3.1/lib/tmail/base64.rb +46 -0
  12. data/lib/gems/tmail-1.2.3.1/lib/tmail/compat.rb +41 -0
  13. data/lib/gems/tmail-1.2.3.1/lib/tmail/config.rb +67 -0
  14. data/lib/gems/tmail-1.2.3.1/lib/tmail/core_extensions.rb +63 -0
  15. data/lib/gems/tmail-1.2.3.1/lib/tmail/encode.rb +581 -0
  16. data/lib/gems/tmail-1.2.3.1/lib/tmail/header.rb +960 -0
  17. data/lib/gems/tmail-1.2.3.1/lib/tmail/index.rb +9 -0
  18. data/lib/gems/tmail-1.2.3.1/lib/tmail/interface.rb +1125 -0
  19. data/lib/gems/tmail-1.2.3.1/lib/tmail/loader.rb +3 -0
  20. data/lib/gems/tmail-1.2.3.1/lib/tmail/mail.rb +578 -0
  21. data/lib/gems/tmail-1.2.3.1/lib/tmail/mailbox.rb +495 -0
  22. data/lib/gems/tmail-1.2.3.1/lib/tmail/main.rb +6 -0
  23. data/lib/gems/tmail-1.2.3.1/lib/tmail/mbox.rb +3 -0
  24. data/lib/gems/tmail-1.2.3.1/lib/tmail/net.rb +248 -0
  25. data/lib/gems/tmail-1.2.3.1/lib/tmail/obsolete.rb +132 -0
  26. data/lib/gems/tmail-1.2.3.1/lib/tmail/parser.rb +1476 -0
  27. data/lib/gems/tmail-1.2.3.1/lib/tmail/parser.y +381 -0
  28. data/lib/gems/tmail-1.2.3.1/lib/tmail/port.rb +379 -0
  29. data/lib/gems/tmail-1.2.3.1/lib/tmail/quoting.rb +118 -0
  30. data/lib/gems/tmail-1.2.3.1/lib/tmail/require_arch.rb +58 -0
  31. data/lib/gems/tmail-1.2.3.1/lib/tmail/scanner.rb +49 -0
  32. data/lib/gems/tmail-1.2.3.1/lib/tmail/scanner_r.rb +261 -0
  33. data/lib/gems/tmail-1.2.3.1/lib/tmail/stringio.rb +280 -0
  34. data/lib/gems/tmail-1.2.3.1/lib/tmail/utils.rb +337 -0
  35. data/lib/gems/tmail-1.2.3.1/lib/tmail/version.rb +39 -0
  36. data/lib/gems/tmail-1.2.3.1/meta/MANIFEST +128 -0
  37. data/lib/gems/tmail-1.2.3.1/meta/VERSION +1 -0
  38. data/lib/gems/tmail-1.2.3.1/meta/project.yaml +30 -0
  39. data/lib/gems/tmail-1.2.3.1/meta/unixname +1 -0
  40. data/lib/gems/validatable-1.6.7/README +118 -0
  41. data/lib/gems/validatable-1.6.7/lib/child_validation.rb +15 -0
  42. data/lib/gems/validatable-1.6.7/lib/errors.rb +74 -0
  43. data/lib/gems/validatable-1.6.7/lib/included_validation.rb +9 -0
  44. data/lib/gems/validatable-1.6.7/lib/macros.rb +283 -0
  45. data/lib/gems/validatable-1.6.7/lib/object_extension.rb +21 -0
  46. data/lib/gems/validatable-1.6.7/lib/requireable.rb +26 -0
  47. data/lib/gems/validatable-1.6.7/lib/understandable.rb +31 -0
  48. data/lib/gems/validatable-1.6.7/lib/validatable.rb +19 -0
  49. data/lib/gems/validatable-1.6.7/lib/validatable_class_methods.rb +85 -0
  50. data/lib/gems/validatable-1.6.7/lib/validatable_instance_methods.rb +106 -0
  51. data/lib/gems/validatable-1.6.7/lib/validations/validates_acceptance_of.rb +11 -0
  52. data/lib/gems/validatable-1.6.7/lib/validations/validates_confirmation_of.rb +15 -0
  53. data/lib/gems/validatable-1.6.7/lib/validations/validates_each.rb +14 -0
  54. data/lib/gems/validatable-1.6.7/lib/validations/validates_format_of.rb +13 -0
  55. data/lib/gems/validatable-1.6.7/lib/validations/validates_length_of.rb +25 -0
  56. data/lib/gems/validatable-1.6.7/lib/validations/validates_numericality_of.rb +16 -0
  57. data/lib/gems/validatable-1.6.7/lib/validations/validates_presence_of.rb +13 -0
  58. data/lib/gems/validatable-1.6.7/lib/validations/validates_true_for.rb +13 -0
  59. data/lib/gems/validatable-1.6.7/lib/validations/validation_base.rb +88 -0
  60. data/lib/gems/validatable-1.6.7/rakefile.rb +50 -0
  61. data/lib/gems/validatable-1.6.7/test/all_tests.rb +1 -0
  62. data/lib/gems/validatable-1.6.7/test/functional/validatable_test.rb +437 -0
  63. data/lib/gems/validatable-1.6.7/test/functional/validates_acceptance_of_test.rb +16 -0
  64. data/lib/gems/validatable-1.6.7/test/functional/validates_confirmation_of_test.rb +56 -0
  65. data/lib/gems/validatable-1.6.7/test/functional/validates_each_test.rb +14 -0
  66. data/lib/gems/validatable-1.6.7/test/functional/validates_format_of_test.rb +34 -0
  67. data/lib/gems/validatable-1.6.7/test/functional/validates_length_of_test.rb +64 -0
  68. data/lib/gems/validatable-1.6.7/test/functional/validates_numericality_of_test.rb +57 -0
  69. data/lib/gems/validatable-1.6.7/test/functional/validates_presence_of_test.rb +16 -0
  70. data/lib/gems/validatable-1.6.7/test/functional/validates_true_for_test.rb +27 -0
  71. data/lib/gems/validatable-1.6.7/test/test_helper.rb +33 -0
  72. data/lib/gems/validatable-1.6.7/test/unit/errors_test.rb +64 -0
  73. data/lib/gems/validatable-1.6.7/test/unit/understandable_test.rb +19 -0
  74. data/lib/gems/validatable-1.6.7/test/unit/validatable_test.rb +38 -0
  75. data/lib/gems/validatable-1.6.7/test/unit/validates_acceptance_of_test.rb +21 -0
  76. data/lib/gems/validatable-1.6.7/test/unit/validates_confirmation_of_test.rb +64 -0
  77. data/lib/gems/validatable-1.6.7/test/unit/validates_format_of_test.rb +34 -0
  78. data/lib/gems/validatable-1.6.7/test/unit/validates_length_of_test.rb +75 -0
  79. data/lib/gems/validatable-1.6.7/test/unit/validates_numericality_of_test.rb +52 -0
  80. data/lib/gems/validatable-1.6.7/test/unit/validates_presence_of_test.rb +25 -0
  81. data/lib/gems/validatable-1.6.7/test/unit/validates_true_for_test.rb +29 -0
  82. data/lib/gems/validatable-1.6.7/test/unit/validation_base_test.rb +52 -0
  83. data/lib/gems/xmpp4r-0.4/CHANGELOG +83 -0
  84. data/lib/gems/xmpp4r-0.4/COPYING +340 -0
  85. data/lib/gems/xmpp4r-0.4/LICENSE +59 -0
  86. data/lib/gems/xmpp4r-0.4/README.rdoc +110 -0
  87. data/lib/gems/xmpp4r-0.4/README_ruby19.txt +43 -0
  88. data/lib/gems/xmpp4r-0.4/Rakefile +262 -0
  89. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/README +56 -0
  90. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/adventure.rb +23 -0
  91. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/adventuremuc.rb +136 -0
  92. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/cube.xml +15 -0
  93. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/tower.xml +69 -0
  94. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/adventure/world.rb +424 -0
  95. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/fileserve.conf +11 -0
  96. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/fileserve.rb +346 -0
  97. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/getonline.rb +56 -0
  98. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/gtkmucclient.rb +315 -0
  99. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/migrate.rb +88 -0
  100. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/minimuc.rb +266 -0
  101. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/pep-aggregator/index.xsl +235 -0
  102. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/pep-aggregator/pep-aggregator.rb +147 -0
  103. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/recvfile.rb +84 -0
  104. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/rosterdiscovery.rb +129 -0
  105. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/sendfile.conf +10 -0
  106. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/sendfile.rb +72 -0
  107. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr.rb +51 -0
  108. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_jabber.rb +43 -0
  109. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_test.rb +10 -0
  110. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/versionpoll.rb +90 -0
  111. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/xmpping.rb +146 -0
  112. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/advanced/xmppingrc.sample +14 -0
  113. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/change_password.rb +41 -0
  114. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/client.rb +70 -0
  115. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/component.rb +11 -0
  116. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/echo.rb +37 -0
  117. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/jabbersend.rb +41 -0
  118. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/mass_sender.rb +68 -0
  119. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/muc_owner_config.rb +12 -0
  120. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/mucinfo.rb +41 -0
  121. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/mucsimplebot.rb +82 -0
  122. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/register.rb +42 -0
  123. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/remove_registration.rb +18 -0
  124. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/roster.rb +44 -0
  125. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/rosterprint.rb +50 -0
  126. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/rosterrename.rb +34 -0
  127. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/rosterwatch.rb +171 -0
  128. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/send_vcard.rb +67 -0
  129. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/tune_client.rb +56 -0
  130. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/tune_server.rb +58 -0
  131. data/lib/gems/xmpp4r-0.4/data/doc/xmpp4r/examples/basic/versionbot.rb +75 -0
  132. data/lib/gems/xmpp4r-0.4/lib/xmpp4r.rb +116 -0
  133. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/base64.rb +32 -0
  134. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams.rb +15 -0
  135. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb +319 -0
  136. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/ibb/base.rb +257 -0
  137. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb +31 -0
  138. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/ibb/target.rb +47 -0
  139. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/base.rb +152 -0
  140. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/initiator.rb +86 -0
  141. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/server.rb +198 -0
  142. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/socks5.rb +65 -0
  143. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb +73 -0
  144. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb.orig +62 -0
  145. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/iq/bytestreams.rb +170 -0
  146. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/iq/si.rb +206 -0
  147. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/callbacks.rb +124 -0
  148. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps.rb +1 -0
  149. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps/c.rb +53 -0
  150. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps/helper/generator.rb +160 -0
  151. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/caps/helper/helper.rb +87 -0
  152. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/client.rb +317 -0
  153. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/command/helper/responder.rb +53 -0
  154. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/command/iq/command.rb +154 -0
  155. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/component.rb +103 -0
  156. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/connection.rb +219 -0
  157. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/dataforms.rb +5 -0
  158. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/dataforms/x/data.rb +297 -0
  159. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/debuglog.rb +42 -0
  160. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/delay.rb +5 -0
  161. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/delay/x/delay.rb +99 -0
  162. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery.rb +7 -0
  163. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/helper/responder.rb +165 -0
  164. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoinfo.rb +211 -0
  165. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoitems.rb +147 -0
  166. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/errors.rb +281 -0
  167. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/feature_negotiation.rb +5 -0
  168. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/feature_negotiation/iq/feature.rb +28 -0
  169. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/framework/base.rb +55 -0
  170. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/framework/bot.rb +148 -0
  171. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/httpbinding.rb +5 -0
  172. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/httpbinding/client.rb +285 -0
  173. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/idgenerator.rb +37 -0
  174. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/iq.rb +221 -0
  175. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/jid.rb +167 -0
  176. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/message.rb +148 -0
  177. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc.rb +14 -0
  178. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/helper/mucbrowser.rb +92 -0
  179. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/helper/mucclient.rb +462 -0
  180. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/helper/simplemucclient.rb +332 -0
  181. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/iq/mucadmin.rb +23 -0
  182. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/iq/mucadminitem.rb +20 -0
  183. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/iq/mucowner.rb +15 -0
  184. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/item.rb +143 -0
  185. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/muc.rb +70 -0
  186. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuserinvite.rb +60 -0
  187. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuseritem.rb +36 -0
  188. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/presence.rb +232 -0
  189. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub.rb +8 -0
  190. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/configuration.rb +86 -0
  191. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/event.rb +49 -0
  192. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/item.rb +35 -0
  193. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/items.rb +44 -0
  194. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/node_config.rb +48 -0
  195. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/publish.rb +24 -0
  196. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/subscription.rb +62 -0
  197. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/subscription_config.rb +67 -0
  198. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/children/unsubscribe.rb +48 -0
  199. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/helper/nodebrowser.rb +130 -0
  200. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/helper/nodehelper.rb +156 -0
  201. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/helper/servicehelper.rb +417 -0
  202. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/pubsub/iq/pubsub.rb +19 -0
  203. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/query.rb +15 -0
  204. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rexmladdons.rb +151 -0
  205. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster.rb +7 -0
  206. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster/helper/roster.rb +519 -0
  207. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster/iq/roster.rb +215 -0
  208. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/roster/x/roster.rb +138 -0
  209. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc.rb +2 -0
  210. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/helper/client.rb +123 -0
  211. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/helper/server.rb +74 -0
  212. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/helper/xmlrpcaddons.rb +67 -0
  213. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/rpc/iq/rpc.rb +23 -0
  214. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/sasl.rb +237 -0
  215. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/semaphore.rb +38 -0
  216. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/stream.rb +497 -0
  217. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/streamparser.rb +77 -0
  218. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/tune.rb +2 -0
  219. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/tune/helper/helper.rb +58 -0
  220. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/tune/tune.rb +113 -0
  221. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/vcard.rb +6 -0
  222. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/vcard/helper/vcard.rb +84 -0
  223. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/vcard/iq/vcard.rb +109 -0
  224. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version.rb +7 -0
  225. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version/helper/responder.rb +72 -0
  226. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version/helper/simpleresponder.rb +44 -0
  227. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/version/iq/version.rb +105 -0
  228. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/x.rb +37 -0
  229. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xhtml.rb +1 -0
  230. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xhtml/html.rb +115 -0
  231. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xmpp4r.rb +18 -0
  232. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xmppelement.rb +168 -0
  233. data/lib/gems/xmpp4r-0.4/lib/xmpp4r/xmppstanza.rb +162 -0
  234. data/lib/gems/xmpp4r-0.4/setup.rb +1586 -0
  235. data/lib/gems/xmpp4r-0.4/test/bytestreams/tc_ibb.rb +186 -0
  236. data/lib/gems/xmpp4r-0.4/test/bytestreams/tc_socks5bytestreams.rb +113 -0
  237. data/lib/gems/xmpp4r-0.4/test/caps/tc_helper.rb +156 -0
  238. data/lib/gems/xmpp4r-0.4/test/dataforms/tc_data.rb +81 -0
  239. data/lib/gems/xmpp4r-0.4/test/delay/tc_xdelay.rb +51 -0
  240. data/lib/gems/xmpp4r-0.4/test/discovery/tc_responder.rb +91 -0
  241. data/lib/gems/xmpp4r-0.4/test/lib/assert_equal_xml.rb +14 -0
  242. data/lib/gems/xmpp4r-0.4/test/lib/clienttester.rb +120 -0
  243. data/lib/gems/xmpp4r-0.4/test/muc/tc_muc_mucclient.rb +830 -0
  244. data/lib/gems/xmpp4r-0.4/test/muc/tc_muc_simplemucclient.rb +114 -0
  245. data/lib/gems/xmpp4r-0.4/test/muc/tc_mucowner.rb +50 -0
  246. data/lib/gems/xmpp4r-0.4/test/pubsub/tc_helper.rb +662 -0
  247. data/lib/gems/xmpp4r-0.4/test/pubsub/tc_nodeconfig.rb +54 -0
  248. data/lib/gems/xmpp4r-0.4/test/pubsub/tc_subscriptionconfig.rb +41 -0
  249. data/lib/gems/xmpp4r-0.4/test/roster/tc_helper.rb +514 -0
  250. data/lib/gems/xmpp4r-0.4/test/roster/tc_iqqueryroster.rb +173 -0
  251. data/lib/gems/xmpp4r-0.4/test/roster/tc_xroster.rb +73 -0
  252. data/lib/gems/xmpp4r-0.4/test/rpc/tc_helper.rb +96 -0
  253. data/lib/gems/xmpp4r-0.4/test/tc_callbacks.rb +129 -0
  254. data/lib/gems/xmpp4r-0.4/test/tc_class_names.rb +146 -0
  255. data/lib/gems/xmpp4r-0.4/test/tc_client.rb +30 -0
  256. data/lib/gems/xmpp4r-0.4/test/tc_errors.rb +146 -0
  257. data/lib/gems/xmpp4r-0.4/test/tc_idgenerator.rb +30 -0
  258. data/lib/gems/xmpp4r-0.4/test/tc_iq.rb +113 -0
  259. data/lib/gems/xmpp4r-0.4/test/tc_iqquery.rb +31 -0
  260. data/lib/gems/xmpp4r-0.4/test/tc_jid.rb +204 -0
  261. data/lib/gems/xmpp4r-0.4/test/tc_message.rb +116 -0
  262. data/lib/gems/xmpp4r-0.4/test/tc_presence.rb +150 -0
  263. data/lib/gems/xmpp4r-0.4/test/tc_rexml.rb +139 -0
  264. data/lib/gems/xmpp4r-0.4/test/tc_stream.rb +229 -0
  265. data/lib/gems/xmpp4r-0.4/test/tc_streamComponent.rb +95 -0
  266. data/lib/gems/xmpp4r-0.4/test/tc_streamError.rb +131 -0
  267. data/lib/gems/xmpp4r-0.4/test/tc_streamSend.rb +59 -0
  268. data/lib/gems/xmpp4r-0.4/test/tc_streamparser.rb +112 -0
  269. data/lib/gems/xmpp4r-0.4/test/tc_xmppstanza.rb +135 -0
  270. data/lib/gems/xmpp4r-0.4/test/ts_xmpp4r.rb +53 -0
  271. data/lib/gems/xmpp4r-0.4/test/tune/tc_helper_recv.rb +84 -0
  272. data/lib/gems/xmpp4r-0.4/test/tune/tc_helper_send.rb +74 -0
  273. data/lib/gems/xmpp4r-0.4/test/tune/tc_tune.rb +79 -0
  274. data/lib/gems/xmpp4r-0.4/test/vcard/tc_helper.rb +49 -0
  275. data/lib/gems/xmpp4r-0.4/test/vcard/tc_iqvcard.rb +62 -0
  276. data/lib/gems/xmpp4r-0.4/test/version/tc_helper.rb +60 -0
  277. data/lib/gems/xmpp4r-0.4/test/version/tc_iqqueryversion.rb +97 -0
  278. data/lib/gems/xmpp4r-0.4/test/xhtml/tc_html.rb +41 -0
  279. data/lib/gems/xmpp4r-0.4/tools/gen_requires.bash +31 -0
  280. data/lib/gems/xmpp4r-0.4/tools/xmpp4r-gemspec-test.rb +11 -0
  281. data/lib/gems/xmpp4r-0.4/xmpp4r.gemspec +291 -0
  282. data/lib/gems/xmpp4r-simple-0.8.8/CHANGELOG +73 -0
  283. data/lib/gems/xmpp4r-simple-0.8.8/COPYING +281 -0
  284. data/lib/gems/xmpp4r-simple-0.8.8/README +59 -0
  285. data/lib/gems/xmpp4r-simple-0.8.8/lib/xmpp4r-simple.rb +492 -0
  286. data/lib/gems/xmpp4r-simple-0.8.8/test/test_xmpp4r_simple.rb +242 -0
  287. data/lib/mack-notifier.rb +1 -3
  288. metadata +398 -46
@@ -0,0 +1,88 @@
1
+ #!/usr/bin/ruby
2
+
3
+ # This script can be used to migrate from one jabber account to another
4
+
5
+ $:.unshift '../../../../../lib'
6
+
7
+ require 'optparse'
8
+ require 'xmpp4r'
9
+ include Jabber
10
+
11
+ jidfrom = JID.new('lucas@linux.ensimag.fr/JabberMigrate')
12
+ pwfrom = 'z'
13
+ jidto = JID.new('lucas@nussbaum.fr/JabberMigrate')
14
+ pwto = 'z'
15
+
16
+ BOTHOLD = "Hi, you are subscribed to my presence. I just changed my JID. The new one is #{jidto.strip}. You might want to update your roster. Thank you, and sorry for the inconvenience !"
17
+ BOTHNEW = "Hi, you are subscribed to the presence of my previous JID : #{jidfrom.strip}. I just changed my JID, and this is the new one. You might want to update your roster. Thank you, and sorry for the inconvenience !"
18
+
19
+ clfrom = Client.new(jidfrom)
20
+ clfrom.connect
21
+ clfrom.auth(pwfrom)
22
+ clto = Client.new(jidto)
23
+ clto.connect
24
+ clto.auth(pwto)
25
+ #clfrom.send(Presence.new)
26
+ #clto.send(Presence.new)
27
+ clfrom.send(Iq.new_rosterget)
28
+ exit = false
29
+ clfrom.add_iq_callback { |i|
30
+ if i.type == :result and i.queryns == 'jabber:iq:roster'
31
+ i.query.each_element do |e|
32
+ e.text = ''
33
+ jid = e.attribute('jid')
34
+ name = e.attribute('name')
35
+ subscription = e.attribute('subscription')
36
+ ask = e.attribute('ask')
37
+ jid &&= jid.value
38
+ next if jid =~ /@(icq|msn|aim|yahoo).blop.info/
39
+ # next if jid !~ /lucas@im.apinc.org/
40
+ puts "Processing #{e.to_s}"
41
+ # Jabber::debug = true
42
+ name &&= name.value
43
+ subscription &&= subscription.value
44
+ ask &&= ask.value
45
+ puts subscription
46
+ case subscription
47
+ when 'from'
48
+ # il veut me voir, je veux pas le voir.
49
+ # envoi unsubscribed
50
+ clfrom.send(Presence.new.set_to(jid).set_type(:unsubscribed))
51
+ # envoi message d'info OLD & NEW
52
+ clfrom.send(Message.new(jid, BOTHOLD).set_type(:chat))
53
+ clto.send(Message.new(jid, BOTHNEW).set_type(:chat))
54
+ when 'to'
55
+ # je veux le voir, il veut pas me voir
56
+ # envoi unsubscribe
57
+ clfrom.send(Presence.new.set_to(jid).set_type(:unsubscribe))
58
+ # envoi subscribe avec message
59
+ pres = Presence.new.set_to(jid).set_type(:subscribe)
60
+ pres.add(Element.new('status').add_text("Hi, I was previously subscribed to your presence with my JID #{jidfrom.strip}. Can I re-subscribe to your presence ? Thank you."))
61
+ clto.send(pres)
62
+ when 'both'
63
+ # envoi unsubscribed
64
+ clfrom.send(Presence.new.set_to(jid).set_type(:unsubscribed))
65
+ # envoi unsubscribe
66
+ clfrom.send(Presence.new.set_to(jid).set_type(:unsubscribe))
67
+ # update roster
68
+ iq = Iq.new_rosterset
69
+ e.delete_attribute('ask')
70
+ e.delete_attribute('subscription')
71
+ iq.query.add_element(e)
72
+ clto.send(iq)
73
+ # envoi message d'info OLD & NEW
74
+ clfrom.send(Message.new(jid, BOTHOLD).set_type(:chat))
75
+ pres = Presence.new.set_to(jid).set_type(:subscribe)
76
+ pres.add(Element.new('status').add_text("Hi, I was previously subscribed to your presence with my JID #{jidfrom.strip}. Can I re-subscribe to your presence ? Thank you."))
77
+ clto.send(pres)
78
+ clto.send(Message.new(jid, BOTHNEW).set_type(:chat))
79
+ end
80
+ end
81
+ end
82
+ }
83
+ while not exit
84
+ clfrom.process
85
+ clto.process
86
+ end
87
+ clfrom.close
88
+ clto.close
@@ -0,0 +1,266 @@
1
+ #!/usr/bin/ruby
2
+
3
+ $:.unshift '../../../../../lib'
4
+
5
+ require 'xmpp4r'
6
+ require 'xmpp4r/iq/query/discoinfo'
7
+ require 'xmpp4r/iq/query/discoitems'
8
+ require 'xmpp4r/x/muc'
9
+
10
+
11
+ #Jabber::debug = true
12
+
13
+ class Room
14
+ class RoomException < Exception
15
+ attr_reader :error
16
+ def initialize(error, msg)
17
+ @error = Jabber::ErrorResponse.new(error, msg)
18
+ end
19
+ end
20
+
21
+ def initialize(stream, name)
22
+ @users = {} # nick => jid
23
+ @stream = stream
24
+ @name = name
25
+ end
26
+
27
+ def num_users
28
+ @users.size
29
+ end
30
+
31
+ def each_user(&block)
32
+ @users.each { |n,j| yield(n, j) }
33
+ end
34
+
35
+ def handle_message(msg)
36
+ origin = msg.from
37
+ msg.from = nil
38
+ @users.each { |nick,jid|
39
+ if jid == origin
40
+ msg.from = Jabber::JID.new(@name.node, @name.domain, nick)
41
+ end
42
+ }
43
+ unless msg.from.nil?
44
+ broadcast(msg)
45
+ end
46
+
47
+ true
48
+ end
49
+
50
+ def handle_presence(pres)
51
+ reason = nil
52
+
53
+ # Check if nick already registered
54
+ @users.each { |nick,jid|
55
+ if pres.from != jid && pres.to.resource == nick
56
+ puts "#{pres.from} tried to use already active #{pres.to}"
57
+ raise RoomException.new('conflict', "Nick already used")
58
+ end
59
+ }
60
+ # New user?
61
+ unless @users.has_key?(pres.to.resource)
62
+ # Check nick length
63
+ if pres.to.resource.size < 1
64
+ puts "#{pres.from} tried to use empty nick"
65
+ raise RoomException.new('not-acceptable', "Nick must contain characters")
66
+ end
67
+
68
+ # Push user-list
69
+ userinfo = Jabber::Presence.import(pres)
70
+ userinfo.to = pres.from
71
+ userinfo.add(Jabber::XMUCUser.new).add(Jabber::XMUCUserItem.new(:none, :participant))
72
+ print "Sending all users for #{pres.to} to #{pres.from}:"
73
+ @users.each { |nick,jid|
74
+ userinfo.from = Jabber::JID.new(@name.node, @name.domain, nick)
75
+ print " #{nick} (#{jid})"
76
+ @stream.send(userinfo)
77
+ }
78
+ puts " Ok"
79
+
80
+ # Add the new user
81
+ puts "Adding #{pres.from} as #{pres.to}"
82
+ @users[pres.to.resource] = pres.from
83
+
84
+ send_message("#{pres.to.resource} joins #{@name.node}")
85
+ reason = "#{pres.to.resource} joins #{@name.node}"
86
+ end
87
+
88
+ # Remove dead rats
89
+ if pres.type == :error || pres.type == :unavailable
90
+ was_nick = nil
91
+ @users.delete_if { |nick,jid|
92
+ was_nick = nick
93
+ jid == pres.from
94
+ }
95
+ unless was_nick.nil?
96
+ send_message("#{was_nick} has left #{@name.node}")
97
+ reason = "#{was_nick} has left #{@name.node}"
98
+ end
99
+ end
100
+
101
+ # Advertise users presence to all
102
+ puts "Advertising user to all"
103
+ x = Jabber::XMUCUserItem.new(:none, :participant, pres.from)
104
+ x.reason = reason
105
+ pres.add(Jabber::XMUCUser.new).add(x)
106
+ pres.from = pres.to
107
+ broadcast(pres)
108
+ end
109
+
110
+ def send_message(body)
111
+ msg = Jabber::Message.new
112
+ msg.from = Jabber::JID.new(@name.node, @name.domain, "")
113
+ msg.type = :groupchat
114
+ msg.body = body
115
+ broadcast(msg)
116
+ end
117
+
118
+ def broadcast(stanza)
119
+ x = stanza.class::import(stanza)
120
+ @users.each { |nick,jid|
121
+ x.to = jid
122
+ @stream.send(x)
123
+ }
124
+ end
125
+ end
126
+
127
+ class MUC
128
+ def initialize(jid, secret, addr, port=5347)
129
+ @rooms = {}
130
+
131
+ @component = Jabber::Component.new(jid, addr, port)
132
+ @component.connect
133
+ @component.auth(secret)
134
+
135
+ @component.add_iq_callback { |iq|
136
+ handle_iq(iq)
137
+ }
138
+ @component.add_presence_callback { |pres|
139
+ handle_presence(pres)
140
+ }
141
+ @component.add_message_callback { |msg|
142
+ handle_message(msg)
143
+ }
144
+ end
145
+
146
+ def handle_iq(iq)
147
+ puts "#{iq.from} #{iq.queryns} to #{iq.to}"
148
+ if iq.query.kind_of?(Jabber::IqQueryDiscoInfo)
149
+ handle_disco_info(iq)
150
+ true
151
+ elsif iq.query.kind_of?(Jabber::IqQueryDiscoItems)
152
+ handle_disco_items(iq)
153
+ true
154
+ else
155
+ false
156
+ end
157
+ end
158
+
159
+ def handle_presence(pres)
160
+ room = nil
161
+ @rooms.each { |name,r|
162
+ room = r if name == pres.to.strip
163
+ }
164
+
165
+ if room.nil? && pres.type.nil? && (pres.to.node.to_s != '')
166
+ room = Room.new(@component, pres.to.strip)
167
+ @rooms[pres.to.strip] = room
168
+ elsif room.nil? && pres.type != :error
169
+ pres.to, pres.from = pres.from, pres.to
170
+ pres.type = :error
171
+ pres.add(Jabber::ErrorResponse.new('item-not-found'))
172
+ @component.send(pres)
173
+ return(true)
174
+ end
175
+
176
+ begin
177
+ room.handle_presence(pres)
178
+ rescue Room::RoomException => e
179
+ pres.to, pres.from = pres.from, pres.to
180
+ pres.type = :error
181
+ pres.add(e.error)
182
+ @component.send(pres)
183
+ return(true)
184
+ end
185
+ return(false)
186
+ end
187
+
188
+ def handle_message(msg)
189
+ puts "Message from #{msg.from} to #{msg.to} (#{msg.type}): #{msg.body.inspect}"
190
+ return if msg.type == :error
191
+
192
+ room = @rooms[msg.to]
193
+ unless room.nil?
194
+ room.handle_message(msg)
195
+ else
196
+ msg.to, msg.from = msg.from, msg.to
197
+ msg.type = :error
198
+ msg.add(Jabber::ErrorResponse.new('item-not-found', 'The chatroom you are trying to reach is currently not available.'))
199
+ @component.send(msg)
200
+ end
201
+ end
202
+
203
+ def handle_disco_info(iq)
204
+ if (iq.type == :get)
205
+ iq.type = :result
206
+ iq.query = Jabber::IqQueryDiscoInfo.new
207
+ if iq.to.node == nil
208
+ iq.query.add(Jabber::DiscoIdentity.new('conference', 'Minimal Multi-User Chat', 'text'))
209
+ else
210
+ room = @rooms[iq.to]
211
+ if room.nil?
212
+ iq.type = :error
213
+ iq.add_element(Jabber::ErrorResponse.new('item-not-found'))
214
+ else
215
+ iq.query.add(Jabber::DiscoIdentity.new('conference', "#{iq.to.node} (#{room.num_users})", 'text'))
216
+ end
217
+ end
218
+ [Jabber::IqQueryDiscoInfo.new.namespace,
219
+ Jabber::IqQueryDiscoItems.new.namespace,
220
+ Jabber::XMUC.new.namespace,
221
+ Jabber::XMUCUser.new.namespace].each { |ns|
222
+ iq.query.add(Jabber::DiscoFeature.new(ns))
223
+ }
224
+ else
225
+ iq.type = :error
226
+ iq.add_element(Jabber::ErrorResponse.new('bad-request'))
227
+ end
228
+ iq.to, iq.from = iq.from, iq.to
229
+ @component.send(iq)
230
+ end
231
+
232
+ def handle_disco_items(iq)
233
+ if (iq.type == :get)
234
+ iq.type = :result
235
+ if iq.to.node == nil
236
+ @rooms.each { |name,room|
237
+ iq.query.add(Jabber::DiscoItem.new(Jabber::JID.new(name, @component.jid.domain), name))
238
+ }
239
+ elsif iq.to.resource == nil
240
+ room = @rooms[iq.to.strip]
241
+ unless room.nil?
242
+ room.each_user { |nick,jid|
243
+ iq.query.add(Jabber::DiscoItem.new(jid, nick))
244
+ }
245
+ else
246
+ iq.type = :error
247
+ iq.add_element(Jabber::ErrorResponse.new('item-not-found'))
248
+ end
249
+ end
250
+ else
251
+ iq.type = :error
252
+ iq.add_element(Jabber::ErrorResponse.new('bad-request'))
253
+ end
254
+ iq.to, iq.from = iq.from, iq.to
255
+ @component.send(iq)
256
+ end
257
+ end
258
+
259
+ if ARGV.size != 3
260
+ puts "Syntax: ./minimuc.rb <JID> <Password> <Host>"
261
+ puts "Example: ./minimuc.rb conference.xmpp4r.mil minimuc localhost"
262
+ exit
263
+ end
264
+
265
+ muc = MUC.new(Jabber::JID.new(ARGV[0]), ARGV[1], ARGV[2])
266
+ Thread.stop
@@ -0,0 +1,235 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <xsl:stylesheet version="1.0"
3
+ xmlns="http://www.w3.org/1999/xhtml"
4
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
+ xmlns:j="jabber:client"
6
+ xmlns:p="http://jabber.org/protocol/pubsub"
7
+ xmlns:tune="http://jabber.org/protocol/tune"
8
+ xmlns:mood="http://jabber.org/protocol/mood"
9
+ xmlns:activity="http://jabber.org/protocol/activity"
10
+ xmlns:chatting="http://www.xmpp.org/extensions/xep-0194.html#ns"
11
+ xmlns:browsing="http://www.xmpp.org/extensions/xep-0195.html#ns"
12
+ xmlns:gaming="http://www.xmpp.org/extensions/xep-0196.html#ns"
13
+ xmlns:watching="http://www.xmpp.org/extensions/xep-0197.html#ns"
14
+ exclude-result-prefixes="xsl j p
15
+ tune mood activity chatting
16
+ browsing gaming watching">
17
+
18
+ <xsl:output method="xml"
19
+ version="1.0"
20
+ encoding="utf-8"
21
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
22
+ doctype-system="DTD/xhtml1-strict.dtd"
23
+ indent="yes"/>
24
+
25
+ <xsl:template match="/items">
26
+ <html>
27
+ <head>
28
+ <title>PEP aggregator</title>
29
+ <style type="text/css">
30
+ <![CDATA[
31
+ body { font-family: sans-serif; }
32
+ h1 { text-align: center; font-weight: bold; font-family: fantasy;
33
+ font-style: italic; }
34
+ h2 { margin-top: 2em; padding: 0.5em 8em; color: black; background:
35
+ #bfbfff; }
36
+ h2 a { color: black; font-decoration: none; }
37
+ p { margin: 0.5em 4em; }
38
+ p.footnote { margin-top: 16em; font-size: 90%; }
39
+ img.avatar { max-width: 10%; clear: left; float: left; padding: 4px; }
40
+ ]]>
41
+ </style>
42
+ </head>
43
+
44
+ <body>
45
+ <h1>PEP aggregator</h1>
46
+
47
+ <xsl:apply-templates/>
48
+
49
+ <p class="footnote">
50
+ This aggregator consumes events by
51
+ the <a href="http://www.xmpp.org/">XMPP</a>
52
+ extension <a href="http://www.xmpp.org/extensions/xep-0163.html">Personal
53
+ Eventing via Pubsub</a>. If you want to participate you'll
54
+ need a PEP-enabled server
55
+ (<a href="http://www.ejabberd.im/">ejabberd</a>), client
56
+ (<a href="http://www.gajim.org/">Gajim</a>
57
+ or <a href="http://psi-im.org/">Psi</a>)
58
+ and <a href="xmpp:{@j:to}?subscribe"><xsl:value-of select="@j:to"/></a>
59
+ in your Jabber roster. The source code can
60
+ be <a href="http://svn.gna.org/viewcvs/xmpp4r/trunk/xmpp4r/data/doc/xmpp4r/examples/advanced/pep-aggregator/">viewed
61
+ online</a>.
62
+ </p>
63
+ </body>
64
+ </html>
65
+ </xsl:template>
66
+
67
+ <xsl:template match="p:item[@j:from]">
68
+ <xsl:if test="@j:has-avatar = 'true'">
69
+ <img class="avatar" src="/avatar/{@j:from}"/>
70
+ </xsl:if>
71
+
72
+ <h2>
73
+ <a href="xmpp:{@j:from}">
74
+ <xsl:value-of select="@j:from-name"/>
75
+ </a>
76
+ </h2>
77
+
78
+ <xsl:apply-templates/>
79
+
80
+ </xsl:template>
81
+
82
+ <xsl:template match="tune:tune[count(*) = 0]">
83
+ <p>Stopped listening</p>
84
+ </xsl:template>
85
+
86
+ <xsl:template match="tune:tune">
87
+ <p>
88
+ ♫ Listening
89
+ <xsl:value-of select="tune:artist"/>
90
+
91
+ <xsl:value-of select="tune:source"/>
92
+
93
+ <xsl:value-of select="tune:title"/>
94
+ </p>
95
+ </xsl:template>
96
+
97
+ <xsl:template match="mood:mood">
98
+ <p>
99
+ ☻ Feeling
100
+ <xsl:text> </xsl:text>
101
+ <xsl:value-of select="name(*[1])"/>
102
+ <xsl:if test="*[1]/*[1]">
103
+ <xsl:text> </xsl:text>
104
+ (<xsl:value-of select="name(*[1]/*[1])"/>)
105
+ </xsl:if>
106
+ <xsl:if test="mood:text">
107
+ <xsl:text> </xsl:text>
108
+ <i><xsl:value-of select="mood:text"/></i>
109
+ </xsl:if>
110
+ </p>
111
+ </xsl:template>
112
+
113
+ <xsl:template match="activity:activity">
114
+ <p>
115
+ ↻ Doing
116
+ <xsl:text> </xsl:text>
117
+ <xsl:value-of select="name(*[1])"/>
118
+ <xsl:if test="*[1]/*[1]">
119
+ <xsl:text> </xsl:text>
120
+ (<xsl:value-of select="name(*[1]/*[1])"/>)
121
+ </xsl:if>
122
+ <xsl:if test="activity:text">
123
+ <xsl:text> </xsl:text>
124
+ <i><xsl:value-of select="activity:text"/></i>
125
+ </xsl:if>
126
+ </p>
127
+ </xsl:template>
128
+
129
+ <xsl:template match="chatting:room[count(*) = 0]">
130
+ <p>Stopped chatting</p>
131
+ </xsl:template>
132
+
133
+ <xsl:template match="chatting:room">
134
+ <p>
135
+ Chatting at
136
+ <a href="{chatting:uri}">
137
+ <xsl:choose>
138
+ <xsl:when test="chatting:name"><xsl:value-of select="chatting:name"/></xsl:when>
139
+ <xsl:otherwise><xsl:value-of select="chatting:uri"/></xsl:otherwise>
140
+ </xsl:choose>
141
+ </a>
142
+ <xsl:if test="chatting:topic">
143
+ <i><xsl:value-of select="chatting:topic"/></i>
144
+ </xsl:if>
145
+ </p>
146
+ </xsl:template>
147
+
148
+ <xsl:template match="browsing:page[count(*) = 0]">
149
+ <p>Stopped browsing</p>
150
+ </xsl:template>
151
+
152
+ <xsl:template match="browsing:page">
153
+ <p>
154
+ Browsing
155
+ <a href="{browsing:uri}">
156
+ <xsl:choose>
157
+ <xsl:when test="browsing:title"><xsl:value-of select="browsing:title"/></xsl:when>
158
+ <xsl:otherwise><xsl:value-of select="browsing:uri"/></xsl:otherwise>
159
+ </xsl:choose>
160
+ </a>
161
+ <xsl:if test="browsing:description">
162
+ <i><xsl:value-of select="browsing:description"/></i>
163
+ </xsl:if>
164
+ </p>
165
+ </xsl:template>
166
+
167
+ <xsl:template match="gaming:game[count(*) = 0]">
168
+ <p>Stopped gaming</p>
169
+ </xsl:template>
170
+
171
+ <xsl:template match="gaming:game">
172
+ <p>
173
+
174
+ Playing
175
+ <xsl:choose>
176
+ <xsl:when test="gaming:uri">
177
+ <a href="{gaming:uri}">
178
+ <xsl:value-of select="gaming:name"/>
179
+ </a>
180
+ </xsl:when>
181
+ <xsl:otherwise>
182
+ <xsl:value-of select="gaming:name"/>
183
+ </xsl:otherwise>
184
+ </xsl:choose>
185
+
186
+ <xsl:if test="gaming:character_name">
187
+ as
188
+ <xsl:choose>
189
+ <xsl:when test="gaming:character_profile">
190
+ <a href="{gaming:character_profile}">
191
+ <xsl:value-of select="gaming:character_name"/>
192
+ </a>
193
+ </xsl:when>
194
+ <xsl:otherwise>
195
+ <xsl:value-of select="gaming:character_name"/>
196
+ </xsl:otherwise>
197
+ </xsl:choose>
198
+ </xsl:if>
199
+
200
+ <xsl:if test="gaming:server_address">
201
+ on
202
+ <a href="{gaming:server_address}">
203
+ <xsl:choose>
204
+ <xsl:when test="gaming:server_name"><xsl:value-of select="gaming:server_name"/></xsl:when>
205
+ <xsl:otherwise><xsl:value-of select="gaming:server_name"/></xsl:otherwise>
206
+ </xsl:choose>
207
+ </a>
208
+ </xsl:if>
209
+
210
+ </p>
211
+ </xsl:template>
212
+
213
+ <xsl:template match="watching:video[count(*) = 0]">
214
+ <p>Stopped watching a video</p>
215
+ </xsl:template>
216
+
217
+ <xsl:template match="watching:video">
218
+ <xsl:if test="watching:program_name">
219
+ <p>
220
+ ✇ Watching
221
+ <xsl:choose>
222
+ <xsl:when test="watching:uri">
223
+ <a href="{watching:uri}">
224
+ <xsl:value-of select="watching:program_name"/>
225
+ </a>
226
+ </xsl:when>
227
+ <xsl:otherwise>
228
+ <xsl:value-of select="watching:program_name"/>
229
+ </xsl:otherwise>
230
+ </xsl:choose>
231
+ </p>
232
+ </xsl:if>
233
+ </xsl:template>
234
+
235
+ </xsl:stylesheet>