index.html
Main Page
|
modules.html
Modules
|
namespaces.html
Namespace List
|
hierarchy.html
Class Hierarchy
|
annotated.html
Data Structures
|
dirs.html
Directories
|
files.html
File List
|
namespacemembers.html
Namespace Members
|
functions.html
Data Fields
|
pages.html
Related Pages
dir_000000.html
mono
Bus.cs
00001
namespace
DBus
00002 {
00003
using
System;
00004
using
System.Runtime.InteropServices;
00005
using
System.Diagnostics;
00006
classDBus_1_1Bus.html
00007
public
class
classDBus_1_1Bus.html
Bus
00008   {
00009
// Keep in sync with C
00010
private
enum
BusType
00011     {
00012       Session = 0,
00013       System = 1,
00014       Activation = 2
00015     }
00016
00017
// Don't allow instantiation
00018
private
classDBus_1_1Bus.html
Bus
() { }
00019
classDBus_1_1Bus.html#e0
00020
public
static
classDBus_1_1Connection.html
Connection
classDBus_1_1Bus.html#e0
GetSessionBus
()
00021     {
00022
return
GetBus(BusType.Session);
00023     }
00024
classDBus_1_1Bus.html#e1
00025
public
static
classDBus_1_1Connection.html
Connection
classDBus_1_1Bus.html#e1
GetSystemBus
()
00026     {
00027
return
GetBus(BusType.System);
00028     }
00029
00030
private
static
classDBus_1_1Connection.html
Connection
GetBus(BusType busType)
00031     {
00032
structDBus_1_1Error.html
Error
error =
new
structDBus_1_1Error.html
Error
();
00033       error.
structDBus_1_1Error.html#a0
Init
();
00034
00035       IntPtr rawConnection = dbus_bus_get((
int
) busType, ref error);
00036
00037
if
(rawConnection != IntPtr.Zero) {
00038
classDBus_1_1Connection.html
Connection
connection =
classDBus_1_1Connection.html
Connection
.Wrap(rawConnection);
00039         connection.
classDBus_1_1Connection.html#a4
SetupWithMain
();
00040         dbus_connection_unref(rawConnection);
00041
00042
return
connection;
00043       }
else
{
00044
throw
new
DBusException(error);
00045       }
00046     }
00047
00048     [DllImport (
"dbus-1"
)]
00049
private
extern
static
IntPtr dbus_bus_get (
int
which, ref Error error);
00050
00051     [DllImport (
"dbus-1"
)]
00052
private
extern
static
void
dbus_connection_unref (IntPtr ptr);
00053   }
00054 }
Generated on Tue Sep 13 01:28:06 2005 for D-BUS by
http://www.doxygen.org/index.html
doxygen
1.4.4
