~ubuntu-branches/ubuntu/precise/tumbler/precise

« back to all changes in this revision

Viewing changes to tumblerd/tumbler-specialized-thumbnailer.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2010-11-07 16:34:58 UTC
  • Revision ID: james.westby@ubuntu.com-20101107163458-skwfq34vnuavipne
Tags: upstream-0.1.4
ImportĀ upstreamĀ versionĀ 0.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* vi:set et ai sw=2 sts=2 ts=2: */
 
2
/*-
 
3
 * Copyright (c) 2009 Jannis Pohlmann <jannis@xfce.org>
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or 
 
6
 * modify it under the terms of the GNU General Public License as
 
7
 * published by the Free Software Foundation; either version 2 of 
 
8
 * the License, or (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public 
 
16
 * License along with this program; if not, write to the Free 
 
17
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
18
 * Boston, MA 02110-1301, USA.
 
19
 */
 
20
 
 
21
#ifdef HAVE_CONFIG_H
 
22
#include <config.h>
 
23
#endif
 
24
 
 
25
#include <glib.h>
 
26
#include <glib/gi18n.h>
 
27
#include <glib-object.h>
 
28
 
 
29
#include <tumbler/tumbler.h>
 
30
#include <tumbler/tumbler-marshal.h>
 
31
 
 
32
#include <tumblerd/tumbler-specialized-thumbnailer.h>
 
33
 
 
34
 
 
35
 
 
36
/* Property identifiers */
 
37
enum
 
38
{
 
39
  PROP_0,
 
40
  PROP_NAME,
 
41
  PROP_OBJECT_PATH,
 
42
  PROP_CONNECTION,
 
43
  PROP_PROXY,
 
44
  PROP_FOREIGN,
 
45
  PROP_MODIFIED,
 
46
};
 
47
 
 
48
 
 
49
 
 
50
typedef struct _SpecializedInfo SpecializedInfo; 
 
51
 
 
52
 
 
53
 
 
54
static void tumbler_specialized_thumbnailer_iface_init      (TumblerThumbnailerIface       *iface);
 
55
static void tumbler_specialized_thumbnailer_constructed     (GObject                       *object);
 
56
static void tumbler_specialized_thumbnailer_finalize        (GObject                       *object);
 
57
static void tumbler_specialized_thumbnailer_get_property    (GObject                       *object,
 
58
                                                             guint                          prop_id,
 
59
                                                             GValue                        *value,
 
60
                                                             GParamSpec                    *pspec);
 
61
static void tumbler_specialized_thumbnailer_set_property    (GObject                       *object,
 
62
                                                             guint                          prop_id,
 
63
                                                             const GValue                  *value,
 
64
                                                             GParamSpec                    *pspec);
 
65
static void tumbler_specialized_thumbnailer_create          (TumblerThumbnailer            *thumbnailer,
 
66
                                                             GCancellable                  *cancellable,
 
67
                                                             TumblerFileInfo               *info);
 
68
static void tumbler_specialized_thumbnailer_proxy_destroyed (DBusGProxy                    *proxy,
 
69
                                                             TumblerSpecializedThumbnailer *thumbnailer);
 
70
 
 
71
 
 
72
 
 
73
struct _TumblerSpecializedThumbnailerClass
 
74
{
 
75
  TumblerAbstractThumbnailerClass __parent__;
 
76
};
 
77
 
 
78
struct _TumblerSpecializedThumbnailer
 
79
{
 
80
  TumblerAbstractThumbnailer __parent__;
 
81
 
 
82
  DBusGConnection *connection;
 
83
  DBusGProxy      *proxy;
 
84
 
 
85
  gboolean         foreign;
 
86
  guint64          modified;
 
87
 
 
88
  gchar           *name;
 
89
  gchar           *object_path;
 
90
};
 
91
 
 
92
struct _SpecializedInfo
 
93
{
 
94
  TumblerThumbnailer *thumbnailer;
 
95
  GCond              *condition;
 
96
  GMutex             *mutex;
 
97
  const gchar        *uri;
 
98
  const gchar        *mime_type;
 
99
  gboolean            had_callback;
 
100
  guint               handle;
 
101
};
 
