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

Legend:
Removed from v.30  
changed lines
  Added in v.273

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26