--- /dev/null
+# GNUstep makefile
+
+-include ../../../config.make
+include $(GNUSTEP_MAKEFILES)/common.make
+
+TOOL_NAME = \
+ meerkat_xml_channels \
+ blogger_zidestore
+
+meerkat_xml_channels_OBJC_FILES += meerkat_xml_channels.m
+
+blogger_zidestore_OBJC_FILES += blogger_zidestore.m NGBloggerClient.m
+
+ADDITIONAL_TOOL_LIBS += \
+ -lNGXmlRpc -lNGObjWeb -lNGMime -lNGStreams -lNGExtensions -lEOControl \
+ -lXmlRpc -lDOM -lSaxObjC
+
+-include GNUmakefile.preamble
+include $(GNUSTEP_MAKEFILES)/tool.make
+-include GNUmakefile.postamble
--- /dev/null
+/*
+ Copyright (C) 2004 Helge Hess
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#ifndef __xmlrpc_NGBloggerClient_H__
+#define __xmlrpc_NGBloggerClient_H__
+
+#import <Foundation/NSObject.h>
+
+/*
+ NGBloggerClient
+
+ Note: this is only demo code and far from being a complete Blogger client!
+ (who knows, it could evolve into one ;-)
+*/
+
+@class NSString, NSArray;
+@class NGXmlRpcClient;
+
+@interface NGBloggerClient : NSObject
+{
+ NGXmlRpcClient *xmlrpc;
+ NSString *appid;
+ NSString *login;
+ NSString *password;
+}
+
+- (id)initWithClient:(NGXmlRpcClient *)_client;
+- (id)initWithURL:(id)_url;
+
+/* accessors */
+
+- (NGXmlRpcClient *)client;
+
+- (void)setLogin:(NSString *)_value;
+- (NSString *)login;
+
+- (void)setPassword:(NSString *)_value;
+- (NSString *)password;
+
+/* operations */
+
+- (NSArray *)getUsersBlogs;
+
+@end
+
+#endif /* __xmlrpc_NGBloggerClient_H__ */
--- /dev/null
+/*
+ Copyright (C) 2004 Helge Hess
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#include "NGBloggerClient.h"
+#include <NGXmlRpc/NGXmlRpcClient.h>
+#include "common.h"
+
+@implementation NGBloggerClient
+
+- (id)initWithClient:(NGXmlRpcClient *)_client {
+ if (_client == nil) {
+ [self release];
+ return nil;
+ }
+ if ((self = [super init])) {
+ self->xmlrpc = [_client retain];
+ self->appid = @"NGBloggerClient";
+ self->login = @"NGBloggerClient";
+ self->password = @"NGBloggerClient";
+ }
+ return self;
+}
+
+- (id)initWithURL:(id)_url {
+ NGXmlRpcClient *client;
+
+ client = [[NGXmlRpcClient alloc] initWithURL:_url];
+ self = [self initWithClient:client];
+ [client release];
+ return self;
+}
+
+- (id)init {
+ return [self initWithClient:nil];
+}
+
+- (void)dealloc {
+ [self->appid release];
+ [self->login release];
+ [self->password release];
+ [self->xmlrpc release];
+ [super dealloc];
+}
+
+/* accessors */
+
+- (NGXmlRpcClient *)client {
+ return self->xmlrpc;
+}
+
+- (void)setLogin:(NSString *)_login {
+ ASSIGNCOPY(self->login, _login);
+ [self->xmlrpc setUserName:self->login];
+}
+- (NSString *)login {
+ return self->login;
+}
+
+- (void)setPassword:(NSString *)_value {
+ ASSIGNCOPY(self->password, _value);
+ [self->xmlrpc setPassword:_value];
+}
+- (NSString *)password {
+ return self->password;
+}
+
+/* operations */
+
+- (NSArray *)getUsersBlogs {
+ return [self->xmlrpc call:@"blogger.getUsersBlogs",
+ self->appid, self->login, self->password, nil];
+}
+
+@end /* NGBloggerClient */
--- /dev/null
+/*
+ Copyright (C) 2004 SKYRIX Software AG
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#include "NGBloggerClient.h"
+#include "common.h"
+
+static void runIt(void) {
+ NGBloggerClient *client;
+ NSString *url, *login, *password;
+ id result;
+
+ // ADJUST!
+ login = @"helge";
+ password = @"secret";
+ url = @"http://localhost/zidestore/so/helge";
+
+ client = [[NGBloggerClient alloc] initWithURL:url];
+ [client setLogin:login];
+ [client setPassword:password];
+
+ result = [client getUsersBlogs];
+ NSLog(@"result: %@", result);
+
+ [client release];
+}
+
+int main(int argc, char **argv, char **env) {
+ NSAutoreleasePool *pool;
+
+ pool = [[NSAutoreleasePool alloc] init];
+#if LIB_FOUNDATION_LIBRARY || defined(GS_PASS_ARGUMENTS)
+ [NSProcessInfo initializeWithArguments:argv count:argc environment:env];
+#endif
+
+ runIt();
+ [pool release];
+ return 0;
+}
--- /dev/null
+/*
+ Copyright (C) 2004 Helge Hess
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#import <Foundation/Foundation.h>
+
+#if !LIB_FOUNDATION_LIBRARY
+# import <NGExtensions/NGObjectMacros.h>
+# import <NGExtensions/NSString+Ext.h>
+#endif
+
+#include <NGExtensions/NGExtensions.h>
+
--- /dev/null
+/*
+ Copyright (C) 2004 SKYRIX Software AG
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#include <NGXmlRpc/NGXmlRpcClient.h>
+#import <Foundation/Foundation.h>
+
+static void runIt(void) {
+ NGXmlRpcClient *client;
+ NSString *url;
+
+ url = @"http://www.oreillynet.com/meerkat/xml-rpc/server.php";
+ client = [[NGXmlRpcClient alloc] initWithURL:url];
+
+ NSLog(@"result: %@",
+ [client call:@"meerkat.getChannelsBySubstring", @"XML", nil]);
+
+ [client release];
+}
+
+int main(int argc, char **argv, char **env) {
+ NSAutoreleasePool *pool;
+
+ pool = [[NSAutoreleasePool alloc] init];
+#if LIB_FOUNDATION_LIBRARY || defined(GS_PASS_ARGUMENTS)
+ [NSProcessInfo initializeWithArguments:argv count:argc environment:env];
+#endif
+
+ runIt();
+ [pool release];
+ return 0;
+}