[retro-gtk] Make error domains private
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] Make error domains private
- Date: Fri, 21 Jul 2017 08:44:39 +0000 (UTC)
commit 1158ff48b859e554574f2dc3a93e56326176724e
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Jul 20 17:38:34 2017 +0200
Make error domains private
This will help reduce the public API and port the code to C.
https://bugzilla.gnome.org/show_bug.cgi?id=777489
retro-gtk/core-error.vala | 2 +-
retro-gtk/disk-controller.vala | 32 ++++++++++++++--------------
retro-gtk/retro-core-descriptor-error.vala | 2 +-
retro-gtk/retro.vala | 2 +-
4 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/retro-gtk/core-error.vala b/retro-gtk/core-error.vala
index 24f8a19..53fabdd 100644
--- a/retro-gtk/core-error.vala
+++ b/retro-gtk/core-error.vala
@@ -1,6 +1,6 @@
// This file is part of retro-gtk. License: GPL-3.0+.
-public errordomain Retro.CoreError {
+private errordomain Retro.CoreError {
COULDNT_SERIALIZE,
COULDNT_DESERIALIZE,
SERIALIZATION_NOT_SUPPORTED,
diff --git a/retro-gtk/disk-controller.vala b/retro-gtk/disk-controller.vala
index 7a5ceb5..71dd8ca 100644
--- a/retro-gtk/disk-controller.vala
+++ b/retro-gtk/disk-controller.vala
@@ -39,9 +39,9 @@ public class DiskControl: Object {
*
* @param ejected the desired eject state
* @return //true// on successfully changed eject state, //false// otherwise
- * @throws CbError the core or its callback couldn't be found
+ * @throws Error the core or its callback couldn't be found
*/
- public bool set_eject_state (bool ejected) throws CbError {
+ public bool set_eject_state (bool ejected) throws Error {
if (core == null)
throw new CbError.NO_CORE ("DiskControl has no core");
@@ -60,9 +60,9 @@ public class DiskControl: Object {
* See {@link set_eject_state} for more informations.
*
* @return the current eject state
- * @throws CbError the core or its callback couldn't be found
+ * @throws Error the core or its callback couldn't be found
*/
- public bool get_eject_state () throws CbError {
+ public bool get_eject_state () throws Error {
if (core == null)
throw new CbError.NO_CORE ("DiskControl has no core");
@@ -85,9 +85,9 @@ public class DiskControl: Object {
*
* @param image_index the desired image index
* @return //true// on successfully changed image index, //false// otherwise
- * @throws CbError the core or its callback couldn't be found
+ * @throws Error the core or its callback couldn't be found
*/
- public bool set_image_index (uint image_index) throws CbError {
+ public bool set_image_index (uint image_index) throws Error {
if (core == null)
throw new CbError.NO_CORE ("DiskControl has no core");
@@ -104,9 +104,9 @@ public class DiskControl: Object {
* Gets the current disk index.
*
* @return the current image index
- * @throws CbError the core or its callback couldn't be found
+ * @throws Error the core or its callback couldn't be found
*/
- public uint get_image_index () throws CbError {
+ public uint get_image_index () throws Error {
if (core == null)
throw new CbError.NO_CORE ("DiskControl has no core");
@@ -123,9 +123,9 @@ public class DiskControl: Object {
* Gets the total number of images which are available to use.
*
* @return total number of images available to use
- * @throws CbError the core or its callback couldn't be found
+ * @throws Error the core or its callback couldn't be found
*/
- public uint get_num_images () throws CbError {
+ public uint get_num_images () throws Error {
if (core == null)
throw new CbError.NO_CORE ("DiskControl has no core");
@@ -149,9 +149,9 @@ public class DiskControl: Object {
* @param index index of the disk image to replace
* @param info information on the disk image to use
* @return //true// on successfully replaced image, //false// otherwise
- * @throws CbError the core or its callback couldn't be found
+ * @throws Error the core or its callback couldn't be found
*/
- public bool replace_image_index (uint index, GameInfo info) throws CbError {
+ public bool replace_image_index (uint index, GameInfo info) throws Error {
if (core == null)
throw new CbError.NO_CORE ("DiskControl has no core");
@@ -178,9 +178,9 @@ public class DiskControl: Object {
*
* @param index index of the disk image to remove
* @return //true// on successfully removed index, //false// otherwise
- * @throws CbError the core or its callback couldn't be found
+ * @throws Error the core or its callback couldn't be found
*/
- public bool remove_image_index (uint index) throws CbError {
+ public bool remove_image_index (uint index) throws Error {
if (core == null)
throw new CbError.NO_CORE ("DiskControl has no core");
@@ -205,9 +205,9 @@ public class DiskControl: Object {
* {@link replace_image_index}.
*
* @return //true// on successfully added index, //false// otherwise
- * @throws CbError the core or its callback couldn't be found
+ * @throws Error the core or its callback couldn't be found
*/
- public bool add_image_index () throws CbError {
+ public bool add_image_index () throws Error {
if (core == null)
throw new CbError.NO_CORE ("DiskControl has no core");
diff --git a/retro-gtk/retro-core-descriptor-error.vala b/retro-gtk/retro-core-descriptor-error.vala
index f51b95b..5c9c630 100644
--- a/retro-gtk/retro-core-descriptor-error.vala
+++ b/retro-gtk/retro-core-descriptor-error.vala
@@ -1,6 +1,6 @@
// This file is part of retro-gtk. License: GPL-3.0+.
-public errordomain Retro.CoreDescriptorError {
+private errordomain Retro.CoreDescriptorError {
REQUIRED_GROUP_NOT_FOUND,
REQUIRED_KEY_NOT_FOUND,
FIRMWARE_NOT_FOUND,
diff --git a/retro-gtk/retro.vala b/retro-gtk/retro.vala
index 40ff627..c16dccf 100644
--- a/retro-gtk/retro.vala
+++ b/retro-gtk/retro.vala
@@ -14,7 +14,7 @@ private const string ENV_PLUGIN_PATH = "RETRO_PLUGIN_PATH_1_0";
* Error type thrown by interfaces when accessing one of their Core's
* callback.
*/
-public errordomain CbError {
+private errordomain CbError {
NO_CORE,
NO_CALLBACK
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]