-- 

INFO_INFO = 0 
INFO_WARN = 1 
INFO_ERROR = 2



-- Stale przydatne przy operowaniu funkcjami Internet* i Http* 


INTERNET_FLAG_RELOAD           =0x80000000  -- retrieve the original item

INTERNET_FLAG_SECURE           =0x00800000  -- use PCT/SSL if applicable (HTTP)
INTERNET_FLAG_KEEP_CONNECTION  =0x00400000  -- use keep-alive semantics
INTERNET_FLAG_NO_AUTO_REDIRECT =0x00200000  -- don't handle redirections automatically
INTERNET_FLAG_READ_PREFETCH    =0x00100000  -- do background read prefetch
INTERNET_FLAG_NO_COOKIES       =0x00080000  -- no automatic cookie handling
INTERNET_FLAG_NO_AUTH          =0x00040000  -- no automatic authentication handling
INTERNET_FLAG_RESTRICTED_ZONE  =0x00020000  -- apply restricted zone policies for cookies, auth
INTERNET_FLAG_CACHE_IF_NET_FAIL=0x00010000  -- return cache file if net request fails
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP  =0x00008000 -- ex: https:-- to http:--
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS =0x00004000 -- ex: http:-- to https:--
INTERNET_FLAG_IGNORE_CERT_DATE_INVALID =0x00002000 -- expired X509 Cert.
INTERNET_FLAG_IGNORE_CERT_CN_INVALID   =0x00001000 -- bad common name in X509 Cert.

INTERNET_OPTION_CALLBACK               =1
INTERNET_OPTION_CONNECT_TIMEOUT        =2
INTERNET_OPTION_CONNECT_RETRIES        =3
INTERNET_OPTION_CONNECT_BACKOFF        =4
INTERNET_OPTION_SEND_TIMEOUT           =5
INTERNET_OPTION_RECEIVE_TIMEOUT        =6
INTERNET_OPTION_DATA_SEND_TIMEOUT      =7
INTERNET_OPTION_DATA_RECEIVE_TIMEOUT   =8
INTERNET_OPTION_HANDLE_TYPE            =9
INTERNET_OPTION_LISTEN_TIMEOUT         =11
INTERNET_OPTION_READ_BUFFER_SIZE       =12
INTERNET_OPTION_WRITE_BUFFER_SIZE      =13

INTERNET_OPTION_ASYNC_ID               =15
INTERNET_OPTION_ASYNC_PRIORITY         =16

INTERNET_OPTION_PARENT_HANDLE          =21
INTERNET_OPTION_KEEP_CONNECTION        =22
INTERNET_OPTION_REQUEST_FLAGS          =23
INTERNET_OPTION_EXTENDED_ERROR         =24

