ObjXMPP  Diff

Differences From Artifact [951ee83820]:

To Artifact [56a714ea1b]:


25
26
27
28
29
30
31
32
33


34
35
36


37
38
39
40


41
42
43
44


45
46
47
48


49
50
51
52
53
54
55
25
26
27
28
29
30
31


32
33
34


35
36
37
38


39
40
41
42


43
44
45
46


47
48
49
50
51
52
53
54
55







-
-
+
+

-
-
+
+


-
-
+
+


-
-
+
+


-
-
+
+







# include "config.h"
#endif

#import "namespaces.h"
#import "XMPPIQ.h"

@implementation XMPPIQ
+ IQWithType: (OFString*)type_
	  ID: (OFString*)ID_
+ IQWithType: (OFString*)type
	  ID: (OFString*)ID
{
	return [[[self alloc] initWithType: type_
					ID: ID_] autorelease];
	return [[[self alloc] initWithType: type
					ID: ID] autorelease];
}

- initWithType: (OFString*)type_
	    ID: (OFString*)ID_
- initWithType: (OFString*)type
	    ID: (OFString*)ID
{
	self = [super initWithName: @"iq"
			      type: type_
				ID: ID_];
			      type: type
				ID: ID];

	@try {
		if (![type_ isEqual: @"get"] && ![type_ isEqual: @"set"] &&
		    ![type_ isEqual: @"result"] && ![type_ isEqual: @"error"])
		if (![type isEqual: @"get"] && ![type isEqual: @"set"] &&
		    ![type isEqual: @"result"] && ![type isEqual: @"error"])
			@throw [OFInvalidArgumentException
			    exceptionWithClass: [self class]
				      selector: _cmd];
	} @catch (id e) {
		[self release];
		@throw e;
	}