<xi:include href="architecture.xml"/>
<xi:include href="xml/ges-common.xml"/>
<xi:include href="xml/ges-enums.xml"/>
+ <xi:include href="xml/ges-gerror.xml"/>
</chapter>
<chapter>
GES_VERSION_NANO
<SUBSECTION Standard>
GES_PADDING
-GES_ERROR_DOMAIN
GES_PADDING_LARGE
GESAssetLoadingReturn
</SECTION>
</SECTION>
<SECTION>
+<FILE>ges-gerror</FILE>
+<TITLE>GES GErrors</TITLE>
+GES_ASSET_ERROR
+GES_FORMATTER_ERROR
+GESAssetError
+GESFormatterError
+</SECTION>
+
+<SECTION>
<FILE>ges-enums</FILE>
<TITLE>GES Enums</TITLE>
GESTrackType
ges-types.h \
ges.h \
ges-enums.h \
+ ges-gerror.h \
ges-custom-source-clip.h \
ges-meta-container.h \
ges-simple-timeline-layer.h \
g_type_name (old_type));
if (error && *error == NULL)
- g_set_error (error, GES_ERROR_DOMAIN, 0,
+ g_set_error (error, GES_ASSET_ERROR, GES_ASSET_WRONG_ID,
"Wrong ID, can not find any extractable_type");
return NULL;
}
g_free (real_id);
if (error && *error == NULL)
- g_set_error (error, GES_ERROR_DOMAIN, 0, "Wrong ID");
+ g_set_error (error, GES_ASSET_ERROR, GES_ASSET_WRONG_ID, "Wrong ID");
return NULL;
}
case GES_ASSET_LOADING_ERROR:
{
if (error == NULL)
- g_set_error (&error, GES_ERROR_DOMAIN, 1,
+ g_set_error (&error, GES_ASSET_ERROR, GES_ASSET_ERROR_LOADING,
"Could not start loading asset");
/* FIXME Define error code */
entry = g_hash_table_lookup (priv->layers, GINT_TO_POINTER (layer_prio));
if (entry == NULL) {
- g_set_error (error, GES_ERROR_DOMAIN, 0,
+ g_set_error (error, GES_FORMATTER_ERROR, GES_FORMATTER_WRONG_INPUT_FILE,
"We got a Clip in a layer"
" that does not exist, something is wrong either in the project file or"
" in %s", g_type_name (G_OBJECT_TYPE (self)));
--- /dev/null
+/* GStreamer Editing Services
+ * Copyright (C) 2013 Thibault Saunier <thibault.saunier@collabora.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION: ges-gerror
+ * @short_description: GError — Categorized error messages
+ */
+
+#ifndef __GES_ERROR_H__
+#define __GES_ERROR_H__
+
+G_BEGIN_DECLS
+
+/**
+ * GES_ASSET_ERROR:
+ *
+ * An error happend using an asset
+ */
+#define GES_ASSET_ERROR g_quark_from_static_string("GES_ASSET_ERROR")
+
+/**
+ * GES_FORMATTER_ERROR:
+ *
+ * An error happend using a formatter
+ */
+#define GES_FORMATTER_ERROR g_quark_from_static_string("GES_FORMATTER_ERROR")
+
+/**
+ * GESAssetError:
+ * @GES_ASSET_WRONG_ID: The ID passed is malformed
+ * @GES_ASSET_ERROR_LOADING: An error happened while loading the asset
+ */
+typedef enum
+{
+ GES_ASSET_WRONG_ID,
+ GES_ASSET_ERROR_LOADING
+} GESAssetError;
+
+/**
+ * GESFormatterError:
+ * @GES_FORMATTER_WRONG_INPUT_FILE: The formatted files was malformed
+ */
+typedef enum
+{
+ GES_FORMATTER_WRONG_INPUT_FILE,
+} GESFormatterError;
+
+G_END_DECLS
+#endif /* __GES_ERROR_H__ */
#include <ges/ges-pitivi-formatter.h>
#include <ges/ges-utils.h>
#include <ges/ges-meta-container.h>
+#include <ges/ges-gerror.h>
G_BEGIN_DECLS
void ges_version (guint * major, guint * minor, guint * micro,
guint * nano);
-#define GES_ERROR_DOMAIN g_quark_from_static_string("GES")
-
G_END_DECLS
#endif /* __GES_H__ */