INTERNET_OPTION_OFFLINE_MODE           =26
INTERNET_OPTION_CACHE_STREAM_HANDLE    =27
INTERNET_OPTION_USERNAME               =28
INTERNET_OPTION_PASSWORD               =29
INTERNET_OPTION_ASYNC                  =30
INTERNET_OPTION_SECURITY_FLAGS         =31
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT=32
INTERNET_OPTION_DATAFILE_NAME          =33
INTERNET_OPTION_URL                    =34
INTERNET_OPTION_SECURITY_CERTIFICATE   =35
INTERNET_OPTION_SECURITY_KEY_BITNESS   =36
INTERNET_OPTION_REFRESH                =37
INTERNET_OPTION_PROXY                  =38
INTERNET_OPTION_SETTINGS_CHANGED       =39
INTERNET_OPTION_VERSION                =40
INTERNET_OPTION_USER_AGENT             =41
INTERNET_OPTION_END_BROWSER_SESSION    =42
INTERNET_OPTION_PROXY_USERNAME         =43
INTERNET_OPTION_PROXY_PASSWORD         =44
INTERNET_OPTION_CONTEXT_VALUE          =45
INTERNET_OPTION_CONNECT_LIMIT          =46
INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT=47
INTERNET_OPTION_POLICY                 =48
INTERNET_OPTION_DISCONNECTED_TIMEOUT   =49
INTERNET_OPTION_CONNECTED_STATE        =50
INTERNET_OPTION_IDLE_STATE             =51
INTERNET_OPTION_OFFLINE_SEMANTICS      =52
INTERNET_OPTION_SECONDARY_CACHE_KEY    =53
INTERNET_OPTION_CALLBACK_FILTER        =54
INTERNET_OPTION_CONNECT_TIME           =55
INTERNET_OPTION_SEND_THROUGHPUT        =56
INTERNET_OPTION_RECEIVE_THROUGHPUT     =57
INTERNET_OPTION_REQUEST_PRIORITY       =58
INTERNET_OPTION_HTTP_VERSION           =59
INTERNET_OPTION_RESET_URLCACHE_SESSION =60
INTERNET_OPTION_ERROR_MASK             =62
INTERNET_OPTION_FROM_CACHE_TIMEOUT     =63
INTERNET_OPTION_BYPASS_EDITED_ENTRY    =64
INTERNET_OPTION_CODEPAGE               =68
INTERNET_OPTION_CACHE_TIMESTAMPS       =69
INTERNET_OPTION_DISABLE_AUTODIAL       =70
INTERNET_OPTION_MAX_CONNS_PER_SERVER    =73
INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER=74
INTERNET_OPTION_PER_CONNECTION_OPTION  =75
INTERNET_OPTION_DIGEST_AUTH_UNLOAD            =76
INTERNET_OPTION_IGNORE_OFFLINE          =77
INTERNET_OPTION_IDENTITY                =78
INTERNET_OPTION_REMOVE_IDENTITY         =79
INTERNET_OPTION_ALTER_IDENTITY          =80
INTERNET_OPTION_SUPPRESS_BEHAVIOR       =81
INTERNET_OPTION_AUTODIAL_MODE           =82
INTERNET_OPTION_AUTODIAL_CONNECTION     =83
INTERNET_OPTION_CLIENT_CERT_CONTEXT     =84
INTERNET_OPTION_AUTH_FLAGS              =85
INTERNET_OPTION_COOKIES_3RD_PARTY       =86
INTERNET_OPTION_DISABLE_PASSPORT_AUTH   =87
INTERNET_OPTION_SEND_UTF8_SERVERNAME_TO_PROXY        =88
INTERNET_OPTION_EXEMPT_CONNECTION_LIMIT =89
INTERNET_OPTION_ENABLE_PASSPORT_AUTH    =90

INTERNET_OPTION_HIBERNATE_INACTIVE_WORKER_THREADS      =91
INTERNET_OPTION_ACTIVATE_WORKER_THREADS                =92
INTERNET_OPTION_RESTORE_WORKER_THREAD_DEFAULTS         =93
INTERNET_OPTION_SOCKET_SEND_BUFFER_LENGTH              =94
INTERNET_OPTION_PROXY_SETTINGS_CHANGED                 =95

INTERNET_HANDLE_TYPE_INTERNET          =1
INTERNET_HANDLE_TYPE_CONNECT_FTP       =2
INTERNET_HANDLE_TYPE_CONNECT_GOPHER    =3
INTERNET_HANDLE_TYPE_CONNECT_HTTP      =4
INTERNET_HANDLE_TYPE_FTP_FIND          =5
INTERNET_HANDLE_TYPE_FTP_FIND_HTML     =6
INTERNET_HANDLE_TYPE_FTP_FILE          =7
INTERNET_HANDLE_TYPE_FTP_FILE_HTML     =8
INTERNET_HANDLE_TYPE_GOPHER_FIND       =9
INTERNET_HANDLE_TYPE_GOPHER_FIND_HTML  =10
INTERNET_HANDLE_TYPE_GOPHER_FILE       =11
INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML  =12
INTERNET_HANDLE_TYPE_HTTP_REQUEST      =13
INTERNET_HANDLE_TYPE_FILE_REQUEST      =14

