/[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 23 by twoaday, Fri Sep 30 10:10:16 2005 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-2005 Timo Schulz   *      Copyright (C) 2000-2006 Timo Schulz
3   *   *
4   * This file is part of WinPT.   * This file is part of WinPT.
5   *   *
6   * WinPT is free software; you can redistribute it and/or   * WinPT is free software; you can redistribute it and/or
7   * modify it under the terms of the GNU General Public License   * modify it under the terms of the GNU General Public License
8   * as published by the Free Software Foundation; either version 2   * as published by the Free Software Foundation; either version 2
9   * of the License, or (at your option) any later version.   * of the License, or (at your option) any later version.
10   *     *  
11   * WinPT is distributed in the hope that it will be useful,   * WinPT is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14   * General Public License for more details.   * General Public License for more details.
15   *   *
16   * You should have received a copy of the GNU General Public License   * You should have received a copy of the GNU General Public License
17   * along with WinPT; if not, write to the Free Software Foundation,   * along with WinPT; if not, write to the Free Software Foundation,
18   * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA   * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19   */   */
20    
21  #ifndef WPT_REGISTRY_H  #ifndef WPT_REGISTRY_H
22  #define WPT_REGISTRY_H  #define WPT_REGISTRY_H
23    
24  enum {  
25      CFG_INVALID=0,  /* Symbolic configuration IDs */
26      CFG_CACHETIME,  enum cfg_t {
27      CFG_WORDWRAP,      CFG_INVALID=0,
28      CFG_FASTMODE,      CFG_CACHETIME,
29      CFG_VIEWER,      CFG_WORDWRAP,
30      CFG_KEYLISTMODE,      CFG_FILEEXT,
31      CFG_WIPEMODE,      CFG_VIEWER,
32      CFG_ALWAYSTRUST,      CFG_ALWAYSTRUST,
33      CFG_AUTOBACKUP,      CFG_AUTOBACKUP,
34      CFG_AUTOBAKMODE,      CFG_AUTOBAKMODE,
35      CFG_DISHOTKEYS,      CFG_DISHOTKEYS,
36      CFG_NOZIP_MMEDIA,      CFG_NOZIP_MMEDIA,
37      CFG_EXPERT,      CFG_EXPERT,
38      CFG_FM_PROGRESS,      CFG_FM_PROGRESS,
39      /* end of id list */      CFG_BACKUP_INC_SKR,
40      CFG_AUTOBAKPATH,      /* end of id list */
41      CFG_KSERV_CONF,      CFG_AUTOBAKPATH,
42  };      CFG_KSERV_CONF,    
43    };
44    
45  struct reg_hotkey_s {  /* All valid configuration commands. */
46      const char * reg_entry;  static const char *cfg [] = {
47      char key[2];            /* the hotkey as a char ('A'). */      NULL,      
48      int enabled;            /* 1=enable this hotkey. */      "CacheTime",
49  };      "WordWrap",
50  typedef struct reg_hotkey_s * reg_hotkey_t;      "DefaultExt",
51        "Viewer",
52  struct winpt_reg_prefs_s {      "AlwaysTrust",
53      int no_hotkeys;     /* disable ALL hotkeys */      "AutoBackup",
54      int word_wrap;      /* set word wrapping (0 means to disable it) */      "BackupMode",
55      int cache_time;     /* caching time for passphrase */      "DisableHotkeys",  
56      int use_tmpfiles;   /* use tempfiles for gpg communication */      "NoCompressMultiMedia",    
57      int use_viewer;     /* use clipboard viewer for displaying plaintext */      "Expert",
58      int no_zip_mmedia;  /* disable compression for multi-media files (movies, music) */      "FMProgressBar",
59      int keylist_mode;   /* normal=0 minimal=1 or  */      "BackupSecring"
60      int wipe_mode;      /* simple=0, dod=1, gutmann=2 */  };
61      int always_trust;   /* skip key validation (1 means yes) */  
62      int auto_backup;    /* automatic backup (1 means activated) */  struct winpt_prefs_s {
63      struct {      int no_hotkeys;     /* disable ALL hotkeys */
64          int mode;       /* backup mode */      int word_wrap;      /* set word wrapping (0 means to disable it) */
65          char *path;     /* keyring backup path */      int cache_time;     /* caching time for passphrase */
66      } backup;      int use_viewer;     /* use clipboard viewer for displaying plaintext */
67      char *kserv_conf;   /* path to the keyserver config file. */      int no_zip_mmedia;  /* disable compression for multi-media files (movies, music) */
68      int expert;         /* run in expert mode. */      int always_trust;   /* skip key validation (1 means yes) */
69      struct {      int auto_backup;    /* automatic backup (1 means activated) */
70          int progress;   /* show the progress bar dialog. */      int default_ext;    /* 1 = GPG, PGP otherwise. */
71      } fm;      struct {
72      char *homedir;     /* mobile home directory. */          int include_secr;/* including secret keyrings. */
73  };          int mode;       /* backup mode */
74            char *path;     /* keyring backup path */
75  extern reg_hotkey_s reg_hotkeys[];      } backup;
76  extern winpt_reg_prefs_s reg_prefs;      char *kserv_conf;   /* path to the keyserver config file. */
77        int expert;         /* run in expert mode. */
78  /*-- wptHotkey.cpp --*/      struct {
79  void hotkeys_modify (void);          int progress;   /* show the progress bar dialog. */
80  void hotkey_disable (reg_hotkey_t rhk);      } fm;
81  void hotkey_enable (reg_hotkey_t rhk, const char * key);      char *homedir;     /* mobile home directory. */
82    
83  /*-- wptRegistry.cpp --*/      /* Actual no registry options but virtual options. */
84  void free_reg_prefs (void);      struct {
85  int regist_inst_gnupg (int create_mokey);          unsigned int ask_cert_level:1;
86  int regist_inst_winpt (int with_ext, int *created);          unsigned int ask_cert_expire:1;
87  int create_file_type (const char * exefile, const char * ext,      } gpg;
88                        const char * extname, char *iconfile );  };
89  int set_reg_winpt_single (int id, int val);  typedef struct winpt_prefs_s *winpt_prefs_t;
90  int get_reg_winpt_single (int id);  extern winpt_prefs_s reg_prefs;
91  int set_reg_winpt_prefs (winpt_reg_prefs_s * opt);  
92  int get_reg_winpt_prefs (winpt_reg_prefs_s * opt);  /*-- wptRegistry.cpp --*/
93  char* get_reg_entry( HKEY root_key, const char * dir, const char * key );  void free_reg_prefs (void);
94  int set_reg_entry( HKEY root_key, const char * dir, const char * key,  int regist_inst_gnupg (int create_mokey);
95                                     const char * value );  int regist_inst_winpt (int with_ext, int *created);
96  int set_reg_key( HKEY root_key, const char * dir, const char * key,  int set_reg_winpt_single (int id, int val);
97                                   const char * value );  int get_reg_winpt_single (int id);
98  int set_reg_entry_gpg( const char * key, const char * value );  int set_reg_winpt_prefs (winpt_prefs_t opt);
99  int set_reg_entry_mo( const char * value );  int get_reg_winpt_prefs (winpt_prefs_t opt);
100  char* get_reg_entry_gpg( const char * key );  char* get_reg_entry (HKEY root_key, const char *dir, const char *key);
101  char* get_reg_entry_mo( void );  int set_reg_entry (HKEY root_key, const char * dir, const char * key,
102  void get_reg_proxy_prefs( char ** host, int * port,                                     const char *value);
103                            char ** user, char ** pass );  int set_reg_key (HKEY root_key, const char * dir, const char * key,
104  int set_reg_proxy_prefs( const char * host, int port,                                   const char * value);
105                           const char * user, const char * pass );  int set_reg_entry_gpg (const char *key, const char *value);
106  int set_reg_entry_keyserver( const char * name, const char * val );  int set_reg_entry_mo (const char *value);
107  char * get_reg_entry_keyserver( const char * name );  char* get_reg_entry_gpg (const char * key);
108  int set_reg_winpt_flag( const char * name, int val );  char* get_reg_entry_mo (void);
109  int get_reg_winpt_flag( const char * name );  int set_reg_entry_keyserver (const char * name, const char *val);
110    char* get_reg_entry_keyserver( const char * name );
111  #endif /* WPT_REGISTRY_H */  int set_reg_winpt_flag (const char *name, int val);
112    int get_reg_winpt_flag (const char *name);
113    char* get_reg_entry_gpg4win (const char *path);
114    int is_gpg4win_installed (void);
115    
116    #endif /* WPT_REGISTRY_H */

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26