aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/service/protocol/event/MessageDeliveredEvent.java
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2012-07-12 17:00:53 +0000
committerYana Stamcheva <yana@jitsi.org>2012-07-12 17:00:53 +0000
commit2a5e9c4895f6e04c15645c5898a9ab7537b8ffb2 (patch)
tree62756bba2293d47b2ddab54a02b63147751050dd /src/net/java/sip/communicator/service/protocol/event/MessageDeliveredEvent.java
parent99a732d5f448270181b48edcae7960854052939b (diff)
downloadjitsi-2a5e9c4895f6e04c15645c5898a9ab7537b8ffb2.zip
jitsi-2a5e9c4895f6e04c15645c5898a9ab7537b8ffb2.tar.gz
jitsi-2a5e9c4895f6e04c15645c5898a9ab7537b8ffb2.tar.bz2
Adds last message correction functionality. Implementation provided by Ivan Vergiliev.
Diffstat (limited to 'src/net/java/sip/communicator/service/protocol/event/MessageDeliveredEvent.java')
-rw-r--r--src/net/java/sip/communicator/service/protocol/event/MessageDeliveredEvent.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/event/MessageDeliveredEvent.java b/src/net/java/sip/communicator/service/protocol/event/MessageDeliveredEvent.java
index 0ffc91b..17a6e0a 100644
--- a/src/net/java/sip/communicator/service/protocol/event/MessageDeliveredEvent.java
+++ b/src/net/java/sip/communicator/service/protocol/event/MessageDeliveredEvent.java
@@ -33,6 +33,12 @@ public class MessageDeliveredEvent
* A timestamp indicating the exact date when the event occurred.
*/
private final long timestamp;
+
+ /**
+ * The ID of the message being corrected, or null if this was a new message
+ * and not a message correction.
+ */
+ private String correctedMessageUID;
/**
* Constructor.
@@ -44,6 +50,21 @@ public class MessageDeliveredEvent
{
this(source, to, System.currentTimeMillis());
}
+
+ /**
+ * Creates a <tt>MessageDeliveredEvent</tt> representing delivery of the
+ * <tt>source</tt> message to the specified <tt>to</tt> contact.
+ *
+ * @param source the <tt>Message</tt> whose delivery this event represents.
+ * @param to the <tt>Contact</tt> that this message was sent to.
+ * @param correctedMessageUID The ID of the message being corrected.
+ */
+ public MessageDeliveredEvent(Message source, Contact to,
+ String correctedMessageUID)
+ {
+ this(source, to, System.currentTimeMillis());
+ this.correctedMessageUID = correctedMessageUID;
+ }
/**
* Creates a <tt>MessageDeliveredEvent</tt> representing delivery of the
@@ -93,4 +114,26 @@ public class MessageDeliveredEvent
return timestamp;
}
+ /**
+ * Returns the ID of the message being corrected, or null if this was a
+ * new message and not a message correction.
+ *
+ * @return the ID of the message being corrected, or null if this was a
+ * new message and not a message correction.
+ */
+ public String getCorrectedMessageUID()
+ {
+ return correctedMessageUID;
+ }
+
+ /**
+ * Sets the ID of the message being corrected to the passed ID.
+ *
+ * @param correctedMessageUID The ID of the message being corrected.
+ */
+ public void setCorrectedMessageUID(String correctedMessageUID)
+ {
+ this.correctedMessageUID = correctedMessageUID;
+ }
+
}