[evolution-data-server] Bug 623017 - Add introspection support
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 623017 - Add introspection support
- Date: Thu, 21 Oct 2010 03:09:03 +0000 (UTC)
commit 63744d4e49d8c91d99f61a51685bc6379c8968a6
Author: Maxim Ermilov <zaspire rambler ru>
Date: Wed Oct 20 23:08:18 2010 -0400
Bug 623017 - Add introspection support
Only covers libecal and bits of libedataserver, but it's a start!
.gitignore | 1 +
Makefile.am | 3 +-
calendar/libecal/Makefile.am | 37 +++++++++++++++++--
calendar/libecal/e-cal-component.c | 2 +-
calendar/libecal/e-cal-view.c | 16 ++++++++-
calendar/libecal/e-cal.c | 17 ++++++---
calendar/libecal/e-cal.h | 1 -
configure.ac | 6 ++-
docs/reference/calendar/libecal/tmpl/e-cal.sgml | 9 -----
.../calendar/libecal/tmpl/libecal-unused.sgml | 8 ++++
libedataserver/Makefile.am | 26 ++++++++++++++
libedataserver/e-source-group.c | 5 +++
libedataserver/e-source-list.c | 5 +++
13 files changed, 111 insertions(+), 25 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5a42a35..047b141 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,6 +61,7 @@
/m4/intlmacosx.m4
/m4/intltool.m4
/m4/intmax.m4
+/m4/introspection.m4
/m4/inttypes-pri.m4
/m4/inttypes_h.m4
/m4/lcmessage.m4
diff --git a/Makefile.am b/Makefile.am
index 3bfc4db..fc9bf7a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
ACLOCAL_AMFLAGS=-I m4
-DISTCHECK_CONFIGURE_FLAGS = --disable-gtk3 --enable-gtk-doc --with-krb5=/usr --without-weather
+DISTCHECK_CONFIGURE_FLAGS = --disable-gtk3 --enable-gtk-doc --with-krb5=/usr --without-weather --enable-introspection
if ENABLE_CALENDAR
CALENDAR_DIR = calendar
@@ -62,6 +62,7 @@ MAINTAINERCLEANFILES = \
$(srcdir)/m4/intlmacosx.m4 \
$(srcdir)/m4/intltool.m4 \
$(srcdir)/m4/intmax.m4 \
+ $(srcdir)/m4/introspection.m4 \
$(srcdir)/m4/inttypes-pri.m4 \
$(srcdir)/m4/inttypes_h.m4 \
$(srcdir)/m4/lcmessage.m4 \
diff --git a/calendar/libecal/Makefile.am b/calendar/libecal/Makefile.am
index e3320f9..62d5144 100644
--- a/calendar/libecal/Makefile.am
+++ b/calendar/libecal/Makefile.am
@@ -5,15 +5,18 @@ MARSHAL_GENERATED = e-cal-marshal.c e-cal-marshal.h
# The library
lib_LTLIBRARIES = libecal-1.2.la
-libecal_1_2_la_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -DG_LOG_DOMAIN=\"libecal\" \
+libecal_INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/calendar \
-I$(top_srcdir)/calendar/libegdbus \
-I$(top_srcdir)/calendar/libedata-cal \
-I$(top_builddir) \
- -I$(top_builddir)/calendar/libecal \
+ -I$(top_builddir)/calendar/libecal
+
+libecal_1_2_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ $(libecal_INCLUDES) \
+ -DG_LOG_DOMAIN=\"libecal\" \
$(LIBICAL_CFLAGS) \
$(EVOLUTION_CALENDAR_CFLAGS)
@@ -62,6 +65,32 @@ BUILT_SOURCES = $(MARSHAL_GENERATED)
CLEANFILES = $(BUILT_SOURCES)
DISTCLEANFILES = $(pkgconfig_DATA)
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --identifier-prefix E
+INTROSPECTION_COMPILER_ARGS =
+
+if HAVE_INTROSPECTION
+
+introspection_sources = \
+ $(filter-out %-private.h, $(libecalinclude_HEADERS) $(libecal_1_2_la_SOURCES))
+
+ECalendar-1.2.gir: libecal-1.2.la
+ECalendar_1_2_gir_INCLUDES = GObject-2.0 EDataServer-1.2 GLib-2.0
+ECalendar_1_2_gir_CFLAGS = $(libecal_INCLUDES) $(LIBICAL_CFLAGS) $(EVOLUTION_CALENDAR_CFLAGS)
+ECalendar_1_2_gir_LIBS = libecal-1.2.la $(top_builddir)/calendar/libegdbus/libegdbus-cal.la $(top_builddir)/libedataserver/libedataserver-1.2.la $(LIBICAL_LIBS)
+ECalendar_1_2_gir_FILES = $(introspection_sources)
+INTROSPECTION_GIRS += ECalendar-1.2.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
+
EXTRA_DIST = \
e-cal-marshal.list \
$(pkgconfig_DATA:-$(API_VERSION).pc=.pc.in)
diff --git a/calendar/libecal/e-cal-component.c b/calendar/libecal/e-cal-component.c
index ca3dee4..700d4fa 100644
--- a/calendar/libecal/e-cal-component.c
+++ b/calendar/libecal/e-cal-component.c
@@ -1038,7 +1038,7 @@ e_cal_component_set_new_vtype (ECalComponent *comp, ECalComponentVType type)
/**
* e_cal_component_set_icalcomponent:
* @comp: A calendar component object.
- * @icalcomp: An #icalcomponent.
+ * @icalcomp: (type long): An #icalcomponent.
*
* Sets the contents of a calendar component object from an #icalcomponent
* structure. If the @comp already had an #icalcomponent set into it, it will
diff --git a/calendar/libecal/e-cal-view.c b/calendar/libecal/e-cal-view.c
index b3fdd32..f64c37d 100644
--- a/calendar/libecal/e-cal-view.c
+++ b/calendar/libecal/e-cal-view.c
@@ -277,7 +277,11 @@ e_cal_view_class_init (ECalViewClass *klass)
g_object_class_install_property (object_class, PROP_CLIENT,
g_param_spec_object ("client", "The e-cal for the view", NULL, E_TYPE_CAL,
G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
-
+ /**
+ * ECalView::objects-added:
+ * @view:: self
+ * @objects: (type GLib.List) (transfer none) (element-type long):
+ */
signals[OBJECTS_ADDED] =
g_signal_new ("objects_added",
G_TYPE_FROM_CLASS (klass),
@@ -286,6 +290,11 @@ e_cal_view_class_init (ECalViewClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
+ /**
+ * ECalView::objects-modified:
+ * @view:: self
+ * @objects: (type GLib.List) (transfer none) (element-type long):
+ */
signals[OBJECTS_MODIFIED] =
g_signal_new ("objects_modified",
G_TYPE_FROM_CLASS (klass),
@@ -294,6 +303,11 @@ e_cal_view_class_init (ECalViewClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
+ /**
+ * ECalView::objects-removed:
+ * @view:: self
+ * @objects: (type GLib.List) (transfer none) (element-type ECalComponentId):
+ */
signals[OBJECTS_REMOVED] =
g_signal_new ("objects_removed",
G_TYPE_FROM_CLASS (klass),
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 1295e74..32427e2 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -315,10 +315,10 @@ e_cal_source_type_enum_get_type (void)
if (g_once_init_enter (&enum_type__volatile)) {
GType enum_type;
static GEnumValue values[] = {
- { E_CAL_SOURCE_TYPE_EVENT, "Event", NULL},
- { E_CAL_SOURCE_TYPE_TODO, "ToDo", NULL},
- { E_CAL_SOURCE_TYPE_JOURNAL, "Journal", NULL},
- { E_CAL_SOURCE_TYPE_LAST, "Invalid", NULL},
+ { E_CAL_SOURCE_TYPE_EVENT, "Event", "Event"},
+ { E_CAL_SOURCE_TYPE_TODO, "ToDo", "ToDo"},
+ { E_CAL_SOURCE_TYPE_JOURNAL, "Journal", "Journal"},
+ { E_CAL_SOURCE_TYPE_LAST, "Invalid", "Invalid"},
{ -1, NULL, NULL}
};
@@ -592,6 +592,11 @@ e_cal_class_init (ECalClass *klass)
G_TYPE_NONE, 1, G_TYPE_INT);
#endif
+ /**
+ * ECal::cal-opened-ex:
+ * @ecal:: self
+ * @error: (type glong):
+ */
e_cal_signals[CAL_OPENED_EX] =
g_signal_new ("cal_opened_ex",
G_TYPE_FROM_CLASS (klass),
@@ -2427,7 +2432,7 @@ e_cal_free_change_list (GList *list)
* e_cal_get_object_list:
* @ecal: A calendar client.
* @query: Query string.
- * @objects: Return value for list of objects.
+ * @objects: (out) (element-type long): Return value for list of objects.
* @error: Placeholder for error information.
*
* Gets a list of objects from the calendar that match the query specified
@@ -3933,7 +3938,7 @@ e_cal_add_timezone (ECal *ecal, icaltimezone *izone, GError **error)
* e_cal_get_query:
* @ecal: A calendar client.
* @sexp: S-expression representing the query.
- * @query: Return value for the new query.
+ * @query: (out): Return value for the new query.
* @error: Placeholder for error information.
*
* Creates a live query object from a loaded calendar.
diff --git a/calendar/libecal/e-cal.h b/calendar/libecal/e-cal.h
index ead68c6..fde5c81 100644
--- a/calendar/libecal/e-cal.h
+++ b/calendar/libecal/e-cal.h
@@ -98,7 +98,6 @@ typedef gchar * (* ECalAuthFunc) (ECal *ecal,
GType e_cal_get_type (void);
-GType e_cal_open_status_enum_get_type (void);
GType e_cal_source_type_enum_get_type (void);
GType e_cal_set_mode_status_enum_get_type (void);
GType cal_mode_enum_get_type (void);
diff --git a/configure.ac b/configure.ac
index 697cba2..7a1d4c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,9 +18,9 @@ dnl library names for backward compatibility.
m4_define([api_version], [1.2])
dnl Autoconf / Automake Initialization
-AC_PREREQ(2.58)
+AC_PREREQ(2.62)
AC_INIT([evolution-data-server],[eds_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server])
-AM_INIT_AUTOMAKE([gnu 1.10 tar-ustar -Wall -Werror foreign])
+AM_INIT_AUTOMAKE([gnu 1.10 tar-ustar -Wall -Wno-portability -Werror foreign])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(README)
AC_CONFIG_HEADERS(config.h)
@@ -1413,6 +1413,8 @@ if test "x$GPERF" = "xno"; then
AC_MSG_ERROR([You need gperf to build evolution-data-server])
fi
+GOBJECT_INTROSPECTION_CHECK([0.9.12])
+
dnl ******************************
dnl Makefiles
dnl ******************************
diff --git a/docs/reference/calendar/libecal/tmpl/e-cal.sgml b/docs/reference/calendar/libecal/tmpl/e-cal.sgml
index ad03e86..641e955 100644
--- a/docs/reference/calendar/libecal/tmpl/e-cal.sgml
+++ b/docs/reference/calendar/libecal/tmpl/e-cal.sgml
@@ -121,15 +121,6 @@ Represents an entire calendar or task list, not individual items within them.2
@Returns:
-<!-- ##### FUNCTION e_cal_open_status_enum_get_type ##### -->
-<para>
-
-</para>
-
- void:
- Returns:
-
-
<!-- ##### FUNCTION e_cal_source_type_enum_get_type ##### -->
<para>
diff --git a/docs/reference/calendar/libecal/tmpl/libecal-unused.sgml b/docs/reference/calendar/libecal/tmpl/libecal-unused.sgml
index 54124d9..f420de5 100644
--- a/docs/reference/calendar/libecal/tmpl/libecal-unused.sgml
+++ b/docs/reference/calendar/libecal/tmpl/libecal-unused.sgml
@@ -512,6 +512,14 @@ ECalViewListener
@listener:
+<!-- ##### FUNCTION e_cal_open_status_enum_get_type ##### -->
+<para>
+
+</para>
+
+ void:
+ Returns:
+
<!-- ##### FUNCTION e_cal_remove_calendar ##### -->
<para>
diff --git a/libedataserver/Makefile.am b/libedataserver/Makefile.am
index f71e00c..ac1f437 100644
--- a/libedataserver/Makefile.am
+++ b/libedataserver/Makefile.am
@@ -96,6 +96,32 @@ EXTRA_DIST = \
$(pkgconfig_DATA:-$(API_VERSION).pc=.pc.in) \
eds-version.h.in
+CLEANFILES =
DISTCLEANFILES = eds-version.h $(pkgconfig_DATA)
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --identifier-prefix E
+INTROSPECTION_COMPILER_ARGS =
+
+if HAVE_INTROSPECTION
+introspection_sources = \
+ $(filter-out %-private.h e-sexp.h, $(libedataserverinclude_HEADERS) $(libedataserver_1_2_la_SOURCES))
+
+EDataServer-1.2.gir: libedataserver-1.2.la
+EDataServer_1_2_gir_INCLUDES = GObject-2.0 libxml2-2.0
+EDataServer_1_2_gir_CFLAGS = -I$(top_srcdir) $(E_DATA_SERVER_CFLAGS) $(SOUP_CFLAGS)
+EDataServer_1_2_gir_LIBS = libedataserver-1.2.la
+EDataServer_1_2_gir_FILES = $(introspection_sources)
+INTROSPECTION_GIRS += EDataServer-1.2.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
+
-include $(top_srcdir)/git.mk
diff --git a/libedataserver/e-source-group.c b/libedataserver/e-source-group.c
index 3d13ce4..b2c0bb6 100644
--- a/libedataserver/e-source-group.c
+++ b/libedataserver/e-source-group.c
@@ -645,6 +645,11 @@ e_source_group_get_readonly (ESourceGroup *group)
return group->priv->readonly;
}
+/**
+ * e_source_group_peek_sources:
+ *
+ * Return value: (transfer none) (element-type ESource):
+ */
GSList *
e_source_group_peek_sources (ESourceGroup *group)
{
diff --git a/libedataserver/e-source-list.c b/libedataserver/e-source-list.c
index 6706e96..f1fe643 100644
--- a/libedataserver/e-source-list.c
+++ b/libedataserver/e-source-list.c
@@ -393,6 +393,11 @@ e_source_list_new_for_gconf_default (const gchar *path)
return list;
}
+/**
+ * e_source_list_peek_groups:
+ *
+ * Return value: (transfer none) (element-type ESourceGroup):
+ */
GSList *
e_source_list_peek_groups (ESourceList *list)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]