1
/*********************************************************
2
* Copyright (C) 2006 VMware, Inc. All rights reserved.
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License as published
6
* by the Free Software Foundation version 2.1 and no later version.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10
* or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
11
* License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program; if not, write to the Free Software Foundation, Inc.,
15
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
*********************************************************/
22
* ProductState is a runtime encapsulation of the identity of a product
23
* and product dependent characteristics.
27
#ifndef _PRODUCT_STATE_H_
28
#define _PRODUCT_STATE_H_
30
#include "vm_basic_types.h"
39
PRODUCT_WORKSTATION = 1 << 0,
40
PRODUCT_SERVER = 1 << 1,
42
PRODUCT_PLAYER = 1 << 3,
43
PRODUCT_TOOLS = 1 << 4,
44
PRODUCT_VDM_CLIENT = 1 << 5,
46
PRODUCT_FUSION = 1 << 7,
49
typedef uint64 ProductMask;
51
typedef uint64 ProductCaps;
55
* #define PRODUCT_CAP_FOO (1 << 0)
59
PRODUCTSTATE_FLAG_NONE = 0,
60
PRODUCTSTATE_FLAG_PRODUCT = 1 << 0,
61
PRODUCTSTATE_FLAG_NAME = 1 << 1,
62
PRODUCTSTATE_FLAG_VERSION = 1 << 2,
63
PRODUCTSTATE_FLAG_BUILDNUMBER = 1 << 3,
64
PRODUCTSTATE_FLAG_CAPABILITIES = 1 << 4,
65
PRODUCTSTATE_FLAG_LICENSENAME = 1 << 5,
66
PRODUCTSTATE_FLAG_LICENSEVERSION = 1 << 6,
67
} ProductStateSerializationFlags;
72
* It is not generally safe to cache returned const pointers; if a caller
73
* wants to cache a value, they should copy it.
76
void ProductState_Set(Product product, const char *name, const char *version,
77
unsigned int buildNumber, ProductCaps capabilities,
78
const char *licenseName, const char *licenseVersion);
79
void ProductState_Reset(void);
81
Product ProductState_GetProduct(void);
82
Bool ProductState_IsProduct(ProductMask product);
83
const char *ProductState_GetName(void);
84
const char *ProductState_GetVersion(void);
85
unsigned int ProductState_GetBuildNumber(void);
86
ProductCaps ProductState_GetCapabilities(void);
87
const char *ProductState_GetLicenseName(void);
88
const char *ProductState_GetLicenseVersion(void);
91
const char *ProductState_GetFullVersion(void);
92
const char *ProductState_GetBuildNumberString(void);
93
const char *ProductState_GetRegistryPath(void);
94
char *ProductState_GetRegistryPathForProduct(const char *productName);
95
void ProductState_GetVersionNumber(unsigned int *major, unsigned int *minor,
96
unsigned int *patchLevel);
98
char *ProductState_Serialize(ProductStateSerializationFlags flags);
99
ProductStateSerializationFlags ProductState_Deserialize(const char *state);
102
#endif /* _PRODUCT_STATE_H_ */