[gnome-packagekit] Add four new enumerated error values



commit 56cd5802358acded446f1a95771761f31d62faef
Author: Richard Hughes <richard hughsie com>
Date:   Wed Aug 19 09:28:09 2009 +0100

    Add four new enumerated error values

 src/gpk-enum.c |   28 ++++++++++++++++++++++++++++
 src/gpk-enum.h |    8 ++++++++
 2 files changed, 36 insertions(+), 0 deletions(-)
---
diff --git a/src/gpk-enum.c b/src/gpk-enum.c
index f1b3966..8842638 100644
--- a/src/gpk-enum.c
+++ b/src/gpk-enum.c
@@ -485,6 +485,18 @@ gpk_error_enum_to_localised_text (PkErrorCodeEnum code)
 	case PK_ERROR_ENUM_CANNOT_DISABLE_REPOSITORY:
 		text = _("Cannot disable source");
 		break;
+	case PK_ERROR_ENUM_RESTRICTED_DOWNLOAD:
+		text = _("The download failed");
+		break;
+	case PK_ERROR_ENUM_PACKAGE_FAILED_TO_CONFIGURE:
+		text = _("Package failed to configure");
+		break;
+	case PK_ERROR_ENUM_PACKAGE_FAILED_TO_BUILD:
+		text = _("Package failed to build");
+		break;
+	case PK_ERROR_ENUM_PACKAGE_FAILED_TO_INSTALL:
+		text = _("Package failed to install");
+		break;
 	default:
 		egg_warning ("Unknown error");
 	}
@@ -694,6 +706,22 @@ gpk_error_enum_to_localised_message (PkErrorCodeEnum code)
 	case PK_ERROR_ENUM_CANNOT_DISABLE_REPOSITORY:
 		text = _("The specified software source could not be disabled.");
 		break;
+	case PK_ERROR_ENUM_RESTRICTED_DOWNLOAD:
+		text = _("The download could not be done automatically and should be done manually.\n"
+			 "More information is available in the detailed report.");
+		break;
+	case PK_ERROR_ENUM_PACKAGE_FAILED_TO_CONFIGURE:
+		text = _("One of the selected packages failed to configure correctly.\n"
+			 "More information is available in the detailed report.");
+		break;
+	case PK_ERROR_ENUM_PACKAGE_FAILED_TO_BUILD:
+		text = _("One of the selected packages failed to build correctly.\n"
+			 "More information is available in the detailed report.");
+		break;
+	case PK_ERROR_ENUM_PACKAGE_FAILED_TO_INSTALL:
+		text = _("One of the selected packages failed to install correctly.\n"
+			 "More information is available in the detailed report.");
+		break;
 	default:
 		egg_warning ("Unknown error, please report a bug at " GPK_BUGZILLA_URL ".\n"
 			    "More information is available in the detailed report.");
diff --git a/src/gpk-enum.h b/src/gpk-enum.h
index 1efdff1..848d70d 100644
--- a/src/gpk-enum.h
+++ b/src/gpk-enum.h
@@ -116,6 +116,14 @@ typedef guint PkMediaTypeEnum;
 #define PK_STATUS_ENUM_UNKNOWN				(PK_STATUS_ENUM_CHECK_LIBRARIES + 1)
 #endif
 
+/* constants defined in 0.5.2 */
+#if (!PK_CHECK_VERSION(0,5,2))
+#define PK_ERROR_ENUM_RESTRICTED_DOWNLOAD		(PK_ERROR_ENUM_CANNOT_DISABLE_REPOSITORY + 1)
+#define PK_ERROR_ENUM_PACKAGE_FAILED_TO_CONFIGURE	(PK_ERROR_ENUM_RESTRICTED_DOWNLOAD + 1)
+#define PK_ERROR_ENUM_PACKAGE_FAILED_TO_BUILD		(PK_ERROR_ENUM_PACKAGE_FAILED_TO_CONFIGURE + 1)
+#define PK_ERROR_ENUM_PACKAGE_FAILED_TO_INSTALL		(PK_ERROR_ENUM_PACKAGE_FAILED_TO_BUILD + 1)
+#endif
+
 void		 gpk_enum_test				(gpointer	 data);
 const gchar	*gpk_role_enum_to_localised_past	(PkRoleEnum	 role)
 							 G_GNUC_CONST;



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