]> err.no Git - yubikey-personalization.old/commitdiff
Add functionality to create and destroy configurations.
authorRichard Levitte <levitte@lp.se>
Wed, 1 Oct 2008 09:59:38 +0000 (09:59 +0000)
committerRichard Levitte <levitte@lp.se>
Wed, 1 Oct 2008 09:59:38 +0000 (09:59 +0000)
The readers and writers need to get the userdata to be able to pass it on.

ykpers.h

index 6a620d3ee49cd64420a95d9dca5f83f67d139d23..02dad5ce9abb4b871203eb36d027b04716ce10b0 100644 (file)
--- a/ykpers.h
+++ b/ykpers.h
 
 #include <ykcore.h>
 
+CONFIG *ykp_create_config(void);
+int ykp_free_config(CONFIG *cfg);
+
 int ykp_AES_key_from_passphrase(CONFIG *cfg, const char *passphrase);
 int ykp_set_access_code(CONFIG *cfg, unsigned char *access_code);
 
-int ykp_write_config(CONFIG *cfg,
-                    int (*writer)(const void *buf, size_t count,
-                                  void *userdata));
+int ykp_write_config(const CONFIG *cfg,
+                    int (*writer)(const char *buf, size_t count,
+                                  void *userdata),
+                    void *userdata);
 int ykp_read_config(CONFIG *cfg,
-                   int (*reader)(const void *buf, size_t count,
-                                 void *userdata));
+                   int (*reader)(char *buf, size_t count,
+                                 void *userdata),
+                   void *userdata);
 
 
 #endif // __YKPERS_H_INCLUDED__