102
 
 
103
 
 
104
 
 
105
G_DEFINE_TYPE_WITH_CODE (TumblerSpecializedThumbnailer, 
 
106
                         tumbler_specialized_thumbnailer,
 
107
                         TUMBLER_TYPE_ABSTRACT_THUMBNAILER,
 
108
                         G_IMPLEMENT_INTERFACE (TUMBLER_TYPE_THUMBNAILER,
 
109
                                                tumbler_specialized_thumbnailer_iface_init));
 
110
 
 
111
 
 
112
 
 
113
static void
 
114
tumbler_specialized_thumbnailer_class_init (TumblerSpecializedThumbnailerClass *klass)
 
115
{
 
116
  GObjectClass *gobject_class;
 
117
 
 
118
  gobject_class = G_OBJECT_CLASS (klass);
 
119
  gobject_class->constructed = tumbler_specialized_thumbnailer_constructed;
 
120
  gobject_class->finalize = tumbler_specialized_thumbnailer_finalize; 
 
121
  gobject_class->get_property = tumbler_specialized_thumbnailer_get_property;
 
122
  gobject_class->set_property = tumbler_specialized_thumbnailer_set_property;
 
123
 
 
124
  g_object_class_install_property (gobject_class,
 
125
                                   PROP_NAME,
 
126
                                   g_param_spec_string ("name",
 
127
                                                        "name",
 
128
                                                        "name",
 
129
                                                        NULL,
 
130
                                                        G_PARAM_CONSTRUCT_ONLY |
 
131
                                                        G_PARAM_READWRITE));
 
132
 
 
133
  g_object_class_install_property (gobject_class,
 
134
                                   PROP_OBJECT_PATH,
 
135
                                   g_param_spec_string ("object-path",
 
136
                                                        "object-path",
 
137
                                                        "object-path",
 
138
                                                        NULL,
 
139
                                                        G_PARAM_CONSTRUCT_ONLY |
 
140
                                                        G_PARAM_READWRITE));
 
141
 
 
142
  g_object_class_install_property (gobject_class,
 
143
                                   PROP_CONNECTION,
 
144
                                   g_param_spec_pointer ("connection",
 
145
                                                         "connection",
 
146
                                                         "connection",
 
147
                                                         G_PARAM_CONSTRUCT_ONLY |
 
148
                                                         G_PARAM_READWRITE));
 
149
 
 
150
  g_object_class_install_property (gobject_class,
 
151
                                   PROP_PROXY,
 
152
                                   g_param_spec_object ("proxy",
 
153
                                                        "proxy",
 
154
                                                        "proxy",
 
155
                                                        DBUS_TYPE_G_PROXY,
 
156
                                                        G_PARAM_READABLE));
 
157
 
 
158
  g_object_class_install_property (gobject_class,
 
159
                                   PROP_FOREIGN,
 
160
                                   g_param_spec_boolean ("foreign",
 
161
                                                         "foreign",
 
162
                                                         "foreign",
 
163
                                                         FALSE,
 
164
                                                         G_PARAM_CONSTRUCT_ONLY |
 
165
                                                         G_PARAM_READWRITE));
 
166
 
 
167
  g_object_class_install_property (gobject_class,
 
168
                                   PROP_MODIFIED,
 
169
                                   g_param_spec_uint64 ("modified",
 
170
                                                        "modified",
 
171
                                                        "modified",
 
172
                                                        0, G_MAXUINT64, 0,
 
173
                                                        G_PARAM_CONSTRUCT_ONLY |
 
174
                                                        G_PARAM_READWRITE));
 
175
 
 
176
  dbus_g_object_register_marshaller (tumbler_marshal_VOID__UINT_STRING,
 
177
                                     G_TYPE_NONE, 
 
178
                                     G_TYPE_UINT,
 
179
                                     G_TYPE_STRING,
 
180
                                     G_TYPE_INVALID);
 
181
 
 
182
  dbus_g_object_register_marshaller (g_cclosure_marshal_VOID__UINT,
 
183
                                     G_TYPE_NONE, 
 
184
                                     G_TYPE_UINT,
 
185
                                     G_TYPE_INVALID);
 
186
 
 
187
  dbus_g_object_register_marshaller (tumbler_marshal_VOID__UINT_STRING_INT_STRING,
 
188
                                     G_TYPE_NONE,
 
189
                                     G_TYPE_UINT,
 
190
                                     G_TYPE_STRING,
 
191
                                     G_TYPE_INT,
 
192
                                     G_TYPE_STRING,
 
193
                                     G_TYPE_INVALID);
 
194
 
 
195
}
 
