[liboobs] Add missing oobs-error.{ch}



commit 77fa81ab21b70386bd41291e3c6b2d75042785f5
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Fri Jan 22 10:56:18 2010 +0100

    Add missing oobs-error.{ch}
    
    Needed by commit 363ab68.

 oobs/oobs-error.c |   38 ++++++++++++++++++++++++++++++++++++++
 oobs/oobs-error.h |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+), 0 deletions(-)
---
diff --git a/oobs/oobs-error.c b/oobs/oobs-error.c
new file mode 100644
index 0000000..055c126
--- /dev/null
+++ b/oobs/oobs-error.c
@@ -0,0 +1,38 @@
+/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
+/* Copyright (C) 2010 Milan Bouchet-Valat
+ *
+ * This program 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 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 program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors: Milan Bouchet-Valat <nalimilan club fr>.
+ */
+
+#include "oobs-error.h"
+
+/**
+ * SECTION:oobs-error
+ * @title: OobsError
+ * @short_description: Error codes
+ **/
+
+GQuark
+oobs_error_quark (void)
+{
+        static GQuark ret = 0;
+        if (ret == 0) {
+                ret = g_quark_from_static_string ("oobs_error");
+        }
+
+        return ret;
+}
diff --git a/oobs/oobs-error.h b/oobs/oobs-error.h
new file mode 100644
index 0000000..4f7012f
--- /dev/null
+++ b/oobs/oobs-error.h
@@ -0,0 +1,53 @@
+/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
+/* Copyright (C) 2010 Milan Bouchet-Valat
+ *
+ * This program 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 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 program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors: Milan Bouchet-Valat <nalimilan club fr>.
+ */
+
+#ifndef __OOBS_ERROR_H
+#define __OOBS_ERROR_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/**
+ * OOBS_ERROR:
+ *
+ * Error domain for errors when using Oobs. Errors in this domain will be from the #OobsError
+ * enumeration. See #GError for information on error domains
+ */
+#define OOBS_ERROR oobs_error_quark()
+
+GQuark oobs_error_quark (void);
+
+/**
+ * OobsError:
+ * @OOBS_ERROR_AUTHENTICATION_FAILED: Error in the backends when authenticating via PolicyKit.
+ * @OOBS_ERROR_AUTHENTICATION_CANCELLED: User manually cancelled the authentication.
+ *
+ * Error codes possible with liboobs.
+ */
+typedef enum
+{
+  OOBS_ERROR_AUTHENTICATION_FAILED,
+  OOBS_ERROR_AUTHENTICATION_CANCELLED,
+} OobsError;
+
+G_END_DECLS
+
+#endif /* __OOBS_ERROR_H */



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