summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-02-17 16:18:30 +0100
committerBastien Nocera <hadess@hadess.net>2021-02-17 17:31:30 +0100
commit4378bdb7077eae511fe22a32c72a03b330ea316b (patch)
tree4c0b884f55885a4ad1ef0022cb1db0642a1fb048
parent02ec6e0d86d3393565879b285f71e49b2f0e785f (diff)
downloadgnome-bluetooth-4378bdb7077eae511fe22a32c72a03b330ea316b.tar.gz
lib: Namespace BluetoothAgent errors correctly
-rw-r--r--lib/bluetooth-agent.c6
-rw-r--r--lib/bluetooth-agent.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/bluetooth-agent.c b/lib/bluetooth-agent.c
index 82404766..6185a297 100644
--- a/lib/bluetooth-agent.c
+++ b/lib/bluetooth-agent.c
@@ -427,7 +427,7 @@ handle_method_call (GDBusConnection *connection,
if (g_str_equal (sender, agent->busname) == FALSE) {
GError *error;
- error = g_error_new (AGENT_ERROR, AGENT_ERROR_REJECT,
+ error = g_error_new (BLUETOOTH_AGENT_ERROR, BLUETOOTH_AGENT_ERROR_REJECT,
"Permission Denied");
g_dbus_method_invocation_take_error(invocation, error);
return;
@@ -648,11 +648,11 @@ GType bluetooth_agent_error_get_type(void)
static GType etype = 0;
if (etype == 0) {
static const GEnumValue values[] = {
- ENUM_ENTRY(AGENT_ERROR_REJECT, "Rejected"),
+ ENUM_ENTRY(BLUETOOTH_AGENT_ERROR_REJECT, "Rejected"),
{ 0, 0, 0 }
};
- etype = g_enum_register_static("agent", values);
+ etype = g_enum_register_static("BluetoothAgentError", values);
}
return etype;
diff --git a/lib/bluetooth-agent.h b/lib/bluetooth-agent.h
index a758e6f2..1727a4ab 100644
--- a/lib/bluetooth-agent.h
+++ b/lib/bluetooth-agent.h
@@ -85,12 +85,12 @@ void bluetooth_agent_set_cancel_func (BluetoothAgent *agent,
BluetoothAgentCancelFunc func,
gpointer data);
-#define AGENT_ERROR (bluetooth_agent_error_quark())
-#define AGENT_ERROR_TYPE (bluetooth_agent_error_get_type())
+#define BLUETOOTH_AGENT_ERROR (bluetooth_agent_error_quark())
+#define BLUETOOTH_AGENT_ERROR_TYPE (bluetooth_agent_error_get_type())
typedef enum {
- AGENT_ERROR_REJECT
-} AgentError;
+ BLUETOOTH_AGENT_ERROR_REJECT
+} BluetoothAgentError;
GType bluetooth_agent_error_get_type (void);
GQuark bluetooth_agent_error_quark (void);