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
&raquo
dir_000001.html
DBusType
Int32.cs
00001
using
System;
00002
using
System.Runtime.InteropServices;
00003
using
System.Reflection.Emit;
00004
00005
using
DBus;
00006
00007
namespace
DBus.DBusType
00008 {
classDBus_1_1DBusType_1_1Int32.html
00012
public
class
classDBus_1_1DBusType_1_1Int32.html
Int32
:
interfaceDBus_1_1DBusType_1_1IDBusType.html
IDBusType
00013   {
classDBus_1_1DBusType_1_1Int32.html#o0
00014
public
const
char
Code =
'i'
;
00015
private
System.Int32 val;
00016
00017
private
classDBus_1_1DBusType_1_1Int32.html
Int32
()
00018     {
00019     }
00020
classDBus_1_1DBusType_1_1Int32.html#a0
00021
public
classDBus_1_1DBusType_1_1Int32.html
Int32
(System.Int32 val,
classDBus_1_1Service.html
Service
service)
00022     {
00023
this
.val = val;
00024     }
00025
classDBus_1_1DBusType_1_1Int32.html#a1
00026
public
classDBus_1_1DBusType_1_1Int32.html
Int32
(IntPtr iter,
classDBus_1_1Service.html
Service
service)
00027     {
00028
group__DBusMessage.html#ga35
dbus_message_iter_get_basic
(iter, out
this
.val);
00029     }
00030
classDBus_1_1DBusType_1_1Int32.html#a2
00031
public
void
Append(IntPtr iter)
00032     {
00033
if
(!
group__DBusMessage.html#ga43
dbus_message_iter_append_basic
(iter, (
int
) Code, ref val))
00034
throw
new
ApplicationException(
"Failed to append INT32 argument:"
+ val);
00035     }
00036
classDBus_1_1DBusType_1_1Int32.html#e0
00037
public
static
bool
Suits(System.Type type)
00038     {
00039
if
(type.IsEnum && Enum.GetUnderlyingType (type) == typeof(System.Int32)) {
00040
return
true
;
00041       }
00042
00043
switch
(type.ToString()) {
00044
case
"System.Int32"
:
00045
case
"System.Int32&"
:
00046
return
true
;      }
00047
00048
return
false
;
00049     }
00050
classDBus_1_1DBusType_1_1Int32.html#e1
00051
public
static
void
EmitMarshalIn(ILGenerator generator, Type type)
00052     {
00053
if
(type.IsByRef) {
00054         generator.Emit(OpCodes.Ldind_I4);
00055       }
00056     }
00057
classDBus_1_1DBusType_1_1Int32.html#e2
00058
public
static
void
EmitMarshalOut(ILGenerator generator, Type type,
bool
isReturn)
00059     {
00060       generator.Emit(OpCodes.Unbox, type);
00061       generator.Emit(OpCodes.Ldind_I4);
00062
if
(!isReturn) {
00063         generator.Emit(OpCodes.Stind_I4);
00064       }
00065     }
00066
classDBus_1_1DBusType_1_1Int32.html#a3
00067
public
object Get()
00068     {
00069
return
this
.val;
00070     }
00071
classDBus_1_1DBusType_1_1Int32.html#a4
00072
public
object Get(System.Type type)
00073     {
00074
if
(type.IsEnum) {
00075
return
Enum.ToObject(type,
this
.val);
00076       }
00077
00078
switch
(type.ToString()) {
00079
case
"System.Int32"
:
00080
case
"System.Int32&"
:
00081
return
this
.val;
00082
default
:
00083
throw
new
ArgumentException(
"Cannot cast DBus.Type.Int32 to type '"
+ type.ToString() +
"'"
);
00084       }
00085     }
00086
00087     [DllImport(
"dbus-1"
)]
00088
private
extern
static
void
group__DBusMessage.html#ga35
dbus_message_iter_get_basic
(IntPtr iter, out System.Int32 value);
00089
00090     [DllImport(
"dbus-1"
)]
00091
private
extern
static
bool
group__DBusMessage.html#ga43
dbus_message_iter_append_basic
(IntPtr iter,
int
type, ref System.Int32 value);
00092   }
00093 }
Generated on Tue Sep 13 01:28:08 2005 for D-BUS by
http://www.doxygen.org/index.html
doxygen
1.4.4
