WSCMessagingPackage Class Reference

Inherits from WSCPackage : NSObject
Declared in WSCMessagingPackage.h

Overview

Package handler that enables SIP-based messaging. An object of the WSCMessagingPackage class can be created by applications and registered while creating a session. A WSCMessaging object should then be used to send and receive messages.

– init

Returns an initialized WSCChatPackage object.

- (instancetype)init

Discussion

Returns an initialized WSCChatPackage object.

Declared In

WSCMessagingPackage.h

– initWithPackageType:

Returns an initialized WSCChatPackage object with package type.

- (instancetype)initWithPackageType:(NSString *)packageType

Parameters

packageType

Package type

Discussion

Returns an initialized WSCChatPackage object with package type.

Declared In

WSCMessagingPackage.h

  observerDelegate

Messaging delegate for being informed of new or acknowledgements of sent messages.

@property (nonatomic, weak) id<WSCMessagingDelegate> observerDelegate

Discussion

Messaging delegate for being informed of new or acknowledgements of sent messages.

Declared In

WSCMessagingPackage.h

– send:target:extHeaders:

Sends a message to a given target.

- (NSString *)send:(NSString *)textMessage target:(NSString *)target extHeaders:(NSDictionary *)extHeaders

Parameters

textMessage

Text Message to be sent

target

user to whom the message should be sent

extHeaders

Dictionary of extension headers

Discussion

Sends a message to a given target.

Declared In

WSCMessagingPackage.h

– accept:extHeaders:

Acknowledgement that a message was received and accepted by the user. This should be called on the incoming message.

- (void)accept:(WSCMessagingMessage *)message extHeaders:(NSDictionary *)extHeaders

Parameters

message

message that should be acked

extHeaders

Dictionary of extension headers

Discussion

Acknowledgement that a message was received and accepted by the user. This should be called on the incoming message.

Declared In

WSCMessagingPackage.h

– reject:cause:reason:extHeaders:

Acknowledgement that a message was received but rejected by the user. This should be called on the incoming message.

- (void)reject:(WSCMessagingMessage *)message cause:(WSCCause *)cause reason:(NSString *)reason extHeaders:(NSDictionary *)extHeaders

Parameters

message

message that should be acked

cause

cause for rejecting the message

reason

textual description on why the message is rejected

extHeaders

Dictionary of extension headers

Discussion

Acknowledgement that a message was received but rejected by the user. This should be called on the incoming message.

Declared In

WSCMessagingPackage.h

– getMessage:

Gets the handle to the message.

- (WSCMessagingMessage *)getMessage:(NSString *)messageId

Parameters

messageId

unique id for the message obtained by send(…) api

Discussion

Gets the handle to the message.

Declared In

WSCMessagingPackage.h