EMOobProviderToUserMessage

Objective-C

@protocol EMOobProviderToUserMessage <EMOobIncomingMessage, EMOobMessageMeta>

Swift

protocol EMOobProviderToUserMessage : EMOobIncomingMessage, EMOobMessageMeta

Interface of an incoming user message from the server.

Since

3.0
  • Gets the locale the message content is for.

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *locale;

    Swift

    var locale: String! { get }

    Return Value

    The locale.

  • Gets the content type of the generic message.

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *contentType;

    Swift

    var contentType: String! { get }

    Return Value

    The content type.

  • Gets message content as secure byte array.

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) id<EMSecureByteArray> content;

    Swift

    var content: (any EMSecureByteArray)! { get }

    Return Value

    The content.

  • Gets message content in form of secure string.

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) id<EMSecureString> contentString;

    Swift

    var contentString: (any EMSecureString)! { get }

    Return Value

    The content.

  • Gets message subject

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) id<EMSecureString> subject;

    Swift

    @NSCopying var subject: (any EMSecureString)! { get }

    Return Value

    The subject.

  • Gets the message creation date.

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval createTime;

    Swift

    var createTime: TimeInterval { get }

    Return Value

    The creation date.

  • Gets the message originator.

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *from;

    Swift

    var from: String! { get }

    Return Value

    The originator.

  • to

    Gets the message recipient.

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *to;

    Swift

    var to: String! { get }

    Return Value

    The recipient.

  • Gets the recipient to use for a response.

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *replyTo;

    Swift

    var replyTo: String! { get }

    Return Value

    The response’s recipient.

  • Gets the message thread identifier.

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *threadId;

    Swift

    var threadId: String! { get }

    Return Value

    The thread identifier.

  • Gets messages attachments.

    Since

    3.0

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSArray *attachments;

    Swift

    var attachments: [Any]! { get }

    Return Value

    The attachments.

  • Gets message content in form of secure string in specific encoding format.

    Since

    3.0

    Declaration

    Objective-C

    - (id<EMSecureString>)contentStringWithEncoding:(NSStringEncoding)encoding;

    Swift

    func contentString(withEncoding encoding: UInt) -> (any EMSecureString)!

    Parameters

    encoding

    A string encoding.

    Return Value

    The content.

  • Create an outgoing response for the current message.

    The recipient field (to) of the created message is set to the value of the response recipient (replyTo) of the incoming message.

    The response thread identifier field (threadId) is set to the same value than the incoming message.

    Since

    3.0

    Declaration

    Objective-C

    - (id<EMOobUserToProviderMessage>)
        createResponseWithLocale:(NSString *)aLocale
                      createTime:(NSTimeInterval)aCreateTime
                         subject:(id<EMSecureString>)aSubject
                            from:(NSString *)aFrom
                     contentType:(NSString *)aContentType
                         content:(id<EMSecureByteArray>)aContent
                     attachments:(NSArray *)anAttachments
                            meta:(NSDictionary *)aMeta;

    Swift

    func createResponse(withLocale aLocale: String!, createTime aCreateTime: TimeInterval, subject aSubject: (any EMSecureString)!, from aFrom: String!, contentType aContentType: String!, content aContent: (any EMSecureByteArray)!, attachments anAttachments: [Any]!, meta aMeta: [AnyHashable : Any]!) -> (any EMOobUserToProviderMessage)!

    Parameters

    aLocale

    Locale to use to handle messages.

    aCreateTime

    Message creation time. If nil the default system time is used.

    aSubject

    Message subject.

    aFrom

    Message originator. Can be nil.

    aContentType

    Message content-type.

    aContent

    Message content.

    anAttachments

    Array of attachments to the message. Can be nil.

    aMeta

    Meta data for the message. Can be nil.

    Return Value

    The outgoing message ready to be sent.