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

Diff of /trunk/Include/wptErrors.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 133 by twoaday, Mon Jan 9 09:15:29 2006 UTC
# Line 1  Line 1 
 /* wptErrors.h - Errors headerfile  
  *      Copyright (C) 2000-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_ERRORS_H  
 #define WPT_ERRORS_H  
   
 #define DEBUG(MSG)   debug   (MSG, __FILE__, __LINE__)  
 #define DEBUG_F(MSG) debug_f (MSG, __FILE__, __LINE__)  
           
   
 enum {  
     WPTERR_GENERAL        = 1,  
     WPTERR_FILE_OPEN      = 2,  
     WPTERR_FILE_CREAT     = 3,  
     WPTERR_FILE_READ      = 4,  
     WPTERR_FILE_WRITE     = 5,  
     WPTERR_FILE_CLOSE     = 6,  
     WPTERR_FILE_EXIST     = 7,  
     WPTERR_FILE_REMOVE    = 8,  
     WPTERR_CLIP_OPEN      = 10,  
     WPTERR_CLIP_CLOSE     = 11,  
     WPTERR_CLIP_EMPTY     = 12,  
     WPTERR_CLIP_SET       = 13,  
     WPTERR_CLIP_GET       = 14,  
     WPTERR_CLIP_ISEMPTY   = 15,  
     WPTERR_CLIP           = 16,  
     WPTERR_CLIP_SECURED   = 17,  
     WPTERR_WINSOCK_INIT   = 18,  
     WPTERR_WINSOCK_RESOLVE= 19,  
     WPTERR_WINSOCK_SOCKET = 20,  
     WPTERR_WINSOCK_CONNECT= 21,  
     WPTERR_WINSOCK_SENDKEY= 22,  
     WPTERR_WINSOCK_RECVKEY= 23,  
     WPTERR_WINSOCK_TIMEOUT= 50,  
     WPTERR_KEYSERVER_NOTFOUND= 24,  
     WPTERR_REGISTRY       = 26,  
     WPTERR_HOTKEY         = 28,  
     WPTERR_DIR_OPEN       = 33,  
     WPTERR_DIR_CREAT      = 34,  
     WPTERR_CURR_WND       = 35,  
     WPTERR_CONFIG_FILE    = 36,  
     WPTERR_GPG_EXEFILE    = 51,  
     WPTERR_GPG_KEYRINGS   = 52,  
     WPTERR_GPG_OPT_KEYRINGS= 53,  
     WPTERR_NOCARD         = 100,  
     WPTERR_NOREADER       = 101,  
     WPTERR_NOPGPCARD      = 102,  
     WPTERR_CDISK_LOCK     = 201,  
     WPTERR_CDISK_MOUNT    = 202,  
     WPTERR_CDISK_UMOUNT   = 203,  
     WPTERR_CDISK_OPEN     = 204,  
     WPTERR_CDISK_BUSY     = 205,  
     WPTERR_CDISK_QUERY    = 206,  
 };  
   
 const char * winpt_strerror (int errid);  
 void winpt_errmsg (const char * name, int is_file);  
 void winpt_debug_msg (void);  
 void debug_box (const char * msg, const char * file, int line);  
 void debug_f (const char * msg, const char * file, int line);  
 void log_f (const char * format, ...);  
 int log_box (const char * title, int style, const char * format, ...);  
   
 /*-- wptW32API.cpp --*/  
 int msg_box (HWND hwnd, const char * text, const char * title, int mode);  
 int show_msg (HWND hWnd, int millis, LPCTSTR string);  
 #define status_box(hwnd, text, title) msg_box (hwnd, text, title, MB_OK)  
   
 #endif /* WPT_ERRORS_H */  
1    /* wptErrors.h - Errors headerfile
2     *      Copyright (C) 2000-2005 Timo Schulz
3     *
4     * This file is part of WinPT.
5     *
6     * WinPT is free software; you can redistribute it and/or
7     * modify it under the terms of the GNU General Public License
8     * as published by the Free Software Foundation; either version 2
9     * of the License, or (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 GNU
14     * 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    
21    #ifndef WPT_ERRORS_H
22    #define WPT_ERRORS_H
23    
24    #define w32_errno ((int)GetLastError ())
25    
26    #define DEBUG(MSG)   debug   (MSG, __FILE__, __LINE__)
27    #define DEBUG_F(MSG) debug_f (MSG, __FILE__, __LINE__)
28            
29    /* Error constants. */
30    enum winpt_err_t {
31        WPTERR_GENERAL        = 1,
32        WPTERR_FILE_OPEN      = 2,
33        WPTERR_FILE_CREAT     = 3,
34        WPTERR_FILE_READ      = 4,
35        WPTERR_FILE_WRITE     = 5,
36        WPTERR_FILE_CLOSE     = 6,
37        WPTERR_FILE_EXIST     = 7,
38        WPTERR_FILE_REMOVE    = 8,
39        WPTERR_CLIP_OPEN      = 10,
40        WPTERR_CLIP_CLOSE     = 11,
41        WPTERR_CLIP_EMPTY     = 12,
42        WPTERR_CLIP_SET       = 13,
43        WPTERR_CLIP_GET       = 14,
44        WPTERR_CLIP_ISEMPTY   = 15,
45        WPTERR_CLIP           = 16,
46        WPTERR_CLIP_SECURED   = 17,
47        WPTERR_WINSOCK_INIT   = 18,
48        WPTERR_WINSOCK_RESOLVE= 19,
49        WPTERR_WINSOCK_SOCKET = 20,
50        WPTERR_WINSOCK_CONNECT= 21,
51        WPTERR_WINSOCK_SENDKEY= 22,
52        WPTERR_WINSOCK_RECVKEY= 23,
53        WPTERR_WINSOCK_TIMEOUT= 50,
54        WPTERR_KEYSERVER_NOTFOUND= 24,
55        WPTERR_REGISTRY       = 26,
56        WPTERR_HOTKEY         = 28,
57        WPTERR_DIR_OPEN       = 33,
58        WPTERR_DIR_CREAT      = 34,
59        WPTERR_CURR_WND       = 35,
60        WPTERR_CONFIG_FILE    = 36,
61        WPTERR_GPG_EXEFILE    = 51,
62        WPTERR_GPG_KEYRINGS   = 52,
63        WPTERR_GPG_OPT_KEYRINGS= 53,
64        WPTERR_NOCARD         = 100,
65        WPTERR_NOREADER       = 101,
66        WPTERR_NOPGPCARD      = 102,
67        WPTERR_CDISK_LOCK     = 201,
68        WPTERR_CDISK_MOUNT    = 202,
69        WPTERR_CDISK_UMOUNT   = 203,
70        WPTERR_CDISK_OPEN     = 204,
71        WPTERR_CDISK_BUSY     = 205,
72        WPTERR_CDISK_QUERY    = 206,
73    };
74    
75    void debug_end (void);
76    const char * winpt_strerror (int errid);
77    void winpt_errmsg (const char * name, int is_file);
78    void winpt_debug_msg (void);
79    void debug_box (const char * msg, const char * file, int line);
80    void debug_f (const char * msg, const char * file, int line);
81    void log_debug (const char * format, ...);
82    int printf_box (const char * title, int style, const char * format, ...);
83    #define log_box printf_box
84    
85    /*-- wptW32API.cpp --*/
86    int msg_box (HWND hwnd, const char * text, const char * title, int mode);
87    int show_msg (HWND hWnd, int millis, LPCTSTR string);
88    #define status_box(hwnd, text, title) msg_box (hwnd, text, title, MB_OK)
89    
90    #endif /* WPT_ERRORS_H */

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26