Comparison

core/storagemanager.lua @ 5121:b5a5643f8572

core.storagemanager, mod_storage_*: "data-driver" -> "storage-provider", to allow using module:provides().
author Waqas Hussain <waqas20@gmail.com>
date Wed, 12 Sep 2012 23:41:28 +0500
parent 5111:7e577727fb9f
child 5133:1443d1c37c6c
comparison
equal deleted inserted replaced
5120:bcabea740c00 5121:b5a5643f8572
31 31
32 local stores_available = multitable.new(); 32 local stores_available = multitable.new();
33 33
34 function initialize_host(host) 34 function initialize_host(host)
35 local host_session = hosts[host]; 35 local host_session = hosts[host];
36 host_session.events.add_handler("item-added/data-driver", function (event) 36 host_session.events.add_handler("item-added/storage-provider", function (event)
37 local item = event.item; 37 local item = event.item;
38 stores_available:set(host, item.name, item); 38 stores_available:set(host, item.name, item);
39 end); 39 end);
40 40
41 host_session.events.add_handler("item-removed/data-driver", function (event) 41 host_session.events.add_handler("item-removed/storage-provider", function (event)
42 local item = event.item; 42 local item = event.item;
43 stores_available:set(host, item.name, nil); 43 stores_available:set(host, item.name, nil);
44 end); 44 end);
45 end 45 end
46 prosody.events.add_handler("host-activated", initialize_host, 101); 46 prosody.events.add_handler("host-activated", initialize_host, 101);