-
-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Includes what *should* be all the types and constants from wininet.h, and some of the functions. Note that, unlike other header bindings, the `wininet` module is *not* re-exported in the root `winapi` module. This is because `wininet.h` and `winhttp.h` define the same constants/enums with *different values.* Also, due to wininet.dll exporting stdcall functions using cdecl mangling, this commit uses the MinGW import libraries, and as such has to exclude some functions when built using a GNU toolchain. This is because creating a more complete import library for the GNU toolchain would require *actually writing* a dummy shared library in C, and I can't be bothered.
- Loading branch information
1 parent
1026160
commit e79d8ea
Showing
8 changed files
with
1,702 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "wininet-sys" | ||
version = "0.0.1" | ||
version = "0.1.0" | ||
authors = ["Peter Atashian <[email protected]>"] | ||
description = "Contains function definitions for the Windows API library wininet. See winapi for types and constants." | ||
documentation = "https://retep998.github.io/doc/wininet/" | ||
|
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
// Copyright © 2016, Daniel Keep | ||
// Licensed under the MIT License <LICENSE.md> | ||
#![cfg(windows)] | ||
extern crate wininet; | ||
use wininet::*; | ||
macro_rules! bb { ($e:expr) => { bb($e as usize) } } | ||
#[inline(never)] fn bb<T>(_: T) {} | ||
#[test] | ||
fn functions() { | ||
bb!(CommitUrlCacheEntryA); | ||
bb!(CommitUrlCacheEntryW); | ||
bb!(CreateMD5SSOHash); | ||
bb!(CreateUrlCacheEntryA); | ||
bb!(CreateUrlCacheEntryW); | ||
bb!(CreateUrlCacheGroup); | ||
bb!(DeleteUrlCacheEntryA); | ||
bb!(DeleteUrlCacheEntryW); | ||
bb!(DeleteUrlCacheGroup); | ||
bb!(DetectAutoProxyUrl); | ||
bb!(FindCloseUrlCache); | ||
bb!(FindFirstUrlCacheEntryA); | ||
bb!(FindFirstUrlCacheEntryExA); | ||
bb!(FindFirstUrlCacheEntryExW); | ||
bb!(FindFirstUrlCacheEntryW); | ||
bb!(FindFirstUrlCacheGroup); | ||
bb!(FindNextUrlCacheEntryA); | ||
bb!(FindNextUrlCacheEntryExA); | ||
bb!(FindNextUrlCacheEntryExW); | ||
bb!(FindNextUrlCacheEntryW); | ||
bb!(FindNextUrlCacheGroup); | ||
bb!(FtpCommandA); | ||
bb!(FtpCommandW); | ||
bb!(FtpCreateDirectoryA); | ||
bb!(FtpCreateDirectoryW); | ||
bb!(FtpDeleteFileA); | ||
bb!(FtpDeleteFileW); | ||
bb!(FtpFindFirstFileA); | ||
bb!(FtpFindFirstFileW); | ||
bb!(FtpGetCurrentDirectoryA); | ||
bb!(FtpGetCurrentDirectoryW); | ||
bb!(FtpGetFileA); | ||
bb!(FtpGetFileEx); | ||
bb!(FtpGetFileSize); | ||
bb!(FtpGetFileW); | ||
bb!(FtpOpenFileA); | ||
bb!(FtpOpenFileW); | ||
bb!(FtpPutFileA); | ||
bb!(FtpPutFileEx); | ||
bb!(FtpPutFileW); | ||
bb!(FtpRemoveDirectoryA); | ||
bb!(FtpRemoveDirectoryW); | ||
bb!(FtpRenameFileA); | ||
bb!(FtpRenameFileW); | ||
bb!(FtpSetCurrentDirectoryA); | ||
bb!(FtpSetCurrentDirectoryW); | ||
bb!(GetUrlCacheEntryInfoA); | ||
bb!(GetUrlCacheEntryInfoExA); | ||
bb!(GetUrlCacheEntryInfoExW); | ||
bb!(GetUrlCacheEntryInfoW); | ||
bb!(GetUrlCacheGroupAttributeA); | ||
bb!(GetUrlCacheGroupAttributeW); | ||
bb!(HttpAddRequestHeadersA); | ||
bb!(HttpAddRequestHeadersW); | ||
bb!(HttpEndRequestA); | ||
bb!(HttpEndRequestW); | ||
bb!(HttpOpenRequestA); | ||
bb!(HttpOpenRequestW); | ||
bb!(HttpQueryInfoA); | ||
bb!(HttpQueryInfoW); | ||
bb!(HttpSendRequestA); | ||
bb!(HttpSendRequestExA); | ||
bb!(HttpSendRequestExW); | ||
bb!(HttpSendRequestW); | ||
bb!(InternetAttemptConnect); | ||
bb!(InternetAutodial); | ||
bb!(InternetAutodialHangup); | ||
bb!(InternetCanonicalizeUrlA); | ||
bb!(InternetCanonicalizeUrlW); | ||
bb!(InternetCheckConnectionA); | ||
bb!(InternetCheckConnectionW); | ||
bb!(InternetClearAllPerSiteCookieDecisions); | ||
bb!(InternetCloseHandle); | ||
bb!(InternetCombineUrlA); | ||
bb!(InternetCombineUrlW); | ||
bb!(InternetConfirmZoneCrossingA); | ||
bb!(InternetConfirmZoneCrossingW); | ||
bb!(InternetConnectA); | ||
bb!(InternetConnectW); | ||
bb!(InternetDialA); | ||
bb!(InternetDialW); | ||
bb!(InternetEnumPerSiteCookieDecisionA); | ||
bb!(InternetEnumPerSiteCookieDecisionW); | ||
bb!(InternetErrorDlg); | ||
bb!(InternetFindNextFileA); | ||
bb!(InternetFindNextFileW); | ||
bb!(InternetGetConnectedState); | ||
bb!(InternetGetConnectedStateExA); | ||
bb!(InternetGetConnectedStateExW); | ||
bb!(InternetGetCookieA); | ||
bb!(InternetGetCookieExA); | ||
bb!(InternetGetCookieExW); | ||
bb!(InternetGetCookieW); | ||
bb!(InternetGetLastResponseInfoA); | ||
bb!(InternetGetLastResponseInfoW); | ||
bb!(InternetGetPerSiteCookieDecisionA); | ||
bb!(InternetGetPerSiteCookieDecisionW); | ||
bb!(InternetGoOnlineA); | ||
bb!(InternetGoOnlineW); | ||
bb!(InternetHangUp); | ||
bb!(InternetInitializeAutoProxyDll); | ||
bb!(InternetLockRequestFile); | ||
bb!(InternetOpenA); | ||
bb!(InternetOpenUrlA); | ||
bb!(InternetOpenUrlW); | ||
bb!(InternetOpenW); | ||
bb!(InternetQueryDataAvailable); | ||
bb!(InternetQueryOptionA); | ||
bb!(InternetQueryOptionW); | ||
bb!(InternetReadFile); | ||
bb!(InternetReadFileExA); | ||
bb!(InternetReadFileExW); | ||
bb!(InternetSetCookieA); | ||
bb!(InternetSetCookieExA); | ||
bb!(InternetSetCookieExW); | ||
bb!(InternetSetCookieW); | ||
bb!(InternetSetDialStateA); | ||
bb!(InternetSetDialStateW); | ||
bb!(InternetSetFilePointer); | ||
bb!(InternetSetOptionA); | ||
bb!(InternetSetOptionExA); | ||
bb!(InternetSetOptionExW); | ||
bb!(InternetSetOptionW); | ||
bb!(InternetSetPerSiteCookieDecisionA); | ||
bb!(InternetSetPerSiteCookieDecisionW); | ||
bb!(InternetSetStatusCallbackA); | ||
bb!(InternetSetStatusCallbackW); | ||
bb!(InternetTimeFromSystemTimeA); | ||
bb!(InternetTimeFromSystemTimeW); | ||
bb!(InternetTimeToSystemTimeA); | ||
bb!(InternetTimeToSystemTimeW); | ||
bb!(InternetUnlockRequestFile); | ||
bb!(InternetWriteFile); | ||
bb!(PrivacyGetZonePreferenceW); | ||
bb!(PrivacySetZonePreferenceW); | ||
bb!(ReadUrlCacheEntryStream); | ||
bb!(ResumeSuspendedDownload); | ||
bb!(RetrieveUrlCacheEntryFileA); | ||
bb!(RetrieveUrlCacheEntryFileW); | ||
bb!(RetrieveUrlCacheEntryStreamA); | ||
bb!(RetrieveUrlCacheEntryStreamW); | ||
bb!(SetUrlCacheEntryGroupA); | ||
bb!(SetUrlCacheEntryGroupW); | ||
bb!(SetUrlCacheEntryInfoA); | ||
bb!(SetUrlCacheEntryInfoW); | ||
bb!(SetUrlCacheGroupAttributeA); | ||
bb!(SetUrlCacheGroupAttributeW); | ||
bb!(UnlockUrlCacheEntryFileA); | ||
bb!(UnlockUrlCacheEntryFileW); | ||
bb!(UnlockUrlCacheEntryStream); | ||
} | ||
#[cfg(not(target_env="gnu"))] | ||
#[test] | ||
fn functions_missing_in_mingw() { | ||
bb!(DeleteWpadCacheForNetworks); | ||
bb!(InternetFreeCookies); | ||
bb!(InternetGetCookieEx2); | ||
bb!(InternetSetCookieEx2); | ||
bb!(ReadUrlCacheEntryStreamEx); | ||
} |