Commit Graph

141 Commits

Author SHA1 Message Date
David Rousselie 00b0c9de5a Apply all handlers by default
For registered behaviors, by default, all handlers are called.
For message handlers, only the first is applied.

darcs-hash:20070605191814-86b55-57a0b315eacd179e9024d97838db5a6fcda2af15.gz
2007-06-05 21:18:14 +02:00
David Rousselie 940f8a83de Code style cleanup
darcs-hash:20070605190158-86b55-3d4313f040b985814572e0196fac9b4476c3daaf.gz
2007-06-05 21:01:58 +02:00
David Rousselie 5237aa1868 Some code style cleanup
darcs-hash:20070531171427-86b55-e463f2d01197ee792909f41c6e71205624de1676.gz
2007-05-31 19:14:27 +02:00
David Rousselie 399109270d Registered Handler exception sent has an error message
darcs-hash:20070530162504-86b55-1f05922de23fc96db715016c3b183dfdcecdb53f.gz
2007-05-30 18:25:04 +02:00
David Rousselie 62cca9bbc9 Some code style cleanup
darcs-hash:20070530062346-86b55-64349462a3967c5f804d6d39b59276428a15477e.gz
2007-05-30 08:23:46 +02:00
David Rousselie 78ab52627f Add plugable handlers and define default handlers
* pluggable handlers for presence_available, presence_unavailable, presence_subscribe, presence_subscribed, message
* define default handlers behavior DefaultSubscribeHandler, DefaultUnsubscribeHandler, DefaultPresenceHandler

darcs-hash:20070523204935-86b55-c45e0631b5694d35d8aac606c1d1f5772bc5f15a.gz
2007-05-23 22:49:35 +02:00
David Rousselie 8b9858a5bf Put message handlers in a class
darcs-hash:20070522172311-86b55-7109d61ce39481f12e1a02fe337a4b2bc92d8fdf.gz
2007-05-22 19:23:11 +02:00
David Rousselie 5896ca069c Make message_handler more general
* message filter now return an account list to pass to the associated message handler

darcs-hash:20070522162247-86b55-5ec9aaa8ed3e917727fca0947c79277d8510067d.gz
2007-05-22 18:22:47 +02:00
David Rousselie 84525604eb Message handler can now handle multiple message types
* each message type to be handle must add a filter function and a handler function tuple to the msg_handlers
attribut of JCLComponent

darcs-hash:20070522060000-86b55-0e8fa4afa2d57743d5cabe1a46cc3d24cc62b294.gz
2007-05-22 08:00:00 +02:00
David Rousselie 4bb6d27c33 Create component runner
- JCLRunner handle configuration file and command line arguments to setup a JCL component

darcs-hash:20070518143255-86b55-f5dfd32edeb34c9d30b85a1dd05a12c6a8423806.gz
2007-05-18 16:32:55 +02:00
David Rousselie 1cab0da48c correct russian language loading (Strings must be unicode)
darcs-hash:20070517125945-86b55-3ca701ae4502acefbcdb47f2591fdcbcc9244267.gz
2007-05-17 14:59:45 +02:00
David Rousselie fa6b508a96 Imported russian translation from jmc-0.2 (need to be updated)
darcs-hash:20070517123910-86b55-4a6115877217edc0ad63b1c359ff8d5710af34ea.gz
2007-05-17 14:39:10 +02:00
David Rousselie b8942af6b5 i18n and i18n testing
darcs-hash:20070516154706-86b55-26ff27dcec5af50f9024791cebfccf4d07166618.gz
2007-05-16 17:47:06 +02:00
David Rousselie 770b8a4de6 Change message when updating account
darcs-hash:20070515161632-86b55-64de8853e45e0dbcbc6f0f9d4e731a4f5848a134.gz
2007-05-15 18:16:32 +02:00
David Rousselie 205add7991 fix send_stanzas when no stanza given
darcs-hash:20070515155703-86b55-e76575f68f0c13fea7de6c7585ad21d12b4c630b.gz
2007-05-15 17:57:03 +02:00
David Rousselie fc7fe41947 Move message format from Feeder to Sender class
darcs-hash:20070515152352-86b55-d8cc1aeec67125efc83681fe0bfec4b12c5fbf3b.gz
2007-05-15 17:23:52 +02:00
David Rousselie 140aefdd3c make PresenceAccount tests inheritable
darcs-hash:20070513170643-86b55-46d262b56085ce15320bd8bf765b8200bc97e852.gz
2007-05-13 19:06:43 +02:00
David Rousselie 74aa7b02df Move unit tests in src module hierarchy
- Python cannot merge a same module from to different folder so merge 'src' and 'tests' folder into one.

