diff options
author | mkanat%bugzilla.org <> | 2009-02-11 21:23:27 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-02-11 21:23:27 +0100 |
commit | 6a10905af0af5b3436a344cf9181d29fcea4083a (patch) | |
tree | 1f23d362b29985e644bb36649b976d3cb44d0ce0 /Bugzilla/WebService/Constants.pm | |
parent | 0b4ee129cc3a16943a39f01494f8167791a8d38a (diff) | |
download | bugzilla-6a10905af0af5b3436a344cf9181d29fcea4083a.tar.gz bugzilla-6a10905af0af5b3436a344cf9181d29fcea4083a.tar.xz |
Bug 475151: Refactor the XML-RPC server stuff out of Bugzilla::WebService
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla/WebService/Constants.pm')
-rwxr-xr-x | Bugzilla/WebService/Constants.pm | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Bugzilla/WebService/Constants.pm b/Bugzilla/WebService/Constants.pm index 2ccca5ae9..172d757ef 100755 --- a/Bugzilla/WebService/Constants.pm +++ b/Bugzilla/WebService/Constants.pm @@ -20,13 +20,13 @@ package Bugzilla::WebService::Constants; use strict; use base qw(Exporter); -@Bugzilla::WebService::Constants::EXPORT = qw( +our @EXPORT = qw( WS_ERROR_CODE ERROR_UNKNOWN_FATAL ERROR_UNKNOWN_TRANSIENT - ERROR_AUTH_NODATA - ERROR_UNIMPLEMENTED + + WS_DISPATCH ); # This maps the error names in global/*-error.html.tmpl to numbers. @@ -115,7 +115,23 @@ use constant ERROR_UNKNOWN_FATAL => -32000; use constant ERROR_UNKNOWN_TRANSIENT => 32000; use constant ERROR_AUTH_NODATA => 410; -use constant ERROR_UNIMPLEMENTED => 910; use constant ERROR_GENERAL => 999; +sub WS_DISPATCH { + # We "require" here instead of "use" above to avoid a dependency loop. + require Bugzilla::Hook; + my %hook_dispatch; + Bugzilla::Hook::process('webservice', { dispatch => \%hook_dispatch }); + + my $dispatch = { + 'Bugzilla' => 'Bugzilla::WebService::Bugzilla', + 'Bug' => 'Bugzilla::WebService::Bug', + 'User' => 'Bugzilla::WebService::User', + 'Product' => 'Bugzilla::WebService::Product', + %hook_dispatch + }; + return $dispatch; +}; + + 1; |