/[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 22 by twoaday, Wed Aug 10 11:33:35 2005 UTC revision 329 by twoaday, Fri Sep 25 16:08:14 2009 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-2007 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  #ifndef WPT_REGISTRY_H
17   * along with WinPT; if not, write to the Free Software Foundation,  #define WPT_REGISTRY_H
18   * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  
19   */  
20    /* Symbolic configuration IDs */
21  #ifndef WPT_REGISTRY_H  enum cfg_t {
22  #define WPT_REGISTRY_H      CFG_INVALID=0,
23        CFG_CACHETIME,
24  enum {      CFG_WORDWRAP,
25      CFG_INVALID=0,      CFG_FILEEXT,
26      CFG_CACHETIME,      CFG_VIEWER,
27      CFG_WORDWRAP,      CFG_ALWAYSTRUST,
28      CFG_FASTMODE,      CFG_AUTOBACKUP,
29      CFG_VIEWER,      CFG_AUTOBAKMODE,
30      CFG_KEYLISTMODE,      CFG_DISHOTKEYS,
31      CFG_WIPEMODE,      CFG_NOZIP_MMEDIA,
32      CFG_ALWAYSTRUST,      CFG_EXPERT,
33      CFG_AUTOBACKUP,      CFG_FM_PROGRESS,
34      CFG_AUTOBAKMODE,      CFG_BACKUP_INC_SKR,
35      CFG_DISHOTKEYS,      /* end of id list */
36      CFG_NOZIP_MMEDIA,      CFG_AUTOBAKPATH,
37      CFG_EXPERT,      CFG_KSERV_CONF,    
38      CFG_FM_PROGRESS,  };
39      /* end of id list */  
40      CFG_AUTOBAKPATH,  extern const char *cfg[];
41      CFG_KSERV_CONF,  
42  };  struct winpt_prefs_s {
43        int no_hotkeys;     /* disable ALL hotkeys */
44        int word_wrap;      /* set word wrapping (0 means to disable it) */
45  struct reg_hotkey_s {      int cache_time;     /* caching time for passphrase */
46      const char * reg_entry;      int use_viewer;     /* use clipboard viewer for displaying plaintext */
47      char key[2];      int no_zip_mmedia;  /* disable compression for multi-media files (movies, music) */
48      int enabled;      int always_trust;   /* skip key validation (1 means yes) */
49  };      int auto_backup;    /* automatic backup (1 means activated) */
50  typedef struct reg_hotkey_s * reg_hotkey_t;      int default_ext;    /* 1 = GPG, PGP otherwise. */
51        int no_safe_pwd_ctrl; /* disable the additional 'safe' window hooks. */
52  struct winpt_reg_prefs_s {      struct {
53      int no_hotkeys;     /* disable ALL hotkeys */          int include_secr;/* including secret keyrings. */
54      int word_wrap;      /* set word wrapping (0 means to disable it) */          int mode;       /* backup mode */
55      int cache_time;     /* caching time for passphrase */          char *path;     /* keyring backup path */
56      int use_tmpfiles;   /* use tempfiles for gpg communication */      } backup;
57      int use_viewer;     /* use clipboard viewer for displaying plaintext */      char *kserv_conf;   /* path to the keyserver config file. */
58      int no_zip_mmedia;  /* disable compression for multi-media files (movies, music) */      int expert;         /* run in expert mode. */
59      int keylist_mode;   /* normal=0 minimal=1 or  */      struct {
60      int wipe_mode;      /* simple=0, dod=1, gutmann=2 */          int progress;   /* show the progress bar dialog. */
61      int always_trust;   /* skip key validation (1 means yes) */      } fm;
62      int auto_backup;    /* automatic backup (1 means activated) */      char *homedir;     /* mobile home directory. */
63      struct {  
64          int mode;      /* Actual no registry options but virtual options. */
65          char *path;      struct {
66      } backup;          unsigned int ask_cert_level:1;
67      char *kserv_conf;          unsigned int ask_cert_expire:1;
68      int expert;      } gpg;
69      struct {  };
70          int progress;  typedef struct winpt_prefs_s *winpt_prefs_t;
71      } fm;  extern winpt_prefs_s reg_prefs;
72      char *homedir;     /* WinPT mobile home dir */  
73  };  /*-- wptRegistry.cpp --*/
74    void free_reg_prefs (void);
75  extern reg_hotkey_s reg_hotkeys[];  int regist_inst_gnupg (int create_mokey);
76  extern winpt_reg_prefs_s reg_prefs;  int regist_inst_winpt (int with_ext, int *created);
77    int set_reg_winpt_single (int id, int val);
78  /*-- wptHotkey.cpp --*/  int get_reg_winpt_single (int id);
79  void hotkeys_modify (void);  int set_reg_winpt_prefs (winpt_prefs_t opt);
80  void hotkey_disable (reg_hotkey_t rhk);  int get_reg_winpt_prefs (winpt_prefs_t opt);
81  void hotkey_enable (reg_hotkey_t rhk, const char * key);  char* get_reg_entry (HKEY root_key, const char *dir, const char *key);
82    int set_reg_entry (HKEY root_key, const char * dir, const char * key,
83  /*-- wptRegistry.cpp --*/                                     const char *value);
84  void free_reg_prefs (void);  int set_reg_key (HKEY root_key, const char * dir, const char * key,
85  int regist_inst_gnupg (int create_mokey);                                   const char * value);
86  int regist_inst_winpt (int with_ext, int *created);  int set_reg_entry_gpg (const char *key, const char *value);
87  int create_file_type (const char * exefile, const char * ext,  char* get_reg_entry_gpg (const char * key);
88                        const char * extname, char *iconfile );  char* get_reg_entry_mo (void);
89  int set_reg_winpt_single (int id, int val);  int set_reg_entry_keyserver (const char * name, const char *val);
90  int get_reg_winpt_single (int id);  char* get_reg_entry_keyserver( const char * name );
91  int set_reg_winpt_prefs (winpt_reg_prefs_s * opt);  int set_reg_winpt_flag (const char *name, int val);
92  int get_reg_winpt_prefs (winpt_reg_prefs_s * opt);  int get_reg_winpt_flag (const char *name);
93  char* get_reg_entry( HKEY root_key, const char * dir, const char * key );  char* get_reg_entry_gpg4win (const char *path);
94  int set_reg_entry( HKEY root_key, const char * dir, const char * key,  int is_gpg4win_installed (void);
95                                     const char * value );  
96  int set_reg_key( HKEY root_key, const char * dir, const char * key,  #endif /* WPT_REGISTRY_H */
                                  const char * value );  
 int set_reg_entry_gpg( const char * key, const char * value );  
 int set_reg_entry_mo( const char * value );  
 char* get_reg_entry_gpg( const char * key );  
 char* get_reg_entry_mo( void );  
 void get_reg_proxy_prefs( char ** host, int * port,  
                           char ** user, char ** pass );  
 int set_reg_proxy_prefs( const char * host, int port,  
                          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.22  
changed lines
  Added in v.329

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26