diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-02-28 18:30:10 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-03-02 14:41:18 +0100 |
| commit | 1e546d46fba261a3e3b6c4ea43f4a7e16aa64c5b (patch) | |
| tree | 566838781d0413a56a4331876692dcc2b7594ce1 /talpid_openvpn_plugin/src/processing.rs | |
| parent | f3226b945964b18e5cba9df7f7cc1347229ed9a8 (diff) | |
| download | mullvadvpn-1e546d46fba261a3e3b6c4ea43f4a7e16aa64c5b.tar.xz mullvadvpn-1e546d46fba261a3e3b6c4ea43f4a7e16aa64c5b.zip | |
Move the openvpn functions to the top
Diffstat (limited to 'talpid_openvpn_plugin/src/processing.rs')
| -rw-r--r-- | talpid_openvpn_plugin/src/processing.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/talpid_openvpn_plugin/src/processing.rs b/talpid_openvpn_plugin/src/processing.rs new file mode 100644 index 0000000000..405e279896 --- /dev/null +++ b/talpid_openvpn_plugin/src/processing.rs @@ -0,0 +1,29 @@ + + +use ffi::OpenVpnPluginEvent; +use std::collections::HashMap; + + +error_chain!{} + + +/// Struct processing OpenVPN events and notifies listeners over IPC +pub struct EventProcessor; + +impl EventProcessor { + pub fn new() -> Result<EventProcessor> { + Ok(EventProcessor) + } + + pub fn process_event(&mut self, event: OpenVpnPluginEvent, _env: HashMap<String, String>) { + // TODO(linus): This is where we should send events to core. + println!("Hello from EventProcessor: {:?}", event); + } +} + +impl Drop for EventProcessor { + fn drop(&mut self) { + // TODO(linus): If we need, this is where we send some shutdown event or similar to core. + println!("Dropping EventProcessor!"); + } +} |
