Add option to force use of flat file store to moonshot-webp
[moonshot-ui.git] / src / moonshot-server.vala
index c415086..eb881d2 100644 (file)
@@ -133,7 +133,8 @@ public class MoonshotServer : Object {
                                  string   ?ca_cert,
                                  string   ?subject,
                                  string   ?subject_alt,
-                                 string   ?server_cert)
+                                 string   ?server_cert,
+                                 int      force_flat_file_store)
     {
       IdCard idcard = new IdCard ();
 
@@ -158,7 +159,7 @@ public class MoonshotServer : Object {
         }
       }
 
-      return parent_app.add_identity (idcard);
+      return parent_app.add_identity (idcard, force_flat_file_store!=0);
     }
 
 
@@ -197,7 +198,8 @@ public class MoonshotServer : Object {
                                 card.trust_anchor.ca_cert,
                                 card.trust_anchor.subject,
                                 card.trust_anchor.subject_alt,
-                                card.trust_anchor.server_cert);
+                                card.trust_anchor.server_cert,
+                                0);
       if (result) {
         installed_cards++;
       }
@@ -382,7 +384,8 @@ public class MoonshotServer : Object {
                                         string     ca_cert,
                                         string     subject,
                                         string     subject_alt,
-                                        string     server_cert)
+                                        string     server_cert,
+                                        bool       force_flat_file_store)
     {
         IdCard idcard = new IdCard ();
         bool success = false;
@@ -415,7 +418,7 @@ public class MoonshotServer : Object {
         // Defer addition to the main loop thread.
         Idle.add (() => {
             mutex.lock ();
-            success = parent_app.add_identity (idcard);
+            success = parent_app.add_identity (idcard, force_flat_file_store);
             cond.signal ();
             mutex.unlock ();
             return false;