~ken-vandine/ubuntu/precise/folks/precise

« back to all changes in this revision

Viewing changes to folks/favouritable.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-12-21 17:40:15 UTC
  • mfrom: (1.2.5 upstream) (4.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221174015-4o0mdnok2a83mcch
Tags: 0.3.3-1ubuntu1
* Merge with Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Build-depend on dh-autoreconf
  - Bump build-depends on valac-0.12, libvala-0.12-dev
  - Add Vcs-Bzr link
* debian/rules:
  - Build with autoreconf

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* favouritable.c generated by valac 0.11.2.25-30b2-dirty, the Vala compiler
 
2
 * generated from favouritable.vala, do not modify */
 
3
 
 
4
/*
 
5
 * Copyright (C) 2010 Collabora Ltd.
 
6
 *
 
7
 * This library is free software: you can redistribute it and/or modify
 
8
 * it under the terms of the GNU Lesser General Public License as published by
 
9
 * the Free Software Foundation, either version 2.1 of the License, or
 
10
 * (at your option) any later version.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU Lesser General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Lesser General Public License
 
18
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
19
 *
 
20
 * Authors:
 
21
 *       Philip Withnall <philip.withnall@collabora.co.uk>
 
22
 */
 
23
 
 
24
#include <glib.h>
 
25
#include <glib-object.h>
 
26
 
 
27
 
 
28
#define FOLKS_TYPE_FAVOURITABLE (folks_favouritable_get_type ())
 
29
#define FOLKS_FAVOURITABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_FAVOURITABLE, FolksFavouritable))
 
30
#define FOLKS_IS_FAVOURITABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_FAVOURITABLE))
 
31
#define FOLKS_FAVOURITABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_FAVOURITABLE, FolksFavouritableIface))
 
32
 
 
33
typedef struct _FolksFavouritable FolksFavouritable;
 
34
typedef struct _FolksFavouritableIface FolksFavouritableIface;
 
35
 
 
36
struct _FolksFavouritableIface {
 
37
        GTypeInterface parent_iface;
 
38
        gboolean (*get_is_favourite) (FolksFavouritable* self);
 
39
        void (*set_is_favourite) (FolksFavouritable* self, gboolean value);
 
40
};
 
41
 
 
42
 
 
43
 
 
44
GType folks_favouritable_get_type (void) G_GNUC_CONST;
 
45
gboolean folks_favouritable_get_is_favourite (FolksFavouritable* self);
 
46
void folks_favouritable_set_is_favourite (FolksFavouritable* self, gboolean value);
 
47
 
 
48
 
 
49
gboolean folks_favouritable_get_is_favourite (FolksFavouritable* self) {
 
50
        return FOLKS_FAVOURITABLE_GET_INTERFACE (self)->get_is_favourite (self);
 
51
}
 
52
 
 
53
 
 
54
void folks_favouritable_set_is_favourite (FolksFavouritable* self, gboolean value) {
 
55
        FOLKS_FAVOURITABLE_GET_INTERFACE (self)->set_is_favourite (self, value);
 
56
}
 
57
 
 
58
 
 
59
static void folks_favouritable_base_init (FolksFavouritableIface * iface) {
 
60
        static gboolean initialized = FALSE;
 
61
        if (!initialized) {
 
62
                initialized = TRUE;
 
63
                /**
 
64
                   * Whether this contact is a user-defined favourite.
 
65
                   */
 
66
                g_object_interface_install_property (iface, g_param_spec_boolean ("is-favourite", "is-favourite", "is-favourite", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
 
67
        }
 
68
}
 
69
 
 
70
 
 
71
/**
 
72
 * Interface exposing a {@link Persona}'s or {@link Individual}'s user-defined
 
73
 * status as a favourite.
 
74
 */
 
75
GType folks_favouritable_get_type (void) {
 
76
        static volatile gsize folks_favouritable_type_id__volatile = 0;
 
77
        if (g_once_init_enter (&folks_favouritable_type_id__volatile)) {
 
78
                static const GTypeInfo g_define_type_info = { sizeof (FolksFavouritableIface), (GBaseInitFunc) folks_favouritable_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
 
79
                GType folks_favouritable_type_id;
 
80
                folks_favouritable_type_id = g_type_register_static (G_TYPE_INTERFACE, "FolksFavouritable", &g_define_type_info, 0);
 
81
                g_type_interface_add_prerequisite (folks_favouritable_type_id, G_TYPE_OBJECT);
 
82
                g_once_init_leave (&folks_favouritable_type_id__volatile, folks_favouritable_type_id);
 
83
        }
 
84
        return folks_favouritable_type_id__volatile;
 
85
}
 
86
 
 
87
 
 
88