summaryrefslogtreecommitdiff
path: root/src/inc/shim/locationinfo.h
blob: d6a1b6d0b40cc89abcae8105ee4469aacef11ec8 (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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
// locationinfo.h
//
// Enum describing different types of locations for coreCLR
// 
// Note: must be platform independent
//
// ======================================================================================


#ifndef LOCATIONINFO_H
#define LOCATIONINFO_H


// in order of preference, smaller is better
enum LocationInfo
{
    Loc_System=1,
    Loc_Machine=2,
    Loc_User=3,
    Loc_Network=4,
    Loc_Undefined =0xffff
};

// Returns the more preferred of two locations
//
// Assumptions: LocationInfo is defined in a manner that a smaller value is better
//
// Input:
// locations to compare
//
// Output: 
// the preferred location
inline LocationInfo BetterLocation(LocationInfo l1, LocationInfo l2)
{
    return l1<l2?l1:l2;
};

#endif //  LOCATIONINFO_H