forked from enlightenment/efl
csharp: updating eldbus_pending docs and hide api.
Summary: ref T8361 Reviewers: lauromoura, felipealmeida, segfaultxavi, woohyun Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8361 Differential Revision: https://phab.enlightenment.org/D10427
This commit is contained in:
parent
2710b5769e
commit
da3406533b
|
@ -2,12 +2,14 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
using static eldbus.EldbusPendingNativeFunctions;
|
using static eldbus.EldbusPendingNativeFunctions;
|
||||||
|
|
||||||
namespace eldbus
|
namespace eldbus
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public static class EldbusPendingNativeFunctions
|
public static class EldbusPendingNativeFunctions
|
||||||
{
|
{
|
||||||
[DllImport(efl.Libs.Eldbus)] public static extern void
|
[DllImport(efl.Libs.Eldbus)] public static extern void
|
||||||
|
@ -42,12 +44,15 @@ public static class EldbusPendingNativeFunctions
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Represents a DBus pending.
|
/// <summary>Represents a DBus pending.
|
||||||
///
|
/// <para>Since EFL 1.23.</para>
|
||||||
/// Since EFL 1.23.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Pending
|
public class Pending
|
||||||
{
|
{
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public IntPtr Handle {get;set;} = IntPtr.Zero;
|
public IntPtr Handle {get;set;} = IntPtr.Zero;
|
||||||
|
/// <summary>Whether this managed list owns the native one.
|
||||||
|
/// <para>Since EFL 1.23.</para>
|
||||||
|
/// </summary>
|
||||||
public bool Own {get;set;} = true;
|
public bool Own {get;set;} = true;
|
||||||
|
|
||||||
private void InitNew(IntPtr handle, bool own)
|
private void InitNew(IntPtr handle, bool own)
|
||||||
|
@ -65,11 +70,17 @@ public class Pending
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public Pending(IntPtr handle, bool own)
|
public Pending(IntPtr handle, bool own)
|
||||||
{
|
{
|
||||||
InitNew(handle, own);
|
InitNew(handle, own);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Releases the native handler.
|
||||||
|
/// <para>Since EFL 1.23.</para>
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The native handler.</returns>
|
||||||
public IntPtr Release()
|
public IntPtr Release()
|
||||||
{
|
{
|
||||||
IntPtr h = Handle;
|
IntPtr h = Handle;
|
||||||
|
@ -77,12 +88,22 @@ public class Pending
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Cancel the pending message.
|
||||||
|
/// <para>Since EFL 1.23.</para>
|
||||||
|
/// </summary>
|
||||||
public void Cancel()
|
public void Cancel()
|
||||||
{
|
{
|
||||||
CheckHandle();
|
CheckHandle();
|
||||||
eldbus_pending_cancel(Handle);
|
eldbus_pending_cancel(Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the destination of the pending message.
|
||||||
|
/// <para>Since EFL 1.23.</para>
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string corresponding to the destination of the
|
||||||
|
/// message</returns>
|
||||||
public string GetDestination()
|
public string GetDestination()
|
||||||
{
|
{
|
||||||
CheckHandle();
|
CheckHandle();
|
||||||
|
@ -90,6 +111,11 @@ public class Pending
|
||||||
return Eina.StringConversion.NativeUtf8ToManagedString(ptr);
|
return Eina.StringConversion.NativeUtf8ToManagedString(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the path of the pending message.
|
||||||
|
/// <para>Since EFL 1.23.</para>
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string corresponding to the path of the message.</returns>
|
||||||
public string GetPath()
|
public string GetPath()
|
||||||
{
|
{
|
||||||
CheckHandle();
|
CheckHandle();
|
||||||
|
@ -97,6 +123,12 @@ public class Pending
|
||||||
return Eina.StringConversion.NativeUtf8ToManagedString(ptr);
|
return Eina.StringConversion.NativeUtf8ToManagedString(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the interface of the pending message.
|
||||||
|
/// <para>Since EFL 1.23.</para>
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string corresponding to the interface of the
|
||||||
|
/// message.</returns>
|
||||||
public string GetInterface()
|
public string GetInterface()
|
||||||
{
|
{
|
||||||
CheckHandle();
|
CheckHandle();
|
||||||
|
@ -104,6 +136,11 @@ public class Pending
|
||||||
return Eina.StringConversion.NativeUtf8ToManagedString(ptr);
|
return Eina.StringConversion.NativeUtf8ToManagedString(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the method of the pending message.
|
||||||
|
/// <para>Since EFL 1.23.</para>
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string corresponding to the method of the message.</returns>
|
||||||
public string GetMethod()
|
public string GetMethod()
|
||||||
{
|
{
|
||||||
CheckHandle();
|
CheckHandle();
|
||||||
|
|
Loading…
Reference in New Issue