/[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 33 by twoaday, Tue Oct 25 07:46:20 2005 UTC revision 182 by twoaday, Tue Mar 14 11:02:32 2006 UTC
# Line 1  Line 1 
1  /* wptRegistry.h - Win32 Registry headerfile  /* wptRegistry.h - Win32 Registry headerfile
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  /* Symbolic configuration IDs */  #include "wptKeyserver.h"
25  enum cfg_t {  
26      CFG_INVALID=0,  /* Symbolic configuration IDs */
27      CFG_CACHETIME,  enum cfg_t {
28      CFG_WORDWRAP,      CFG_INVALID=0,
29      CFG_FASTMODE,      CFG_CACHETIME,
30      CFG_VIEWER,      CFG_WORDWRAP,
31      CFG_KEYLISTMODE,      CFG_FASTMODE,
32      CFG_WIPEMODE,      CFG_VIEWER,
33      CFG_ALWAYSTRUST,      CFG_WIPEMODE,
34      CFG_AUTOBACKUP,      CFG_ALWAYSTRUST,
35      CFG_AUTOBAKMODE,      CFG_AUTOBACKUP,
36      CFG_DISHOTKEYS,      CFG_AUTOBAKMODE,
37      CFG_NOZIP_MMEDIA,      CFG_DISHOTKEYS,
38      CFG_EXPERT,      CFG_NOZIP_MMEDIA,
39      CFG_FM_PROGRESS,      CFG_EXPERT,
40      /* end of id list */      CFG_FM_PROGRESS,
41      CFG_AUTOBAKPATH,      /* end of id list */
42      CFG_KSERV_CONF,      CFG_AUTOBAKPATH,
43  };      CFG_KSERV_CONF,
44    };
45    
46  struct reg_hotkey_s {  
47      const char *reg_entry;  struct winpt_reg_prefs_s {
48      char key[2];            /* the hotkey as a char ('A'). */      int no_hotkeys;     /* disable ALL hotkeys */
49      int enabled;            /* 1=enable this hotkey. */      int word_wrap;      /* set word wrapping (0 means to disable it) */
50  };      int cache_time;     /* caching time for passphrase */
51  typedef struct reg_hotkey_s * reg_hotkey_t;      int use_tmpfiles;   /* use tempfiles for gpg communication */
52        int use_viewer;     /* use clipboard viewer for displaying plaintext */
53  struct winpt_reg_prefs_s {      int no_zip_mmedia;  /* disable compression for multi-media files (movies, music) */
54      int no_hotkeys;     /* disable ALL hotkeys */      int wipe_mode;      /* simple=0, dod=1, gutmann=2 */
55      int word_wrap;      /* set word wrapping (0 means to disable it) */      int always_trust;   /* skip key validation (1 means yes) */
56      int cache_time;     /* caching time for passphrase */      int auto_backup;    /* automatic backup (1 means activated) */
57      int use_tmpfiles;   /* use tempfiles for gpg communication */      struct {
58      int use_viewer;     /* use clipboard viewer for displaying plaintext */          int mode;       /* backup mode */
59      int no_zip_mmedia;  /* disable compression for multi-media files (movies, music) */          char *path;     /* keyring backup path */
60      int keylist_mode;   /* normal=0 minimal=1 or  */      } backup;
61      int wipe_mode;      /* simple=0, dod=1, gutmann=2 */      char *kserv_conf;   /* path to the keyserver config file. */
62      int always_trust;   /* skip key validation (1 means yes) */      int expert;         /* run in expert mode. */
63      int auto_backup;    /* automatic backup (1 means activated) */      struct {
64      struct {          int progress;   /* show the progress bar dialog. */
65          int mode;       /* backup mode */      } fm;
66          char *path;     /* keyring backup path */      char *homedir;     /* mobile home directory. */
67      } backup;  
68      char *kserv_conf;   /* path to the keyserver config file. */      /* Actual no registry options but virtual options. */
69      int expert;         /* run in expert mode. */      struct {
70      struct {          unsigned int ask_cert_level:1;
71          int progress;   /* show the progress bar dialog. */          unsigned int ask_cert_expire:1;
72      } fm;      } gpg;
73      char *homedir;     /* mobile home directory. */  };
74  };  
75    extern winpt_reg_prefs_s reg_prefs;
76  extern reg_hotkey_s reg_hotkeys[];  
77  extern winpt_reg_prefs_s reg_prefs;  /*-- wptRegistry.cpp --*/
78    void free_reg_prefs (void);
79  /*-- wptHotkey.cpp --*/  int regist_inst_gnupg (int create_mokey);
80  void hotkeys_modify (void);  int regist_inst_winpt (int with_ext, int *created);
81  void hotkey_disable (reg_hotkey_t rhk);  int create_file_type (const char * exefile, const char * ext,
82  void hotkey_enable (reg_hotkey_t rhk, const char * key);                        const char * extname, char *iconfile );
83    int set_reg_winpt_single (int id, int val);
84  /*-- wptRegistry.cpp --*/  int get_reg_winpt_single (int id);
85  void free_reg_prefs (void);  int set_reg_winpt_prefs (winpt_reg_prefs_s * opt);
86  int regist_inst_gnupg (int create_mokey);  int get_reg_winpt_prefs (winpt_reg_prefs_s * opt);
87  int regist_inst_winpt (int with_ext, int *created);  char* get_reg_entry( HKEY root_key, const char * dir, const char * key );
88  int create_file_type (const char * exefile, const char * ext,  int set_reg_entry( HKEY root_key, const char * dir, const char * key,
89                        const char * extname, char *iconfile );                                     const char * value );
90  int set_reg_winpt_single (int id, int val);  int set_reg_key( HKEY root_key, const char * dir, const char * key,
91  int get_reg_winpt_single (int id);                                   const char * value );
92  int set_reg_winpt_prefs (winpt_reg_prefs_s * opt);  int set_reg_entry_gpg( const char * key, const char * value );
93  int get_reg_winpt_prefs (winpt_reg_prefs_s * opt);  int set_reg_entry_mo( const char * value );
94  char* get_reg_entry( HKEY root_key, const char * dir, const char * key );  char* get_reg_entry_gpg( const char * key );
95  int set_reg_entry( HKEY root_key, const char * dir, const char * key,  char* get_reg_entry_mo( void );
96                                     const char * value );  void get_reg_proxy_prefs (keyserver_proxy_t prox);
97  int set_reg_key( HKEY root_key, const char * dir, const char * key,  int set_reg_proxy_prefs (keyserver_proxy_t prox);
98                                   const char * value );  int set_reg_entry_keyserver( const char * name, const char * val );
99  int set_reg_entry_gpg( const char * key, const char * value );  char * get_reg_entry_keyserver( const char * name );
100  int set_reg_entry_mo( const char * value );  int set_reg_winpt_flag (const char *name, int val);
101  char* get_reg_entry_gpg( const char * key );  int get_reg_winpt_flag (const char *name);
102  char* get_reg_entry_mo( void );  char* get_reg_entry_gpg4win (const char *path);
103  void get_reg_proxy_prefs( char ** host, int * port,  int is_gpg4win_installed (void);
104                            char ** user, char ** pass );  
105  int set_reg_proxy_prefs( const char * host, int port,  #endif /* WPT_REGISTRY_H */
                          const char * user, const char * pass );  
 int set_reg_entry_keyserver( const char * name, const char * val );  
 char * get_reg_entry_keyserver( const char * name );  
 int set_reg_winpt_flag( const char * name, int val );  
 int get_reg_winpt_flag( const char * name );  
   
 #endif /* WPT_REGISTRY_H */  

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26