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

Annotation of /trunk/Include/wptRegistry.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 270 - (hide annotations)
Sat Oct 21 18:08:57 2006 UTC (18 years, 4 months ago) by twoaday
File MIME type: text/plain
File size: 3848 byte(s)


1 twoaday 270 /* wptRegistry.h - Registry interface
2 twoaday 180 * Copyright (C) 2000-2006 Timo Schulz
3 werner 37 *
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 twoaday 180
25 werner 37 /* Symbolic configuration IDs */
26     enum cfg_t {
27     CFG_INVALID=0,
28     CFG_CACHETIME,
29     CFG_WORDWRAP,
30 twoaday 218 CFG_FILEEXT,
31 werner 37 CFG_VIEWER,
32     CFG_WIPEMODE,
33     CFG_ALWAYSTRUST,
34     CFG_AUTOBACKUP,
35     CFG_AUTOBAKMODE,
36     CFG_DISHOTKEYS,
37     CFG_NOZIP_MMEDIA,
38     CFG_EXPERT,
39     CFG_FM_PROGRESS,
40 twoaday 222 CFG_BACKUP_INC_SKR,
41 werner 37 /* end of id list */
42     CFG_AUTOBAKPATH,
43 twoaday 222 CFG_KSERV_CONF,
44 werner 37 };
45    
46 twoaday 270 /* All valid configuration commands. */
47     static const char *cfg [] = {
48     NULL,
49     "CacheTime",
50     "WordWrap",
51     "DefaultExt",
52     "Viewer",
53     "WipeMode",
54     "AlwaysTrust",
55     "AutoBackup",
56     "BackupMode",
57     "DisableHotkeys",
58     "NoCompressMultiMedia",
59     "Expert",
60     "FMProgressBar",
61     "BackupSecring"
62     };
63 werner 37
64 twoaday 270 struct winpt_prefs_s {
65 werner 37 int no_hotkeys; /* disable ALL hotkeys */
66     int word_wrap; /* set word wrapping (0 means to disable it) */
67     int cache_time; /* caching time for passphrase */
68     int use_viewer; /* use clipboard viewer for displaying plaintext */
69     int no_zip_mmedia; /* disable compression for multi-media files (movies, music) */
70     int wipe_mode; /* simple=0, dod=1, gutmann=2 */
71     int always_trust; /* skip key validation (1 means yes) */
72     int auto_backup; /* automatic backup (1 means activated) */
73 twoaday 218 int default_ext; /* 1 = GPG, PGP otherwise. */
74 werner 37 struct {
75 twoaday 222 int include_secr;/* including secret keyrings. */
76 werner 37 int mode; /* backup mode */
77     char *path; /* keyring backup path */
78     } backup;
79     char *kserv_conf; /* path to the keyserver config file. */
80     int expert; /* run in expert mode. */
81     struct {
82     int progress; /* show the progress bar dialog. */
83     } fm;
84     char *homedir; /* mobile home directory. */
85 twoaday 39
86     /* Actual no registry options but virtual options. */
87     struct {
88     unsigned int ask_cert_level:1;
89 twoaday 182 unsigned int ask_cert_expire:1;
90 twoaday 39 } gpg;
91 werner 37 };
92 twoaday 270 typedef struct winpt_prefs_s *winpt_prefs_t;
93     extern winpt_prefs_s reg_prefs;
94 werner 37
95     /*-- wptRegistry.cpp --*/
96     void free_reg_prefs (void);
97     int regist_inst_gnupg (int create_mokey);
98     int regist_inst_winpt (int with_ext, int *created);
99     int set_reg_winpt_single (int id, int val);
100     int get_reg_winpt_single (int id);
101 twoaday 270 int set_reg_winpt_prefs (winpt_prefs_t opt);
102     int get_reg_winpt_prefs (winpt_prefs_t opt);
103 twoaday 264 char* get_reg_entry (HKEY root_key, const char *dir, const char *key);
104 twoaday 270 int set_reg_entry (HKEY root_key, const char * dir, const char * key,
105     const char *value);
106     int set_reg_key (HKEY root_key, const char * dir, const char * key,
107     const char * value);
108     int set_reg_entry_gpg (const char *key, const char *value);
109     int set_reg_entry_mo (const char *value);
110     char* get_reg_entry_gpg (const char * key);
111     char* get_reg_entry_mo (void);
112     int set_reg_entry_keyserver (const char * name, const char *val);
113     char* get_reg_entry_keyserver( const char * name );
114 twoaday 128 int set_reg_winpt_flag (const char *name, int val);
115     int get_reg_winpt_flag (const char *name);
116     char* get_reg_entry_gpg4win (const char *path);
117     int is_gpg4win_installed (void);
118 werner 37
119     #endif /* WPT_REGISTRY_H */

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26