(file) Return to WMIFlavor.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / WMIMapper / WMIProvider

  1 karl  1.6 //%2006////////////////////////////////////////////////////////////////////////
  2 kumpf 1.1 //
  3 karl  1.4 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4           // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6 karl  1.3 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.4 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8           // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl  1.5 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.6 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12           // EMC Corporation; Symantec Corporation; The Open Group.
 13 kumpf 1.1 //
 14           // Permission is hereby granted, free of charge, to any person obtaining a copy
 15           // of this software and associated documentation files (the "Software"), to
 16           // deal in the Software without restriction, including without limitation the
 17           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18           // sell copies of the Software, and to permit persons to whom the Software is
 19           // furnished to do so, subject to the following conditions:
 20 karl  1.4 // 
 21 kumpf 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29           //
 30           //==============================================================================
 31           //
 32           // Author: Chip Vincent (cvincent@us.ibm.com)
 33           //
 34           // Modified By: Barbara Packard (barbara_packard@hp.com)
 35           //
 36           //%/////////////////////////////////////////////////////////////////////////////
 37           
 38           #include "StdAfx.h"
 39           
 40           #include "WMIFlavor.h"
 41           
 42 kumpf 1.1 PEGASUS_NAMESPACE_BEGIN
 43           
 44           WMIFlavor::WMIFlavor(const CIMFlavor & flavor) : CIMFlavor(flavor) //, _ui32(0)
 45           {
 46           }
 47           
 48           WMIFlavor::WMIFlavor(const LONG flavor) // : _ui32(0)
 49           {
 50              if(flavor & WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE) {
 51           //      _ui32 |= TOINSTANCE;
 52           	   addFlavor(TOINSTANCE);
 53              }
 54           
 55              if(flavor & WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS) {
 56           //      _ui32 |= TOSUBCLASS;
 57           	   addFlavor(TOSUBCLASS);
 58              }
 59           
 60              if(flavor & WBEM_FLAVOR_OVERRIDABLE) {
 61           //      _ui32 |= OVERRIDABLE;
 62           	   addFlavor(OVERRIDABLE);
 63 kumpf 1.1    }
 64           
 65              if(flavor & WBEM_FLAVOR_MASK_PROPAGATION) {
 66                 //_ui32 = NONE;
 67              }
 68           
 69              if(flavor &WBEM_FLAVOR_DONT_PROPAGATE) {
 70                 //_ui32 = NONE;
 71              }
 72           
 73              if(flavor & WBEM_FLAVOR_NOT_OVERRIDABLE) {
 74                 //_ui32 = NONE;
 75              }
 76           
 77              if(flavor & WBEM_FLAVOR_MASK_PERMISSIONS) {
 78                 //_ui32 = NONE;
 79              }
 80           
 81              if(flavor & WBEM_FLAVOR_ORIGIN_LOCAL) {
 82                 //_ui32 = NONE;
 83              }
 84 kumpf 1.1 
 85              if(flavor & WBEM_FLAVOR_ORIGIN_PROPAGATED) {
 86                 //_ui32 = NONE;
 87              }
 88           
 89              if(flavor & WBEM_FLAVOR_ORIGIN_SYSTEM) {
 90                 //_ui32 = NONE;
 91              }
 92           
 93              if(flavor & WBEM_FLAVOR_MASK_ORIGIN) {
 94                 //_ui32 = NONE;
 95              }
 96           
 97              if(flavor & WBEM_FLAVOR_NOT_AMENDED) {
 98                 //_ui32 = NONE;
 99              }
100           
101              if(flavor & WBEM_FLAVOR_AMENDED) {
102                 //_ui32 = NONE;
103              }
104           
105 kumpf 1.1    if(flavor & WBEM_FLAVOR_MASK_AMENDED) {
106                 //_ui32 = NONE;
107              }
108           }
109           
110           /*
111           WMIFlavor::operator Uint32(void) const
112           {
113              return(_ui32);
114           }
115           
116 kumpf 1.2 
117 kumpf 1.1 WMIFlavor::operator LONG(void) const
118           {
119 kumpf 1.2    return LONG(cimFlavor);
120           }
121           */
122 kumpf 1.1 
123 kumpf 1.2 /////////////////////////////////////////////////////////////////////////////
124           // WMIFlavor::getAsWMIValue - maps the flavor values from CIM to WMI
125           //
126           // ///////////////////////////////////////////////////////////////////////////
127           long WMIFlavor::getAsWMIValue ()
128           {
129           	long wmiVal = 0;
130           	if (hasFlavor(CIMFlavor::OVERRIDABLE))
131           		wmiVal |= WBEM_FLAVOR_OVERRIDABLE;
132           	if (hasFlavor(CIMFlavor::OVERRIDABLE))
133           		wmiVal |= WBEM_FLAVOR_OVERRIDABLE;
134           	if (hasFlavor(CIMFlavor::TOSUBCLASS))
135           		wmiVal |= WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS;
136           	if (hasFlavor(CIMFlavor::TOINSTANCE))
137           		wmiVal |= WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE;
138           	if (hasFlavor(CIMFlavor::DISABLEOVERRIDE))
139           		wmiVal |= WBEM_FLAVOR_NOT_OVERRIDABLE;
140           	return wmiVal;
141 kumpf 1.1 }
142           
143           PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2