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

Diff of /trunk/Include/wptContext.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4 by twoaday, Sun Feb 6 11:11:40 2005 UTC revision 208 by twoaday, Mon May 1 12:22:18 2006 UTC
# Line 1  Line 1 
 /* wptContext.h - Internal file to store private contexts  
  *      Copyright (C) 2001-2005 Timo Schulz  
  *  
  * This file is part of WinPT.  
  *  
  * WinPT is free software; you can redistribute it and/or modify  
  * it under the terms of the GNU General Public License as published by  
  * the Free Software Foundation; either version 2 of the License, or  
  * (at your option) any later version.  
  *  
  * WinPT is distributed in the hope that it will be useful,  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
  * GNU General Public License for more details.  
  *  
  * You should have received a copy of the GNU General Public License  
  * along with WinPT; if not, write to the Free Software Foundation,  
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA  
  */  
   
 #ifndef WPT_CONTEXT_H  
 #define WPT_CONTEXT_H  
   
 struct subclass_s {  
     HWND    dlg;  
     WNDPROC old;  
     WNDPROC current;  
     void * opaque;  
 };  
   
 struct winpt_key_s {  
     const char * uid;  
     const char * keyid;  
     unsigned int key_pair:1;  
     unsigned int is_protected:1;  
     unsigned int flags;  
     struct {  
         listview_ctrl_t ctl;  
         int idx;  
         int new_val;  
     } callback;  
 };  
 typedef struct winpt_key_s * winpt_key_t;  
   
 struct text_input_s {  
     char * data;  
     size_t length;  
     int    type;  
 };  
   
 struct date_s {  
     int          cancel;  
     const char * text;  
     SYSTEMTIME   st;  
 };  
   
 struct md_file_s {  
     int             mdalgo;  
     listview_ctrl_t lv;  
 };  
   
 struct secdel_confirm_s {  
     unsigned int       yes:1;  
     gpgme_recipients_t rset;  
 };  
   
 struct import_status_s {  
     int          import_res[14];  
     unsigned int rev_cert:1;  
 };  
   
 struct progress_filter_s {  
     HWND     hwnd;  
     HWND     dlg;  
     HANDLE   thread_hd;  
     int      error;  
     const char * what;  
     int      type;  
     unsigned curr;  
     unsigned total;  
 };  
   
   
 struct http_file_s {  
     char url[256];  
     char proxy[64];  
     int  port;  
     int  cancel;  
 };  
   
 struct key_wizard_s {  
     int interactive;  
 };  
   
 #endif /* WPT_CONTEXT_H */  
1    /* wptContext.h - Internal file to store private contexts
2     *      Copyright (C) 2001-2005 Timo Schulz
3     *
4     * This file is part of WinPT.
5     *
6     * WinPT is free software; you can redistribute it and/or modify
7     * it under the terms of the GNU General Public License as published by
8     * the Free Software Foundation; either version 2 of the License, or
9     * (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
14     * GNU 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    #ifndef WPT_CONTEXT_H
21    #define WPT_CONTEXT_H
22    
23    /* Window subclassing context. */
24    struct subclass_s {
25        HWND    dlg;
26        WNDPROC old;        /* old window procedure */
27        WNDPROC current;    /* the subclass window procedure */
28        void * opaque;
29    };
30    
31    /* Container for a gpgme key. */
32    struct winpt_key_s {
33        const char  *uid;               /* pointer to the first uid */
34        const char  *keyid;             /* pointer to the first keyid */
35        unsigned int key_pair:1;        /* is a complete key. */
36        unsigned int is_protected:1;    /* secret key is protected. */
37        unsigned int update:1;          /* 1=need to reload key. */
38        unsigned int is_v3:1;           /* key is version 3 (RSA/MD5) */
39        unsigned int has_photo:1;       /* 1=contains photo-id. */
40        unsigned int flags;
41        gpgme_key_t  ctx;               /* if not NULL, the actualy gpgme key */
42        struct keycache_s *ext;         /* extended key attributes or NULL. */
43        /* Callback structure if a listview needs to be updated. */
44        struct {
45            listview_ctrl_t ctl;        /* the listview control. */
46            int idx;                    /* selected index. */
47            int new_val;                /* new value */
48        } callback;
49        char tmp_keyid[8+1];
50        int internal;                  
51    };
52    typedef struct winpt_key_s * winpt_key_t;
53    
54    /* Text input context for detached sigs. */
55    struct text_input_s {
56        char  *data;    /* input data. */
57        size_t length;  /* length of input data. */
58        int    type;    /* type of data (0=text data for signature) */
59    };
60    
61    /* Date context for the date selection dialog. */
62    struct date_s {
63        int         cancel;     /* cancel was hit. */
64        const char *text;       /* text used as the title. */
65        SYSTEMTIME  st;         /* selected time by the user. */
66    };
67    
68    struct md_file_s {
69        int             mdalgo;
70        listview_ctrl_t lv;
71    };
72    
73    struct secdel_confirm_s {
74        unsigned int       yes:1;   /* if yes=1 user confirmed delete. */
75        listview_ctrl_t    lv_files;/* listview control with the files to delete. */
76    };
77    
78    
79    /* Progress filter context. */
80    struct progress_filter_s {
81        HWND     hwnd;
82        HWND     dlg;
83        HANDLE   thread_hd;
84        int      error;
85        const char *what;
86        int      type;
87        unsigned curr;
88        unsigned total;
89    };
90    
91    /* URL context. */
92    struct URL_ctx_s {
93        const char *title;      /* title for the dialog. */
94        const char *desc;       /* description of what to do. */
95        char url[256];          /* the selected URL. */
96        char proxy[64];
97        int  port;              /* the port to use. */
98        int  cancel;            /* user cancelled operation. */
99        int  check;             /* use strict URL checking. */
100    };
101    
102    /* Key generation context */
103    struct genkey_s {
104        gpgme_key_t  newkey;        /* handle to the new key */
105        int          interactive;
106        unsigned int first_start:1;
107        unsigned int cancel:1;
108        char         *fpr;          /* fingerprint of the key. */
109    };
110    
111    #endif /* WPT_CONTEXT_H */

Legend:
Removed from v.4  
changed lines
  Added in v.208

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26