PyOW_CIMClient.cpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * Copyright (C) 2003-2004 Vintela, Inc. All rights reserved.
00003 *
00004 * Redistribution and use in source and binary forms, with or without
00005 * modification, are permitted provided that the following conditions are met:
00006 *
00007 *  - Redistributions of source code must retain the above copyright notice,
00008 *    this list of conditions and the following disclaimer.
00009 *
00010 *  - Redistributions in binary form must reproduce the above copyright notice,
00011 *    this list of conditions and the following disclaimer in the documentation
00012 *    and/or other materials provided with the distribution.
00013 *
00014 *  - Neither the name of Vintela, Inc. nor the names of its
00015 *    contributors may be used to endorse or promote products derived from this
00016 *    software without specific prior written permission.
00017 *
00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 * ARE DISCLAIMED. IN NO EVENT SHALL Vintela, Inc. OR THE CONTRIBUTORS
00022 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00028 * POSSIBILITY OF SUCH DAMAGE.
00029 *******************************************************************************/
00030 
00035 #include <OW_CIMClient.hpp>
00036 #include <OW_ResultHandlerIFC.hpp>
00037 #include <OW_CIMClassEnumeration.hpp>
00038 #include <OW_CIMParamValue.hpp>
00039 #include <OW_CIMQualifierType.hpp>
00040 #include <OW_CIMValue.hpp>
00041 #include <OW_CIMInstance.hpp>
00042 #include <OW_CIMObjectPath.hpp>
00043 // note this comes *after* the OpenWBEM headers, because it has a
00044 // #define ANY void
00045 // which really screws up OpenWBEM
00046 #include <boost/python.hpp>
00047 #ifdef ANY
00048 #undef ANY
00049 #endif
00050 
00051 namespace OW_NAMESPACE
00052 {
00053 
00054 using namespace boost::python;
00055  
00056 namespace {
00057 // CIMClient
00058 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_enumNameSpaceE_overloads, CIMClient::enumNameSpaceE, 0, 1)
00059 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_enumNameSpace_overloads, CIMClient::enumNameSpace, 1, 2)
00060 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_enumClass_overloads, CIMClient::enumClass, 2, 6)
00061 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_enumClassE_overloads, CIMClient::enumClassE, 1, 5)
00062 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_enumClassNames_overloads, CIMClient::enumClassNames, 2, 3)
00063 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_enumClassNamesE_overloads, CIMClient::enumClassNamesE, 1, 2)
00064 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_enumInstances_overloads, CIMClient::enumInstances, 2, 7)
00065 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_enumInstancesE_overloads, CIMClient::enumInstancesE, 1, 6)
00066 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_getClass_overloads, CIMClient::getClass, 1, 5)
00067 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_getInstance_overloads, CIMClient::getInstance, 1, 5)
00068 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_modifyInstance_overloads, CIMClient::modifyInstance, 1, 3)
00069 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00070 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_associatorNames_overloads, CIMClient::associatorNames, 2, 6)
00071 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_associatorNamesE_overloads, CIMClient::associatorNamesE, 1, 5)
00072 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_associators_overloads, CIMClient::associators, 2, 9)
00073 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_associatorsE_overloads, CIMClient::associatorsE, 1, 8)
00074 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_associatorsClasses_overloads, CIMClient::associatorsClasses, 2, 9)
00075 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_associatorsClassesE_overloads, CIMClient::associatorsClassesE, 1, 8)
00076 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_referenceNames_overloads, CIMClient::referenceNames, 2, 4)
00077 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_referenceNamesE_overloads, CIMClient::referenceNamesE, 1, 3)
00078 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_references_overloads, CIMClient::references, 2, 7)
00079 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_referencesE_overloads, CIMClient::referencesE, 1, 6)
00080 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_referencesClasses_overloads, CIMClient::referencesClasses, 2, 7)
00081 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(CIMClient_referencesClassesE_overloads, CIMClient::referencesClassesE, 1, 6)
00082 #endif
00083 }
00084 void registerCIMClient()
00085 {
00086    //    CIMClient
00087    class_<CIMClient>("CIMClient", init<const String&, const String&, optional<const ClientAuthCBIFCRef&> >())
00088       .def("setNameSpace", &CIMClient::setNameSpace)
00089       .def("getNameSpace", &CIMClient::getNameSpace)
00090 #if !defined(OW_DISABLE_INSTANCE_MANIPULATION) && !defined(OW_DISABLE_NAMESPACE_MANIPULATION)
00091       .def("createNameSpace", &CIMClient::createNameSpace)
00092       .def("deleteNameSpace", &CIMClient::deleteNameSpace)
00093 #endif
00094       .def("enumNameSpaceE", &CIMClient::enumNameSpaceE, CIMClient_enumNameSpaceE_overloads(args("deep")))
00095       .def("enumNameSpace", &CIMClient::enumNameSpace, CIMClient_enumNameSpace_overloads(args("deep")))
00096       .def("enumClass", &CIMClient::enumClass, CIMClient_enumClass_overloads(args("deep", "localOnly", "includeQualifiers", "includeClassOrigin")))
00097       .def("enumClassE", &CIMClient::enumClassE, CIMClient_enumClassE_overloads(args("deep", "localOnly", "includeQualifiers", "includeClassOrigin")))
00098       .def("enumClassNames", &CIMClient::enumClassNames, CIMClient_enumClassNames_overloads(args("deep")))
00099       .def("enumClassNamesE", &CIMClient::enumClassNamesE, CIMClient_enumClassNamesE_overloads(args("deep")))
00100       .def("enumInstances", &CIMClient::enumInstances, CIMClient_enumInstances_overloads(args("deep", "localOnly", "includeQualifiers", "includeClassOrigin", "propertyList")))
00101       .def("enumInstancesE", &CIMClient::enumInstancesE, CIMClient_enumInstancesE_overloads(args("deep", "localOnly", "includeQualifiers", "includeClassOrigin", "propertyList")))
00102       .def("enumInstanceNames", &CIMClient::enumInstanceNames)
00103       .def("enumInstanceNamesE", &CIMClient::enumInstanceNamesE)
00104       .def("getClass", &CIMClient::getClass, CIMClient_getClass_overloads(args("localOnly", "includeQualifiers", "includeClassOrigin", "propertyList")))
00105       .def("getInstance", &CIMClient::getInstance, CIMClient_getInstance_overloads(args("localOnly", "includeQualifiers", "includeClassOrigin", "propertyList")))
00106       .def("invokeMethod", &CIMClient::invokeMethod)
00107       .def("getQualifierType", &CIMClient::getQualifierType)
00108 #ifndef OW_DISABLE_QUALIFIER_DECLARATION
00109       .def("setQualifierType", &CIMClient::setQualifierType)
00110       .def("deleteQualifierType", &CIMClient::deleteQualifierType)
00111       .def("enumQualifierTypes", &CIMClient::enumQualifierTypes)
00112       .def("enumQualifierTypesE", &CIMClient::enumQualifierTypesE)
00113 #endif
00114 #ifndef OW_DISABLE_SCHEMA_MANIPULATION
00115       .def("modifyClass", &CIMClient::modifyClass)
00116       .def("createClass", &CIMClient::createClass)
00117       .def("deleteClass", &CIMClient::deleteClass)
00118 #endif
00119 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00120       .def("modifyInstance", &CIMClient::modifyInstance, CIMClient_modifyInstance_overloads(args("includeQualifiers", "propertyList")))
00121       .def("createInstance", &CIMClient::createInstance)
00122       .def("deleteInstance", &CIMClient::deleteInstance)
00123 #endif
00124       .def("getProperty", &CIMClient::getProperty)
00125       .def("setProperty", &CIMClient::setProperty)
00126 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00127       .def("associatorNames", &CIMClient::associatorNames, CIMClient_associatorNames_overloads(args("assocClass", "resultClass", "role", "resultRole")))
00128       .def("associatorNamesE", &CIMClient::associatorNamesE, CIMClient_associatorNamesE_overloads(args("assocClass", "resultClass", "role", "resultRole")))
00129       .def("associators", &CIMClient::associators, CIMClient_associators_overloads(args("assocClass", "resultClass", "role", "resultRole", "includeQualifiers", "includeClassOrigin", "propertyList")))
00130       .def("associatorsE", &CIMClient::associatorsE, CIMClient_associatorsE_overloads(args("assocClass", "resultClass", "role", "resultRole", "includeQualifiers", "includeClassOrigin", "propertyList")))
00131       .def("associatorsClasses", &CIMClient::associatorsClasses, CIMClient_associatorsClasses_overloads(args("assocClass", "resultClass", "role", "resultRole", "includeQualifiers", "includeClassOrigin", "propertyList")))
00132       .def("associatorsClassesE", &CIMClient::associatorsClassesE, CIMClient_associatorsClassesE_overloads(args("assocClass", "resultClass", "role", "resultRole", "includeQualifiers", "includeClassOrigin", "propertyList")))
00133       .def("referenceNames", &CIMClient::referenceNames, CIMClient_referenceNames_overloads(args("resultClass", "role")))
00134       .def("referenceNamesE", &CIMClient::referenceNamesE, CIMClient_referenceNamesE_overloads(args("resultClass", "role")))
00135       .def("references", &CIMClient::references, CIMClient_references_overloads(args("resultClass", "role", "includeQualifiers", "includeClassOrigin", "propertyList")))
00136       .def("referencesE", &CIMClient::referencesE, CIMClient_referencesE_overloads(args("resultClass", "role", "includeQualifiers", "includeClassOrigin", "propertyList")))
00137       .def("referencesClasses", &CIMClient::referencesClasses, CIMClient_referencesClasses_overloads(args("resultClass", "role", "includeQualifiers", "includeClassOrigin", "propertyList")))
00138       .def("referencesClassesE", &CIMClient::referencesClassesE, CIMClient_referencesClassesE_overloads(args("resultClass", "role", "includeQualifiers", "includeClassOrigin", "propertyList")))
00139 #endif
00140       .def("execQuery", &CIMClient::execQuery)
00141       .def("execQueryE", &CIMClient::execQueryE)
00142       ;
00143 }
00144 
00145 } // end namespace OW_NAMESPACE
00146 

Generated on Thu Feb 9 08:48:30 2006 for openwbem by  doxygen 1.4.6