summaryrefslogtreecommitdiffstats
path: root/avahi-sharp
diff options
context:
space:
mode:
authorJames Willcox <snopr@snorp.net>2005-11-10 16:15:41 +0000
committerJames Willcox <snopr@snorp.net>2005-11-10 16:15:41 +0000
commite2baad5870d5aaf25657035b2391a3a29f7cff46 (patch)
tree3ac6d2cfb3b78448c12bea111ac6e42e6efedb3c /avahi-sharp
parente83fa01d8add031a844e0bcbb69831c2046c7cfa (diff)
update to latest api changes
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@946 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-sharp')
-rw-r--r--avahi-sharp/Client.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/avahi-sharp/Client.cs b/avahi-sharp/Client.cs
index 5734f01..394efc5 100644
--- a/avahi-sharp/Client.cs
+++ b/avahi-sharp/Client.cs
@@ -62,7 +62,8 @@ namespace Avahi
Registering = ServerState.Registering,
Running = ServerState.Running,
Collision = ServerState.Collision,
- Disconnected = 100
+ Failure = 100,
+ Connecting = 101
}
[Flags]
@@ -82,6 +83,13 @@ namespace Avahi
Local = 8,
OurOwn = 16,
}
+
+ [Flags]
+ public enum ClientFlags {
+ None = 0,
+ IgnoreUserConfig = 1,
+ NoFail = 2
+ }
public class Client : IDisposable
{
@@ -93,7 +101,7 @@ namespace Avahi
private Thread thread;
[DllImport ("avahi-client")]
- private static extern IntPtr avahi_client_new (IntPtr poll, ClientCallback handler,
+ private static extern IntPtr avahi_client_new (IntPtr poll, ClientFlags flags, ClientCallback handler,
IntPtr userData, out int error);
[DllImport ("avahi-client")]
@@ -212,7 +220,7 @@ namespace Avahi
}
}
- public Client ()
+ public Client (ClientFlags flags)
{
spoll = avahi_simple_poll_new ();
@@ -222,7 +230,7 @@ namespace Avahi
cb = OnClientCallback;
int error;
- handle = avahi_client_new (poll, cb, IntPtr.Zero, out error);
+ handle = avahi_client_new (poll, flags, cb, IntPtr.Zero, out error);
if (error != 0)
throw new ClientException (error);
@@ -231,6 +239,9 @@ namespace Avahi
thread.Start ();
}
+ public Client () : this (ClientFlags.None) {
+ }
+
~Client ()
{
Dispose ();