From 4885e0764d6ea0ed542b90f9e02dd1eb5d1fa8d7 Mon Sep 17 00:00:00 2001 From: Bruno da Silva Belo Date: Wed, 16 Oct 2019 11:26:03 -0300 Subject: [PATCH] csharp: Updating eldbus_common docs. 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/D10416 --- .../mono/eldbus_mono/eldbus_common.cs | 663 +++++++++++++++++- 1 file changed, 661 insertions(+), 2 deletions(-) diff --git a/src/bindings/mono/eldbus_mono/eldbus_common.cs b/src/bindings/mono/eldbus_mono/eldbus_common.cs index 80b1e25c60..99a7aef6e5 100644 --- a/src/bindings/mono/eldbus_mono/eldbus_common.cs +++ b/src/bindings/mono/eldbus_mono/eldbus_common.cs @@ -2,182 +2,466 @@ using System; using System.Runtime.InteropServices; +using System.ComponentModel; using static eldbus.EldbusMessageNativeFunctions; namespace eldbus { - +/// +/// Representation for Timeout flags. +/// Since EFL 1.23. +/// public static class Timeout { + /// + /// Infinite flag. + /// Since EFL 1.23. + /// public const int Infinite = 0x7fffffff; } +/// +/// The path to an object. +/// Since EFL 1.23. +/// [StructLayout(LayoutKind.Sequential)] public struct ObjectPath { + /// + /// The string of the path. + /// Since EFL 1.23. + /// public string value; + /// + /// Constructor + /// Since EFL 1.23. + /// + /// The string of the path. public ObjectPath(string str) { value = str; } + /// + /// Conversion operator of ObjectPath from string. + /// Since EFL 1.23. + /// + /// The string of the path. public static implicit operator ObjectPath(string str) { return new ObjectPath(str); } + /// + /// Conversion operator of string from ObjectPath. + /// Since EFL 1.23. + /// + /// The ObjectPath to be converted. public static implicit operator string(ObjectPath path) { return path.value; } } +/// +/// String to a signature. +/// Since EFL 1.23. +/// [StructLayout(LayoutKind.Sequential)] public struct SignatureString { + /// + /// The string of the signature. + /// Since EFL 1.23. + /// public string value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The string of the signature. public SignatureString(string str) { value = str; } + /// + /// Conversion operator of SignatureString from string. + /// Since EFL 1.23. + /// + /// The string of the signature. public static implicit operator SignatureString(string str) { return new SignatureString(str); } + /// + /// Conversion operator of string from SignatureString. + /// Since EFL 1.23. + /// + /// The SignatureString to be conversion. public static implicit operator string(SignatureString sig) { return sig.value; } } +/// +/// Representation for Unix file descriptor. +/// Since EFL 1.23. +/// [StructLayout(LayoutKind.Sequential)] public struct UnixFd { + /// + /// The value of the file descriptor. + /// Since EFL 1.23. + /// public Int32 value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The file descriptor. public UnixFd(Int32 fd) { value = fd; } + /// + /// Conversion operator of UnixFd from Int32. + /// Since EFL 1.23. + /// + /// The file descriptor. public static implicit operator UnixFd(Int32 fd) { return new UnixFd(fd); } + /// + /// Conversion operator of Int32 from UnixFd. + /// Since EFL 1.23. + /// + /// The UnixFd to be converted. public static implicit operator Int32(UnixFd unix_fd) { return unix_fd.value; } } - +/// +/// Arguments of EldBus. +/// Since EFL 1.23. +/// public static class Argument { + /// + /// The type of a byte. + /// Since EFL 1.23. + /// public class ByteType { + /// + /// The code of the byte. + /// Since EFL 1.23. + /// public const char Code = 'y'; + /// + /// The signature of the byte. + /// Since EFL 1.23. + /// public const string Signature = "y"; } + /// + /// The type of a boolean + /// Since EFL 1.23. + /// public class BooleanType { + /// + /// The code of the boolean. + /// Since EFL 1.23. + /// public const char Code = 'b'; + /// + /// The signature of the boolean. + /// Since EFL 1.23. + /// public const string Signature = "b"; } + /// + /// The type of a Int16. + /// Since EFL 1.23. + /// public class Int16Type { + /// + /// The code of the Int16. + /// Since EFL 1.23. + /// public const char Code = 'n'; + /// + /// The signature of the Int16. + /// Since EFL 1.23. + /// public const string Signature = "n"; } + /// + /// The type of an unsigned Int16. + /// Since EFL 1.23. + /// public class UInt16Type { + /// + /// The code of the unsigned Int16. + /// Since EFL 1.23. + /// public const char Code = 'q'; + /// + /// The signature of the unsigned Int16. + /// Since EFL 1.23. + /// public const string Signature = "q"; } + /// + /// The type of a Int32. + /// Since EFL 1.23. + /// public class Int32Type { + /// + /// The code of the Int32. + /// Since EFL 1.23. + /// public const char Code = 'i'; + /// + /// The signature of the Int32. + /// Since EFL 1.23. + /// public const string Signature = "i"; } + /// + /// The type of an unsigned Int32. + /// Since EFL 1.23. + /// public class UInt32Type { + /// + /// The code of the unsigned Int32. + /// Since EFL 1.23. + /// public const char Code = 'u'; + /// + /// The signature of the unsigned Int32. + /// Since EFL 1.23. + /// public const string Signature = "u"; } + /// + /// The type of a Int64. + /// Since EFL 1.23. + /// public class Int64Type { + /// + /// The code of the Int64. + /// Since EFL 1.23. + /// public const char Code = 'x'; + /// + /// The signature of the Int64. + /// Since EFL 1.23. + /// public const string Signature = "x"; } + /// + /// The type of an unsigned Int64. + /// Since EFL 1.23. + /// public class UInt64Type { + /// + /// The code of the unsigned Int64. + /// Since EFL 1.23. + /// public const char Code = 't'; + /// + /// The signature of the unsigned Int64. + /// Since EFL 1.23. + /// public const string Signature = "t"; } + /// + /// The type of the double. + /// Since EFL 1.23. + /// public class DoubleType { + /// + /// The code of the double. + /// Since EFL 1.23. + /// public const char Code = 'd'; + /// + /// The signature of the double. + /// Since EFL 1.23. + /// public const string Signature = "d"; } + /// + /// The type of a string. + /// Since EFL 1.23. + /// public class StringType { + /// + /// The code of the string. + /// Since EFL 1.23. + /// public const char Code = 's'; + /// + /// The signature of the string. + /// Since EFL 1.23. + /// public const string Signature = "s"; } + /// + /// The type of an object path. + /// Since EFL 1.23. + /// public class ObjectPathType { + /// + /// The code of the object path. + /// Since EFL 1.23. + /// public const char Code = 'o'; + /// + /// The signature of the object path. + /// Since EFL 1.23. + /// public const string Signature = "o"; } + /// + /// The type of a signature. + /// Since EFL 1.23. + /// public class SignatureType { + /// + /// The code of the signature. + /// Since EFL 1.23. + /// public const char Code = 'g'; + /// + /// The signature of the signature. + /// Since EFL 1.23. + /// public const string Signature = "g"; } + /// + /// The type of a array. + /// Since EFL 1.23. + /// public class ArrayType { + /// + /// The code of the array. + /// Since EFL 1.23. + /// public const char Code = 'a'; + /// + /// The signature of the array. + /// Since EFL 1.23. + /// public const string Signature = "a"; } + /// + /// The type of a struct. + /// Since EFL 1.23. + /// public class StructType { + /// + /// The code of the struct. + /// Since EFL 1.23. + /// public const char Code = 'r'; + /// + /// The signature of the struct. + /// Since EFL 1.23. + /// public const string Signature = "r"; } + /// + /// The type of a variant. + /// Since EFL 1.23. + /// public class VariantType { + /// + /// The code of the variant. + /// Since EFL 1.23. + /// public const char Code = 'v'; + /// + /// The signature of the variant. + /// Since EFL 1.23. + /// public const string Signature = "v"; } + /// + /// The type of a dictionary. + /// Since EFL 1.23. + /// public class DictEntryType { + /// + /// The code of the dictionary. + /// Since EFL 1.23. + /// public const char Code = 'e'; + /// + /// The signature of the dictionary. + /// Since EFL 1.23. + /// public const string Signature = "e"; } + /// + /// The type of an unix file descriptor. + /// Since EFL 1.23. + /// public class UnixFdType { + /// + /// The code of unix fd. + /// Since EFL 1.23. + /// public const char Code = 'h'; + /// + /// The signature of the unix fd. + /// Since EFL 1.23. + /// public const string Signature = "h"; } @@ -218,8 +502,17 @@ public static class Argument // public static readonly UnixFdType h = UnixFdT; } +/// +/// Arguments to a basic message eldbus. +/// Since EFL 1.23. +/// public abstract class BasicMessageArgument { + /// + /// Appends a message to eldbus. + /// Since EFL 1.23. + /// + /// The message to be appended. public void AppendTo(eldbus.Message msg) { if (!InternalAppendTo(msg)) @@ -228,6 +521,11 @@ public abstract class BasicMessageArgument } } + /// + /// Appends a message to eldbus. + /// Since EFL 1.23. + /// + /// The messages to append. public void AppendTo(eldbus.MessageIterator iter) { if (!InternalAppendTo(iter)) @@ -236,447 +534,786 @@ public abstract class BasicMessageArgument } } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public abstract char TypeCode {get;} + + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public abstract string Signature {get;} + + [EditorBrowsable(EditorBrowsableState.Never)] protected abstract bool InternalAppendTo(eldbus.Message msg); + + [EditorBrowsable(EditorBrowsableState.Never)] protected abstract bool InternalAppendTo(eldbus.MessageIterator iter); + /// + /// Conversion operator of BasicMessageArgument from byte. + /// Since EFL 1.23. + /// + /// The byte to be converted. public static implicit operator BasicMessageArgument(byte arg) { return new ByteMessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from bool. + /// Since EFL 1.23. + /// + /// The bool to be converted. public static implicit operator BasicMessageArgument(bool arg) { return new BoolMessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from Int16. + /// Since EFL 1.23. + /// + /// The int16 to be converted. public static implicit operator BasicMessageArgument(Int16 arg) { return new Int16MessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from unsigned int16. + /// Since EFL 1.23. + /// + /// The unsigned int16 to be converted. public static implicit operator BasicMessageArgument(UInt16 arg) { return new UInt16MessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from int32. + /// Since EFL 1.23. + /// + /// The int32 to be converted. public static implicit operator BasicMessageArgument(Int32 arg) { return new Int32MessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from unsigned int32. + /// Since EFL 1.23. + /// + /// The unsigned int32 to be converted. public static implicit operator BasicMessageArgument(UInt32 arg) { return new UInt32MessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from int64. + /// Since EFL 1.23. + /// + /// The int64 to be converted. public static implicit operator BasicMessageArgument(Int64 arg) { return new Int64MessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from unsigned int64. + /// Since EFL 1.23. + /// + /// The unsigned int64 to be converted. public static implicit operator BasicMessageArgument(UInt64 arg) { return new UInt64MessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from string. + /// Since EFL 1.23. + /// + /// the string to be converted. public static implicit operator BasicMessageArgument(string arg) { return new StringMessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from signature. + /// Since EFL 1.23. + /// + /// The signature to be converted. public static implicit operator BasicMessageArgument(SignatureString arg) { return new SignatureMessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from object path. + /// Since EFL 1.23. + /// + /// The object path to be converted. public static implicit operator BasicMessageArgument(ObjectPath arg) { return new ObjectPathMessageArgument(arg); } + /// + /// Conversion operator of BasicMessageArgument from unix fd. + /// Since EFL 1.23. + /// + /// The unix fd to be converted. public static implicit operator BasicMessageArgument(UnixFd arg) { return new UnixFdMessageArgument(arg); } } +/// +/// Arguments to a byte message eldbus. +/// Since EFL 1.23. +/// public class ByteMessageArgument : BasicMessageArgument { private byte value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The argument of the eldbus. public ByteMessageArgument(byte arg) { value = arg; } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.ByteType.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Arguments to a bool message eldbus. +/// Since EFL 1.23. +/// public class BoolMessageArgument : BasicMessageArgument { private Int32 value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the eldbus. public BoolMessageArgument(bool arg) { value = Convert.ToInt32(arg); } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.BooleanType.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Arguments to an int16 message eldbus. +/// Since EFL 1.23. +/// public class Int16MessageArgument : BasicMessageArgument { private Int16 value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the eldbus. public Int16MessageArgument(Int16 arg) { value = arg; } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.Int16Type.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Arguments to an unsigned int16 message eldbus. +/// Since EFL 1.23. +/// public class UInt16MessageArgument : BasicMessageArgument { private UInt16 value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// the arguments of the eldbus. public UInt16MessageArgument(UInt16 arg) { value = arg; } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.UInt16Type.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Arguments to an int32 message eldbus. +/// Since EFL 1.23. +/// public class Int32MessageArgument : BasicMessageArgument { private Int32 value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the eldbus. public Int32MessageArgument(Int32 arg) { value = arg; } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.Int32Type.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Arguments to an unsigned int32 message eldbus. +/// Since EFL 1.23. +/// public class UInt32MessageArgument : BasicMessageArgument { private UInt32 value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the unsigned type. public UInt32MessageArgument(UInt32 arg) { value = arg; } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.UInt32Type.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Arguments to an int64 message eldbus. +/// Since EFL 1.23. +/// public class Int64MessageArgument : BasicMessageArgument { private Int64 value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the eldbus. public Int64MessageArgument(Int64 arg) { value = arg; } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.Int64Type.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Arguments to an unsigned int64 message eldbus. +/// Since EFL 1.23. +/// public class UInt64MessageArgument : BasicMessageArgument { private UInt64 value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the eldbus. public UInt64MessageArgument(UInt64 arg) { value = arg; } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.UInt64Type.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Arguments to a double message eldbus. +/// Since EFL 1.23. +/// public class DoubleMessageArgument : BasicMessageArgument { private double value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the eldbus. public DoubleMessageArgument(double arg) { value = arg; } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.DoubleType.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Arguments to a string like message eldbus. +/// Since EFL 1.23. +/// public abstract class StringLikeMessageArgument : BasicMessageArgument { private string value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the eldbus. public StringLikeMessageArgument(string arg) { value = arg; } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Arguments to a string message eldbus. +/// Since EFL 1.23. +/// public class StringMessageArgument : StringLikeMessageArgument { + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the eldbus. public StringMessageArgument(string arg) : base(arg) { } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.StringType.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } } +/// +/// Arguments to an object path message eldbus. +/// Since EFL 1.23. +/// public class ObjectPathMessageArgument : StringLikeMessageArgument { + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// public ObjectPathMessageArgument(ObjectPath arg) : base(arg.value) { } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.ObjectPathType.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } } +/// +/// Arguments to a signature message eldbus. +/// Since EFL 1.23. +/// public class SignatureMessageArgument : StringLikeMessageArgument { + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the eldbus. public SignatureMessageArgument(SignatureString arg) : base(arg.value) { } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.SignatureType.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } } +/// +/// Arguments to an unixfd message eldbus. +/// Since EFL 1.23. +/// public class UnixFdMessageArgument : BasicMessageArgument { private Int32 value; + /// + /// Constructor. + /// Since EFL 1.23. + /// + /// The arguments of the eldbus. public UnixFdMessageArgument(UnixFd arg) { value = arg.value; } + /// + /// The code of the type. + /// Since EFL 1.23. + /// public override char TypeCode { get { return Argument.UnixFdType.Code; } } + /// + /// The signature of the type. + /// Since EFL 1.23. + /// public override string Signature { get { return Argument.ByteType.Signature; } } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.Message msg) { return eldbus_message_arguments_append(msg.Handle, Signature, value); } + [EditorBrowsable(EditorBrowsableState.Never)] protected override bool InternalAppendTo(eldbus.MessageIterator iter) { return eldbus_message_iter_basic_append(iter.Handle, TypeCode, value); } } +/// +/// Function type to delegate a message. +/// Since EFL 1.23. +/// +/// The message. +/// public delegate void MessageDelegate(eldbus.Message msg, eldbus.Pending pending); +/// +/// Commons for eldbus. +/// Since EFL 1.23. +/// public static class Common { + /// + /// Register the NullError. + /// Since EFL 1.23. + /// public static void RaiseNullHandle() { if (NullHandleError == 0) @@ -687,13 +1324,28 @@ public static class Common Eina.Error.Raise(NullHandleError); } + /// + /// Instance for a EldBus_Message_Cb. + /// Since EFL 1.23. + /// + /// The data to the eldbus. + /// The message to eldbus. + /// public delegate void Eldbus_Message_Cb(IntPtr data, IntPtr msg, IntPtr pending); + /// + /// Get a wrapper for the message instance. + /// Since EFL 1.23. + /// public static IntPtr GetMessageCbWrapperPtr() { return Marshal.GetFunctionPointerForDelegate(GetMessageCbWrapper()); } + /// + /// Gets the message wrapper. + /// Since EFL 1.23. + /// public static Eldbus_Message_Cb GetMessageCbWrapper() { if (message_cb_wrapper == null) @@ -704,6 +1356,13 @@ public static class Common return message_cb_wrapper; } + /// + /// Wraps the data to a message. + /// Since EFL 1.23. + /// + /// + /// + /// public static void MessageCbWrapper(IntPtr data, IntPtr msg_hdl, IntPtr pending_hdl) { MessageDelegate dlgt = Marshal.GetDelegateForFunctionPointer(data, typeof(MessageDelegate)) as MessageDelegate;