OSDN Git Service

Redo the filters based on assumptions discussed in mingw-dvlpr list.
[mingw/mingw-org-wsl.git] / include / lmalert.h
1 /**
2  * @file lmalert.h
3  * @copy 2012 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _LMALERT_H
25 #define _LMALERT_H
26 #pragma GCC system_header
27 #include <_mingw.h>
28
29 #define ALERTER_MAILSLOT TEXT("\\\\.\\MAILSLOT\\Alerter")
30 #define ALERT_PRINT_EVENT TEXT("PRINTING")
31 #define ALERT_MESSAGE_EVENT TEXT("MESSAGE")
32 #define ALERT_ERRORLOG_EVENT TEXT("ERRORLOG")
33 #define ALERT_ADMIN_EVENT TEXT("ADMIN")
34 #define ALERT_USER_EVENT TEXT("USER")
35 #define ALERT_OTHER_INFO(x) ((PBYTE)(x)+sizeof(STD_ALERT))
36 #define ALERT_VAR_DATA(p) ((PBYTE)(p)+sizeof(*p))
37 #define PRJOB_QSTATUS 3
38 #define PRJOB_DEVSTATUS 508
39 #define PRJOB_COMPLETE 4
40 #define PRJOB_INTERV 8
41 #define PRJOB_ 16
42 #define PRJOB_DESTOFFLINE 32
43 #define PRJOB_DESTPAUSED 64
44 #define PRJOB_NOTIFY 128
45 #define PRJOB_DESTNOPAPER 256
46 #define PRJOB_DELETED 32768
47 #define PRJOB_QS_QUEUED 0
48 #define PRJOB_QS_PAUSED 1
49 #define PRJOB_QS_SPOOLING 2
50 #define PRJOB_QS_PRINTING 3
51
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55
56 typedef struct _ADMIN_OTHER_INFO {
57         DWORD alrtad_errcode;
58         DWORD alrtad_numstrings;
59 }ADMIN_OTHER_INFO,*PADMIN_OTHER_INFO,*LPADMIN_OTHER_INFO;
60 typedef struct _STD_ALERT {
61         DWORD alrt_timestamp;
62         TCHAR alrt_eventname[EVLEN+1];
63         TCHAR alrt_servicename[SNLEN+1];
64 }STD_ALERT,*PSTD_ALERT,*LPSTD_ALERT;
65 typedef struct _ERRLOG_OTHER_INFO {
66         DWORD alrter_errcode;
67         DWORD alrter_offset;
68 }ERRLOG_OTHER_INFO,*PERRLOG_OTHER_INFO,*LPERRLOG_OTHER_INFO;
69 typedef struct _PRINT_OTHER_INFO {
70         DWORD alrtpr_jobid;
71         DWORD alrtpr_status;
72         DWORD alrtpr_submitted;
73         DWORD alrtpr_size;
74 }PRINT_OTHER_INFO,*PPRINT_OTHER_INFO,*LPPRINT_OTHER_INFO;
75 typedef struct _USER_OTHER_INFO {
76         DWORD alrtus_errcode;
77         DWORD alrtus_numstrings;
78 }USER_OTHER_INFO,*PUSER_OTHER_INFO,*LPUSER_OTHER_INFO;
79 NET_API_STATUS WINAPI NetAlertRaise(LPCWSTR,PVOID,DWORD);
80 NET_API_STATUS WINAPI NetAlertRaiseEx(LPCWSTR,PVOID,DWORD,LPCWSTR);
81
82 #ifdef __cplusplus
83 }
84 #endif
85
86 #endif