~ubuntu-branches/ubuntu/quantal/folks/quantal

« back to all changes in this revision

Viewing changes to tools/inspect/command-quit.c

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-09-12 09:48:10 UTC
  • mfrom: (1.6.2)
  • Revision ID: package-import@ubuntu.com-20120912094810-6zlx8889hcovxj7p
Tags: 0.7.4.1-0ubuntu1
* New upstream bugfix release
* debian/control:
  - Bump build-depends on libglib2.0-dev, valac-0.18, libvala-0.18-dev
* debian/libfolks-eds25.symbols:
* debian/libfolks25.symbols:
  - Updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 */
3
3
 
4
4
/*
23
23
 
24
24
#include <glib.h>
25
25
#include <glib-object.h>
 
26
#include <gio/gio.h>
26
27
#include <stdlib.h>
27
28
#include <string.h>
28
29
 
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;
61
65
 
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;
86
91
};
87
92
 
 
93
struct _FolksInspectCommandsQuitRunData {
 
94
        int _state_;
 
95
        GObject* _source_object_;
 
96
        GAsyncResult* _res_;
 
97
        GSimpleAsyncResult* _async_result;
 
98
        FolksInspectCommandsQuit* self;
 
99
        gchar* command_string;
 
100
};
 
101
 
88
102
 
89
103
static gpointer folks_inspect_commands_quit_parent_class = NULL;
90
104
 
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_);
107
123
 
108
124
 
109
125
FolksInspectCommandsQuit* folks_inspect_commands_quit_construct (GType object_type, FolksInspectClient* client) {
121
137
}
122
138
 
123
139
 
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_;
 
142
        _data_ = _data;
 
143
        _g_free0 (_data_->command_string);
 
144
        _folks_inspect_command_unref0 (_data_->self);
 
145
        g_slice_free (FolksInspectCommandsQuitRunData, _data_);
 
146
}
 
147
 
 
148
 
 
149
static gpointer _folks_inspect_command_ref0 (gpointer self) {
 
150
        return self ? folks_inspect_command_ref (self) : NULL;
 
151
}
 
152
 
 
153
 
 
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_;
 
158
        const gchar* _tmp1_;
 
159
        gchar* _tmp2_;
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_);
 
171
}
 
172
 
 
173
 
 
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_));
 
177
}
 
178
 
 
179
 
 
180
static gboolean folks_inspect_commands_quit_real_run_co (FolksInspectCommandsQuitRunData* _data_) {
 
181
        switch (_data_->_state_) {
 
182
                case 0:
 
183
                goto _state_0;
 
184
                default:
 
185
                g_assert_not_reached ();
 
186
        }
 
187
        _state_0:
127
188
        exit (0);
 
189
        if (_data_->_state_ == 0) {
 
190
                g_simple_async_result_complete_in_idle (_data_->_async_result);
 
191
        } else {
 
192
                g_simple_async_result_complete (_data_->_async_result);
 
193
        }
 
194
        g_object_unref (_data_->_async_result);
 
195
        return FALSE;
128
196
}
129
197
 
130
198
 
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;