/usr/include/x86_64-linux-gnu/winpr/credui.h is in libwinpr-dev 1.1.0~git20140921.1.440916e+dfsg1-13+deb9u3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | /**
* WinPR: Windows Portable Runtime
* Credentials Management UI
*
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef WINPR_CREDUI_H
#define WINPR_CREDUI_H
#include <winpr/winpr.h>
#include <winpr/wtypes.h>
#include <winpr/sspi.h>
#include <winpr/error.h>
#include <winpr/credentials.h>
#ifdef _WIN32
#include <wincred.h>
#else
#define CREDUI_MAX_MESSAGE_LENGTH 32767
#define CREDUI_MAX_CAPTION_LENGTH 128
#define CREDUI_MAX_GENERIC_TARGET_LENGTH CRED_MAX_GENERIC_TARGET_NAME_LENGTH
#define CREDUI_MAX_DOMAIN_TARGET_LENGTH CRED_MAX_DOMAIN_TARGET_NAME_LENGTH
#define CREDUI_MAX_USERNAME_LENGTH CRED_MAX_USERNAME_LENGTH
#define CREDUI_MAX_PASSWORD_LENGTH (CRED_MAX_CREDENTIAL_BLOB_SIZE / 2)
#define CREDUI_FLAGS_INCORRECT_PASSWORD 0x00000001
#define CREDUI_FLAGS_DO_NOT_PERSIST 0x00000002
#define CREDUI_FLAGS_REQUEST_ADMINISTRATOR 0x00000004
#define CREDUI_FLAGS_EXCLUDE_CERTIFICATES 0x00000008
#define CREDUI_FLAGS_REQUIRE_CERTIFICATE 0x00000010
#define CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX 0x00000040
#define CREDUI_FLAGS_ALWAYS_SHOW_UI 0x00000080
#define CREDUI_FLAGS_REQUIRE_SMARTCARD 0x00000100
#define CREDUI_FLAGS_PASSWORD_ONLY_OK 0x00000200
#define CREDUI_FLAGS_VALIDATE_USERNAME 0x00000400
#define CREDUI_FLAGS_COMPLETE_USERNAME 0x00000800
#define CREDUI_FLAGS_PERSIST 0x00001000
#define CREDUI_FLAGS_SERVER_CREDENTIAL 0x00004000
#define CREDUI_FLAGS_EXPECT_CONFIRMATION 0x00020000
#define CREDUI_FLAGS_GENERIC_CREDENTIALS 0x00040000
#define CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS 0x00080000
#define CREDUI_FLAGS_KEEP_USERNAME 0x00100000
#define CREDUIWIN_GENERIC 0x00000001
#define CREDUIWIN_CHECKBOX 0x00000002
#define CREDUIWIN_AUTHPACKAGE_ONLY 0x00000010
#define CREDUIWIN_IN_CRED_ONLY 0x00000020
#define CREDUIWIN_ENUMERATE_ADMINS 0x00000100
#define CREDUIWIN_ENUMERATE_CURRENT_USER 0x00000200
#define CREDUIWIN_SECURE_PROMPT 0x00001000
#define CREDUIWIN_PACK_32_WOW 0x10000000
typedef HANDLE HWND;
typedef HANDLE HBITMAP;
typedef struct _CREDUI_INFOA
{
DWORD cbSize;
HWND hwndParent;
PCSTR pszMessageText;
PCSTR pszCaptionText;
HBITMAP hbmBanner;
} CREDUI_INFOA, *PCREDUI_INFOA;
typedef struct _CREDUI_INFOW
{
DWORD cbSize;
HWND hwndParent;
PCWSTR pszMessageText;
PCWSTR pszCaptionText;
HBITMAP hbmBanner;
} CREDUI_INFOW, *PCREDUI_INFOW;
#ifdef UNICODE
#define CREDUI_INFO CREDUI_INFOW
#define PCREDUI_INFO PCREDUI_INFOW
#else
#define CREDUI_INFO CREDUI_INFOA
#define PCREDUI_INFO PCREDUI_INFOA
#endif
#ifdef __cplusplus
extern "C" {
#endif
WINPR_API DWORD CredUIPromptForCredentialsW(PCREDUI_INFOW pUiInfo, PCWSTR pszTargetName,
PCtxtHandle pContext, DWORD dwAuthError, PWSTR pszUserName, ULONG ulUserNameBufferSize,
PWSTR pszPassword, ULONG ulPasswordBufferSize, BOOL* save, DWORD dwFlags);
WINPR_API DWORD CredUIPromptForCredentialsA(PCREDUI_INFOA pUiInfo, PCSTR pszTargetName,
PCtxtHandle pContext, DWORD dwAuthError, PSTR pszUserName, ULONG ulUserNameBufferSize,
PSTR pszPassword, ULONG ulPasswordBufferSize, BOOL* save, DWORD dwFlags);
WINPR_API DWORD CredUIParseUserNameW(CONST WCHAR* UserName, WCHAR* user, ULONG userBufferSize, WCHAR* domain, ULONG domainBufferSize);
WINPR_API DWORD CredUIParseUserNameA(CONST CHAR* userName, CHAR* user, ULONG userBufferSize, CHAR* domain, ULONG domainBufferSize);
WINPR_API DWORD CredUICmdLinePromptForCredentialsW(PCWSTR pszTargetName, PCtxtHandle pContext,
DWORD dwAuthError, PWSTR UserName, ULONG ulUserBufferSize, PWSTR pszPassword,
ULONG ulPasswordBufferSize, PBOOL pfSave, DWORD dwFlags);
WINPR_API DWORD CredUICmdLinePromptForCredentialsA(PCSTR pszTargetName, PCtxtHandle pContext,
DWORD dwAuthError, PSTR UserName, ULONG ulUserBufferSize, PSTR pszPassword,
ULONG ulPasswordBufferSize, PBOOL pfSave, DWORD dwFlags);
WINPR_API DWORD CredUIConfirmCredentialsW(PCWSTR pszTargetName, BOOL bConfirm);
WINPR_API DWORD CredUIConfirmCredentialsA(PCSTR pszTargetName, BOOL bConfirm);
WINPR_API DWORD CredUIStoreSSOCredW(PCWSTR pszRealm, PCWSTR pszUsername, PCWSTR pszPassword, BOOL bPersist);
WINPR_API DWORD CredUIStoreSSOCredA(PCSTR pszRealm, PCSTR pszUsername, PCSTR pszPassword, BOOL bPersist);
WINPR_API DWORD CredUIReadSSOCredW(PCWSTR pszRealm, PWSTR* ppszUsername);
WINPR_API DWORD CredUIReadSSOCredA(PCSTR pszRealm, PSTR* ppszUsername);
#ifdef __cplusplus
}
#endif
#ifdef UNICODE
#define CredUIPromptForCredentials CredUIPromptForCredentialsW
#define CredUIParseUserName CredUIParseUserNameW
#define CredUICmdLinePromptForCredentials CredUICmdLinePromptForCredentialsW
#define CredUIConfirmCredentials CredUIConfirmCredentialsW
#define CredUIStoreSSOCred CredUIStoreSSOCredW
#define CredUIReadSSOCred CredUIReadSSOCredW
#else
#define CredUIPromptForCredentials CredUIPromptForCredentialsA
#define CredUIParseUserName CredUIParseUserNameA
#define CredUICmdLinePromptForCredentials CredUICmdLinePromptForCredentialsA
#define CredUIConfirmCredentials CredUIConfirmCredentialsA
#define CredUIStoreSSOCred CredUIStoreSSOCredA
#define CredUIReadSSOCred CredUIReadSSOCredA
#endif
#endif
#endif /* WINPR_CREDUI_H */
|