From 2554b3a77894640f264f375b9b92a9e8930e9a58 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Fri, 1 Apr 2011 03:14:19 +0200 Subject: [PATCH] Add convenience header and method. --- src/Makefile | 3 ++- src/ObjXMPP.h | 34 ++++++++++++++++++++++++++++++++++ src/XMPPConnection.h | 2 ++ src/XMPPConnection.m | 5 +++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/ObjXMPP.h diff --git a/src/Makefile b/src/Makefile index d91b0e3..ec69153 100644 --- a/src/Makefile +++ b/src/Makefile @@ -18,7 +18,8 @@ SRCS = XMPPAuthenticator.m \ XMPPSCRAMAuth.m \ XMPPStanza.m -INCLUDES = ${SRCS:.m=.h} +INCLUDES = ${SRCS:.m=.h} \ + ObjXMPP.h include ../buildsys.mk diff --git a/src/ObjXMPP.h b/src/ObjXMPP.h new file mode 100644 index 0000000..ac114cd --- /dev/null +++ b/src/ObjXMPP.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2011, Jonathan Schleifer + * + * https://webkeks.org/hg/objxmpp/ + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice is present in all copies. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#import "XMPPJID.h" + +#import "XMPPConnection.h" +#import "XMPPExceptions.h" + +#import "XMPPStanza.h" +#import "XMPPIQ.h" +#import "XMPPMessage.h" +#import "XMPPPresence.h" + +#import "XMPPRosterItem.h" +#import "XMPPRoster.h" diff --git a/src/XMPPConnection.h b/src/XMPPConnection.h index 90c20fb..ea3685f 100644 --- a/src/XMPPConnection.h +++ b/src/XMPPConnection.h @@ -90,6 +90,8 @@ @property (readonly, retain) XMPPRoster *roster; #endif ++ connection; + /** * Connects to the XMPP service. */ diff --git a/src/XMPPConnection.m b/src/XMPPConnection.m index a0812b7..c130074 100644 --- a/src/XMPPConnection.m +++ b/src/XMPPConnection.m @@ -43,6 +43,11 @@ #import "XMPPExceptions.h" @implementation XMPPConnection ++ connection +{ + return [[[self alloc] init] autorelease]; +} + - init { self = [super init];