//
//  VivochaChatObject.h
//  ios-sdk
//
//  Created by Michael Siddi on 13/11/13.
//  Copyright (c) 2013 Vivocha Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

@class VivochaChatAck;

///Vivocha base object for chat contacts. VivochaMessage and VivochaChatPresence are subclasses of this one.
@interface VivochaChatObject : NSObject <NSCoding>

///Timestamp when the object has been created / received
@property (nonatomic, retain) NSDate *timestamp;

///Unique object ID
@property (nonatomic, retain) NSString *objectID;

/**
 Returns YES if the message is sent by the Customer.
 */
@property (nonatomic, assign) BOOL isOutgoing;

/**
    The contactId which the chat object belongs to.
 */
@property (nonatomic, readonly, strong) NSString *contactId;

/**
 The remote peer address. (e.g. agentID@chat.vivocha.com in case of XMPP protocol)
 */
@property (nonatomic, strong) NSString *remotePeer;

/// The collection of acks for the current chat object.
@property (nonatomic, readonly, strong) NSMutableArray<VivochaChatAck *>* acks;

/// The message has been marked as received by the Agent console. It means that the message has been delivered to the Agent.
- (BOOL) isReceived;

/// The message has been marked as read by the Agent console. It means that the message has been read by the agent.
- (BOOL) isRead;


@end