HTTP_QUERY_MIME_VERSION                =0
HTTP_QUERY_CONTENT_TYPE                =1
HTTP_QUERY_CONTENT_TRANSFER_ENCODING   =2
HTTP_QUERY_CONTENT_ID                  =3
HTTP_QUERY_CONTENT_DESCRIPTION         =4
HTTP_QUERY_CONTENT_LENGTH              =5
HTTP_QUERY_CONTENT_LANGUAGE            =6
HTTP_QUERY_ALLOW                       =7
HTTP_QUERY_PUBLIC                      =8
HTTP_QUERY_DATE                        =9
HTTP_QUERY_EXPIRES                     =10
HTTP_QUERY_LAST_MODIFIED               =11
HTTP_QUERY_MESSAGE_ID                  =12
HTTP_QUERY_URI                         =13
HTTP_QUERY_DERIVED_FROM                =14
HTTP_QUERY_COST                        =15
HTTP_QUERY_LINK                        =16
HTTP_QUERY_PRAGMA                      =17
HTTP_QUERY_VERSION                     =18  -- special: part of status line
HTTP_QUERY_STATUS_CODE                 =19  -- special: part of status line
HTTP_QUERY_STATUS_TEXT                 =20  -- special: part of status line
HTTP_QUERY_RAW_HEADERS                 =21  -- special: all headers as ASCIIZ
HTTP_QUERY_RAW_HEADERS_CRLF            =22  -- special: all headers
HTTP_QUERY_CONNECTION                  =23
HTTP_QUERY_ACCEPT                      =24
HTTP_QUERY_ACCEPT_CHARSET              =25
HTTP_QUERY_ACCEPT_ENCODING             =26
HTTP_QUERY_ACCEPT_LANGUAGE             =27
HTTP_QUERY_AUTHORIZATION               =28
HTTP_QUERY_CONTENT_ENCODING            =29
HTTP_QUERY_FORWARDED                   =30
HTTP_QUERY_FROM                        =31
HTTP_QUERY_IF_MODIFIED_SINCE           =32
HTTP_QUERY_LOCATION                    =33
HTTP_QUERY_ORIG_URI                    =34
HTTP_QUERY_REFERER                     =35
HTTP_QUERY_RETRY_AFTER                 =36
HTTP_QUERY_SERVER                      =37
HTTP_QUERY_TITLE                       =38
HTTP_QUERY_USER_AGENT                  =39
HTTP_QUERY_WWW_AUTHENTICATE            =40
HTTP_QUERY_PROXY_AUTHENTICATE          =41
HTTP_QUERY_ACCEPT_RANGES               =42
HTTP_QUERY_SET_COOKIE                  =43
HTTP_QUERY_COOKIE                      =44
HTTP_QUERY_REQUEST_METHOD              =45  -- special: GET/POST etc.
HTTP_QUERY_REFRESH                     =46
HTTP_QUERY_CONTENT_DISPOSITION         =47

--
-- HTTP=1.1 defined headers
--

HTTP_QUERY_AGE                         =48
HTTP_QUERY_CACHE_CONTROL               =49
HTTP_QUERY_CONTENT_BASE                =50
HTTP_QUERY_CONTENT_LOCATION            =51
HTTP_QUERY_CONTENT_MD5                 =52
HTTP_QUERY_CONTENT_RANGE               =53
HTTP_QUERY_ETAG                        =54
HTTP_QUERY_HOST                        =55
HTTP_QUERY_IF_MATCH                    =56
HTTP_QUERY_IF_NONE_MATCH               =57
HTTP_QUERY_IF_RANGE                    =58
HTTP_QUERY_IF_UNMODIFIED_SINCE         =59
HTTP_QUERY_MAX_FORWARDS                =60
HTTP_QUERY_PROXY_AUTHORIZATION         =61
HTTP_QUERY_RANGE                       =62
HTTP_QUERY_TRANSFER_ENCODING           =63
HTTP_QUERY_UPGRADE                     =64
HTTP_QUERY_VARY                        =65
HTTP_QUERY_VIA                         =66
HTTP_QUERY_WARNING                     =67
HTTP_QUERY_EXPECT                      =68
HTTP_QUERY_PROXY_CONNECTION            =69
HTTP_QUERY_UNLESS_MODIFIED_SINCE       =70



