[nautilus-actions] Refactoring: define internal interface for NAIImporter interface



commit 0a676f773b536dc6776c115bbeb55fb7135359a5
Author: Pierre Wieser <pwieser trychlos org>
Date:   Wed Feb 17 10:39:59 2010 +0100

    Refactoring: define internal interface for NAIImporter interface

 ChangeLog              |    3 ++
 src/core/na-importer.c |   66 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/core/na-importer.h |   48 ++++++++++++++++++++++++++++++++++
 3 files changed, 117 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a79a073..677ffa7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-02-17 Pierre Wieser <pwieser trychlos org>
 
+	* src/core/na-importer.c:
+	* src/core/na-importer.h: New files.
+
 	* src/core/Makefile.am:
 	* src/core/na-iimporter.c:
 	* src/core/na-io-provider.c:
diff --git a/src/core/na-importer.c b/src/core/na-importer.c
new file mode 100644
index 0000000..22eba74
--- /dev/null
+++ b/src/core/na-importer.c
@@ -0,0 +1,66 @@
+/*
+ * Nautilus Actions
+ * A Nautilus extension which offers configurable context menu actions.
+ *
+ * Copyright (C) 2005 The GNOME Foundation
+ * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
+ * Copyright (C) 2009, 2010 Pierre Wieser and others (see AUTHORS)
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this Library; see the file COPYING.  If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ *   Frederic Ruaudel <grumz grumz net>
+ *   Rodrigo Moya <rodrigo gnome-db org>
+ *   Pierre Wieser <pwieser trychlos org>
+ *   ... and many others (see AUTHORS)
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "na-importer.h"
+
+extern gboolean iimporter_initialized;		/* defined in na-iimporter.c */
+extern gboolean iimporter_finalized;		/* defined in na-iimporter.c */
+
+/**
+ * na_importer_import:
+ * @items: a #GList of already loaded items.
+ * @uri: the source filename URI.
+ * @mode: the import mode.
+ * @messages: a pointer to a #GSList list of strings; the provider
+ *  may append messages to this list, but shouldn't reinitialize it.
+ *
+ * Exports the specified @item to the target @uri in the required
+ * @format.
+ *
+ * Returns: a newly allocated #NAObjectItem-derived object, or %NULL
+ * if an error has been detected.
+ */
+NAObjectItem *
+na_importer_import( GList *items, const gchar *uri, guint mode, GSList **messages )
+{
+	NAObjectItem *item;
+
+	item = NULL;
+
+	if( iimporter_initialized && !iimporter_finalized ){
+
+	}
+
+	return( item );
+}
diff --git a/src/core/na-importer.h b/src/core/na-importer.h
new file mode 100644
index 0000000..0e37a61
--- /dev/null
+++ b/src/core/na-importer.h
@@ -0,0 +1,48 @@
+/*
+ * Nautilus Actions
+ * A Nautilus extension which offers configurable context menu actions.
+ *
+ * Copyright (C) 2005 The GNOME Foundation
+ * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
+ * Copyright (C) 2009, 2010 Pierre Wieser and others (see AUTHORS)
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this Library; see the file COPYING.  If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ *   Frederic Ruaudel <grumz grumz net>
+ *   Rodrigo Moya <rodrigo gnome-db org>
+ *   Pierre Wieser <pwieser trychlos org>
+ *   ... and many others (see AUTHORS)
+ */
+
+#ifndef __NACT_NA_IMPORTER_H__
+#define __NACT_NA_IMPORTER_H__
+
+/**
+ * SECTION: na_iimport
+ * @short_description: #NAIImport internal functions.
+ * @include: nact/na-import.h
+ */
+
+#include <api/na-object-item.h>
+
+G_BEGIN_DECLS
+
+NAObjectItem *na_importer_import( GList *items, const gchar *uri, guint mode, GSList **messages );
+
+G_END_DECLS
+
+#endif /* __NACT_NA_IMPORTER_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]