diff options
-rw-r--r-- | plugins/Makefile.am | 24 | ||||
-rw-r--r-- | plugins/icera/mm-iface-icera.c | 58 | ||||
-rw-r--r-- | plugins/icera/mm-iface-icera.h | 35 |
3 files changed, 105 insertions, 12 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 6bb3b0f9..1de58fc7 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -20,18 +20,18 @@ PLUGIN_COMMON_LINKER_FLAGS = \ udevrulesdir = $(UDEV_BASE_DIR)/rules.d udevrules_DATA = -########################### -## Icera-specific support # -########################### -# -#noinst_LTLIBRARIES = libicera-utils.la -# -#libicera_utils_la_SOURCES = \ -# mm-modem-icera.c \ -# mm-modem-icera.h -# -#libicera_utils_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) -#libicera_utils_la_LIBADD = $(GUDEV_LDFLAGS) +######################################## + +# Icera-specific support +noinst_LTLIBRARIES = libmm-utils-icera.la +libmm_utils_icera_la_SOURCES = \ + icera/mm-iface-icera.h \ + icera/mm-iface-icera.c +libmm_utils_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) +libmm_utils_icera_la_LIBADD = $(GUDEV_LDFLAGS) + +ICERA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/icera +ICERA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-icera.la ######################################## diff --git a/plugins/icera/mm-iface-icera.c b/plugins/icera/mm-iface-icera.c new file mode 100644 index 00000000..8d55d406 --- /dev/null +++ b/plugins/icera/mm-iface-icera.c @@ -0,0 +1,58 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details: + * + * Copyright (C) 2010 - 2012 Red Hat, Inc. + * Copyright (C) 2012 Aleksander Morgado <aleksander@gnu.org> + */ + +#include <config.h> + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <unistd.h> +#include <ctype.h> + +#include "ModemManager.h" +#include "mm-log.h" +#include "mm-iface-icera.h" +#include "mm-iface-modem.h" + +/*****************************************************************************/ + +static void +iface_icera_init (gpointer g_iface) +{ +} + +GType +mm_iface_icera_get_type (void) +{ + static GType iface_icera_type = 0; + + if (!G_UNLIKELY (iface_icera_type)) { + static const GTypeInfo info = { + sizeof (MMIfaceIcera), /* class_size */ + iface_icera_init, /* base_init */ + NULL, /* base_finalize */ + }; + + iface_icera_type = g_type_register_static (G_TYPE_INTERFACE, + "MMIfaceIcera", + &info, + 0); + + g_type_interface_add_prerequisite (iface_icera_type, MM_TYPE_IFACE_MODEM); + } + + return iface_icera_type; +} diff --git a/plugins/icera/mm-iface-icera.h b/plugins/icera/mm-iface-icera.h new file mode 100644 index 00000000..fd326e61 --- /dev/null +++ b/plugins/icera/mm-iface-icera.h @@ -0,0 +1,35 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details: + * + * Copyright (C) 2010 - 2012 Red Hat, Inc. + * Copyright (C) 2012 Aleksander Morgado <aleksander@gnu.org> + */ + +#ifndef MM_IFACE_ICERA_H +#define MM_IFACE_ICERA_H + +#include "mm-iface-modem.h" + +#define MM_TYPE_IFACE_ICERA (mm_iface_icera_get_type ()) +#define MM_IFACE_ICERA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_IFACE_ICERA, MMIfaceIcera)) +#define MM_IS_IFACE_ICERA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_IFACE_ICERA)) +#define MM_IFACE_ICERA_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), MM_TYPE_IFACE_ICERA, MMIfaceIcera)) + +typedef struct _MMIfaceIcera MMIfaceIcera; + +struct _MMIfaceIcera { + GTypeInterface g_iface; +}; + +GType mm_iface_icera_get_type (void); + +#endif /* MM_IFACE_ICERA_H */ |