TmdbImage: Added Tmdb image
[maevies] / src / mvs-minfo-provider.h
1 /*
2  * mvs-minfo-provider.h
3  *
4  * This file is part of maevies
5  * Copyright (C) 2010 Simón Pena <spenap@gmail.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License for more details.
16  *
17  */
18
19 #ifndef _MVS_MINFO_PROVIDER
20 #define _MVS_MINFO_PROVIDER
21
22 #include <glib-object.h>
23 #include <libsoup/soup.h>
24
25 G_BEGIN_DECLS
26
27 typedef enum {
28         MVS_SERVICE_TMDB,
29         MVS_SERVICE_WATC
30 } MvsService;
31
32 #define MVS_TYPE_MINFO_PROVIDER mvs_minfo_provider_get_type()
33 #define MVS_MINFO_PROVIDER(obj) \
34   (G_TYPE_CHECK_INSTANCE_CAST ((obj), MVS_TYPE_MINFO_PROVIDER, MvsMInfoProvider))
35 #define MVS_MINFO_PROVIDER_CLASS(klass) \
36   (G_TYPE_CHECK_CLASS_CAST ((klass), MVS_TYPE_MINFO_PROVIDER, MvsMInfoProviderClass))
37 #define MVS_IS_MINFO_PROVIDER(obj) \
38   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MVS_TYPE_MINFO_PROVIDER))
39 #define MVS_IS_MINFO_PROVIDER_CLASS(klass) \
40   (G_TYPE_CHECK_CLASS_TYPE ((klass), MVS_TYPE_MINFO_PROVIDER))
41 #define MVS_MINFO_PROVIDER_GET_CLASS(obj) \
42   (G_TYPE_INSTANCE_GET_CLASS ((obj), MVS_TYPE_MINFO_PROVIDER, MvsMInfoProviderClass))
43
44 typedef struct _MvsMInfoProviderPrivate MvsMInfoProviderPrivate;
45
46 typedef struct {
47         GObject parent;
48
49         /* <private> */
50         MvsMInfoProviderPrivate *priv;
51 } MvsMInfoProvider;
52
53 typedef struct {
54         GObjectClass parent_class;
55
56         /*< private >*/
57         void (*response_callback) (MvsMInfoProvider *self, GList *list);
58 } MvsMInfoProviderClass;
59
60 GType mvs_minfo_provider_get_type (void);
61
62 MvsMInfoProvider* mvs_minfo_provider_new (void);
63
64 gboolean mvs_minfo_provider_query (MvsMInfoProvider *self,
65                                    MvsService service,
66                                    const gchar *query);
67
68 gboolean mvs_minfo_provider_set_format (MvsMInfoProvider *self,
69                                         const gchar *format);
70
71 G_END_DECLS
72
73 #endif /* _MVS_MINFO_PROVIDER */