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

Annotation of /trunk/Include/wptRegistry.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 23 - (hide annotations)
Fri Sep 30 10:10:16 2005 UTC (19 years, 5 months ago) by twoaday
File MIME type: text/plain
File size: 4059 byte(s)
Almost finished phase 1 of the WinPT GPGME port.
Still need more cleanup, comments and tests.


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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26