-
Notifications
You must be signed in to change notification settings - Fork 11
/
Event.cs
35 lines (33 loc) · 1.91 KB
/
Event.cs
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
/*
* Copyright (C)
* Arnaud Champion <[email protected]>
* Jaromír Červenka <[email protected]>
*
* See COPYING.LIB for the License of this software
*/
using System.Runtime.InteropServices;
namespace Libvirt
{
/// <summary>
/// The Event class expose all the event related methods
/// </summary>
public class Event
{
///<summary>
/// Function to install callbacks
///</summary>
///<param name="addHandle">the virEventAddHandleFunc which will be called (a delegate)</param>
///<param name="updateHandle">the virEventUpdateHandleFunc which will be called (a delegate)</param>
///<param name="removeHandle">the virEventRemoveHandleFunc which will be called (a delegate)</param>
///<param name="addTimeout">the virEventAddTimeoutFunc which will be called (a delegate)</param>
///<param name="updateTimeout">the virEventUpdateTimeoutFunc which will be called (a delegate)</param>
///<param name="removeTimeout">the virEventRemoveTimeoutFunc which will be called (a delegate)</param>
[DllImport("libvirt-0.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "virEventRegisterImpl")]
public static extern void RegisterImpl([MarshalAs(UnmanagedType.FunctionPtr)] EventAddHandleFunc addHandle,
[MarshalAs(UnmanagedType.FunctionPtr)] EventUpdateHandleFunc updateHandle,
[MarshalAs(UnmanagedType.FunctionPtr)] EventRemoveHandleFunc removeHandle,
[MarshalAs(UnmanagedType.FunctionPtr)] EventAddTimeoutFunc addTimeout,
[MarshalAs(UnmanagedType.FunctionPtr)] EventUpdateTimeoutFunc updateTimeout,
[MarshalAs(UnmanagedType.FunctionPtr)] EventRemoveTimeoutFunc removeTimeout);
}
}