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, |
33 |
CFG_WIPEMODE, |
CFG_WIPEMODE, |
34 |
CFG_ALWAYSTRUST, |
CFG_ALWAYSTRUST, |
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) */ |
50 |
int cache_time; /* caching time for passphrase */ |
int cache_time; /* caching time for passphrase */ |
|
int use_tmpfiles; /* use tempfiles for gpg communication */ |
|
51 |
int use_viewer; /* use clipboard viewer for displaying plaintext */ |
int use_viewer; /* use clipboard viewer for displaying plaintext */ |
52 |
int no_zip_mmedia; /* disable compression for multi-media files (movies, music) */ |
int no_zip_mmedia; /* disable compression for multi-media files (movies, music) */ |
53 |
int wipe_mode; /* simple=0, dod=1, gutmann=2 */ |
int wipe_mode; /* simple=0, dod=1, gutmann=2 */ |
54 |
int always_trust; /* skip key validation (1 means yes) */ |
int always_trust; /* skip key validation (1 means yes) */ |
55 |
int auto_backup; /* automatic backup (1 means activated) */ |
int auto_backup; /* automatic backup (1 means activated) */ |
56 |
|
int default_ext; /* 1 = GPG, PGP otherwise. */ |
57 |
struct { |
struct { |
58 |
int mode; /* backup mode */ |
int mode; /* backup mode */ |
59 |
char *path; /* keyring backup path */ |
char *path; /* keyring backup path */ |
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 |
|
|
|
/* Registry hotkey context. */ |
|
|
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; |
|
|
|
|
|
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); |