aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/plugin/interfaces.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-08-27 23:55:49 +0200
committerfiaxh <git@mx.ax.lt>2017-08-28 00:02:59 +0200
commit8bc0d107e740be468ee0c9dcd253de36355088d3 (patch)
tree36858e844d711eb18a68612fd815cb84f4c3a88f /libdino/src/plugin/interfaces.vala
parenta807ded65cd907e04bab7b8cd27b5702b157e3a2 (diff)
downloaddino-8bc0d107e740be468ee0c9dcd253de36355088d3.tar.gz
dino-8bc0d107e740be468ee0c9dcd253de36355088d3.zip
Plugins providing conversation items for ConversationView
Diffstat (limited to 'libdino/src/plugin/interfaces.vala')
-rw-r--r--libdino/src/plugin/interfaces.vala37
1 files changed, 37 insertions, 0 deletions
diff --git a/libdino/src/plugin/interfaces.vala b/libdino/src/plugin/interfaces.vala
index 729f7b26..5ffd491f 100644
--- a/libdino/src/plugin/interfaces.vala
+++ b/libdino/src/plugin/interfaces.vala
@@ -71,4 +71,41 @@ public interface ConversationTitlebarWidget : Object {
public abstract void set_conversation(Conversation conversation);
}
+public abstract interface ConversationItemPopulator : Object {
+ public abstract string id { get; }
+ public abstract void init(Conversation conversation, ConversationItemCollection summary, WidgetType type);
+ public virtual void populate_timespan(Conversation conversation, DateTime from, DateTime to) { }
+ public virtual void populate_between_widgets(Conversation conversation, DateTime from, DateTime to) { }
+ public abstract void close(Conversation conversation);
+}
+
+public abstract class MetaConversationItem : Object {
+ public virtual Jid? jid { get; set; default=null; }
+ public virtual string color { get; set; default=null; }
+ public virtual string display_name { get; set; default=null; }
+ public virtual bool dim { get; set; default=false; }
+ public virtual DateTime? sort_time { get; set; default=null; }
+ public virtual DateTime? display_time { get; set; default=null; }
+ public virtual Encryption? encryption { get; set; default=null; }
+ public virtual Entities.Message.Marked? mark { get; set; default=null; }
+
+ public abstract bool can_merge { get; set; }
+ public abstract bool requires_avatar { get; set; }
+ public abstract bool requires_header { get; set; }
+
+ public abstract Object get_widget(WidgetType type);
+}
+
+public interface ConversationItemCollection : Object {
+ public abstract void insert_item(MetaConversationItem item);
+ public abstract void remove_item(MetaConversationItem item);
+}
+
+public interface MessageDisplayProvider : Object {
+ public abstract string id { get; set; }
+ public abstract double priority { get; set; }
+ public abstract bool can_display(Entities.Message? message);
+ public abstract MetaConversationItem? get_item(Entities.Message message, Entities.Conversation conversation);
+}
+
}