1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _INC_WDSCLIENTAPI 7 #define _INC_WDSCLIENTAPI 8 #include <wdstpdi.h> 9 #if (_WIN32_WINNT >= 0x0600) 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 #ifndef WDSTCIAPI 16 #define WDSTCIAPI WINAPI 17 #endif 18 19 /* Wdstptc.dll is missing an implib because Vista clients don't have the dll to generate it from */ 20 21 typedef VOID (CALLBACK *PFN_WdsTransportClientReceiveContents)( 22 HANDLE hSessionKey, 23 PVOID pCallerData, 24 PVOID pMetadata, 25 ULONG ulSize, 26 PULARGE_INTEGER pContentOffset 27 ); 28 29 typedef VOID (CALLBACK *PFN_WdsTransportClientReceiveMetadata)( 30 HANDLE hSessionKey, 31 PVOID pCallerData, 32 PVOID pMetadata, 33 ULONG ulSize 34 ); 35 36 typedef VOID (CALLBACK *PFN_WdsTransportClientSessionComplete)( 37 HANDLE hSessionKey, 38 PVOID pCallerData, 39 DWORD dwError 40 ); 41 42 typedef VOID (CALLBACK *PFN_WdsTransportClientSessionStart)( 43 HANDLE hSessionKey, 44 PVOID pCallerData, 45 PULARGE_INTEGER FileSize 46 ); 47 48 typedef VOID (CALLBACK *PFN_WdsTransportClientSessionStartEx)( 49 HANDLE hSessionKey, 50 PVOID pCallerData, 51 PTRANSPORTCLIENT_SESSION_INFO Info 52 ); 53 54 typedef enum _TRANSPORTCLIENT_CALLBACK_ID { 55 WDS_TRANSPORTCLIENT_SESSION_START = 0, 56 WDS_TRANSPORTCLIENT_RECEIVE_CONTENTS = 1, 57 WDS_TRANSPORTCLIENT_SESSION_COMPLETE = 2, 58 WDS_TRANSPORTCLIENT_RECEIVE_METADATA = 3, 59 WDS_TRANSPORTCLIENT_SESSION_STARTEX = 4, 60 WDS_TRANSPORTCLIENT_MAX_CALLBACKS = 5 61 } TRANSPORTCLIENT_CALLBACK_ID,*PTRANSPORTCLIENT_CALLBACK_ID; 62 63 typedef struct _TRANSPORTCLIENT_SESSION_INFO { 64 ULONG ulStructureLength; 65 ULARGE_INTEGER ullFileSize; 66 ULONG ulBlockSize; 67 } TRANSPORTCLIENT_SESSION_INFO, *PTRANSPORTCLIENT_SESSION_INFO; 68 69 #define WDS_TRANSPORT_CLIENT_CURRENT_API_VERSION 1 70 71 #define WDS_TRANSPORTCLIENT_AUTH 1 72 #define WDS_TRANSPORTCLIENT_NO_AUTH 2 73 74 #define WDS_TRANSPORTCLIENT_PROTOCOL_MULTICAST 1 75 76 typedef struct _WDS_TRANSPORTCLIENT_REQUEST { 77 ULONG ulLength; 78 ULONG ulApiVersion; 79 ULONG ulAuthLevel; 80 LPCWSTR pwszServer; 81 LPCWSTR pwszNamespace; 82 LPCWSTR pwszObjectName; 83 ULONG ulCacheSize; 84 ULONG ulProtocol; 85 PVOID pvProtocolData; 86 ULONG ulProtocolDataLength; 87 } WDS_TRANSPORTCLIENT_REQUEST, *PWDS_TRANSPORTCLIENT_REQUEST; 88 89 DWORD WDSTCIAPI WdsTransportClientStartSession( 90 HANDLE hSessionKey 91 ); 92 93 DWORD WDSTCIAPI WdsTransportClientAddRefBuffer( 94 PVOID pvBuffer 95 ); 96 97 DWORD WDSTCIAPI WdsTransportClientCancelSession( 98 HANDLE hSessionKey 99 ); 100 101 DWORD WDSTCIAPI WdsTransportClientCloseSession( 102 HANDLE hSessionKey 103 ); 104 105 DWORD WDSTCIAPI WdsTransportClientCompleteReceive( 106 HANDLE hSessionKey, 107 HANDLE ulSize, 108 PULARGE_INTEGER pullOffset 109 ); 110 111 DWORD WDSTCIAPI WdsTransportClientInitialize(void); 112 113 DWORD WDSTCIAPI WdsTransportClientInitializeSession( 114 PWDS_TRANSPORTCLIENT_REQUEST pSessionRequest, 115 PVOID pCallerData, 116 PHANDLE hSessionKey 117 ); 118 119 DWORD WDSTCIAPI WdsTransportClientQueryStatus( 120 HANDLE hSessionKey, 121 PULONG puStatus, 122 PULONG puErrorCode 123 ); 124 125 DWORD WDSTCIAPI WdsTransportClientRegisterCallback( 126 HANDLE hSessionKey, 127 TRANSPORTCLIENT_CALLBACK_ID CallbackId, 128 PVOID pfnCallback 129 ); 130 131 DWORD WDSTCIAPI WdsTransportClientReleaseBuffer( 132 PVOID pvBuffer 133 ); 134 135 DWORD WDSTCIAPI WdsTransportClientShutdown(void); 136 137 DWORD WDSTCIAPI WdsTransportClientWaitForCompletion( 138 HANDLE hSessionKey, 139 ULONG uTimeout 140 ); 141 142 #ifdef __cplusplus 143 } 144 #endif 145 #endif /*(_WIN32_WINNT >= 0x0600)*/ 146 #endif /*_INC_WDSCLIENTAPI*/ 147