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

Diff of /trunk/Include/wptFileManager.h

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

revision 2 by twoaday, Mon Jan 31 11:02:21 2005 UTC revision 32 by twoaday, Mon Oct 24 08:03:48 2005 UTC
# Line 21  Line 21 
21  #ifndef WPT_FILE_MANAGER_H  #ifndef WPT_FILE_MANAGER_H
22  #define WPT_FILE_MANAGER_H  #define WPT_FILE_MANAGER_H
23    
24    /* File manager commands. */
25  enum {  enum {
26      FM_NONE         = 0,      FM_NONE         = 0,
27      FM_ENCRYPT      = 1,              FM_ENCRYPT      = 1,        
# Line 35  enum { Line 36  enum {
36      FM_ENCRYPT_DIR  = 10,      FM_ENCRYPT_DIR  = 10,
37  };  };
38    
39    /* Sort by constants. */
40  enum {  enum {
41      FM_SORT_NONE    = 0,      FM_SORT_NONE    = 0,
42      FM_SORT_STAT    = 1,      FM_SORT_STAT    = 1,
# Line 42  enum { Line 44  enum {
44      FM_SORT_OP      = 3      FM_SORT_OP      = 3
45  };  };
46    
47    /* File manager handle. */
48  struct fm_state_s {  struct fm_state_s {
49      gpgme_ctx_t ctx;      gpgme_ctx_t ctx;            /* currently used gpgme context. */
50      gpgme_recipients_t recp;      gpgme_key_t *recp;          /* selected recipients. */
51      char * output;      int         n_recp;
52      char * opaque;      char *output;               /* output file name. */
53      int cancel;      char *opaque;
54      HWND dlg;      int cancel;                 /* 1=if user cancelled operation. */
55      passphrase_cb_s pass_cb;      HWND dlg;                   /* handle to the calling dialog. */
56        struct passphrase_cb_s pass_cb;
57        struct progress_filter_s *prog_cb;
58      int init_cb;      int init_cb;
59      int cache_cb;      int cache_cb;
60      gpgme_sigmode_t sigmode;      gpgme_sig_mode_t sigmode;   /* used signature mode. */
61      unsigned int implist_revcert:1;      struct {
62      unsigned int wipe:1;          unsigned int revcert:1;
63      unsigned int req_signer:1;          unsigned int has_seckey:1;
64        } import;
65        unsigned int wipe:1;        /* 1=if original file should be wiped. */
66        unsigned int req_signer:1;  /* 1=if user wants to select a signer. */
67  };  };
68  typedef struct fm_state_s * fm_state_t;  typedef struct fm_state_s * fm_state_t;
69    
70    /* Gpg file handle. */
71    struct file_data_s {
72        struct gpgme_data_cbs   cbs;
73        FILE             *handle;
74        gpgme_data_t     dat;
75        unsigned long    size;
76        unsigned long    off;
77        void             *cb_value;
78    };
79    typedef struct file_data_s *file_data_t;
80    
81    /*-- wptFileCBS.cpp --*/
82    gpgme_error_t gpg_file_data_new (const char *fname, int for_read,
83                                     file_data_t *r_cb);
84    void          gpg_file_data_release (file_data_t cb);
85    void          gpg_file_data_set_cb (file_data_t ctx,
86                                        struct progress_filter_s *pfx);
87    
88    /*-- wptFileManager.cpp --*/
89  char * fm_quote_file (const char * name);  char * fm_quote_file (const char * name);
90  int fm_parse_command_line (char * cmdl);  int fm_parse_command_line (char * cmdl);
91  int fm_parse_files (listview_ctrl_t lv, HWND dlg, int cmd);  int fm_parse_files (listview_ctrl_t lv, HWND dlg, int cmd);
# Line 69  int fm_build (listview_ctrl_t *lv, HWND Line 95  int fm_build (listview_ctrl_t *lv, HWND
95  void fm_delete (listview_ctrl_t lv);  void fm_delete (listview_ctrl_t lv);
96  int fm_add_dropped_files (listview_ctrl_t lv, HDROP dd_files);  int fm_add_dropped_files (listview_ctrl_t lv, HDROP dd_files);
97  int fm_add_opened_files (listview_ctrl_t lv, HWND dlg);  int fm_add_opened_files (listview_ctrl_t lv, HWND dlg);
 const char* fm_get_file_type (const char *fname);  
98  void fm_remove_crit_file_attrs (const char *fname, int force);  void fm_remove_crit_file_attrs (const char *fname, int force);
99  int fm_get_current_pos (listview_ctrl_t lv);  int fm_get_current_pos (listview_ctrl_t lv);
100  int fm_sort (listview_ctrl_t lv, int sortby);  int fm_sort (listview_ctrl_t lv, int sortby);
# Line 78  int fm_assume_onepass_sig (const char * Line 103  int fm_assume_onepass_sig (const char *
103  int fm_check_file_type (listview_ctrl_t lv, int pos, int fm_cmd);  int fm_check_file_type (listview_ctrl_t lv, int pos, int fm_cmd);
104  int fm_send_file (listview_ctrl_t lv);  int fm_send_file (listview_ctrl_t lv);
105    
106  /*-- commands --*/  /*-- ccommands --*/
107  int fm_encrypt (fm_state_t c, const char * name, int sign);  int fm_encrypt (fm_state_t c, const char * name, int sign);
108  int fm_sym_encrypt (fm_state_t c, const char * name);  int fm_sym_encrypt (fm_state_t c, const char * name);
109  int fm_decrypt (fm_state_t c, const char * name);  int fm_decrypt (fm_state_t c, const char * name);
# Line 91  int fm_encrypt_directory (fm_state_t c, Line 116  int fm_encrypt_directory (fm_state_t c,
116  int fm_verify_pasted_detsig (listview_ctrl_t lv, HWND dlg);  int fm_verify_pasted_detsig (listview_ctrl_t lv, HWND dlg);
117  int fm_assume_onepass_sig (const char * fname);  int fm_assume_onepass_sig (const char * fname);
118    
 #endif /* WPT_FILE_MANAGER_H */  
119    #endif /* WPT_FILE_MANAGER_H */

Legend:
Removed from v.2  
changed lines
  Added in v.32

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26