summaryrefslogtreecommitdiff
path: root/src/publishing/Publishing.c
blob: 4bcc4dbf5706611897365af3d5ce5a4dbbff4fc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
/* Publishing.c generated by valac 0.40.4, the Vala compiler
 * generated from Publishing.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */


#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include "shotwell-plugin-dev-1.0.h"
#include <glib/gi18n-lib.h>




void publishing_init (GError** error);
static void _vala_array_add54 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add55 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add56 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add57 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
void plugins_register_extension_point (GType type,
                                       const gchar* name,
                                       const gchar* icon_name,
                                       gchar** core_ids,
                                       int core_ids_length1);
#define RESOURCES_PUBLISH "applications-internet"
void publishing_terminate (void);
static void _vala_array_destroy (gpointer array,
                          gint array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gint array_length,
                       GDestroyNotify destroy_func);


static void
_vala_array_add54 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 11 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	if ((*length) == (*size)) {
#line 11 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 11 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 66 "Publishing.c"
	}
#line 11 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	(*array)[(*length)++] = value;
#line 11 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	(*array)[*length] = NULL;
#line 72 "Publishing.c"
}


static void
_vala_array_add55 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 12 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	if ((*length) == (*size)) {
#line 12 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 12 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 88 "Publishing.c"
	}
#line 12 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	(*array)[(*length)++] = value;
#line 12 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	(*array)[*length] = NULL;
#line 94 "Publishing.c"
}


static void
_vala_array_add56 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 13 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	if ((*length) == (*size)) {
#line 13 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 13 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 110 "Publishing.c"
	}
#line 13 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	(*array)[(*length)++] = value;
#line 13 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	(*array)[*length] = NULL;
#line 116 "Publishing.c"
}


static void
_vala_array_add57 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 14 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	if ((*length) == (*size)) {
#line 14 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 14 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 132 "Publishing.c"
	}
#line 14 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	(*array)[(*length)++] = value;
#line 14 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	(*array)[*length] = NULL;
#line 138 "Publishing.c"
}


void
publishing_init (GError** error)
{
	gchar** core_ids = NULL;
	gchar** _tmp0_;
	gint core_ids_length1;
	gint _core_ids_size_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gchar* _tmp6_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	gchar* _tmp8_;
	gchar** _tmp9_;
	gint _tmp9__length1;
#line 10 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp0_ = g_new0 (gchar*, 0 + 1);
#line 10 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	core_ids = _tmp0_;
#line 10 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	core_ids_length1 = 0;
#line 10 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_core_ids_size_ = core_ids_length1;
#line 11 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp1_ = core_ids;
#line 11 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp1__length1 = core_ids_length1;
#line 11 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp2_ = g_strdup ("org.yorba.shotwell.publishing.facebook");
#line 11 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_vala_array_add54 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp2_);
#line 12 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp3_ = core_ids;
#line 12 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp3__length1 = core_ids_length1;
#line 12 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp4_ = g_strdup ("org.yorba.shotwell.publishing.picasa");
#line 12 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_vala_array_add55 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp4_);
#line 13 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp5_ = core_ids;
#line 13 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp5__length1 = core_ids_length1;
#line 13 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp6_ = g_strdup ("org.yorba.shotwell.publishing.flickr");
#line 13 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_vala_array_add56 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp6_);
#line 14 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp7_ = core_ids;
#line 14 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp7__length1 = core_ids_length1;
#line 14 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp8_ = g_strdup ("org.yorba.shotwell.publishing.youtube");
#line 14 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_vala_array_add57 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp8_);
#line 16 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp9_ = core_ids;
#line 16 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	_tmp9__length1 = core_ids_length1;
#line 16 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	plugins_register_extension_point (SPIT_PUBLISHING_TYPE_SERVICE, _ ("Publishing"), RESOURCES_PUBLISH, _tmp9_, _tmp9__length1);
#line 9 "/home/jens/Source/shotwell/src/publishing/Publishing.vala"
	core_ids = (_vala_array_free (core_ids, core_ids_length1, (GDestroyNotify) g_free), NULL);
#line 211 "Publishing.c"
}


void
publishing_terminate (void)
{
}


static void
_vala_array_destroy (gpointer array,
                     gint array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void
_vala_array_free (gpointer array,
                  gint array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}