diff options
Diffstat (limited to '')
-rw-r--r-- | src/balutil/inc/balretry.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/balutil/inc/balretry.h b/src/balutil/inc/balretry.h new file mode 100644 index 00000000..040ab4ae --- /dev/null +++ b/src/balutil/inc/balretry.h | |||
@@ -0,0 +1,65 @@ | |||
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 | typedef enum BALRETRY_TYPE | ||
10 | { | ||
11 | BALRETRY_TYPE_CACHE, | ||
12 | BALRETRY_TYPE_EXECUTE, | ||
13 | } BALRETRY_TYPE; | ||
14 | |||
15 | /******************************************************************* | ||
16 | BalRetryInitialize - initialize the retry count and timeout between | ||
17 | retries (in milliseconds). | ||
18 | ********************************************************************/ | ||
19 | DAPI_(void) BalRetryInitialize( | ||
20 | __in DWORD dwMaxRetries, | ||
21 | __in DWORD dwTimeout | ||
22 | ); | ||
23 | |||
24 | /******************************************************************* | ||
25 | BalRetryUninitialize - call to cleanup any memory allocated during | ||
26 | use of the retry utility. | ||
27 | ********************************************************************/ | ||
28 | DAPI_(void) BalRetryUninitialize(); | ||
29 | |||
30 | /******************************************************************* | ||
31 | BalRetryStartPackage - call when a package begins to be modified. If | ||
32 | the package is being retried, the function will | ||
33 | wait the specified timeout. | ||
34 | ********************************************************************/ | ||
35 | DAPI_(void) BalRetryStartPackage( | ||
36 | __in BALRETRY_TYPE type, | ||
37 | __in_z_opt LPCWSTR wzPackageId, | ||
38 | __in_z_opt LPCWSTR wzPayloadId | ||
39 | ); | ||
40 | |||
41 | /******************************************************************* | ||
42 | BalRetryErrorOccured - call when an error occurs for the retry utility | ||
43 | to consider. | ||
44 | ********************************************************************/ | ||
45 | DAPI_(void) BalRetryErrorOccurred( | ||
46 | __in_z_opt LPCWSTR wzPackageId, | ||
47 | __in DWORD dwError | ||
48 | ); | ||
49 | |||
50 | /******************************************************************* | ||
51 | BalRetryEndPackage - returns IDRETRY is a retry is recommended or | ||
52 | IDNOACTION if a retry is not recommended. | ||
53 | ********************************************************************/ | ||
54 | DAPI_(HRESULT) BalRetryEndPackage( | ||
55 | __in BALRETRY_TYPE type, | ||
56 | __in_z_opt LPCWSTR wzPackageId, | ||
57 | __in_z_opt LPCWSTR wzPayloadId, | ||
58 | __in HRESULT hrError, | ||
59 | __inout BOOL* pfRetry | ||
60 | ); | ||
61 | |||
62 | |||
63 | #ifdef __cplusplus | ||
64 | } | ||
65 | #endif | ||