ObjXMPP  Diff

Differences From Artifact [72643fc0a8]:

To Artifact [e0459a5b73]:


53
54
55
56
57
58
59
60

61
62
63
64
65
66
67
	      ID: (OFString*)ID_
{
	return [[[self alloc] initWithName: name
				      type: type_
					ID: ID_] autorelease];
}

+ stanzaWithElement: (OFXMLElement*)elem {

	return [[[self alloc] initWithElement: elem] autorelease];
}

- initWithName: (OFString*)name_
{
	return [self initWithName: name_
			     type: nil







|
>







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
	      ID: (OFString*)ID_
{
	return [[[self alloc] initWithName: name
				      type: type_
					ID: ID_] autorelease];
}

+ stanzaWithElement: (OFXMLElement*)elem
{
	return [[[self alloc] initWithElement: elem] autorelease];
}

- initWithName: (OFString*)name_
{
	return [self initWithName: name_
			     type: nil
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98





99
100
101
102
103
104
105
			       ID: ID_];
}

- initWithName: (OFString*)name_
	  type: (OFString*)type_
	    ID: (OFString*)ID_
{
	if (![name_ isEqual: @"iq"] &&
	    ![name_ isEqual: @"message"] &&
	    ![name_ isEqual: @"presence"])
		of_log(@"Invalid stanza name!");

	self = [super initWithName: name_];

	@try {





		[self setDefaultNamespace: @"jabber:client"];

		if (type_)
			[self setType: type_];

		if (ID_)
			[self setID: ID_];







<
<
<
<
<



>
>
>
>
>







85
86
87
88
89
90
91





92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
			       ID: ID_];
}

- initWithName: (OFString*)name_
	  type: (OFString*)type_
	    ID: (OFString*)ID_
{





	self = [super initWithName: name_];

	@try {
		if (![name_ isEqual: @"iq"] && ![name_ isEqual: @"message"] &&
		    ![name_ isEqual: @"presence"])
			@throw [OFInvalidArgumentException newWithClass: isa
							       selector: _cmd];

		[self setDefaultNamespace: @"jabber:client"];

		if (type_)
			[self setType: type_];

		if (ID_)
			[self setID: ID_];