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

using System;
using System.Runtime.InteropServices;

namespace eldbus
{

/// <summary>Initializes Eldbus.
///
/// Since EFL 1.23.
/// </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();

    public static void Init()
    {
        if (eldbus_init() == 0)
        {
            throw new Efl.EflException("Failed to initialize Eldbus");
        }
    }

    public static void Shutdown()
    {
        eldbus_shutdown();
    }

}

}