4 * Copyright (C) 2012 Intel Corporation. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU Lesser General Public License,
8 * version 2.1, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
19 * Mark Ryan <mark.d.ryan@intel.com>
29 enum msu_task_type_t_ {
32 MSU_TASK_GET_CHILDREN,
33 MSU_TASK_GET_ALL_PROPS,
36 MSU_TASK_GET_RESOURCE,
37 MSU_TASK_SET_PREFER_LOCAL_ADDRESSES,
38 MSU_TASK_SET_PROTOCOL_INFO,
39 MSU_TASK_UPLOAD_TO_ANY,
41 MSU_TASK_GET_UPLOAD_STATUS,
42 MSU_TASK_GET_UPLOAD_IDS,
43 MSU_TASK_CANCEL_UPLOAD,
44 MSU_TASK_DELETE_OBJECT,
45 MSU_TASK_CREATE_CONTAINER,
46 MSU_TASK_CREATE_CONTAINER_IN_ANY,
47 MSU_TASK_UPDATE_OBJECT
49 typedef enum msu_task_type_t_ msu_task_type_t;
51 typedef void (*msu_cancel_task_t)(void *handle);
53 typedef struct msu_task_get_children_t_ msu_task_get_children_t;
54 struct msu_task_get_children_t_ {
63 typedef struct msu_task_get_props_t_ msu_task_get_props_t;
64 struct msu_task_get_props_t_ {
65 gchar *interface_name;
68 typedef struct msu_task_get_prop_t_ msu_task_get_prop_t;
69 struct msu_task_get_prop_t_ {
71 gchar *interface_name;
74 typedef struct msu_task_search_t_ msu_task_search_t;
75 struct msu_task_search_t_ {
83 typedef struct msu_task_get_resource_t_ msu_task_get_resource_t;
84 struct msu_task_get_resource_t_ {
89 typedef struct msu_task_set_prefer_local_addresses_t_
90 msu_task_set_prefer_local_addresses_t;
91 struct msu_task_set_prefer_local_addresses_t_ {
95 typedef struct msu_task_set_protocol_info_t_ msu_task_set_protocol_info_t;
96 struct msu_task_set_protocol_info_t_ {
100 typedef struct msu_task_upload_t_ msu_task_upload_t;
101 struct msu_task_upload_t_ {
106 typedef struct msu_task_upload_action_t_ msu_task_upload_action_t;
107 struct msu_task_upload_action_t_ {
111 typedef struct msu_task_create_container_t_ msu_task_create_container_t;
112 struct msu_task_create_container_t_ {
115 GVariant *child_types;
118 typedef struct msu_task_update_t_ msu_task_update_t;
119 struct msu_task_update_t_ {
120 GVariant *to_add_update;
124 typedef struct msu_task_t_ msu_task_t;
126 msu_task_type_t type;
128 const gchar *result_format;
130 GDBusMethodInvocation *invocation;
131 gboolean synchronous;
132 gboolean multiple_retvals;
134 msu_task_get_children_t get_children;
135 msu_task_get_props_t get_props;
136 msu_task_get_prop_t get_prop;
137 msu_task_search_t search;
138 msu_task_get_resource_t resource;
139 msu_task_set_prefer_local_addresses_t prefer_local_addresses;
140 msu_task_set_protocol_info_t protocol_info;
141 msu_task_upload_t upload;
142 msu_task_upload_action_t upload_action;
143 msu_task_create_container_t create_container;
144 msu_task_update_t update;
148 msu_task_t *msu_task_get_version_new(GDBusMethodInvocation *invocation);
149 msu_task_t *msu_task_get_servers_new(GDBusMethodInvocation *invocation);
150 msu_task_t *msu_task_get_children_new(GDBusMethodInvocation *invocation,
151 const gchar *path, GVariant *parameters,
152 gboolean items, gboolean containers);
153 msu_task_t *msu_task_get_children_ex_new(GDBusMethodInvocation *invocation,
155 GVariant *parameters, gboolean items,
156 gboolean containers);
157 msu_task_t *msu_task_get_prop_new(GDBusMethodInvocation *invocation,
158 const gchar *path, GVariant *parameters);
159 msu_task_t *msu_task_get_props_new(GDBusMethodInvocation *invocation,
160 const gchar *path, GVariant *parameters);
161 msu_task_t *msu_task_search_new(GDBusMethodInvocation *invocation,
162 const gchar *path, GVariant *parameters);
163 msu_task_t *msu_task_search_ex_new(GDBusMethodInvocation *invocation,
164 const gchar *path, GVariant *parameters);
165 msu_task_t *msu_task_get_resource_new(GDBusMethodInvocation *invocation,
166 const gchar *path, GVariant *parameters);
167 msu_task_t *msu_task_set_protocol_info_new(GDBusMethodInvocation *invocation,
168 GVariant *parameters);
169 msu_task_t *msu_task_prefer_local_addresses_new(
170 GDBusMethodInvocation *invocation,
171 GVariant *parameters);
172 msu_task_t *msu_task_upload_to_any_new(GDBusMethodInvocation *invocation,
173 const gchar *path, GVariant *parameters);
174 msu_task_t *msu_task_upload_new(GDBusMethodInvocation *invocation,
175 const gchar *path, GVariant *parameters);
176 msu_task_t *msu_task_get_upload_status_new(GDBusMethodInvocation *invocation,
178 GVariant *parameters);
179 msu_task_t *msu_task_get_upload_ids_new(GDBusMethodInvocation *invocation,
181 msu_task_t *msu_task_cancel_upload_new(GDBusMethodInvocation *invocation,
183 GVariant *parameters);
184 msu_task_t *msu_task_delete_new(GDBusMethodInvocation *invocation,
186 msu_task_t *msu_task_create_container_new_generic(
187 GDBusMethodInvocation *invocation,
188 msu_task_type_t type,
190 GVariant *parameters);
191 msu_task_t *msu_task_update_new(GDBusMethodInvocation *invocation,
192 const gchar *path, GVariant *parameters);
193 void msu_task_complete_and_delete(msu_task_t *task);
194 void msu_task_fail_and_delete(msu_task_t *task, GError *error);
195 void msu_task_cancel_and_delete(msu_task_t *task);
196 void msu_task_delete(msu_task_t *task);