summaryrefslogtreecommitdiffhomepage
path: root/talpid_openvpn_plugin/src/processing.rs
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2017-07-17 10:36:52 +0200
committerLinus Färnstrand <linus@mullvad.net>2017-07-17 10:48:09 +0200
commitf07f1a0262c908ff83490850b67a167f963efc2d (patch)
tree5a5209baefc0b10ba528f254e7ce2456c23f6ac9 /talpid_openvpn_plugin/src/processing.rs
parent6a4202fc8c55752f0fef86c04b628a3f9ada5279 (diff)
downloadmullvadvpn-f07f1a0262c908ff83490850b67a167f963efc2d.tar.xz
mullvadvpn-f07f1a0262c908ff83490850b67a167f963efc2d.zip
Rename all crates from snake_case to kebab-case
Diffstat (limited to 'talpid_openvpn_plugin/src/processing.rs')
-rw-r--r--talpid_openvpn_plugin/src/processing.rs43
1 files changed, 0 insertions, 43 deletions
diff --git a/talpid_openvpn_plugin/src/processing.rs b/talpid_openvpn_plugin/src/processing.rs
deleted file mode 100644
index e33097c633..0000000000
--- a/talpid_openvpn_plugin/src/processing.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-use openvpn_ffi;
-
-use talpid_ipc::{IpcServerId, WsIpcClient};
-
-error_chain! {
- errors {
- IpcSendingError {
- description("Failed while sending an event over the IPC channel")
- }
- }
-}
-
-
-/// Struct processing OpenVPN events and notifies listeners over IPC
-pub struct EventProcessor {
- ipc_client: WsIpcClient,
-}
-
-impl EventProcessor {
- pub fn new(server_id: IpcServerId) -> Result<EventProcessor> {
- debug!("Creating EventProcessor");
- let ipc_client = WsIpcClient::new(server_id).chain_err(|| "Unable to create IPC client")?;
- Ok(EventProcessor { ipc_client })
- }
-
- pub fn process_event(&mut self,
- event: openvpn_ffi::OpenVpnPluginEvent,
- env: openvpn_ffi::OpenVpnEnv)
- -> Result<()> {
- trace!("Processing \"{:?}\" event", event);
- self.ipc_client
- .call("openvpn_event", &(event, env))
- .map(|_: Option<()>| ())
- .chain_err(|| ErrorKind::IpcSendingError)
- }
-}
-
-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.
- debug!("Dropping EventProcessor");
- }
-}