Make the body of a message a property.
This commit is contained in:
parent
212dac3107
commit
2efeee1a0d
2 changed files with 18 additions and 1 deletions
|
@ -27,6 +27,10 @@
|
||||||
* \brief A class describing a message stanza.
|
* \brief A class describing a message stanza.
|
||||||
*/
|
*/
|
||||||
@interface XMPPMessage: XMPPStanza
|
@interface XMPPMessage: XMPPStanza
|
||||||
|
#ifdef OF_HAVE_PROPERTIES
|
||||||
|
@property (copy) OFString *body;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new autoreleased XMPPMessage.
|
* Creates a new autoreleased XMPPMessage.
|
||||||
*
|
*
|
||||||
|
@ -94,9 +98,16 @@
|
||||||
ID: (OFString*)ID;
|
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
|
* \param body The text content of the body element or nil to remove the body
|
||||||
*/
|
*/
|
||||||
- (void)setBody: (OFString*)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
|
@end
|
||||||
|
|
|
@ -90,4 +90,10 @@
|
||||||
namespace: XMPP_NS_CLIENT
|
namespace: XMPP_NS_CLIENT
|
||||||
stringValue: body]];
|
stringValue: body]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (OFString*)body
|
||||||
|
{
|
||||||
|
return [[self elementForName: @"body"
|
||||||
|
namespace: XMPP_NS_CLIENT] stringValue];
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue