diff options
Diffstat (limited to 'src/net/java/sip/communicator/service')
-rw-r--r-- | src/net/java/sip/communicator/service/history/HistoryWriter.java | 15 | ||||
-rw-r--r-- | src/net/java/sip/communicator/service/msghistory/MessageHistoryAdvancedService.java | 39 |
2 files changed, 54 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/service/history/HistoryWriter.java b/src/net/java/sip/communicator/service/history/HistoryWriter.java index 3d952b3..413b300 100644 --- a/src/net/java/sip/communicator/service/history/HistoryWriter.java +++ b/src/net/java/sip/communicator/service/history/HistoryWriter.java @@ -70,6 +70,21 @@ public interface HistoryWriter throws IOException; /** + * Stores the passed propertyValues complying with the + * historyRecordStructure. + * + * @param propertyValues + * The values of the record. + * @param timestamp + * The timestamp of the record. + * + * @throws IOException + */ + public void insertRecord( + String[] propertyValues, Date timestamp, String timestampProperty) + throws IOException; + + /** * Updates a record by searching for record with idProperty which have idValue * and updating/creating the property with newValue. * diff --git a/src/net/java/sip/communicator/service/msghistory/MessageHistoryAdvancedService.java b/src/net/java/sip/communicator/service/msghistory/MessageHistoryAdvancedService.java new file mode 100644 index 0000000..53786cb --- /dev/null +++ b/src/net/java/sip/communicator/service/msghistory/MessageHistoryAdvancedService.java @@ -0,0 +1,39 @@ +/* + * Jitsi, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package net.java.sip.communicator.service.msghistory; + +import net.java.sip.communicator.service.protocol.*; + +import java.util.*; + +/** + * Adds advanced operation to the message service like inserting/editing + * messages. Can be used to insert messages when synchronizing history with + * external source. + * @author Damian Minkov + */ +public interface MessageHistoryAdvancedService +{ + /** + * Inserts message to the history. Allows to update the already saved + * history. + * @param direction String direction of the message in or out. + * @param source The source Contact + * @param destination The destination Contact + * @param message Message message to be written + * @param messageTimestamp Date this is the timestamp when was message + * received that came from the protocol provider + * @param isSmsSubtype whether message to write is an sms + */ + public void insertMessage( + String direction, + Contact source, + Contact destination, + Message message, + Date messageTimestamp, + boolean isSmsSubtype); +} |