darcs-hash:20070513141150-86b55-892f79fdc18fb69f5b8513ea7a31b01f8eb68f0e.gz
2007-05-13 16:11:50 +02:00
David Rousselie 046bade075 Make PresenceAccount_TestCase inheritable
- PresenceAccount subclasses can reuse PresenceAccount_TestCase tests

darcs-hash:20070509161025-86b55-4a6cfb08b0de6dc7e77b63aee4482712da75743b.gz
2007-05-09 18:10:25 +02:00
David Rousselie 24b54799bf setuptools integration
darcs-hash:20070508143542-86b55-a0a3ecad6c4dad7dc0e605db86cac9bbd1133f9f.gz
2007-05-08 16:35:42 +02:00
David Rousselie 47aed647a2 Refactor probe sending
darcs-hash:20070408175758-86b55-933dcd6fc56871993bd9b8dfecd98b61d68db070.gz
2007-04-08 19:57:58 +02:00
David Rousselie ca0d636b33 Finish AccountManager refactoring
darcs-hash:20070405161831-86b55-592fee80ee5682e6fa13ac7a96432e362bec186a.gz
2007-04-05 18:18:31 +02:00
David Rousselie 5fb853bdfe Move presence_available handlers to AccountManager
darcs-hash:20070329162807-86b55-2a353558d6a26e686454022c092d4d161a91d786.gz
2007-03-29 18:28:07 +02:00
David Rousselie 863da17c6f Move set_register handlers to AccountManager
darcs-hash:20070329160047-86b55-476be92b2db0b0b144a27d44111478b880adfa85.gz
2007-03-29 18:00:47 +02:00
David Rousselie 77eaa91405 Move get_register handlers in AccountManager
darcs-hash:20070329051608-86b55-adccf703bd3fe6efa583c6e8d3dcadf60f0168b0.gz
2007-03-29 07:16:08 +02:00
David Rousselie 516bb75a77 Move disco_get_info and disco_get_items to AccountManager
discovery get_info and get_items handler now use a generic
method "apply_behavior" to determine receiver (main component,
account type node or account).
AccountManager split previous handler in a more testable way
(test returned objects instead of XML).

darcs-hash:20070327163756-86b55-3932d4b1f59fb20d6aa8e096cdf06049095a4c2b.gz
2007-03-27 18:37:56 +02:00
David Rousselie 0fad164e57 Correct get_register_fields inheritance usage
PresenceAccount subclasses called PresenceAccount.get_register_fields but
the "cls" parameter was always PresenceAccount. Now subclasses pass a "real_class"
parameter which contains the class type on which get_register_fields was called.

darcs-hash:20070325122936-86b55-fb6db014fbdeaa2fa1a423b935df5e72ffe6a20a.gz
2007-03-25 14:29:36 +02:00
David Rousselie 289e1f2c36 Registration form fields naming updated
darcs-hash:20070324105551-86b55-51c4f11ff6d916a867969c38090dbaad30e597ff.gz
2007-03-24 11:55:51 +01:00
David Rousselie 101e74f6c7 account default_func and post_func refactoring
for registration fields, default_func now returns default_value
and post_func include test for mandatory fields.

darcs-hash:20070322161501-86b55-75b6d57fef3ba0df6c6c80a487c9afcdab2d40c3.gz
2007-03-22 17:15:01 +01:00
David Rousselie 6753545187 Test DiscoIdentity component name
darcs-hash:20070321172639-86b55-5b6da4fc5c905e26b60f414012590ee3a70f2d66.gz
2007-03-21 18:26:39 +01:00
David Rousselie 2791e3cd61 Better handlers exceptions handling
darcs-hash:20070321072742-86b55-56b0ae25d0a3e8835100a6b570aeb271ad912fe7.gz
2007-03-21 08:27:42 +01:00
David Rousselie 244a82f38a Feeder component pass itself to Feeder and Sender classes
darcs-hash:20070320172708-86b55-a27ecfede6e5da36ef197438587584c59dc0a1d7.gz
2007-03-20 18:27:08 +01:00
David Rousselie 76cf0cfa9d modifiable component default lang attribut
JCLComponent constructor takes an optional lang parameter to override default
jcl.lang.Lang class.
Typical usage is in derived component classes which has a derived (from
jcl.lang.Lang) Lang class.

