Add copyright notices to all source files and put a license in LICENSE.
[versaplex.git] / versaplexd / wvdbusserver.cs
blob26b6fa05429ce58afe2a96cdef956e64e0e76004
1 /*
2 * Versaplex:
3 * Copyright (C)2007-2008 Versabanq Innovations Inc. and contributors.
4 * See the included file named LICENSE for license information.
5 */
6 using System;
7 using System.Runtime.InteropServices;
9 public class WvDBusServer : IDisposable
11 [DllImport("wvdbusd.dll")]
12 static extern void wvdbusd_start();
14 [DllImport("wvdbusd.dll")]
15 static extern void wvdbusd_stop();
17 [DllImport("wvdbusd.dll", CharSet=CharSet.Ansi)]
18 static extern void wvdbusd_listen(string moniker);
20 [DllImport("wvdbusd.dll")]
21 static extern void wvdbusd_runonce();
23 [DllImport("wvdbusd.dll")]
24 static extern int wvdbusd_check();
26 public static int check()
28 return wvdbusd_check();
31 public WvDBusServer()
33 wvdbusd_start();
36 public void Dispose()
38 wvdbusd_stop();
41 public void listen(string moniker)
43 wvdbusd_listen(moniker);
46 public void runonce()
48 wvdbusd_runonce();