2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE 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 SOPE 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 SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __NGXmlRpc_NGXmlRpcAction_H__
23 #define __NGXmlRpc_NGXmlRpcAction_H__
25 #import <Foundation/NSObject.h>
26 #import <NGObjWeb/WOActionResults.h>
27 #include <NGObjWeb/WOApplication.h>
28 #include <NGXmlRpc/WODirectAction+XmlRpc.h>
30 @class NSArray, NSString, NSException;
31 @class XmlRpcMethodCall;
32 @class NGAsyncResultProxy;
35 @interface NGXmlRpcAction : NSObject
43 - (id)initWithContext:(WOContext *)_context;
48 - (WORequest *)request;
50 - (id)existingSession;
57 /* sandstorm components */
59 - (NSString *)xmlrpcComponentNamespacePrefix;
60 - (NSString *)xmlrpcComponentName;
61 - (NSString *)xmlrpcComponentNamespace;
63 /* XML-RPC direct action dispatcher ... */
65 - (id)performActionNamed:(NSString *)_name parameters:(NSArray *)_params;
66 - (id<WOActionResults>)performMethodCall:(XmlRpcMethodCall *)_call;
68 - (id<WOActionResults>)missingAuthAction;
69 - (id<WOActionResults>)accessDeniedAction;
71 - (id<WOActionResults>)actionResponseForResult:(id)resValue;
75 - (WOResponse *)responseForAsyncResult:(NGAsyncResultProxy *)_proxy;
79 - (BOOL)hasAuthorizationHeader;
80 - (NSString *)credentials;
84 @interface NGXmlRpcAction(Registry)
88 + (void)registerActionClass:(Class)_class forURI:(NSString *)_uri;
89 + (Class)actionClassForURI:(NSString *)_uri;
93 + (BOOL)registerMappingsInFile:(NSString *)_path;
95 + (void)registerSelector:(SEL)_selector
96 forMethodNamed:(NSString *)_method
97 signature:(id)_signature; /* either array or CSV */
99 + (SEL)selectorForActionNamed:(NSString *)_name
100 signature:(NSArray *)_signature;
102 + (NSArray *)registeredMethodNames; /* can be used for listMethods */
103 + (NSArray *)signaturesForMethodNamed:(NSString *)_method;
104 + (NSArray *)registeredMethodNames;
108 @interface WOApplication(XmlRpcActionClass)
110 - (Class)defaultActionClassForRequest:(WORequest *)_request;
114 #endif /* __NGXmlRpc_NGXmlRpcAction_H__ */