HTTP_QUERY_ECHO_REQUEST                =71
HTTP_QUERY_ECHO_REPLY                  =72

-- These are the set of headers that should be added back to a request when
-- re-doing a request after a RETRY_WITH response.
HTTP_QUERY_ECHO_HEADERS                =73
HTTP_QUERY_ECHO_HEADERS_CRLF           =74

HTTP_QUERY_PROXY_SUPPORT               =75
HTTP_QUERY_AUTHENTICATION_INFO         =76
HTTP_QUERY_PASSPORT_URLS               =77
HTTP_QUERY_PASSPORT_CONFIG             =78

HTTP_QUERY_MAX                         =78

--
-- HTTP_QUERY_CUSTOM - if this special value is supplied as the dwInfoLevel
-- parameter of HttpQueryInfo() then the lpBuffer parameter contains the name
-- of the header we are to query
--

HTTP_QUERY_CUSTOM                      =65535

--
-- HTTP_QUERY_FLAG_REQUEST_HEADERS - if this bit is set in the dwInfoLevel
-- parameter of HttpQueryInfo() then the request headers will be queried for the
-- request information
--

HTTP_QUERY_FLAG_REQUEST_HEADERS        =0x80000000

--
-- HTTP_QUERY_FLAG_SYSTEMTIME - if this bit is set in the dwInfoLevel parameter
-- of HttpQueryInfo() AND the header being queried contains date information,
-- e.g. the "Expires:" header then lpBuffer will contain a SYSTEMTIME structure
-- containing the date and time information converted from the header string
--

HTTP_QUERY_FLAG_SYSTEMTIME             =0x40000000

--
-- HTTP_QUERY_FLAG_NUMBER - if this bit is set in the dwInfoLevel parameter of
-- HttpQueryInfo(), then the value of the header will be converted to a number
-- before being returned to the caller, if applicable
--

HTTP_QUERY_FLAG_NUMBER                 =0x20000000

--
-- HTTP_QUERY_FLAG_COALESCE - combine the values from several headers of the
-- same name into the output buffer
--

HTTP_QUERY_FLAG_COALESCE               =0x10000000

-- Jako że QueryInfo zwraca wszystko jako tekst, do porównywania również musimy
-- podstawiać tekst...

HTTP_STATUS_CONTINUE           ='100' -- OK to continue with request
HTTP_STATUS_SWITCH_PROTOCOLS   ='101' -- server has switched protocols in upgrade header

HTTP_STATUS_OK                 ='200' -- request completed
HTTP_STATUS_CREATED            ='201' -- object created, reason = new URI
HTTP_STATUS_ACCEPTED           ='202' -- async completion (TBS)
HTTP_STATUS_PARTIAL            ='203' -- partial completion
HTTP_STATUS_NO_CONTENT         ='204' -- no info to return
HTTP_STATUS_RESET_CONTENT      ='205' -- request completed, but clear form
HTTP_STATUS_PARTIAL_CONTENT    ='206' -- partial GET furfilled

HTTP_STATUS_AMBIGUOUS          ='300' -- server couldn't decide what to return
HTTP_STATUS_MOVED              ='301' -- object permanently moved
HTTP_STATUS_REDIRECT           ='302' -- object temporarily moved
HTTP_STATUS_REDIRECT_METHOD    ='303' -- redirection w/ new access method
HTTP_STATUS_NOT_MODIFIED       ='304' -- if-modified-since was not modified
HTTP_STATUS_USE_PROXY          ='305' -- redirection to proxy, location header specifies proxy to use
HTTP_STATUS_REDIRECT_KEEP_VERB ='307' -- HTTP/1.1: keep same verb

