summaryrefslogtreecommitdiffstats
path: root/gio/gfile.override
diff options
context:
space:
mode:
Diffstat (limited to 'gio/gfile.override')
-rw-r--r--gio/gfile.override95
1 files changed, 92 insertions, 3 deletions
diff --git a/gio/gfile.override b/gio/gfile.override
index 29ce187..406d62a 100644
--- a/gio/gfile.override
+++ b/gio/gfile.override
@@ -1422,10 +1422,99 @@ _wrap_g_file_query_filesystem_info_async(PyGObject *self, PyObject *args, PyObje
pygio_notify_free(notify);
return NULL;
}
+%%
+override g_file_set_attributes_async kwargs
+static PyObject *
+_wrap_g_file_set_attributes_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "info", "callback", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGObject *info;
+ PyGIONotify *notify;
+ GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OiOO:GFile.set_attributes_async",
+ kwlist,
+ &PyGFileInfo_Type,
+ &info,
+ &notify->callback,
+ &flags,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_set_attributes_async(G_FILE(self->obj),
+ G_FILE_INFO(info->obj),
+ flags,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+%%
+override g_file_set_attributes_finish kwargs
+static PyObject *
+_wrap_g_file_set_attributes_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *res;
+ GFileInfo *info = NULL;
+ GError *error = NULL;
+ gboolean ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:File.set_attributes_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &res))
+ return NULL;
+
+ ret = g_file_set_attributes_finish(G_FILE(self->obj),
+ G_ASYNC_RESULT(res->obj), &info,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ py_ret = pygobject_new((GObject *)info);
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+
+ return py_ret;
+}
-/* GFile.set_attributes_async */
/* GFile.set_display_name_async */
/* GFile.load_partial_contents_async: No ArgType for GFileReadMoreCallback */
-/* GFile.move: No ArgType for GFileProgressCallback */
-/* GFile.set_attributes_finish: No ArgType for GFileInfo** */
/* GFile.load_partial_contents_finish: No ArgType for char** */