~ubuntu-branches/ubuntu/trusty/gupnp-tools/trusty

« back to all changes in this revision

Viewing changes to src/universal-cp/action-dialog.c

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2013-09-03 19:29:44 UTC
  • mfrom: (9.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130903192944-gvgyqynjh5n74h5d
Tags: 0.8.7-1
* Imported Upstream version 0.8.7
  - Fix argument order in UPnP calls. (Closes: #519464)
* use DEB_LDFLAGS_MAINT_APPEND and include buildflags.mk
  - avoids overriding hardening build flags
* Add build-dependency on autotools-dev
  - this lets CDBS automatically update config.guess/config.sub

Show diffs side-by-side

added added

removed removed

Lines of Context:
572
572
        }
573
573
}
574
574
 
575
 
static GHashTable *
 
575
static void
576
576
retrieve_in_action_arguments (GUPnPServiceIntrospection *introspection,
577
 
                              GUPnPServiceActionInfo    *action_info)
 
577
                              GUPnPServiceActionInfo    *action_info,
 
578
                              GList                     **in_names,
 
579
                              GList                     **in_values)
578
580
{
579
 
        GHashTable *in_args;
580
581
        GList      *arg_node;
581
582
 
582
 
        in_args = g_hash_table_new_full (g_str_hash,
583
 
                                         g_direct_equal,
584
 
                                         NULL,
585
 
                                         g_value_free);
586
 
 
587
583
        arg_node = gtk_container_get_children (GTK_CONTAINER (in_args_table));
588
584
 
589
585
        for (; arg_node; arg_node = arg_node->next) {
600
596
                if (name == NULL)
601
597
                        continue;
602
598
 
603
 
                g_hash_table_insert (in_args, name, value);
 
599
                *in_names = g_list_append (*in_names, name);
 
600
                *in_values = g_list_append (*in_values, value);
604
601
        }
605
 
 
606
 
        return in_args;
607
602
}
608
603
 
609
604
static GHashTable *
735
730
        GUPnPServiceProxy         *proxy;
736
731
        GUPnPServiceIntrospection *introspection;
737
732
        GUPnPServiceActionInfo    *action_info;
738
 
        GHashTable                *in_args;
 
733
        GList                     *in_names = NULL, *in_values = NULL;
739
734
 
740
735
        action_info = get_selected_action (&proxy, &introspection);
741
736
        if (action_info == NULL)
742
737
                return;
743
738
 
744
 
        in_args = retrieve_in_action_arguments (introspection,
745
 
                                                action_info);
746
 
 
747
 
        gupnp_service_proxy_begin_action_hash (proxy,
748
 
                                              action_info->name,
749
 
                                              on_action_complete,
750
 
                                              NULL,
751
 
                                              in_args);
752
 
 
753
 
        g_hash_table_destroy (in_args);
 
739
        retrieve_in_action_arguments (introspection,
 
740
                                      action_info,
 
741
                                      &in_names,
 
742
                                      &in_values);
 
743
 
 
744
        gupnp_service_proxy_begin_action_list (proxy,
 
745
                                               action_info->name,
 
746
                                               in_names,
 
747
                                               in_values,
 
748
                                               on_action_complete,
 
749
                                               NULL);
 
750
 
 
751
        g_list_free (in_names);
 
752
        g_list_free_full (in_values, g_value_free);
 
753
 
754
754
        g_object_unref (proxy);
755
755
        g_object_unref (introspection);
756
756
}