summaryrefslogtreecommitdiff
path: root/lib/bluetooth-agent.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2009-06-13 19:35:49 +0100
committerBastien Nocera <hadess@hadess.net>2009-06-13 21:03:45 +0100
commit6c6b73618be165281785370414c0c5f826099535 (patch)
treef24315e396b2348808f0ab27b4d7633dae7c4b58 /lib/bluetooth-agent.c
parent07b921ddf59b88f7231b63fbec7e8a1aae1d73fd (diff)
downloadgnome-bluetooth-6c6b73618be165281785370414c0c5f826099535.tar.gz
Move AgentError to the shared BluetoothAgent
So we can use it in the wizard as well.
Diffstat (limited to 'lib/bluetooth-agent.c')
-rw-r--r--lib/bluetooth-agent.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/bluetooth-agent.c b/lib/bluetooth-agent.c
index bdc20b66..b88520ca 100644
--- a/lib/bluetooth-agent.c
+++ b/lib/bluetooth-agent.c
@@ -528,3 +528,30 @@ void bluetooth_agent_set_cancel_func(BluetoothAgent *agent,
priv->cancel_func = func;
priv->cancel_data = data;
}
+
+GQuark bluetooth_agent_error_quark(void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_static_string("agent");
+
+ return quark;
+}
+
+#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
+
+GType bluetooth_agent_error_get_type(void)
+{
+ static GType etype = 0;
+ if (etype == 0) {
+ static const GEnumValue values[] = {
+ ENUM_ENTRY(AGENT_ERROR_REJECT, "Rejected"),
+ { 0, 0, 0 }
+ };
+
+ etype = g_enum_register_static("agent", values);
+ }
+
+ return etype;
+}
+