summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eldbus_mono/eldbus_config.cs
blob: f42452e2fbcb952fb934bac14ff4b7a338c7aa1f (plain)
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
#pragma warning disable 1591

using System;
using System.Runtime.InteropServices;

namespace eldbus
{

/// <summary>Initializes Eldbus.
/// <para>Since EFL 1.23.</para>
/// </summary>
public static class Config
{
    [DllImport(efl.Libs.Eldbus)] private static extern int eldbus_init();
    [DllImport(efl.Libs.Eldbus)] private static extern int eldbus_shutdown();

    /// <summary>
    /// Initialization of the eldbus.
    /// <para>Since EFL 1.23.</para>
    /// </summary>
    public static void Init()
    {
        if (eldbus_init() == 0)
        {
            throw new Efl.EflException("Failed to initialize Eldbus");
        }
    }

    /// <summary>
    /// Shutdown the eldbus.
    /// <para>Since EFL 1.23.</para>
    /// </summary>
    public static void Shutdown()
    {
        eldbus_shutdown();
    }

}

}