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, |
30 |
CFG_WORDWRAP, |
CFG_WORDWRAP, |
31 |
CFG_FASTMODE, |
CFG_FASTMODE, |
32 |
CFG_VIEWER, |
CFG_VIEWER, |
|
CFG_KEYLISTMODE, |
|
33 |
CFG_WIPEMODE, |
CFG_WIPEMODE, |
34 |
CFG_ALWAYSTRUST, |
CFG_ALWAYSTRUST, |
35 |
CFG_AUTOBACKUP, |
CFG_AUTOBACKUP, |
44 |
}; |
}; |
45 |
|
|
46 |
|
|
|
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; |
|
|
|
|
47 |
struct winpt_reg_prefs_s { |
struct winpt_reg_prefs_s { |
48 |
int no_hotkeys; /* disable ALL hotkeys */ |
int no_hotkeys; /* disable ALL hotkeys */ |
49 |
int word_wrap; /* set word wrapping (0 means to disable it) */ |
int word_wrap; /* set word wrapping (0 means to disable it) */ |
51 |
int use_tmpfiles; /* use tempfiles for gpg communication */ |
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) */ |
68 |
/* Actual no registry options but virtual options. */ |
/* Actual no registry options but virtual options. */ |
69 |
struct { |
struct { |
70 |
unsigned int ask_cert_level:1; |
unsigned int ask_cert_level:1; |
71 |
|
unsigned int ask_cert_expire:1; |
72 |
} gpg; |
} gpg; |
73 |
}; |
}; |
74 |
|
|
|
extern reg_hotkey_s reg_hotkeys[]; |
|
75 |
extern winpt_reg_prefs_s reg_prefs; |
extern winpt_reg_prefs_s reg_prefs; |
76 |
|
|
|
/*-- wptHotkey.cpp --*/ |
|
|
void hotkeys_modify (void); |
|
|
void hotkey_disable (reg_hotkey_t rhk); |
|
|
void hotkey_enable (reg_hotkey_t rhk, const char * key); |
|
|
|
|
77 |
/*-- wptRegistry.cpp --*/ |
/*-- wptRegistry.cpp --*/ |
78 |
void free_reg_prefs (void); |
void free_reg_prefs (void); |
79 |
int regist_inst_gnupg (int create_mokey); |
int regist_inst_gnupg (int create_mokey); |
93 |
int set_reg_entry_mo( const char * value ); |
int set_reg_entry_mo( const char * value ); |
94 |
char* get_reg_entry_gpg( const char * key ); |
char* get_reg_entry_gpg( const char * key ); |
95 |
char* get_reg_entry_mo( void ); |
char* get_reg_entry_mo( void ); |
96 |
void get_reg_proxy_prefs( char ** host, int * port, |
void get_reg_proxy_prefs (keyserver_proxy_t prox); |
97 |
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 ); |
|
98 |
int set_reg_entry_keyserver( const char * name, const char * val ); |
int set_reg_entry_keyserver( const char * name, const char * val ); |
99 |
char * get_reg_entry_keyserver( const char * name ); |
char * get_reg_entry_keyserver( const char * name ); |
100 |
int set_reg_winpt_flag( const char * name, int val ); |
int set_reg_winpt_flag (const char *name, int val); |
101 |
int get_reg_winpt_flag( const char * name ); |
int get_reg_winpt_flag (const char *name); |
102 |
|
char* get_reg_entry_gpg4win (const char *path); |
103 |
|
int is_gpg4win_installed (void); |
104 |
|
|
105 |
#endif /* WPT_REGISTRY_H */ |
#endif /* WPT_REGISTRY_H */ |