aboutsummaryrefslogtreecommitdiff
path: root/src/api/burn/balutil/inc/balretry.h
blob: 35282a7e8a9d4e2a8c1dfbeee135396c030dba5a (plain)
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
#pragma once
// 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.


#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************
 BalRetryInitialize - initialize the retry count and timeout between
                      retries (in milliseconds).
********************************************************************/
DAPI_(void) BalRetryInitialize(
    __in DWORD dwMaxRetries,
    __in DWORD dwTimeout
    );

/*******************************************************************
 BalRetryUninitialize - call to cleanup any memory allocated during
                        use of the retry utility.
********************************************************************/
DAPI_(void) BalRetryUninitialize();

/*******************************************************************
 BalRetryStartPackage - call when a package begins to be modified. If
                        the package is being retried, the function will
                        wait the specified timeout.
********************************************************************/
DAPI_(void) BalRetryStartPackage(
    __in_z LPCWSTR wzPackageId
    );

/*******************************************************************
 BalRetryErrorOccured - call when an error occurs for the retry utility
                        to consider.
********************************************************************/
DAPI_(void) BalRetryErrorOccurred(
    __in_z LPCWSTR wzPackageId,
    __in DWORD dwError
    );

/*******************************************************************
 BalRetryEndPackage - returns TRUE if a retry is recommended.
********************************************************************/
DAPI_(HRESULT) BalRetryEndPackage(
    __in_z LPCWSTR wzPackageId,
    __in HRESULT hrError,
    __inout BOOL* pfRetry
    );

/*******************************************************************
 BalRetryStartContainerOrPayload - call when a container or payload
        begins to be acquired. If the target is being retried,
        the function will wait the specified timeout.
********************************************************************/
DAPI_(void) BalRetryStartContainerOrPayload(
    __in_z_opt LPCWSTR wzContainerOrPackageId,
    __in_z_opt LPCWSTR wzPayloadId
    );

/*******************************************************************
 BalRetryEndContainerOrPayload - returns TRUE if a retry is recommended.
********************************************************************/
DAPI_(HRESULT) BalRetryEndContainerOrPayload(
    __in_z_opt LPCWSTR wzContainerOrPackageId,
    __in_z_opt LPCWSTR wzPayloadId,
    __in HRESULT hrError,
    __inout BOOL* pfRetry
    );


#ifdef __cplusplus
}
#endif