]>
Commit | Line | Data |
---|---|---|
cf4e471d MR |
1 | <?php |
2 | require_once('openmediavault/object.inc'); | |
3 | require_once('openmediavault/module.inc'); | |
4 | require_once("Exception.php"); | |
5 | ||
6 | /** | |
7 | * Class containing information about the pool | |
8 | * | |
9 | * @author Michael Rasmussen | |
10 | * @version 0.1 | |
11 | * @copyright Michael Rasmussen <mir@datanom.net> | |
12 | */ | |
13 | class OMVModuleZFS extends OMVModuleAbstract | |
14 | implements OMVINotifyListener { | |
15 | ||
16 | private $pools; | |
17 | ||
18 | public function __construct() { | |
19 | $this->pools = array(); | |
20 | $this->updatePools(); | |
21 | } | |
22 | ||
23 | public function getName() { | |
24 | return "zfs"; | |
25 | } | |
26 | ||
27 | public function bindListeners(OMVNotifyDispatcher $dispatcher) { | |
28 | // Update service if configuration has been modified | |
29 | $dispatcher->addListener( | |
30 | OMV_NOTIFY_MODIFY, | |
31 | "org.openmediavault.services.nfs", | |
32 | array($this, "onUpdateNFSService")); | |
33 | $dispatcher->addListener( | |
34 | OMV_NOTIFY_CREATE, | |
35 | "org.openmediavault.services.nfs.shares.share", | |
36 | array($this, "onCreateNFSShare")); | |
37 | $dispatcher->addListener( | |
38 | OMV_NOTIFY_DELETE, | |
39 | "org.openmediavault.services.nfs.shares.share", | |
40 | array($this, "onDeleteNFSShare")); | |
41 | $dispatcher->addListener( | |
42 | OMV_NOTIFY_MODIFY, | |
43 | "org.openmediavault.services.nfs.shares.share", | |
44 | array($this, "onUpdateNFSShare")); | |
800ebb76 | 45 | $this->debug(sprintf("bindListeners %s", var_export($dispatcher, true))); |
cf4e471d MR |
46 | } |
47 | ||
48 | /** | |
49 | * XXX | |
50 | * org.openmediavault.services.nfs | |
51 | * | |
52 | * @param string event | |
53 | * @access public | |
54 | */ | |
55 | public function onUpdateNFSService($args) { | |
56 | $this->debug(sprintf("onUpdateNFSService args=%s", var_export($args, true))); | |
57 | } | |
58 | ||
59 | /** | |
60 | * XXX | |
61 | * org.openmediavault.services.nfs.shares.share | |
62 | * | |
63 | * @param string event | |
64 | * @access public | |
65 | */ | |
66 | public function onCreateNFSShare($args) { | |
67 | $this->debug(sprintf("onCreateNFSShare args=%s", var_export($args, true))); | |
68 | } | |
69 | ||
70 | /** | |
71 | * XXX | |
72 | * org.openmediavault.services.nfs.shares.share | |
73 | * | |
74 | * @param string event | |
75 | * @access public | |
76 | */ | |
77 | public function onDeleteNFSShare($args) { | |
78 | $this->debug(sprintf("onDeleteNFSShare args=%s", var_export($args, true))); | |
79 | } | |
80 | ||
81 | /** | |
82 | * XXX | |
83 | * org.openmediavault.services.nfs.shares.share | |
84 | * | |
85 | * @param string event | |
86 | * @access public | |
87 | */ | |
88 | public function onUpdateNFSShare($args) { | |
89 | $this->debug(sprintf("onUpdateNFSShare args=%s", var_export($args, true))); | |
90 | } | |
91 | ||
cf4e471d MR |
92 | private function updatePools() { |
93 | ||
94 | } | |
95 | } | |
96 | ||
97 | // Register module. | |
98 | $moduleMgr = &OMVModuleMgr::getInstance(); | |
99 | $moduleMgr->registerModule(new OMVModuleZFS()); | |
100 | ?> |