autoreconf
[moonshot-ui.git] / src / moonshot-id.vala
index 9c17bda..58af2d7 100644 (file)
@@ -1,7 +1,34 @@
+public class TrustAnchor : Object
+{
+  public string ca_cert {get; set; default = "";}
+  public string subject {get; set; default = "";}
+  public string subject_alt  {get; set; default = "";}
+  public string server_cert  {get; set; default = "";}
+}
+
+public struct Rule
+{
+  public string pattern;
+  public string always_confirm;
+}
+
+public class IdCard : Object
+{
+  private string _nai;
+  
+  public string display_name { get; set; default = ""; }
+  
+  public string username { get; set; default = ""; }
+  public string password { get; set; default = null; }
 
-class IdCard : Object {
+  public string issuer { get; set; default = ""; }
+  
+  public Rule[] rules {get; set; default = {};}
+  public string[] services { get; set; default = {}; }
 
-    public string name { get; set; default = null; }
-    public int number { get; set; default = -1; }
+  public TrustAnchor trust_anchor  { get; set; default = new TrustAnchor (); }
+  
+  public Gdk.Pixbuf pixbuf { get; set; default = null; }    
 
+  public unowned string nai { get {  _nai = username + "@" + issuer; return _nai;}}
 }