~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to lib/include/productState.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*********************************************************
2
 
 * Copyright (C) 2006 VMware, Inc. All rights reserved.
3
 
 *
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.
7
 
 *
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.
12
 
 *
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.
16
 
 *
17
 
 *********************************************************/
18
 
 
19
 
/*
20
 
 * productState.h --
21
 
 *
22
 
 *      ProductState is a runtime encapsulation of the identity of a product
23
 
 *      and product dependent characteristics.
24
 
 */
25
 
 
26
 
 
27
 
#ifndef _PRODUCT_STATE_H_
28
 
#define _PRODUCT_STATE_H_
29
 
 
30
 
#include "vm_basic_types.h"
31
 
 
32
 
 
33
 
/*
34
 
 * Public types.
35
 
 */
36
 
 
37
 
typedef enum {
38
 
   PRODUCT_GENERIC = 0,
39
 
   PRODUCT_WORKSTATION = 1 << 0,
40
 
   PRODUCT_SERVER = 1 << 1,
41
 
   PRODUCT_ESX = 1 << 2,
42
 
   PRODUCT_PLAYER = 1 << 3,
43
 
   PRODUCT_TOOLS = 1 << 4,
44
 
   PRODUCT_VDM_CLIENT = 1 << 5,
45
 
   PRODUCT_CVP = 1 << 6,
46
 
   PRODUCT_FUSION = 1 << 7,
47
 
   /* etc */
48
 
} Product;
49
 
typedef uint64 ProductMask;
50
 
 
51
 
typedef uint64 ProductCaps;
52
 
/*
53
 
 * Define as needed.
54
 
 *
55
 
 * #define PRODUCT_CAP_FOO (1 << 0)
56
 
 */
57
 
 
58
 
typedef enum {
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;
68
 
 
69
 
/*
70
 
 * Public functions.
71
 
 *
72
 
 * It is not generally safe to cache returned const pointers; if a caller
73
 
 * wants to cache a value, they should copy it.
74
 
 */
75
 
 
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);
80
 
 
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);
89
 
/* etc */
90
 
 
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);
97
 
 
98
 
char *ProductState_Serialize(ProductStateSerializationFlags flags);
99
 
ProductStateSerializationFlags ProductState_Deserialize(const char *state);
100
 
 
101
 
 
102
 
#endif /* _PRODUCT_STATE_H_ */