Пример #1
0
 public void AppendTo(eldbus.MessageIterator iter)
 {
     if (!InternalAppendTo(iter))
     {
         throw new SEHException("Eldbus: could not append basic type to eldbus.MessageIterator");
     }
 }
 public void AppendTo(eldbus.MessageIterator iter)
 {
     if (!InternalAppendTo(iter))
     {
         eina.Error.RaiseIfOccurred();
         throw new SEHException("Eldbus: could not append basic type to eldbus.MessageIterator");
     }
 }
Пример #3
0
        public void Get(out eldbus.MessageIterator iter, string signatue)
        {
            CheckHandle();
            IntPtr hdl = IntPtr.Zero;

            if (!eldbus_message_iter_arguments_get(Handle, signatue, out hdl) || hdl == IntPtr.Zero)
            {
                throw new SEHException("Eldbus: could not get argument");
            }
            iter = new eldbus.MessageIterator(hdl, Handle);
        }
Пример #4
0
        public static void utc_eldbus_message_iterator_activatable_list_p()
        {
            eldbus.MessageDelegate responseMessageCb = delegate(eldbus.Message msg, eldbus.Pending p)
            {
                try
                {
                    if (timeout != IntPtr.Zero)
                    {
                        ecore_timer_del(timeout);
                        timeout = IntPtr.Zero;
                    }

                    string errname, errmsg;
                    if (msg.GetError(out errname, out errmsg))
                    {
                        return;
                    }

                    eldbus.MessageIterator iterMain = msg.GetMessageIterator();

                    string signature = iterMain.GetSignature();
                    if (String.IsNullOrEmpty(signature))
                    {
                        return;
                    }

                    eldbus.MessageIterator iterator;
                    iterMain.Get(out iterator, signature);

                    string bus_name;
                    bool   isHasData = false;

                    while (iterator.GetAndNext(out bus_name))
                    {
                        if (String.IsNullOrEmpty(bus_name))
                        {
                            return;
                        }
                        isHasData = true;
                    }

                    isSuccess = isHasData;
                }
                finally
                {
                    ecore_main_loop_quit();
                }
            };

            ActivatableList(responseMessageCb);
        }
Пример #5
0
        public bool GetAndNext(out eldbus.MessageIterator iter, char typecode)
        {
            CheckHandle();
            IntPtr hdl = IntPtr.Zero;
            bool   r   = eldbus_message_iter_get_and_next(Handle, typecode, out hdl);

            if (hdl == IntPtr.Zero)
            {
                throw new SEHException("Eldbus: could not get argument");
            }
            iter = new eldbus.MessageIterator(hdl, Handle);

            return(r);
        }
Пример #6
0
        public bool GetAndNext(out eldbus.MessageIterator iter, string signatue)
        {
            CheckHandle();
            IntPtr hdl = IntPtr.Zero;

            if (!eldbus_message_iter_arguments_get(Handle, signatue, out hdl) || hdl == IntPtr.Zero)
            {
                eina.Error.RaiseIfOccurred();
                throw new SEHException("Eldbus: could not get argument");
            }
            iter = new eldbus.MessageIterator(hdl, Handle);

            return(Next());
        }
Пример #7
0
        public static void utc_eldbus_message_iter_next_p()
        {
            eldbus.MessageDelegate activatableListResponseCb = delegate(eldbus.Message msg, eldbus.Pending p)
            {
                try
                {
                    string errname, errmsg;
                    if (msg.GetError(out errname, out errmsg))
                    {
                        return;
                    }

                    eldbus.MessageIterator iterMain = msg.GetMessageIterator();

                    string signature = iterMain.GetSignature();
                    if (String.IsNullOrEmpty(signature))
                    {
                        return;
                    }

                    eldbus.MessageIterator iterator;
                    iterMain.Get(out iterator, signature);

                    bool isHasData = false;
                    do
                    {
                        string busName;
                        iterator.Get(out busName);
                        if (String.IsNullOrEmpty(busName))
                        {
                            return;
                        }
                        isHasData = true;
                    } while (iterator.Next());

                    isSuccess = isHasData;
                }
                finally
                {
                    Efl.App.AppMain.Quit(0);
                }
            };
            ActivatableList(activatableListResponseCb);
        }
Пример #8
0
 protected override bool InternalAppendTo(eldbus.MessageIterator iter)
 {
     return(eldbus_message_iter_basic_append(iter.Handle, TypeCode, value));
 }
Пример #9
0
 protected abstract bool InternalAppendTo(eldbus.MessageIterator iter);