Mono.Zeroconf – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 // Copyright 2006 Alp Toker <alp@atoker.com>
2 // This software is made available under the MIT License
3 // See COPYING for details
4  
5 using System;
6 using System.Collections.Generic;
7 using NDesk.DBus;
8  
9 namespace org.freedesktop.DBus
10 {
11 [Flags]
12 public enum NameFlag : uint
13 {
14 None = 0,
15 AllowReplacement = 0x1,
16 ReplaceExisting = 0x2,
17 DoNotQueue = 0x4,
18 }
19  
20 public enum RequestNameReply : uint
21 {
22 PrimaryOwner = 1,
23 InQueue,
24 Exists,
25 AlreadyOwner,
26 }
27  
28 public enum ReleaseNameReply : uint
29 {
30 Released = 1,
31 NonExistent,
32 NotOwner,
33 }
34  
35 public enum StartReply : uint
36 {
37 //The service was successfully started.
38 Success = 1,
39 //A connection already owns the given name.
40 AlreadyRunning,
41 }
42  
43 public delegate void NameOwnerChangedHandler (string name, string old_owner, string new_owner);
44 public delegate void NameAcquiredHandler (string name);
45 public delegate void NameLostHandler (string name);
46  
47 [Interface ("org.freedesktop.DBus.Peer")]
48 public interface Peer
49 {
50 void Ping ();
51 [return: Argument ("machine_uuid")]
52 string GetMachineId ();
53 }
54  
55 [Interface ("org.freedesktop.DBus.Introspectable")]
56 public interface Introspectable
57 {
58 [return: Argument ("data")]
59 string Introspect ();
60 }
61  
62 [Interface ("org.freedesktop.DBus.Properties")]
63 public interface Properties
64 {
65 [return: Argument ("value")]
66 object Get (string @interface, string propname);
67 void Set (string @interface, string propname, object value);
68 [return: Argument ("props")]
69 IDictionary<string,object> GetAll(string @interface);
70 }
71  
72 [Interface ("org.freedesktop.DBus")]
73 public interface IBus : Introspectable
74 {
75 RequestNameReply RequestName (string name, NameFlag flags);
76 ReleaseNameReply ReleaseName (string name);
77 string Hello ();
78 string[] ListNames ();
79 string[] ListActivatableNames ();
80 bool NameHasOwner (string name);
81 event NameOwnerChangedHandler NameOwnerChanged;
82 event NameLostHandler NameLost;
83 event NameAcquiredHandler NameAcquired;
84 StartReply StartServiceByName (string name, uint flags);
85 string GetNameOwner (string name);
86 uint GetConnectionUnixUser (string connection_name);
87 void AddMatch (string rule);
88 void RemoveMatch (string rule);
89  
90 //undocumented in spec
91 string[] ListQueuedOwners (string name);
92 uint GetConnectionUnixProcessID (string connection_name);
93 byte[] GetConnectionSELinuxSecurityContext (string connection_name);
94 void ReloadConfig ();
95 }
96 }