196
 
 
197
 
 
198
 
 
199
static void
 
200
tumbler_specialized_thumbnailer_iface_init (TumblerThumbnailerIface *iface)
 
201
{
 
202
  iface->create = tumbler_specialized_thumbnailer_create;
 
203
}
 
204
 
 
205
 
 
206
 
 
207
static void
 
208
tumbler_specialized_thumbnailer_init (TumblerSpecializedThumbnailer *thumbnailer)
 
209
{
 
210
}
 
211
 
 
212
 
 
213
 
 
214
static void
 
215
tumbler_specialized_thumbnailer_constructed (GObject *object)
 
216
{
 
217
  TumblerSpecializedThumbnailer *thumbnailer = TUMBLER_SPECIALIZED_THUMBNAILER (object);
 
218
 
 
219
  g_return_if_fail (TUMBLER_SPECIALIZED_THUMBNAILER (thumbnailer));
 
220
 
 
221
  /* chain up to parent classes */
 
222
  if (G_OBJECT_CLASS (tumbler_specialized_thumbnailer_parent_class)->constructed != NULL)
 
223
    (G_OBJECT_CLASS (tumbler_specialized_thumbnailer_parent_class)->constructed) (object);
 
224
 
 
225
  thumbnailer->proxy = 
 
226
    dbus_g_proxy_new_for_name (thumbnailer->connection,
 
227
                               thumbnailer->name,
 
228
                               thumbnailer->object_path,
 
229
                               "org.freedesktop.thumbnails.SpecializedThumbnailer1");
 
230
 
 
231
  dbus_g_proxy_add_signal (thumbnailer->proxy, "Ready", 
 
232
                           G_TYPE_UINT, G_TYPE_STRING, 
 
233
                           G_TYPE_INVALID);
 
234
 
 
235
  dbus_g_proxy_add_signal (thumbnailer->proxy, "Error",
 
236
                           G_TYPE_UINT, G_TYPE_STRING, 
 
237
                           G_TYPE_INT, G_TYPE_STRING, 
 
238
                           G_TYPE_INVALID);
 
239
 
 
240
  dbus_g_proxy_add_signal (thumbnailer->proxy, "Finished", 
 
241
                           G_TYPE_UINT,
 
242
                           G_TYPE_INVALID);
 
243
 
 
244
  if (thumbnailer->foreign) {
 
245
    g_signal_connect (thumbnailer->proxy, "destroy",
 
246
                      G_CALLBACK (tumbler_specialized_thumbnailer_proxy_destroyed),
 
247
                      thumbnailer);
 
248
  }
 
249
}
 
250
 
 
251
 
 
252
 
 
253
static void
 
254
tumbler_specialized_thumbnailer_finalize (GObject *object)
 
255
{
 
256
  TumblerSpecializedThumbnailer *thumbnailer = TUMBLER_SPECIALIZED_THUMBNAILER (object);
 
257
 
 
258
  g_free (thumbnailer->name);
 
259
  g_free (thumbnailer->object_path);
 
260
 
 
261
  g_signal_handlers_disconnect_matched (thumbnailer->proxy, G_SIGNAL_MATCH_DATA,
 
262
                                        0, 0, NULL, NULL, thumbnailer);
 
263
 
 
264
  g_object_unref (thumbnailer->proxy);
 
265
 
 
266
  dbus_g_connection_unref (thumbnailer->connection);
 
267
 
 
268
  (*G_OBJECT_CLASS (tumbler_specialized_thumbnailer_parent_class)->finalize) (object);
 
269
}
 
270
 
 
271
 
 
272
 
 
273
static void
 
274
tumbler_specialized_thumbnailer_get_property (GObject    *object,
 
275
                                              guint       prop_id,
 
276
                                              GValue     *value,
 
277
                                              GParamSpec *pspec)
 
