2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #ifndef __NGXmlRpc_NGXmlRpcAction_H__
24 #define __NGXmlRpc_NGXmlRpcAction_H__
26 #import <Foundation/NSObject.h>
27 #import <NGObjWeb/WOActionResults.h>
28 #include <NGObjWeb/WOApplication.h>
29 #include <NGXmlRpc/WODirectAction+XmlRpc.h>
31 @class NSArray, NSString, NSException;
32 @class XmlRpcMethodCall;
33 @class NGAsyncResultProxy;
36 @interface NGXmlRpcAction : NSObject
44 - (id)initWithContext:(WOContext *)_context;
49 - (WORequest *)request;
51 - (id)existingSession;
58 /* sandstorm components */
60 - (NSString *)xmlrpcComponentNamespacePrefix;
61 - (NSString *)xmlrpcComponentName;
62 - (NSString *)xmlrpcComponentNamespace;
64 /* XML-RPC direct action dispatcher ... */
66 - (id)performActionNamed:(NSString *)_name parameters:(NSArray *)_params;
67 - (id<WOActionResults>)performMethodCall:(XmlRpcMethodCall *)_call;
69 - (id<WOActionResults>)missingAuthAction;
70 - (id<WOActionResults>)accessDeniedAction;
72 - (id<WOActionResults>)actionResponseForResult:(id)resValue;
76 - (WOResponse *)responseForAsyncResult:(NGAsyncResultProxy *)_proxy;
80 - (BOOL)hasAuthorizationHeader;
81 - (NSString *)credentials;
85 @interface NGXmlRpcAction(Registry)
89 + (void)registerActionClass:(Class)_class forURI:(NSString *)_uri;
90 + (Class)actionClassForURI:(NSString *)_uri;
94 + (BOOL)registerMappingsInFile:(NSString *)_path;
96 + (void)registerSelector:(SEL)_selector
97 forMethodNamed:(NSString *)_method
98 signature:(id)_signature; /* either array or CSV */
100 + (SEL)selectorForActionNamed:(NSString *)_name
101 signature:(NSArray *)_signature;
103 + (NSArray *)registeredMethodNames; /* can be used for listMethods */
104 + (NSArray *)signaturesForMethodNamed:(NSString *)_method;
105 + (NSArray *)registeredMethodNames;
109 @interface WOApplication(XmlRpcActionClass)
111 - (Class)defaultActionClassForRequest:(WORequest *)_request;
115 #endif /* __NGXmlRpc_NGXmlRpcAction_H__ */