HTTP_STATUS_BAD_REQUEST        ='400' -- invalid syntax
HTTP_STATUS_DENIED             ='401' -- access denied
HTTP_STATUS_PAYMENT_REQ        ='402' -- payment required
HTTP_STATUS_FORBIDDEN          ='403' -- request forbidden
HTTP_STATUS_NOT_FOUND          ='404' -- object not found
HTTP_STATUS_BAD_METHOD         ='405' -- method is not allowed
HTTP_STATUS_NONE_ACCEPTABLE    ='406' -- no response acceptable to client found
HTTP_STATUS_PROXY_AUTH_REQ     ='407' -- proxy authentication required
HTTP_STATUS_REQUEST_TIMEOUT    ='408' -- server timed out waiting for request
HTTP_STATUS_CONFLICT           ='409' -- user should resubmit with more info
HTTP_STATUS_GONE               ='410' -- the resource is no longer available
HTTP_STATUS_LENGTH_REQUIRED    ='411' -- the server refused to accept request w/o a length
HTTP_STATUS_PRECOND_FAILED     ='412' -- precondition given in request failed
HTTP_STATUS_REQUEST_TOO_LARGE  ='413' -- request entity was too large
HTTP_STATUS_URI_TOO_LONG       ='414' -- request URI too long
HTTP_STATUS_UNSUPPORTED_MEDIA  ='415' -- unsupported media type
HTTP_STATUS_RETRY_WITH         ='449' -- retry after doing the appropriate action.

HTTP_STATUS_SERVER_ERROR       ='500' -- internal server error
HTTP_STATUS_NOT_SUPPORTED      ='501' -- required not supported
HTTP_STATUS_BAD_GATEWAY        ='502' -- error response received from gateway
HTTP_STATUS_SERVICE_UNAVAIL    ='503' -- temporarily overloaded
HTTP_STATUS_GATEWAY_TIMEOUT    ='504' -- timed out waiting for gateway
HTTP_STATUS_VERSION_NOT_SUP    ='505' -- HTTP version not supported


ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR = 12039 --'Notifies the user of the zone crossing to and from a secure site.
ERROR_INTERNET_INCORRECT_PASSWORD = 12014 --'Displays a dialog box requesting the user's name and password. (On Microsoft® Windows® 95, the function attempts to use any cached authentication information for the server being accessed before displaying a dialog box.)
ERROR_INTERNET_INVALID_CA = 12045  --'Notifies the user that the Microsoft Win32® Internet function does not recognize the certificate authority that generated the certificate for this Secure Sockets Layer (SSL) site.
ERROR_INTERNET_POST_IS_NON_SECURE = 12043 --'Displays a warning about posting data to the server through a nonsecure connection.
ERROR_INTERNET_SEC_CERT_CN_INVALID = 12038 --'Indicates that the SSL certificate Common Name (host name field) is incorrect. Displays an Invalid SSL Common Name dialog box and lets the user view the incorrect certificate. Also allows the user to select a certificate in response to a server request.
ERROR_INTERNET_SEC_CERT_DATE_INVALID = 12037 --'Tells the user that the SSL certificate has expired.

FLAGS_ERROR_UI_FILTER_FOR_ERRORS = 1 --'Scans the returned headers for errors. Call this flag after using HttpSendRequest. This option detects any hidden errors, such as an authentication error.
FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS = 2 --'If the function succeeds, stores the results of the dialog box in the Internet handle.
FLAGS_ERROR_UI_FLAGS_GENERATE_DATA = 4 --'Queries the Internet handle for needed information. The function constructs the appropriate data structure for the error. (For example, for Cert CN failures, the function grabs the certificate.)
FLAGS_ERROR_UI_SERIALIZE_DIALOGS = 0x10 --'Serializes authentication dialog boxes for concurrent requests on a password cache entry. The lppvData parameter should contain the address of a pointer to an INTERNET_AUTH_NOTIFY_DATA structure, and the client should implement a thread-safe, nonblocking callback function.
