module RongIMLib { export interface DataAccessProvider { addConversation(conversation: Conversation, callback: ResultCallback): void; removeConversation(conversationType: ConversationType, targetId: string, callback: ResultCallback): void; addMessage(conversationType: ConversationType, targetId: string, message: MessageContent, callback?: ResultCallback): void; removeMessage(conversationType: ConversationType, targetId: string, messageId: number[], callback: ResultCallback): void; updateMessage(message: Message, callback?: ResultCallback): void; clearMessages(conversationType: ConversationType, targetId: string, callback: ResultCallback): void; updateMessages(conversationType: ConversationType, targetId: string, key: string, value: any, callback: ResultCallback): void; getConversation(conversationType: ConversationType, targetId: string): Conversation; getConversationList(callback: ResultCallback, conversationTypes?: ConversationType[]): void; clearConversations(conversationTypes: ConversationType[], callback: ResultCallback): void; getHistoryMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, callback: GetHistoryMessagesCallback): void; getTotalUnreadCount(callback: ResultCallback): void; getConversationUnreadCount(conversationTypes: ConversationType[], callback: ResultCallback): void; getUnreadCount(conversationType: ConversationType, targetId: string, callback: ResultCallback): void; clearUnreadCount(conversationType: ConversationType, targetId: string, callback: ResultCallback):void; setConversationToTop(conversationType: ConversationType, targetId: string, callback: ResultCallback): void; setMessageExtra(messageId: string, value: string, callback: ResultCallback): void; setMessageReceivedStatus(messageId: string, receivedStatus: ReceivedStatus, callback: ResultCallback): void; setMessageSentStatus(messageId: string, sentStatus: SentStatus, callback: ResultCallback): void; } }