diff options
author | <rob.taylor@collabora.co.uk> | 2006-01-16 09:58:46 +0000 |
---|---|---|
committer | <rob.taylor@collabora.co.uk> | 2006-01-16 09:58:46 +0000 |
commit | 57ce2490624bb997c984884240ace1a07934e22b (patch) | |
tree | 15d8a81e0a6eb43fdba6b437e6fbbe9c4dc03c1e /tools | |
parent | 19ba015f7824d5dc8b58af748443be594bdfcd68 (diff) |
added to generrors.py to generate the error quark needed to register the errors with dbus
Diffstat (limited to 'tools')
-rw-r--r-- | tools/generrors.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/generrors.py b/tools/generrors.py index 51a7ddd..050ec4a 100644 --- a/tools/generrors.py +++ b/tools/generrors.py @@ -38,4 +38,28 @@ for val in errors: out.write("} TelepathyErrors; \n\n") +out.write( +""" + GQuark telepathy_errors_quark (void); + #define TELEPATHY_ERRORS telepathy_errors_quark () +""") + + gengobject.print_header_end(out, "telepathy_errors"); + +out = open("telepathy-errors.c", 'w') + +out.write( +""" +#include <glib.h> +#include "telepathy-errors.h" + +GQuark +telepathy_errors_quark (void) +{ + static GQuark quark = 0; + if (!quark) + quark = g_quark_from_static_string ("telepathy_errors"); + return quark; +} +""") |