278
{
 
279
  TumblerSpecializedThumbnailer *thumbnailer = TUMBLER_SPECIALIZED_THUMBNAILER (object);
 
280
 
 
281
  switch (prop_id)
 
282
    {
 
283
    case PROP_CONNECTION:
 
284
      g_value_set_pointer (value, dbus_g_connection_ref (thumbnailer->connection));
 
285
      break;
 
286
    case PROP_NAME:
 
287
      g_value_set_string (value, thumbnailer->name);
 
288
      break;
 
289
    case PROP_OBJECT_PATH:
 
290
      g_value_set_string (value, thumbnailer->object_path);
 
291
      break;
 
292
    case PROP_PROXY:
 
293
      g_value_set_object (value, thumbnailer->proxy);
 
294
      break;
 
295
    case PROP_FOREIGN:
 
296
      g_value_set_boolean (value, thumbnailer->foreign);
 
297
      break;
 
298
    case PROP_MODIFIED:
 
299
      g_value_set_uint64 (value, thumbnailer->modified);
 
300
      break;
 
301
    default:
 
302
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 
303
      break;
 
304
    }
 
305
}
 
306
 
 
307
 
 
308
 
 
309
static void
 
310
tumbler_specialized_thumbnailer_set_property (GObject      *object,
 
311
                                              guint         prop_id,
 
312
                                              const GValue *value,
 
313
                                              GParamSpec   *pspec)
 
314
{
 
315
  TumblerSpecializedThumbnailer *thumbnailer = TUMBLER_SPECIALIZED_THUMBNAILER (object);
 
316
 
 
317
  switch (prop_id)
 
318
    {
 
319
    case PROP_CONNECTION:
 
320
      thumbnailer->connection = dbus_g_connection_ref (g_value_get_pointer (value));
 
321
      break;
 
322
    case PROP_NAME:
 
323
      thumbnailer->name = g_value_dup_string (value);
 
324
      break;
 
325
    case PROP_OBJECT_PATH:
 
326
      thumbnailer->object_path = g_value_dup_string (value);
 
327
      break;
 
328
    case PROP_FOREIGN:
 
329
      thumbnailer->foreign = g_value_get_boolean (value);
 
330
      break;
 
331
    case PROP_MODIFIED:
 
332
      thumbnailer->modified = g_value_get_uint64 (value);
 
333
      break;
 
334
    default:
 
335
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 
336
      break;
 
337
    }
 
338
}
 
339
 
 
340
 
 
341
 
 
342
static void
 
343
specialized_error (DBusGProxy *proxy,
 
344
                   guint       handle,
 
345
                   gchar      *uri,
 
346
                   gint        error_code,
 
347
                   gchar      *error_msg,
 
348
                   gpointer    user_data)
 
349
{
 
350
  SpecializedInfo *info = user_data;
 
351
 
 
352
  if (info->handle == handle)
 
353
    g_signal_emit_by_name (info->thumbnailer, "error", uri, error_code, error_msg);
 
354
}
 
355
 
 
356
 
 
357
 
 
358
static void
 
359
specialized_ready (DBusGProxy *proxy,
 
360
                   guint       handle,
 
361
                   gchar      *uri,
 
362
                   gpointer    user_data)
 
363
{
 
364
  SpecializedInfo *info = user_data;
 
365
 
 
366
  if (info->handle == handle)
 
367
    g_signal_emit_by_name (info->thumbnailer, "ready", uri);
 
368
}
 
369
 
 
370
 
 
371
 
 
372
static void
 
373
specialized_finished (DBusGProxy *proxy,
 
374
                      guint       handle,
 
375
                      gpointer    user_data)
 
376
{
 
377
  SpecializedInfo *info = user_data;
 
378
 
 
379
  if (info->handle == handle) 
 
380
    {
 
381
      g_mutex_lock (info->mutex);
 
382
      g_cond_broadcast (info->condition);
 
383
      info->had_callback = TRUE;
 
384
      g_mutex_unlock (info->mutex);
 
385
    }
 
386
}
 
387
 
 
388
static void
 
389
tumbler_specialized_thumbnailer_create (TumblerThumbnailer *thumbnailer,
 
390
                                        GCancellable       *cancellable,
 
391
                                        TumblerFileInfo    *info)
 
