| 1 | #pragma once |
| 2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 3 | |
| 4 | |
| 5 | #ifdef __cplusplus |
| 6 | extern "C" { |
| 7 | #endif |
| 8 | |
| 9 | /******************************************************************* |
| 10 | BalRetryInitialize - initialize the retry count and timeout between |
| 11 | retries (in milliseconds). |
| 12 | ********************************************************************/ |
| 13 | DAPI_(void) BalRetryInitialize( |
| 14 | __in DWORD dwMaxRetries, |
| 15 | __in DWORD dwTimeout |
| 16 | ); |
| 17 | |
| 18 | /******************************************************************* |
| 19 | BalRetryUninitialize - call to cleanup any memory allocated during |
| 20 | use of the retry utility. |
| 21 | ********************************************************************/ |
| 22 | DAPI_(void) BalRetryUninitialize(); |
| 23 | |
| 24 | /******************************************************************* |
| 25 | BalRetryStartPackage - call when a package begins to be modified. If |
| 26 | the package is being retried, the function will |
| 27 | wait the specified timeout. |
| 28 | ********************************************************************/ |
| 29 | DAPI_(void) BalRetryStartPackage( |
| 30 | __in_z LPCWSTR wzPackageId |
| 31 | ); |
| 32 | |
| 33 | /******************************************************************* |
| 34 | BalRetryErrorOccured - call when an error occurs for the retry utility |
| 35 | to consider. |
| 36 | ********************************************************************/ |
| 37 | DAPI_(void) BalRetryErrorOccurred( |
| 38 | __in_z LPCWSTR wzPackageId, |
| 39 | __in DWORD dwError |
| 40 | ); |
| 41 | |
| 42 | /******************************************************************* |
| 43 | BalRetryEndPackage - returns TRUE if a retry is recommended. |
| 44 | ********************************************************************/ |
| 45 | DAPI_(HRESULT) BalRetryEndPackage( |
| 46 | __in_z LPCWSTR wzPackageId, |
| 47 | __in HRESULT hrError, |
| 48 | __inout BOOL* pfRetry |
| 49 | ); |
| 50 | |
| 51 | /******************************************************************* |
| 52 | BalRetryStartContainerOrPayload - call when a container or payload |
| 53 | begins to be acquired. If the target is being retried, |
| 54 | the function will wait the specified timeout. |
| 55 | ********************************************************************/ |
| 56 | DAPI_(void) BalRetryStartContainerOrPayload( |
| 57 | __in_z_opt LPCWSTR wzContainerOrPackageId, |
| 58 | __in_z_opt LPCWSTR wzPayloadId |
| 59 | ); |
| 60 | |
| 61 | /******************************************************************* |
| 62 | BalRetryEndContainerOrPayload - returns TRUE if a retry is recommended. |
| 63 | ********************************************************************/ |
| 64 | DAPI_(HRESULT) BalRetryEndContainerOrPayload( |
| 65 | __in_z_opt LPCWSTR wzContainerOrPackageId, |
| 66 | __in_z_opt LPCWSTR wzPayloadId, |
| 67 | __in HRESULT hrError, |
| 68 | __inout BOOL* pfRetry |
| 69 | ); |
| 70 | |
| 71 | |
| 72 | #ifdef __cplusplus |
| 73 | } |
| 74 | #endif |