/[winpt]/trunk/Include/wptRegistry.h
ViewVC logotype

Diff of /trunk/Include/wptRegistry.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 182 by twoaday, Tue Mar 14 11:02:32 2006 UTC revision 273 by twoaday, Fri Dec 8 10:22:17 2006 UTC
# Line 1  Line 1 
1  /* wptRegistry.h - Win32 Registry headerfile  /* wptRegistry.h - Registry interface
2   *      Copyright (C) 2000-2006 Timo Schulz   *      Copyright (C) 2000-2006 Timo Schulz
3   *   *
4   * This file is part of WinPT.   * This file is part of WinPT.
# Line 21  Line 21 
21  #ifndef WPT_REGISTRY_H  #ifndef WPT_REGISTRY_H
22  #define WPT_REGISTRY_H  #define WPT_REGISTRY_H
23    
 #include "wptKeyserver.h"  
24    
25  /* Symbolic configuration IDs */  /* Symbolic configuration IDs */
26  enum cfg_t {  enum cfg_t {
27      CFG_INVALID=0,      CFG_INVALID=0,
28      CFG_CACHETIME,      CFG_CACHETIME,
29      CFG_WORDWRAP,      CFG_WORDWRAP,
30      CFG_FASTMODE,      CFG_FILEEXT,
31      CFG_VIEWER,      CFG_VIEWER,
     CFG_WIPEMODE,  
32      CFG_ALWAYSTRUST,      CFG_ALWAYSTRUST,
33      CFG_AUTOBACKUP,      CFG_AUTOBACKUP,
34      CFG_AUTOBAKMODE,      CFG_AUTOBAKMODE,
# Line 38  enum cfg_t { Line 36  enum cfg_t {
36      CFG_NOZIP_MMEDIA,      CFG_NOZIP_MMEDIA,
37      CFG_EXPERT,      CFG_EXPERT,
38      CFG_FM_PROGRESS,      CFG_FM_PROGRESS,
39        CFG_BACKUP_INC_SKR,
40      /* end of id list */      /* end of id list */
41      CFG_AUTOBAKPATH,      CFG_AUTOBAKPATH,
42      CFG_KSERV_CONF,      CFG_KSERV_CONF,    
43  };  };
44    
45    /* All valid configuration commands. */
46    static const char *cfg [] = {
47        NULL,      
48        "CacheTime",
49        "WordWrap",
50        "DefaultExt",
51        "Viewer",
52        "AlwaysTrust",
53        "AutoBackup",
54        "BackupMode",
55        "DisableHotkeys",  
56        "NoCompressMultiMedia",    
57        "Expert",
58        "FMProgressBar",
59        "BackupSecring"
60    };
61    
62  struct winpt_reg_prefs_s {  struct winpt_prefs_s {
63      int no_hotkeys;     /* disable ALL hotkeys */      int no_hotkeys;     /* disable ALL hotkeys */
64      int word_wrap;      /* set word wrapping (0 means to disable it) */      int word_wrap;      /* set word wrapping (0 means to disable it) */
65      int cache_time;     /* caching time for passphrase */      int cache_time;     /* caching time for passphrase */
     int use_tmpfiles;   /* use tempfiles for gpg communication */  
66      int use_viewer;     /* use clipboard viewer for displaying plaintext */      int use_viewer;     /* use clipboard viewer for displaying plaintext */
67      int no_zip_mmedia;  /* disable compression for multi-media files (movies, music) */      int no_zip_mmedia;  /* disable compression for multi-media files (movies, music) */
     int wipe_mode;      /* simple=0, dod=1, gutmann=2 */  
68      int always_trust;   /* skip key validation (1 means yes) */      int always_trust;   /* skip key validation (1 means yes) */
69      int auto_backup;    /* automatic backup (1 means activated) */      int auto_backup;    /* automatic backup (1 means activated) */
70        int default_ext;    /* 1 = GPG, PGP otherwise. */
71      struct {      struct {
72            int include_secr;/* including secret keyrings. */
73          int mode;       /* backup mode */          int mode;       /* backup mode */
74          char *path;     /* keyring backup path */          char *path;     /* keyring backup path */
75      } backup;      } backup;
# Line 71  struct winpt_reg_prefs_s { Line 86  struct winpt_reg_prefs_s {
86          unsigned int ask_cert_expire:1;          unsigned int ask_cert_expire:1;
87      } gpg;      } gpg;
88  };  };
89    typedef struct winpt_prefs_s *winpt_prefs_t;
90  extern winpt_reg_prefs_s reg_prefs;  extern winpt_prefs_s reg_prefs;
91    
92  /*-- wptRegistry.cpp --*/  /*-- wptRegistry.cpp --*/
93  void free_reg_prefs (void);  void free_reg_prefs (void);
94  int regist_inst_gnupg (int create_mokey);  int regist_inst_gnupg (int create_mokey);
95  int regist_inst_winpt (int with_ext, int *created);  int regist_inst_winpt (int with_ext, int *created);
 int create_file_type (const char * exefile, const char * ext,  
                       const char * extname, char *iconfile );  
96  int set_reg_winpt_single (int id, int val);  int set_reg_winpt_single (int id, int val);
97  int get_reg_winpt_single (int id);  int get_reg_winpt_single (int id);
98  int set_reg_winpt_prefs (winpt_reg_prefs_s * opt);  int set_reg_winpt_prefs (winpt_prefs_t opt);
99  int get_reg_winpt_prefs (winpt_reg_prefs_s * opt);  int get_reg_winpt_prefs (winpt_prefs_t opt);
100  char* get_reg_entry( HKEY root_key, const char * dir, const char * key );  char* get_reg_entry (HKEY root_key, const char *dir, const char *key);
101  int set_reg_entry( HKEY root_key, const char * dir, const char * key,  int set_reg_entry (HKEY root_key, const char * dir, const char * key,
102                                     const char * value );                                     const char *value);
103  int set_reg_key( HKEY root_key, const char * dir, const char * key,  int set_reg_key (HKEY root_key, const char * dir, const char * key,
104                                   const char * value );                                   const char * value);
105  int set_reg_entry_gpg( const char * key, const char * value );  int set_reg_entry_gpg (const char *key, const char *value);
106  int set_reg_entry_mo( const char * value );  int set_reg_entry_mo (const char *value);
107  char* get_reg_entry_gpg( const char * key );  char* get_reg_entry_gpg (const char * key);
108  char* get_reg_entry_mo( void );  char* get_reg_entry_mo (void);
109  void get_reg_proxy_prefs (keyserver_proxy_t prox);  int set_reg_entry_keyserver (const char * name, const char *val);
110  int set_reg_proxy_prefs (keyserver_proxy_t prox);  char* get_reg_entry_keyserver( const char * name );
 int set_reg_entry_keyserver( const char * name, const char * val );  
 char * get_reg_entry_keyserver( const char * name );  
111  int set_reg_winpt_flag (const char *name, int val);  int set_reg_winpt_flag (const char *name, int val);
112  int get_reg_winpt_flag (const char *name);  int get_reg_winpt_flag (const char *name);
113  char* get_reg_entry_gpg4win (const char *path);  char* get_reg_entry_gpg4win (const char *path);

Legend:
Removed from v.182  
changed lines
  Added in v.273

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26