1 ; Mereo - An HTTP server.
2 ; Copyright (C) 2008 Jelle Geerts
4 ; This program is free software: you can redistribute it and/or modify
5 ; it under the terms of the GNU General Public License as published by
6 ; the Free Software Foundation, either version 3 of the License, or
7 ; (at your option) any later version.
9 ; This program is distributed in the hope that it will be useful,
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ; GNU General Public License for more details.
14 ; You should have received a copy of the GNU General Public License
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
17 NIM_ADD
equ 000h ;Adds an icon to the taskbar status area.
18 NIM_MODIFY
equ 001h ;Changes the icon, tooltip text, or notification message identifier for an icon in the taskbar status area.
19 NIM_DELETE
equ 002h ;Deletes an icon from the taskbar status area.
21 TTF_IDISHWND
equ 001h ;Specifies to use custom window handle in uId for TOOLINFO struct.
23 TTI_NONE
equ 000h ;No icon (Icon for a balloon tooltip)
24 TTI_INFO
equ 001h ;Information icon (Icon for a balloon tooltip)
25 TTI_WARNING
equ 002h ;Warning icon (Icon for a balloon tooltip)
26 TTI_ERROR
equ 003h ;Error icon (Icon for a balloon tooltip)
28 TTS_ALWAYSTIP
equ 001h ;The ToolTip will appear when the cursor is on a tool, regardless of whether the ToolTip control's owner window is active or inactive.
29 TTS_NOPREFIX
equ 002h ;Prevents the system from stripping the ampersand (&) character from a string.
30 TTS_BALLOON
equ 040h ;The ToolTip control has the appearance of a cartoon "balloon", with rounded corners and a stem pointing to the item.
32 NIF_MESSAGE
equ 001h ;The uCallbackMessage member is valid.
33 NIF_ICON
equ 002h ;The hIcon member is valid.
34 NIF_TIP
equ 004h ;The szTip member is valid.
35 NIF_INFO
equ 010h ;Use balloon tip instead of a standard tooltip. The szInfo, uTimeout, szInfoTitle, and dwInfoFlags members are valid.
37 NIIF_NONE
equ 000h ;No icon.
38 NIIF_INFO
equ 001h ;An information icon.
39 NIIF_WARNING
equ 002h ;A warning icon.
40 NIIF_ERROR
equ 003h ;An error icon.
41 NIIF_USER
equ 004h ;Version 6.0. Use the icon specified in NOTIFYICONDATA.hIcon
42 NIIF_QUESTION
equ 006h ;A question icon. (Don't know if NIIF_QUESTION is the right name)
43 NIIF_NOSOUND
equ 010h ;Version 6.0. Do not play the associated sound. Applies only to balloon ToolTips.
45 NOTIFYICONDATA2
STRUCT
46 ; NOTIFYICONDATA in windows.inc is old, here is new
47 ; (same as in you can see in MFC apps) now we can make balloon tooltips.
48 ; I've called this structure NOTIFYICONDATA2 otherwise MASM assembler
49 ; would give the error 'structure redifinition'.
60 union
;Union means both names 'uTimeout' and 'uVersion' refer to the same memory location
64 szInfoTitle
db 64 dup
(?)
68 ; Constants for API's or Win32 Structures
69 BIF_BROWSEINCLUDEURLS
equ 80h
71 BIF_NEWDIALOGSTYLE
equ 40h
72 BIF_RETURNONLYFSDIRS
equ 1
73 BIF_USENEWUI
equ BIF_NEWDIALOGSTYLE
or BIF_EDITBOX
75 ICC_STANDARD_CLASSES
equ 4000h
76 ICC_NATIVEFNTCTL_CLASS
equ 2000h
79 LOCALE_SYSTEM_DEFAULT
equ 800h
83 ; Constants for the window elements
84 ID_MAIN_DIALOG
equ 100
88 IDC_DIRBROWSING
equ 104
91 IDM_SELECTDIRFILE
equ 107
97 IDT_COMPIPADDRESS
equ 113
98 ID_NOTAREA_ICON_STOPPED
equ 114
99 ID_NOTAREA_ICON_RUNNING
equ 115
103 IDC_AUTOSTART
equ 119
104 IDC_AUTOSTART_CURRENT
equ 120
105 IDC_AUTOSTART_ALL
equ 121
106 ID_OPEN_WEBROOT
equ 122
107 ID_MAIN_CHARSET
equ 123
109 IDE_BIND_ADDRESS
equ 125
110 ID_BIND_ADDRESS_CLR
equ 126
112 ID_ABOUT_DIALOG
equ 200
113 ID_ABOUT_TEXT
equ 201
114 ID_ABOUT_TEXT2
equ 202
115 ID_ABOUT_TEXT3
equ 203
116 ID_ABOUT_TEXT4
equ 204
117 ID_ABOUT_ICON
equ 205
119 ID_LOG_DIALOG
equ 300
124 IDT_LOG_STATUS
equ 305
129 ID_ADDFAV_DIALOG
equ 400
130 ID_ADDFAV_NAME
equ 401
131 ID_ADDFAV_PATH
equ 402
132 ID_ADDFAV_PORT
equ 403
133 ID_ADDFAV_FINISH
equ 404
134 ID_ADDFAV_QUESTION
equ 405
135 ID_ADDFAV_BROWSE
equ 406
136 IDE_ADDFAV_BIND_ADDRESS
equ 407
138 ID_REMFAV_DIALOG
equ 500
139 ID_REMFAV_INTEGER
equ 501
141 ID_UPDATE_DIALOG
equ 600
142 ID_UPDATE_STOP
equ 601
144 ID_AUTOSTART_DIALOG
equ 700
145 ID_AUTOSTART_PATH
equ 701
146 ID_AUTOSTART_BROWSE
equ 702
147 ID_AUTOSTART_PORT
equ 703
148 ID_AUTOSTART_FINISH
equ 704
149 IDC_AUTOSTART_DIRBROWSING
equ 705
150 IDC_AUTOSTART_HIDDEN
equ 706
151 IDE_AUTOSTART_BIND_ADDRESS
equ 707
153 ID_SETTINGS_UPDATE_DIALOG
equ 800
154 ID_SETTINGS_UPDATE_INTERVAL
equ 801
155 IDM_SETTINGS_UPDATE
equ 802
156 ID_SETTINGS_UPDATE_APPLY
equ 803
157 IDM_UPDATE_CHECK
equ 804
158 IDC_SETTINGS_UPDATE_ATSTART
equ 805
159 IDM_SETTINGS_PREFS
equ 806
160 ID_SETTINGS_PREFS_DIALOG
equ 807
161 ID_SETTINGS_PREFS_APPLY
equ 808
162 IDC_SETTINGS_DIRBROWSE_FORCE
equ 809
163 IDC_SETTINGS_LOGENABLE
equ 810
164 IDE_SETTINGS_MAXTHREADS
equ 811
165 IDE_SETTINGS_LOGMEM
equ 812
166 ; *'new_cfg_item-widget_id'*
168 IDM_NOTAREA_EXIT
equ 900
170 ID_IMG_HTTP_DB_DIR
equ 1000
171 ID_IMG_HTTP_DB_FILE
equ 1001
173 ; Extra components of main window
174 ID_STATUSBAR
equ 4000
177 ID_NOTAREA_ICON_MSG
equ 4003
179 ; Extra components of update window
180 ID_UPDATE_TIMER
equ 5000
181 ID_UPDATE_CHECK_TIMER
equ 5001
183 ; Notification area icon ID numbers for notification area icon menu
186 ; Contants for the window messages & notification area icon etc
187 WM_SOCKET
equ WM_APP
+1
188 WM_NOTAREA_ICON
equ WM_APP
+2
189 WM_LOG_READ_ERROR
equ WM_USER
+3
190 WM_UPDATE_NOTIFY
equ WM_USER
+4
191 UPDATE_CHECK_NOTIFY
equ WM_TIMER
192 UPDATE_CHECK_NO_NOTIFY
equ WM_TIMER
+1
199 WSA_REQ_VERSION
equ 2
200 ONE_KILOBYTE
equ 1024
201 ONE_MEGABYTE
equ 1048576
202 ONE_GIGABYTE
equ 1073741824
203 CONTENT_DIRECTORIES
equ 1
205 LOGMEM
equ (ONE_MEGABYTE
*10)
206 LOGMEM_LIMIT
equ 0FFFFFFFFh
; *** when changing this, update the 'settings_save_e_logmemlim' error message too ***
207 LOGMEM_LINELIMIT
equ 256 ; The maximum amount one line in the log file can take.
208 ERRORPAGE_MAX_LENGTH
equ 4096
209 HANDLECONNECTIONTHREAD_STACKSIZE
equ 32768
211 MAXTHREADS_LIMIT
equ 0FFFFh
; *** when changing this, update the 'settings_save_e_mthreadlim' error message too ***
212 PATH_BUFFER_WIDE_LEN
equ 12288
215 SOCK_STREAM_SEND_SIZE
equ 8192
216 HTTP_DEFAULT_PORT
equ 80
219 hSock
dd ? ; handle to socket
220 hThread
dd ? ; handle to thread
221 hEventStart
dd ? ; handle to event
222 WaitingStatus
dd ? ; yes/no
223 ThreadRunning
dd ? ; yes/no
224 RecvData
dd ? ; yes/no
225 fd_close
dd ? ; yes/no