392
{
 
393
  TumblerSpecializedThumbnailer *s;
 
394
  SpecializedInfo                sinfo;
 
395
  GTimeVal                       timev;
 
396
  TumblerThumbnail              *thumbnail;
 
397
  TumblerThumbnailFlavor        *flavor;
 
398
  const gchar                   *flavor_name;
 
399
  const gchar                   *uri;
 
400
  GError                        *error = NULL;
 
401
  gchar                         *message;
 
402
 
 
403
  g_return_if_fail (TUMBLER_IS_SPECIALIZED_THUMBNAILER (thumbnailer));
 
404
 
 
405
  uri = tumbler_file_info_get_uri (info);
 
406
  thumbnail = tumbler_file_info_get_thumbnail (info);
 
407
  flavor = tumbler_thumbnail_get_flavor (thumbnail);
 
408
  flavor_name = tumbler_thumbnail_flavor_get_name (flavor);
 
409
 
 
410
  s = TUMBLER_SPECIALIZED_THUMBNAILER (thumbnailer);
 
411
 
 
412
  sinfo.condition = g_cond_new ();
 
413
  sinfo.had_callback = FALSE;
 
414
  sinfo.mutex = g_mutex_new ();
 
415
  sinfo.uri = uri;
 
416
  sinfo.mime_type = tumbler_file_info_get_mime_type (info);
 
417
  sinfo.thumbnailer = thumbnailer;
 
418
 
 
419
  dbus_g_proxy_connect_signal (s->proxy, "Finished",
 
420
                               G_CALLBACK (specialized_finished),
 
421
                               &sinfo, 
 
422
                               NULL);
 
423
 
 
424
  dbus_g_proxy_connect_signal (s->proxy, "Ready",
 
425
                               G_CALLBACK (specialized_ready),
 
426
                               &sinfo, 
 
427
                               NULL);
 
428
 
 
429
  dbus_g_proxy_connect_signal (s->proxy, "Error",
 
430
                               G_CALLBACK (specialized_error),
 
431
                               &sinfo, 
 
432
                               NULL);
 
433
 
 
434
  dbus_g_proxy_call_with_timeout (s->proxy, "Queue", 
 
435
                                  100000000, /* 100 seconds worth of timeout */
 
436
                                  &error,
 
437
                                  G_TYPE_STRING, uri,
 
438
                                  G_TYPE_STRING, sinfo.mime_type,
 
439
                                  G_TYPE_STRING, flavor_name,
 
440
                                  /* TODO: Get this bool from scheduler type */
 
441
                                  G_TYPE_BOOLEAN, FALSE,
 
442
                                  G_TYPE_INVALID, 
 
443
                                  G_TYPE_UINT, &sinfo.handle,
 
444
                                  G_TYPE_INVALID);
 
445
 
 
446
  if (error == NULL)
 
447
    {
 
448
      g_get_current_time (&timev);
 
449
  
 
450
      /* 100 seconds worth of timeout */
 
451
      g_time_val_add  (&timev, 100000000); 
 
452
 
 
453
      g_mutex_lock (sinfo.mutex);
 
454
 
 
455
      /* we are a thread, so the mainloop will still be
 
456
       * be running to receive the error and ready signals */
 
457
      if (!sinfo.had_callback)
 
458
        {
 
459
          if (!g_cond_timed_wait (sinfo.condition, sinfo.mutex, &timev))
 
460
            {
 
461
              message = g_strdup (_("Failed to call the specialized thumbnailer: timeout"));
 
462
              g_signal_emit_by_name (thumbnailer, "error", uri, 1, message);
 
463
              g_free (message);
 
464
            }
 
465
        }
 
466
      g_mutex_unlock (sinfo.mutex);
 
467
    }
 
468
  else
 
469
    {
 
470
      message = g_strdup_printf (_("Failed to call the specialized thumbnailer: %s"),
 
471
                                 error->message);
 
472
      g_signal_emit_by_name (thumbnailer, "error", uri, 1, message);
 
473
      g_free (message);
 
474
      g_clear_error (&error);
 
475
    }
 
476
 
 
477
  dbus_g_proxy_disconnect_signal (s->proxy, "Finished",
 
478
                               G_CALLBACK (specialized_finished),
 
479
                               &sinfo);
 
480
 
 
481
  dbus_g_proxy_disconnect_signal (s->proxy, "Ready",
 
482
                               G_CALLBACK (specialized_ready),
 
483
                               &sinfo);
 
484
 
 
485
  dbus_g_proxy_disconnect_signal (s->proxy, "Error",
 
486
                               G_CALLBACK (specialized_error),
 
487
                               &sinfo);
 
488
}
 
489
 
 
490
static void
 
491
tumbler_specialized_thumbnailer_proxy_destroyed (DBusGProxy                    *proxy,
 
492
                                                 TumblerSpecializedThumbnailer *thumbnailer)
 
