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

Legend:
Removed from v.2  
changed lines
  Added in v.264

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26