ObjXMPP  Check-in [694e1355dd]

Overview
Comment:Change -[XMPPMessage addBody:] to -[XMPPMessage setBody:].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 694e1355dd54b74b9dd4d7f136dd1dc2e2baa9453bead5e029ef34502ee58664
User & Date: js on 2012-02-03 08:05:51
Other Links: manifest | tags
Context
2012-02-03
09:40
Merge. check-in: 7738fa4342 user: js tags: trunk
08:05
Change -[XMPPMessage addBody:] to -[XMPPMessage setBody:]. check-in: 694e1355dd user: js tags: trunk
08:04
Clean up properties. check-in: 5d6af5c663 user: js tags: trunk
Changes

Modified src/XMPPMessage.h from [7899970ddc] to [2e4d4d1193].

90
91
92
93
94
95
96
97
98
99
100
101
102
 * \param ID The value for the stanza's id attribute
 * \return A initialized XMPPMessage
 */
- initWithType: (OFString*)type
	    ID: (OFString*)ID;

/**
 * Adds a body element to the XMPPMessage
 *
 * \param body The text content of the body element
 */
- (void)addBody: (OFString*)body;
@end







|

|

|

90
91
92
93
94
95
96
97
98
99
100
101
102
 * \param ID The value for the stanza's id attribute
 * \return A initialized XMPPMessage
 */
- initWithType: (OFString*)type
	    ID: (OFString*)ID;

/**
 * Sets the body element of the XMPPMessage.
 *
 * \param body The text content of the body element or nil to remove the body
 */
- (void)setBody: (OFString*)body;
@end

Modified src/XMPPMessage.m from [b04caf9947] to [4e83efc9ba].

73
74
75
76
77
78
79
80
81







82
83
84
85
86
	    ID: (OFString*)ID_
{
	return [super initWithName: @"message"
			      type: type_
				ID: ID_];
}

- (void)addBody: (OFString*)body
{







	[self addChild: [OFXMLElement elementWithName: @"body"
					    namespace: XMPP_NS_CLIENT
					  stringValue: body]];
}
@end







|

>
>
>
>
>
>
>
|
|
|


73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
	    ID: (OFString*)ID_
{
	return [super initWithName: @"message"
			      type: type_
				ID: ID_];
}

- (void)setBody: (OFString*)body
{
	OFXMLElement *oldBody = [self elementForName: @"body"
					   namespace: XMPP_NS_CLIENT];

	if (oldBody != nil)
		[self removeChild: oldBody];

	if (body != nil)
		[self addChild: [OFXMLElement elementWithName: @"body"
						    namespace: XMPP_NS_CLIENT
						  stringValue: body]];
}
@end