summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2011-03-16 15:35:15 -0400
committerDavid Zeuthen <davidz@redhat.com>2011-03-16 15:35:15 -0400
commit7b5a1f5831201cb12d2b7c2d8725eb45594bac1d (patch)
treef21bab342b46319612b287840d59264720ef2a76
parentbea5ff9e3a753cbbee0b12246bce79206049f0b4 (diff)
Nuke unused code
Signed-off-by: David Zeuthen <davidz@redhat.com>
-rw-r--r--src/Makefile.am2
-rw-r--r--src/mytestpair.c102
-rw-r--r--src/mytestpair.h66
-rw-r--r--src/mytestpoint.c220
-rw-r--r--src/mytestpoint.h54
5 files changed, 0 insertions, 444 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 8a176c1..0661464 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -111,8 +111,6 @@ noinst_LTLIBRARIES = libgen.la
libgen_la_SOURCES = \
test-generated.h test-generated.c \
- mytestpair.h mytestpair.c \
- mytestpoint.h mytestpoint.c \
$(NULL)
libgen_la_CFLAGS = \
diff --git a/src/mytestpair.c b/src/mytestpair.c
deleted file mode 100644
index 520edb0..0000000
--- a/src/mytestpair.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/* GDBus Binding Tool
- *
- * Copyright (C) 2008-2010 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: David Zeuthen <davidz@redhat.com>
- */
-
-#include "config.h"
-#include "mytestpair.h"
-
-/**
- * my_test_pair_new:
- *
- * Creates a new #MyTestPair instance.
- *
- * Returns: A new #MyTestPair. Free with my_test_pair_free().
- */
-MyTestPair *
-my_test_pair_new (void)
-{
- return g_new0 (MyTestPair, 1);
-}
-
-/**
- * my_test_pair_copy:
- * @pair: A #MyTestPair
- *
- * Copies @pair. The copy is a deep copy.
- *
- * Returns: A new #MyTestPair. Free with my_test_pair_free().
- */
-MyTestPair *
-my_test_pair_copy (MyTestPair *pair)
-{
- MyTestPair *ret;
- ret = g_new0 (MyTestPair, 1);
- ret->first = pair->first;
- ret->second = pair->second;
- ret->meta = g_strdup (pair->meta);
- return ret;
-}
-
-/**
- * my_test_pair_free:
- * @pair: A #MyTestPair.
- *
- * Frees all resources used by @pair.
- */
-void
-my_test_pair_free (MyTestPair *pair)
-{
- g_free (pair->meta);
- g_free (pair);
-}
-
-G_DEFINE_BOXED_TYPE (MyTestPair, my_test_pair, my_test_pair_copy, my_test_pair_free);
-
-/**
- * my_test_pair_from_gvariant:
- * @value: A #GVariant of type <literal>(iis)</literal>.
- *
- * Creates a #MyTestPair from @value.
- *
- * Returns: A new #MyTestPair. Free with my_test_pair_free().
- */
-MyTestPair *
-my_test_pair_from_gvariant (GVariant *value)
-{
- MyTestPair *ret;
- ret = g_new0 (MyTestPair, 1);
- g_variant_get (value, "(iis)", &ret->first, &ret->second, &ret->meta);
- return ret;
-}
-
-/**
- * my_test_pair_to_gvariant:
- * @pair: A #MyTestPair.
- *
- * Serializes @pair into a #GVariant.
- *
- * Returns: A new, floating, #GVariant. Free with g_variant_unref().
- */
-GVariant *
-my_test_pair_to_gvariant (MyTestPair *pair)
-{
- return g_variant_new ("(iis)", pair->first, pair->second, pair->meta != NULL ? pair->meta : "");
-}
diff --git a/src/mytestpair.h b/src/mytestpair.h
deleted file mode 100644
index f2308a7..0000000
--- a/src/mytestpair.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* GDBus Binding Tool
- *
- * Copyright (C) 2008-2010 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: David Zeuthen <davidz@redhat.com>
- */
-
-#ifndef __MY_TEST_PAIR_H__
-#define __MY_TEST_PAIR_H__
-
-#include <gio/gio.h>
-
-G_BEGIN_DECLS
-
-struct _MyTestPair;
-typedef struct _MyTestPair MyTestPair;
-
-/**
- * MyTestPair:
- * @first: The first element.
- * @second: The second element.
- * @meta: Meta-data.
- *
- * The #MyTestPair structure contains only private data and should
- * only be accessed using the provided API.
- */
-struct _MyTestPair
-{
- gint first;
- gint second;
- gchar *meta;
-};
-
-MyTestPair *my_test_pair_new (void);
-MyTestPair *my_test_pair_copy (MyTestPair *pair);
-void my_test_pair_free (MyTestPair *pair);
-
-/**
- * MY_TEST_TYPE_PAIR:
- *
- * The #GType for a boxed type holding a #MyTestPair struct.
- */
-#define MY_TEST_TYPE_PAIR (my_test_pair_get_type())
-GType my_test_pair_get_type (void) G_GNUC_CONST;
-
-MyTestPair *my_test_pair_from_gvariant (GVariant *value);
-GVariant *my_test_pair_to_gvariant (MyTestPair *pair);
-
-G_END_DECLS
-
-#endif /* __MY_TEST_PAIR_H__ */
diff --git a/src/mytestpoint.c b/src/mytestpoint.c
deleted file mode 100644
index 182a089..0000000
--- a/src/mytestpoint.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/* GDBus Binding Tool
- *
- * Copyright (C) 2008-2010 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: David Zeuthen <davidz@redhat.com>
- */
-
-#include "config.h"
-#include "mytestpoint.h"
-
-typedef struct _MyTestPointClass MyTestPointClass;
-
-/**
- * MyTestPoint:
- *
- * The #MyTestPoint structure contains only private data and should
- * only be accessed using the provided API.
- */
-struct _MyTestPoint
-{
- /*< private >*/
- GObject parent_instance;
- gint x;
- gint y;
- gchar *meta;
-};
-
-struct _MyTestPointClass
-{
- GObjectClass parent_class;
-};
-
-G_DEFINE_TYPE (MyTestPoint, my_test_point, G_TYPE_OBJECT);
-
-static void
-my_test_point_finalize (GObject *object)
-{
- MyTestPoint *point = (MyTestPoint *) object;
-
- g_free (point->meta);
-
- G_OBJECT_CLASS (my_test_point_parent_class)->finalize (object);
-}
-
-static void
-my_test_point_init (MyTestPoint *point)
-{
- point->meta = g_strdup ("");
-}
-
-static void
-my_test_point_class_init (MyTestPointClass *klass)
-{
- GObjectClass *gobject_class;
-
- gobject_class = G_OBJECT_GET_CLASS (klass);
- gobject_class->finalize = my_test_point_finalize;
-}
-
-/**
- * my_test_point_new:
- * @x: X coordinate.
- * @y: Y coordinate.
- * @meta: Meta-data.
- *
- * Creates a new #MyTestPoint instance.
- *
- * Returns: A new #MyTestPoint. Free with g_object_unref().
- */
-MyTestPoint *
-my_test_point_new (gint x,
- gint y,
- const gchar *meta)
-{
- MyTestPoint *ret;
- ret = MY_TEST_POINT (g_object_new (MY_TEST_TYPE_POINT, NULL));
- ret->x = x;
- ret->y = y;
- ret->meta = g_strdup (meta);
- return ret;
-}
-
-
-/**
- * my_test_point_from_gvariant:
- * @value: A #GVariant of type <literal>(iis)</literal>.
- *
- * Creates a #MyTestPoint from @value.
- *
- * Returns: A new #MyTestPoint. Free with g_object_unref().
- */
-MyTestPoint *
-my_test_point_from_gvariant (GVariant *value)
-{
- MyTestPoint *ret;
- ret = my_test_point_new (0, 0, NULL);
- g_variant_get (value, "(iis)", &ret->x, &ret->y, &ret->meta);
- return ret;
-}
-
-/**
- * my_test_point_to_gvariant:
- * @point: A #MyTestPoint.
- *
- * Serializes @point into a #GVariant.
- *
- * Returns: A new, floating, #GVariant. Free with g_variant_unref().
- */
-GVariant *
-my_test_point_to_gvariant (MyTestPoint *point)
-{
- return g_variant_new ("(iis)", point->x, point->y, point->meta != NULL ? point->meta : "");
-}
-
-/**
- * my_test_point_get_x:
- * @point: A #MyTestPoint.
- *
- * Gets the X coordinate of @pointer.
- *
- * Returns: The value.
- */
-gint
-my_test_point_get_x (MyTestPoint *point)
-{
- g_return_val_if_fail (MY_TEST_IS_POINT (point), 0);
- return point->x;
-}
-
-/**
- * my_test_point_get_y:
- * @point: A #MyTestPoint.
- *
- * Gets the Y coordinate of @pointer.
- *
- * Returns: The value.
- */
-gint
-my_test_point_get_y (MyTestPoint *point)
-{
- g_return_val_if_fail (MY_TEST_IS_POINT (point), 0);
- return point->y;
-}
-
-/**
- * my_test_point_get_meta:
- * @point: A #MyTestPoint.
- *
- * Gets the meta-data of @point.
- *
- * Returns: The value. Free with g_free().
- */
-gchar *
-my_test_point_get_meta (MyTestPoint *point)
-{
- g_return_val_if_fail (MY_TEST_IS_POINT (point), NULL);
- return g_strdup (point->meta);
-}
-
-/**
- * my_test_point_set_x:
- * @point: A #MyTestPoint.
- * @x: Value to set.
- *
- * Sets X coordinate on @point.
- */
-void
-my_test_point_set_x (MyTestPoint *point,
- gint x)
-{
- g_return_if_fail (MY_TEST_IS_POINT (point));
- point->x = x;
-}
-
-/**
- * my_test_point_set_y:
- * @point: A #MyTestPoint.
- * @y: Value to set.
- *
- * Sets Y coordinate on @point.
- */
-void
-my_test_point_set_y (MyTestPoint *point,
- gint y)
-{
- g_return_if_fail (MY_TEST_IS_POINT (point));
- point->y = y;
-}
-
-/**
- * my_test_point_set_meta:
- * @point: A #MyTestPoint.
- * @meta: Value to set.
- *
- * Sets meta-data on @point.
- */
-void
-my_test_point_set_meta (MyTestPoint *point,
- const gchar *meta)
-{
- g_return_if_fail (MY_TEST_IS_POINT (point));
- g_free (point->meta);
- point->meta = g_strdup (meta);
-}
-
diff --git a/src/mytestpoint.h b/src/mytestpoint.h
deleted file mode 100644
index bbd4727..0000000
--- a/src/mytestpoint.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* GDBus Binding Tool
- *
- * Copyright (C) 2008-2010 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: David Zeuthen <davidz@redhat.com>
- */
-
-#ifndef __MY_TEST_POINT_H__
-#define __MY_TEST_POINT_H__
-
-#include <gio/gio.h>
-
-G_BEGIN_DECLS
-
-#define MY_TEST_TYPE_POINT (my_test_point_get_type ())
-#define MY_TEST_POINT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MY_TEST_TYPE_POINT, MyTestPoint))
-#define MY_TEST_IS_POINT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MY_TEST_TYPE_POINT))
-
-typedef struct _MyTestPoint MyTestPoint;
-
-GType my_test_point_get_type (void) G_GNUC_CONST;
-MyTestPoint *my_test_point_new (gint x,
- gint y,
- const gchar *meta);
-gint my_test_point_get_x (MyTestPoint *point);
-gint my_test_point_get_y (MyTestPoint *point);
-gchar *my_test_point_get_meta (MyTestPoint *point);
-void my_test_point_set_x (MyTestPoint *point,
- gint x);
-void my_test_point_set_y (MyTestPoint *point,
- gint y);
-void my_test_point_set_meta (MyTestPoint *point,
- const gchar *meta);
-MyTestPoint *my_test_point_from_gvariant (GVariant *value);
-GVariant *my_test_point_to_gvariant (MyTestPoint *point);
-
-G_END_DECLS
-
-#endif /* __MY_TEST_POINT_H__ */