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 |
* |
* |
21 |
#ifndef WPT_REGISTRY_H |
#ifndef WPT_REGISTRY_H |
22 |
#define WPT_REGISTRY_H |
#define WPT_REGISTRY_H |
23 |
|
|
24 |
|
#include "wptKeyserver.h" |
25 |
|
|
26 |
/* Symbolic configuration IDs */ |
/* Symbolic configuration IDs */ |
27 |
enum cfg_t { |
enum cfg_t { |
28 |
CFG_INVALID=0, |
CFG_INVALID=0, |
29 |
CFG_CACHETIME, |
CFG_CACHETIME, |
30 |
CFG_WORDWRAP, |
CFG_WORDWRAP, |
31 |
CFG_FASTMODE, |
CFG_FILEEXT, |
32 |
CFG_VIEWER, |
CFG_VIEWER, |
|
CFG_KEYLISTMODE, |
|
33 |
CFG_WIPEMODE, |
CFG_WIPEMODE, |
34 |
CFG_ALWAYSTRUST, |
CFG_ALWAYSTRUST, |
35 |
CFG_AUTOBACKUP, |
CFG_AUTOBACKUP, |
38 |
CFG_NOZIP_MMEDIA, |
CFG_NOZIP_MMEDIA, |
39 |
CFG_EXPERT, |
CFG_EXPERT, |
40 |
CFG_FM_PROGRESS, |
CFG_FM_PROGRESS, |
41 |
|
CFG_BACKUP_INC_SKR, |
42 |
/* end of id list */ |
/* end of id list */ |
43 |
CFG_AUTOBAKPATH, |
CFG_AUTOBAKPATH, |
44 |
CFG_KSERV_CONF, |
CFG_KSERV_CONF, |
45 |
}; |
}; |
46 |
|
|
47 |
|
|
|
struct reg_hotkey_s { |
|
|
const char *reg_entry; |
|
|
char key[2]; /* the hotkey as a char ('A'). */ |
|
|
int enabled; /* 1=enable this hotkey. */ |
|
|
}; |
|
|
typedef struct reg_hotkey_s * reg_hotkey_t; |
|
|
|
|
48 |
struct winpt_reg_prefs_s { |
struct winpt_reg_prefs_s { |
49 |
int no_hotkeys; /* disable ALL hotkeys */ |
int no_hotkeys; /* disable ALL hotkeys */ |
50 |
int word_wrap; /* set word wrapping (0 means to disable it) */ |
int word_wrap; /* set word wrapping (0 means to disable it) */ |
51 |
int cache_time; /* caching time for passphrase */ |
int cache_time; /* caching time for passphrase */ |
|
int use_tmpfiles; /* use tempfiles for gpg communication */ |
|
52 |
int use_viewer; /* use clipboard viewer for displaying plaintext */ |
int use_viewer; /* use clipboard viewer for displaying plaintext */ |
53 |
int no_zip_mmedia; /* disable compression for multi-media files (movies, music) */ |
int no_zip_mmedia; /* disable compression for multi-media files (movies, music) */ |
|
int keylist_mode; /* normal=0 minimal=1 or */ |
|
54 |
int wipe_mode; /* simple=0, dod=1, gutmann=2 */ |
int wipe_mode; /* simple=0, dod=1, gutmann=2 */ |
55 |
int always_trust; /* skip key validation (1 means yes) */ |
int always_trust; /* skip key validation (1 means yes) */ |
56 |
int auto_backup; /* automatic backup (1 means activated) */ |
int auto_backup; /* automatic backup (1 means activated) */ |
57 |
|
int default_ext; /* 1 = GPG, PGP otherwise. */ |
58 |
struct { |
struct { |
59 |
|
int include_secr;/* including secret keyrings. */ |
60 |
int mode; /* backup mode */ |
int mode; /* backup mode */ |
61 |
char *path; /* keyring backup path */ |
char *path; /* keyring backup path */ |
62 |
} backup; |
} backup; |
66 |
int progress; /* show the progress bar dialog. */ |
int progress; /* show the progress bar dialog. */ |
67 |
} fm; |
} fm; |
68 |
char *homedir; /* mobile home directory. */ |
char *homedir; /* mobile home directory. */ |
69 |
|
|
70 |
|
/* Actual no registry options but virtual options. */ |
71 |
|
struct { |
72 |
|
unsigned int ask_cert_level:1; |
73 |
|
unsigned int ask_cert_expire:1; |
74 |
|
} gpg; |
75 |
}; |
}; |
76 |
|
|
|
extern reg_hotkey_s reg_hotkeys[]; |
|
77 |
extern winpt_reg_prefs_s reg_prefs; |
extern winpt_reg_prefs_s reg_prefs; |
78 |
|
|
|
/*-- wptHotkey.cpp --*/ |
|
|
void hotkeys_modify (void); |
|
|
void hotkey_disable (reg_hotkey_t rhk); |
|
|
void hotkey_enable (reg_hotkey_t rhk, const char * key); |
|
|
|
|
79 |
/*-- wptRegistry.cpp --*/ |
/*-- wptRegistry.cpp --*/ |
80 |
void free_reg_prefs (void); |
void free_reg_prefs (void); |
81 |
int regist_inst_gnupg (int create_mokey); |
int regist_inst_gnupg (int create_mokey); |
86 |
int get_reg_winpt_single (int id); |
int get_reg_winpt_single (int id); |
87 |
int set_reg_winpt_prefs (winpt_reg_prefs_s * opt); |
int set_reg_winpt_prefs (winpt_reg_prefs_s * opt); |
88 |
int get_reg_winpt_prefs (winpt_reg_prefs_s * opt); |
int get_reg_winpt_prefs (winpt_reg_prefs_s * opt); |
89 |
char* get_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 |
int set_reg_entry( HKEY root_key, const char * dir, const char * key, |
int set_reg_entry( HKEY root_key, const char * dir, const char * key, |
91 |
const char * value ); |
const char * value ); |
92 |
int set_reg_key( HKEY root_key, const char * dir, const char * key, |
int set_reg_key( HKEY root_key, const char * dir, const char * key, |
95 |
int set_reg_entry_mo( const char * value ); |
int set_reg_entry_mo( const char * value ); |
96 |
char* get_reg_entry_gpg( const char * key ); |
char* get_reg_entry_gpg( const char * key ); |
97 |
char* get_reg_entry_mo( void ); |
char* get_reg_entry_mo( void ); |
98 |
void get_reg_proxy_prefs( char ** host, int * port, |
void get_reg_proxy_prefs (keyserver_proxy_t prox); |
99 |
char ** user, char ** pass ); |
int set_reg_proxy_prefs (keyserver_proxy_t prox); |
|
int set_reg_proxy_prefs( const char * host, int port, |
|
|
const char * user, const char * pass ); |
|
100 |
int set_reg_entry_keyserver( const char * name, const char * val ); |
int set_reg_entry_keyserver( const char * name, const char * val ); |
101 |
char * get_reg_entry_keyserver( const char * name ); |
char * get_reg_entry_keyserver( const char * name ); |
102 |
int set_reg_winpt_flag( const char * name, int val ); |
int set_reg_winpt_flag (const char *name, int val); |
103 |
int get_reg_winpt_flag( const char * name ); |
int get_reg_winpt_flag (const char *name); |
104 |
|
char* get_reg_entry_gpg4win (const char *path); |
105 |
|
int is_gpg4win_installed (void); |
106 |
|
|
107 |
#endif /* WPT_REGISTRY_H */ |
#endif /* WPT_REGISTRY_H */ |