1 |
/* wptRegistry.h - Win32 Registry headerfile |
/* wptRegistry.h - Registry interface |
2 |
* Copyright (C) 2000-2006 Timo Schulz |
* Copyright (C) 2000-2006 Timo Schulz |
3 |
* |
* |
4 |
* This file is part of WinPT. |
* This file is part of WinPT. |
21 |
#ifndef WPT_REGISTRY_H |
#ifndef WPT_REGISTRY_H |
22 |
#define WPT_REGISTRY_H |
#define WPT_REGISTRY_H |
23 |
|
|
|
#include "wptKeyserver.h" |
|
24 |
|
|
25 |
/* Symbolic configuration IDs */ |
/* Symbolic configuration IDs */ |
26 |
enum cfg_t { |
enum cfg_t { |
43 |
CFG_KSERV_CONF, |
CFG_KSERV_CONF, |
44 |
}; |
}; |
45 |
|
|
46 |
|
/* 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 |
|
|
64 |
struct winpt_reg_prefs_s { |
struct winpt_prefs_s { |
65 |
int no_hotkeys; /* disable ALL hotkeys */ |
int no_hotkeys; /* disable ALL hotkeys */ |
66 |
int word_wrap; /* set word wrapping (0 means to disable it) */ |
int word_wrap; /* set word wrapping (0 means to disable it) */ |
67 |
int cache_time; /* caching time for passphrase */ |
int cache_time; /* caching time for passphrase */ |
89 |
unsigned int ask_cert_expire:1; |
unsigned int ask_cert_expire:1; |
90 |
} gpg; |
} gpg; |
91 |
}; |
}; |
92 |
|
typedef struct winpt_prefs_s *winpt_prefs_t; |
93 |
extern winpt_reg_prefs_s reg_prefs; |
extern winpt_prefs_s reg_prefs; |
94 |
|
|
95 |
/*-- wptRegistry.cpp --*/ |
/*-- wptRegistry.cpp --*/ |
96 |
void free_reg_prefs (void); |
void free_reg_prefs (void); |
97 |
int regist_inst_gnupg (int create_mokey); |
int regist_inst_gnupg (int create_mokey); |
98 |
int regist_inst_winpt (int with_ext, int *created); |
int regist_inst_winpt (int with_ext, int *created); |
|
int create_file_type (const char * exefile, const char * ext, |
|
|
const char * extname, char *iconfile ); |
|
99 |
int set_reg_winpt_single (int id, int val); |
int set_reg_winpt_single (int id, int val); |
100 |
int get_reg_winpt_single (int id); |
int get_reg_winpt_single (int id); |
101 |
int set_reg_winpt_prefs (winpt_reg_prefs_s * opt); |
int set_reg_winpt_prefs (winpt_prefs_t opt); |
102 |
int get_reg_winpt_prefs (winpt_reg_prefs_s * opt); |
int get_reg_winpt_prefs (winpt_prefs_t opt); |
103 |
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); |
104 |
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, |
105 |
const char * value ); |
const char *value); |
106 |
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, |
107 |
const char * value ); |
const char * value); |
108 |
int set_reg_entry_gpg( const char * key, const char * value ); |
int set_reg_entry_gpg (const char *key, const char *value); |
109 |
int set_reg_entry_mo( const char * value ); |
int set_reg_entry_mo (const char *value); |
110 |
char* get_reg_entry_gpg( const char * key ); |
char* get_reg_entry_gpg (const char * key); |
111 |
char* get_reg_entry_mo( void ); |
char* get_reg_entry_mo (void); |
112 |
void get_reg_proxy_prefs (keyserver_proxy_t prox); |
int set_reg_entry_keyserver (const char * name, const char *val); |
113 |
int set_reg_proxy_prefs (keyserver_proxy_t prox); |
char* get_reg_entry_keyserver( const char * name ); |
|
int set_reg_entry_keyserver( const char * name, const char * val ); |
|
|
char * get_reg_entry_keyserver( const char * name ); |
|
114 |
int set_reg_winpt_flag (const char *name, int val); |
int set_reg_winpt_flag (const char *name, int val); |
115 |
int get_reg_winpt_flag (const char *name); |
int get_reg_winpt_flag (const char *name); |
116 |
char* get_reg_entry_gpg4win (const char *path); |
char* get_reg_entry_gpg4win (const char *path); |