MumbleKit
 All Classes Functions
Instance Methods | Class Methods | List of all members
MKTextMessage Class Reference

 . More...

Inheritance diagram for MKTextMessage:

Instance Methods

(NSString *) - plainTextString
 
(NSString *) - HTMLString
 
(NSArray *) - embeddedLinks
 
(NSArray *) - embeddedImages
 

Class Methods

(MKTextMessage *) + messageWithPlainText:
 
(MKTextMessage *) + messageWithHTML:
 
(MKTextMessage *) + messageWithString:
 

Detailed Description

 .

Method Documentation

- (NSArray *) embeddedImages

Returns all embedded images found in the text message. (Only images with data URIs are considered valid).

Returns
Returns an NSArray of all images found in the text message. The images are represented as data URIs.
- (NSArray *) embeddedLinks

Returns all links found in the text message.

Returns
Returns an NSArray of NSStrings corresponding to the href attributes of any a tags found in the text message.
- (NSString *) HTMLString

Returns an HTML representation of the text message.

Returns
Returns an HTML version of the text message. If there is no HTML version, a plain text version is returned.
+ (MKTextMessage *) messageWithHTML: (NSString *)  html

Create a new MKTextMessage with HTML representation given in html.

Parameters
htmlThe HTML representing the text message.
Returns
Returns a MKTextMessage object that can be sent using an MKServerModel.
+ (MKTextMessage *) messageWithPlainText: (NSString *)  msg

Create a new MKTextMessage with the plain text representation given in msg.

Parameters
msgThe plain text version of the text message.
Returns
Returns a MKTextMessage object that can be sent using an MKServerModel.
+ (MKTextMessage *) messageWithString: (NSString *)  str

Create a new MKTextMessage with the given string. The internal representation is chosen depending on the content of the message.

Parameters
strA string representing the message to create. This string can be either a plain text string, or an HTML string. MKTextMessage will detect this itself and handle the message accordingly.
Returns
Returns a MKTextMessage object that can be sent using an MKServerModel.
- (NSString *) plainTextString

Returns the text message represented in plain text. If the message was an HTML formatted message, the formatting will be stripped, and a plain text string will be returned.

Returns
A plain text representation of the text message. If the message has a plain text representation, that is returned. If the message is an HTML message, it will be lossily converted to plain text.

The documentation for this class was generated from the following file: