aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/plugin
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-08-02 03:15:12 +0200
committerfiaxh <git@lightrise.org>2019-08-02 19:20:04 +0200
commit08a5088c16ae0bd69adc42ac6489adde3a9ad13f (patch)
treed68d0600e320e662876ffecdd8d8b00c20e4c5a4 /libdino/src/plugin
parent9ee9661bf3616603d9d92590fa1556840fe18970 (diff)
downloaddino-08a5088c16ae0bd69adc42ac6489adde3a9ad13f.tar.gz
dino-08a5088c16ae0bd69adc42ac6489adde3a9ad13f.zip
Rework encryption enabling logic + UI
Diffstat (limited to 'libdino/src/plugin')
-rw-r--r--libdino/src/plugin/interfaces.vala27
1 files changed, 26 insertions, 1 deletions
diff --git a/libdino/src/plugin/interfaces.vala b/libdino/src/plugin/interfaces.vala
index ed48fc02..41929ac0 100644
--- a/libdino/src/plugin/interfaces.vala
+++ b/libdino/src/plugin/interfaces.vala
@@ -25,7 +25,7 @@ public interface EncryptionListEntry : Object {
public abstract Entities.Encryption encryption { get; }
public abstract string name { get; }
- public abstract bool can_encrypt(Conversation conversation);
+ public abstract void encryption_activated(Entities.Conversation conversation, Plugins.SetInputFieldStatus callback);
}
public abstract class AccountSettingsEntry : Object {
@@ -123,4 +123,29 @@ public interface NotificationCollection : Object {
public signal void remove_meta_notification(MetaConversationNotification item);
}
+public delegate void SetInputFieldStatus(InputFieldStatus field_status);
+public class InputFieldStatus : Object {
+ public enum MessageType {
+ NONE,
+ INFO,
+ WARNING,
+ ERROR
+ }
+ public enum InputState {
+ NORMAL,
+ DISABLED,
+ NO_SEND
+ }
+
+ public string? message;
+ public MessageType message_type;
+ public InputState input_state;
+
+ public InputFieldStatus(string? message, MessageType message_type, InputState input_state) {
+ this.message = message;
+ this.message_type = message_type;
+ this.input_state = input_state;
+ }
+}
+
}