493
{
 
494
  g_return_if_fail (DBUS_IS_G_PROXY (proxy));
 
495
  g_return_if_fail (TUMBLER_IS_SPECIALIZED_THUMBNAILER (thumbnailer));
 
496
 
 
497
  g_signal_emit_by_name (thumbnailer, "unregister");
 
498
}
 
499
 
 
500
 
 
501
 
 
502
TumblerThumbnailer *
 
503
tumbler_specialized_thumbnailer_new (DBusGConnection    *connection,
 
504
                                     const gchar        *name,
 
505
                                     const gchar        *object_path,
 
506
                                     const gchar *const *uri_schemes,
 
507
                                     const gchar *const *mime_types,
 
508
                                     guint64             modified)
 
509
{
 
510
  TumblerSpecializedThumbnailer *thumbnailer;
 
511
 
 
512
  g_return_val_if_fail (connection != NULL, NULL);
 
513
  g_return_val_if_fail (object_path != NULL && *object_path != '\0', NULL);
 
514
  g_return_val_if_fail (name != NULL && *name != '\0', NULL);
 
515
  g_return_val_if_fail (uri_schemes != NULL, NULL);
 
516
  g_return_val_if_fail (mime_types != NULL, NULL);
 
517
 
 
518
  thumbnailer = g_object_new (TUMBLER_TYPE_SPECIALIZED_THUMBNAILER, 
 
519
                              "connection", connection, "foreign", FALSE, "name", name, 
 
520
                              "object-path", object_path, "uri-schemes", uri_schemes, 
 
521
                              "mime-types", mime_types,
 
522
                              "modified", modified, NULL);
 
523
 
 
524
  return TUMBLER_THUMBNAILER (thumbnailer);
 
525
}
 
526
 
 
527
 
 
528
 
 
529
TumblerThumbnailer *
 
530
tumbler_specialized_thumbnailer_new_foreign (DBusGConnection    *connection,
 
531
                                             const gchar        *name,
 
532
                                             const gchar *const *uri_schemes,
 
533
                                             const gchar *const *mime_types)
 
534
{
 
535
  TumblerSpecializedThumbnailer *thumbnailer;
 
536
  GTimeVal                       current_time;
 
537
 
 
538
  g_return_val_if_fail (connection != NULL, NULL);
 
539
  g_return_val_if_fail (name != NULL, NULL);
 
540
  g_return_val_if_fail (uri_schemes != NULL, NULL);
 
541
  g_return_val_if_fail (mime_types != NULL, NULL);
 
542
 
 
543
  g_get_current_time (&current_time);
 
544
 
 
545
  thumbnailer = g_object_new (TUMBLER_TYPE_SPECIALIZED_THUMBNAILER, 
 
546
                              "connection", connection, "foreign", TRUE, "name", name, 
 
547
                              "uri-schemes", uri_schemes, "mime-types", mime_types,
 
548
                              "modified", current_time.tv_sec, NULL);
 
549
 
 
550
  return TUMBLER_THUMBNAILER (thumbnailer);
 
551
}
 
552
 
 
553
 
 
554
 
 
555
const gchar *
 
556
tumbler_specialized_thumbnailer_get_name (TumblerSpecializedThumbnailer *thumbnailer)
 
557
{
 
558
  g_return_val_if_fail (TUMBLER_IS_SPECIALIZED_THUMBNAILER (thumbnailer), FALSE);
 
559
  return thumbnailer->name;
 
560
}
 
561
 
 
562
 
 
563
 
 
564
gboolean
 
565
tumbler_specialized_thumbnailer_get_foreign (TumblerSpecializedThumbnailer *thumbnailer)
 
566
{
 
567
  g_return_val_if_fail (TUMBLER_IS_SPECIALIZED_THUMBNAILER (thumbnailer), FALSE);
 
568
  return thumbnailer->foreign;
 
569
}
 
570
 
 
571
 
 
572
 
 
573
guint64
 
574
tumbler_specialized_thumbnailer_get_modified (TumblerSpecializedThumbnailer *thumbnailer)
 
575
{
 
576
  g_return_val_if_fail (TUMBLER_IS_SPECIALIZED_THUMBNAILER (thumbnailer), 0);
 
577
  return thumbnailer->modified;
 
578
}