SINOutgoingMessage Class Reference

Inherits from NSObject
Declared in SINOutgoingMessage.h

Overview

SINOutgoingMessage should be used to create outgoing instant-messages.

  messageId

String that is used as an identifier for this particular message.

@property (nonatomic, readonly) NSString *messageId

Declared In

SINOutgoingMessage.h

  recipientIds

Array of ids of the recipients of the message.

@property (nonatomic, readonly) NSArray *recipientIds

Declared In

SINOutgoingMessage.h

  text

Message body text

@property (nonatomic, readonly) NSString *text

Declared In

SINOutgoingMessage.h

  headers

Message headers

@property (nonatomic, readonly) NSDictionary *headers

Declared In

SINOutgoingMessage.h

+ messageWithRecipient:text:

Creates a new message with the specified recipient and message body.

+ (SINOutgoingMessage *)messageWithRecipient:(NSString *)recipientId text:(NSString *)text

Parameters

recipientId

The indended recipient’s id.

text

Message text

Exceptions

NSInvalidArgumentException

Throws exception if message is invalid, e.g. if no recipient is set or text is nil.

Declared In

SINOutgoingMessage.h

+ messageWithRecipients:text:

Creates a new message with the specified recipients and message body.

+ (SINOutgoingMessage *)messageWithRecipients:(NSArray *)recipientIds text:(NSString *)text

Parameters

recipientIds

The indended recipients' ids.

text

Message text

Exceptions

NSInvalidArgumentException

Throws exception if message is invalid, e.g. if no recipient is set or text is nil.

Declared In

SINOutgoingMessage.h

+ messageWithMessage:

Creates a SINOutgoingMessage from a SINMessage.

+ (SINOutgoingMessage *)messageWithMessage:(id<SINMessage>)message

Parameters

message

The original message

Return Value

A new sendable message. This message will have the same contents as the previous message but with a new id.

Declared In

SINOutgoingMessage.h

– addHeaderWithValue:key:

Add a message header

- (void)addHeaderWithValue:(NSString *)value key:(NSString *)key

Parameters

value

Header value

key

Header key

Discussion

The total size of header keys + values (when encoded with NSUTF8StringEncoding) must not exceed 1024 bytes.

Declared In

SINOutgoingMessage.h