Пример #1
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);
        }
Пример #2
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);
        }