ObjXMPP  Check-in [edef1e1fbf]

Overview
Comment:Make the body of a message a property.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: edef1e1fbffba79f7e7c6a38cd0ea84fec6c91483729a7a46315808dbb1c30ef
User & Date: js on 2012-02-03 10:31:45
Other Links: manifest | tags
Context
2012-02-03
10:43
Hide instance variables from the documentation. check-in: f5739f6ee6 user: js tags: trunk
10:31
Make the body of a message a property. check-in: edef1e1fbf user: js tags: trunk
10:29
Remove streamOpen property (an ivar is enough). check-in: 171da49bc4 user: js tags: trunk
Changes

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

23
24
25
26
27
28
29




30
31
32
33
34
35
36
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40







+
+
+
+








#import "XMPPStanza.h"

/**
 * \brief A class describing a message stanza.
 */
@interface XMPPMessage: XMPPStanza
#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *body;
#endif

/**
 * Creates a new autoreleased XMPPMessage.
 *
 * \return A new autoreleased XMPPMessage
 */
+ message;

90
91
92
93
94
95
96
97

98
99
100
101







102
94
95
96
97
98
99
100

101
102
103
104
105
106
107
108
109
110
111
112
113







-
+




+
+
+
+
+
+
+

 * \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.
 * Sets the text content of the body of the XMPPMessage.
 *
 * \param body The text content of the body element or nil to remove the body
 */
- (void)setBody: (OFString*)body;

/**
 * Returns the text content of the body element of the XMPPMessage.
 *
 * \return The text content of the body element of the XMPPMessage.
 */
- (OFString*)body;
@end

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

86
87
88
89
90
91
92






93
86
87
88
89
90
91
92
93
94
95
96
97
98
99







+
+
+
+
+
+

		[self removeChild: oldBody];

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

- (OFString*)body
{
	return [[self elementForName: @"body"
			   namespace: XMPP_NS_CLIENT] stringValue];
}
@end