File: DBus.cs

package info (click to toggle)
aircrack-ng 1%3A1.6%2Bgit20210130.91820bc-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 19,056 kB
  • sloc: ansic: 67,045; cs: 5,392; sh: 3,773; python: 2,565; pascal: 1,074; asm: 570; makefile: 253; cpp: 46
file content (96 lines) | stat: -rw-r--r-- 2,405 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Copyright 2006 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details

using System;
using System.Collections.Generic;
using NDesk.DBus;

namespace org.freedesktop.DBus
{
	[Flags]
	public enum NameFlag : uint
	{
		None = 0,
		AllowReplacement = 0x1,
		ReplaceExisting = 0x2,
		DoNotQueue = 0x4,
	}

	public enum RequestNameReply : uint
	{
		PrimaryOwner = 1,
		InQueue,
		Exists,
		AlreadyOwner,
	}

	public enum ReleaseNameReply : uint
	{
		Released = 1,
		NonExistent,
		NotOwner,
	}

	public enum StartReply : uint
	{
		//The service was successfully started.
		Success = 1,
		//A connection already owns the given name.
		AlreadyRunning,
	}

	public delegate void NameOwnerChangedHandler (string name, string old_owner, string new_owner);
	public delegate void NameAcquiredHandler (string name);
	public delegate void NameLostHandler (string name);

	[Interface ("org.freedesktop.DBus.Peer")]
	public interface Peer
	{
		void Ping ();
		[return: Argument ("machine_uuid")]
		string GetMachineId ();
	}

	[Interface ("org.freedesktop.DBus.Introspectable")]
	public interface Introspectable
	{
		[return: Argument ("data")]
		string Introspect ();
	}

	[Interface ("org.freedesktop.DBus.Properties")]
	public interface Properties
	{
		[return: Argument ("value")]
		object Get (string @interface, string propname);
		void Set (string @interface, string propname, object value);
		[return: Argument ("props")]
		IDictionary<string,object> GetAll(string @interface);
	}

	[Interface ("org.freedesktop.DBus")]
	public interface IBus : Introspectable
	{
		RequestNameReply RequestName (string name, NameFlag flags);
		ReleaseNameReply ReleaseName (string name);
		string Hello ();
		string[] ListNames ();
		string[] ListActivatableNames ();
		bool NameHasOwner (string name);
		event NameOwnerChangedHandler NameOwnerChanged;
		event NameLostHandler NameLost;
		event NameAcquiredHandler NameAcquired;
		StartReply StartServiceByName (string name, uint flags);
		string GetNameOwner (string name);
		uint GetConnectionUnixUser (string connection_name);
		void AddMatch (string rule);
		void RemoveMatch (string rule);

		//undocumented in spec
		string[] ListQueuedOwners (string name);
		uint GetConnectionUnixProcessID (string connection_name);
		byte[] GetConnectionSELinuxSecurityContext (string connection_name);
		void ReloadConfig ();
	}
}