1
/* command-quit.c generated by valac 0.17.3, the Vala compiler
1
/* command-quit.c generated by valac 0.17.6.5-65f99, the Vala compiler
2
2
* generated from command-quit.vala, do not modify */
58
59
typedef struct _FolksInspectCommandsQuit FolksInspectCommandsQuit;
59
60
typedef struct _FolksInspectCommandsQuitClass FolksInspectCommandsQuitClass;
60
61
typedef struct _FolksInspectCommandsQuitPrivate FolksInspectCommandsQuitPrivate;
62
#define _g_free0(var) (var = (g_free (var), NULL))
63
#define _folks_inspect_command_unref0(var) ((var == NULL) ? NULL : (var = (folks_inspect_command_unref (var), NULL)))
64
typedef struct _FolksInspectCommandsQuitRunData FolksInspectCommandsQuitRunData;
62
66
struct _FolksInspectCommand {
63
67
GTypeInstance parent_instance;
69
73
struct _FolksInspectCommandClass {
70
74
GTypeClass parent_class;
71
75
void (*finalize) (FolksInspectCommand *self);
72
void (*run) (FolksInspectCommand* self, const gchar* command_string);
76
void (*run) (FolksInspectCommand* self, const gchar* command_string, GAsyncReadyCallback _callback_, gpointer _user_data_);
77
void (*run_finish) (FolksInspectCommand* self, GAsyncResult* _res_);
73
78
gchar** (*complete_subcommand) (FolksInspectCommand* self, const gchar* subcommand, int* result_length1);
74
79
const gchar* (*get_name) (FolksInspectCommand* self);
75
80
const gchar* (*get_description) (FolksInspectCommand* self);
85
90
FolksInspectCommandClass parent_class;
93
struct _FolksInspectCommandsQuitRunData {
95
GObject* _source_object_;
97
GSimpleAsyncResult* _async_result;
98
FolksInspectCommandsQuit* self;
99
gchar* command_string;
89
103
static gpointer folks_inspect_commands_quit_parent_class = NULL;
103
117
FolksInspectCommandsQuit* folks_inspect_commands_quit_new (FolksInspectClient* client);
104
118
FolksInspectCommandsQuit* folks_inspect_commands_quit_construct (GType object_type, FolksInspectClient* client);
105
119
FolksInspectCommand* folks_inspect_command_construct (GType object_type, FolksInspectClient* client);
106
static void folks_inspect_commands_quit_real_run (FolksInspectCommand* base, const gchar* command_string);
120
static void folks_inspect_commands_quit_real_run_data_free (gpointer _data);
121
static void folks_inspect_commands_quit_real_run (FolksInspectCommand* base, const gchar* command_string, GAsyncReadyCallback _callback_, gpointer _user_data_);
122
static gboolean folks_inspect_commands_quit_real_run_co (FolksInspectCommandsQuitRunData* _data_);
109
125
FolksInspectCommandsQuit* folks_inspect_commands_quit_construct (GType object_type, FolksInspectClient* client) {
124
static void folks_inspect_commands_quit_real_run (FolksInspectCommand* base, const gchar* command_string) {
140
static void folks_inspect_commands_quit_real_run_data_free (gpointer _data) {
141
FolksInspectCommandsQuitRunData* _data_;
143
_g_free0 (_data_->command_string);
144
_folks_inspect_command_unref0 (_data_->self);
145
g_slice_free (FolksInspectCommandsQuitRunData, _data_);
149
static gpointer _folks_inspect_command_ref0 (gpointer self) {
150
return self ? folks_inspect_command_ref (self) : NULL;
154
static void folks_inspect_commands_quit_real_run (FolksInspectCommand* base, const gchar* command_string, GAsyncReadyCallback _callback_, gpointer _user_data_) {
125
155
FolksInspectCommandsQuit * self;
156
FolksInspectCommandsQuitRunData* _data_;
157
FolksInspectCommandsQuit* _tmp0_;
126
160
self = (FolksInspectCommandsQuit*) base;
161
_data_ = g_slice_new0 (FolksInspectCommandsQuitRunData);
162
_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, folks_inspect_commands_quit_real_run);
163
g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_inspect_commands_quit_real_run_data_free);
164
_tmp0_ = _folks_inspect_command_ref0 (self);
165
_data_->self = _tmp0_;
166
_tmp1_ = command_string;
167
_tmp2_ = g_strdup (_tmp1_);
168
_g_free0 (_data_->command_string);
169
_data_->command_string = _tmp2_;
170
folks_inspect_commands_quit_real_run_co (_data_);
174
static void folks_inspect_commands_quit_real_run_finish (FolksInspectCommand* base, GAsyncResult* _res_) {
175
FolksInspectCommandsQuitRunData* _data_;
176
_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
180
static gboolean folks_inspect_commands_quit_real_run_co (FolksInspectCommandsQuitRunData* _data_) {
181
switch (_data_->_state_) {
185
g_assert_not_reached ();
189
if (_data_->_state_ == 0) {
190
g_simple_async_result_complete_in_idle (_data_->_async_result);
192
g_simple_async_result_complete (_data_->_async_result);
194
g_object_unref (_data_->_async_result);
158
226
static void folks_inspect_commands_quit_class_init (FolksInspectCommandsQuitClass * klass) {
159
227
folks_inspect_commands_quit_parent_class = g_type_class_peek_parent (klass);
160
228
FOLKS_INSPECT_COMMAND_CLASS (klass)->run = folks_inspect_commands_quit_real_run;
229
FOLKS_INSPECT_COMMAND_CLASS (klass)->run_finish = folks_inspect_commands_quit_real_run_finish;
161
230
FOLKS_INSPECT_COMMAND_CLASS (klass)->get_name = folks_inspect_commands_quit_real_get_name;
162
231
FOLKS_INSPECT_COMMAND_CLASS (klass)->get_description = folks_inspect_commands_quit_real_get_description;
163
232
FOLKS_INSPECT_COMMAND_CLASS (klass)->get_help = folks_inspect_commands_quit_real_get_help;