darcs-hash:20070320172242-86b55-7f2552cd27d8c6990c7f9fea9d4fcdccafabe4ff.gz
2007-03-20 18:22:42 +01:00
David Rousselie 352cfc921b Set JCLComponent.ask_password public
darcs-hash:20070222173443-86b55-a9998d61d4b4c6ea901cf84fa97f2bf0f5e5fa4c.gz
2007-02-22 18:34:43 +01:00
David Rousselie e8ece28f00 Set public JCLComponent.send_error method
darcs-hash:20070222173205-86b55-d14f1d840e5ce83cd67a20afdbbc8d23b1907057.gz
2007-02-22 18:32:05 +01:00
David Rousselie d83ad1debe send error implementation
send an error to a user only if he has not already been notified

darcs-hash:20070222172740-86b55-7032fdab46f54932c222c36a68bad0915120e92c.gz
2007-02-22 18:27:40 +01:00
David Rousselie 826d045b41 Replace DataForm implementation by Form implementation from PyXMPP
darcs-hash:20070213174122-86b55-54dc9d8ae9c4f354af0b46e597779744fbd97900.gz
2007-02-13 18:41:22 +01:00
David Rousselie b4ae16acc6 Multi account types support : change discovery handling
In discovery process, account types are listed with
jid

darcs-hash:20070207173337-86b55-b1b67a8d099e3ab19caa7599953c6836339db6ad.gz
2007-02-07 18:33:37 +01:00
David Rousselie cfa8da9655 Multiple account types: disco get_items implemented and tested
darcs-hash:20070131175146-86b55-de5924fb265a0f611c053303de114e8667d6f881.gz
2007-01-31 18:51:46 +01:00
David Rousselie 95f645fd16 Delete any trace of account factory
darcs-hash:20070131172522-86b55-ac7c678131705c856adbaff6da9011b0b0bf4ac3.gz
2007-01-31 18:25:22 +01:00
David Rousselie ae6406b807 Refactor AccountExample to support account types naming convention
darcs-hash:20070131172203-86b55-ee6b5c58dfe7ba50a04a62b5bbbf39c5c43d430d.gz
2007-01-31 18:22:03 +01:00
David Rousselie 56f48bb516 Multiple account types support: disco type listing
Account types are listed, accounts are not yet listed (need tests)
account factory have been replace by account classes naming convention (${type}Account)

darcs-hash:20070131171321-86b55-f1de0bb3e3ddea3b16783a3ec9bf1977bee16d94.gz
2007-01-31 18:13:21 +01:00
David Rousselie a0ec3ac81a Multi account types support (part1)
Introduce factory function to instanciate new account class while registering.
Need more work to list accounts types in disco

darcs-hash:20070123185508-86b55-1797b5a17f14d9f271775bde3eff3189a61a919f.gz
2007-01-23 19:55:08 +01:00
David Rousselie cf3fcf5655 Test get_register list-single field values
darcs-hash:20070119170359-86b55-8e3991b4b008094329dcef4b14ba2ed4540d1c44.gz
2007-01-19 18:03:59 +01:00
David Rousselie 583679b6ed Add list-single field type
darcs-hash:20070117175956-86b55-1d833aae947a048e6240a393837cfde02e918b6f.gz
2007-01-17 18:59:56 +01:00
David Rousselie 56209ddff1 Make component works with Account subclasses
darcs-hash:20070117173408-86b55-eaf9be902109c4269dbbfc589e7284e55bc1d3eb.gz
2007-01-17 18:34:08 +01:00
David Rousselie 51334ed5f7 PresenceAccount creation
darcs-hash:20070116172724-86b55-a944af8b2e75e749c5a6533521352de26dcee39f.gz
2007-01-16 18:27:24 +01:00
David Rousselie 9a2da0eeff Give component instead of stream to Feeder and Sender classes
darcs-hash:20061130215710-86b55-652c6ee7e4a69b67c7502db8db92d3cd0b0000ea.gz
2006-11-30 22:57:10 +01:00
David Rousselie 717e1543d3 Add handle_presence_subscribed test
darcs-hash:20061130215636-86b55-55c02e41cd14be5b752f1a187ef3834abb632425.gz
2006-11-30 22:56:36 +01:00
David Rousselie 04fee565a7 Stop timer thread when stopping component
darcs-hash:20061130215532-86b55-c3093785c0b17528f6c667c4e877122583d2589e.gz
2006-11-30 22:55:32 +01:00