• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CIMNamespaceName函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CIMNamespaceName函数的典型用法代码示例。如果您正苦于以下问题:C++ CIMNamespaceName函数的具体用法?C++ CIMNamespaceName怎么用?C++ CIMNamespaceName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CIMNamespaceName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: _deleteSubscriptionInstance

void _deleteSubscriptionInstance 
    (CIMClient & client, 
     const String & filterName,
     const String & handlerName)
{
    _deleteSubscriptionInstance (client, filterName, handlerName,
        CIMNamespaceName (), CIMNamespaceName (),
        PEGASUS_NAMESPACENAME_INTEROP);
}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:9,代码来源:DisableEnable2.cpp


示例2: CIMNamespaceName

PEGASUS_NAMESPACE_BEGIN

MCCA_TestAssocProvider::MCCA_TestAssocProvider(void)
{
    nameSpaceA = CIMNamespaceName ("root/MCCAtest/A");
    nameSpaceB = CIMNamespaceName ("root/MCCAtest/B");
    testClassName = CIMName ("MCCA_TestClass");
    assocClassName = CIMName ("MCCA_TestAssocClass");

}
开发者ID:brunolauze,项目名称:pegasus,代码行数:10,代码来源:MCCA_TestAssocProvider.cpp


示例3: _getKeyValue

void _getKeyValue (
    const CIMInstance& namespaceInstance,
    CIMNamespaceName& childNamespaceName,
    Boolean& isRelativeName)

{
    //Validate key property

    Uint32 pos;
    CIMValue propertyValue;

    // [Key, MaxLen (256), Description (
    //       "A string that uniquely identifies the Namespace "
    //       "within the ObjectManager.") ]
    // string Name;

    pos = namespaceInstance.findProperty(NAMESPACE_PROPERTYNAME);
    if (pos == PEG_NOT_FOUND)
    {
        throw CIMPropertyNotFoundException
        (NAMESPACE_PROPERTYNAME.getString());
    }

    propertyValue = namespaceInstance.getProperty(pos).getValue();
    if (propertyValue.getType() != CIMTYPE_STRING)
    {
        //l10n
        //throw CIMInvalidParameterException("Invalid type for property: "
        //+ NAMESPACE_PROPERTYNAME.getString());
        throw CIMInvalidParameterException(MessageLoaderParms(
                                               "ControlProviders.NamespaceProvider.NamespaceProvider.INVALID_TYPE_FOR_PROPERTY",
                                               "Invalid type for property: $0",
                                               NAMESPACE_PROPERTYNAME.getString()));
    }

    String cnsName;
    propertyValue.get(cnsName);
    if (cnsName == String::EMPTY)
    {
        childNamespaceName = CIMNamespaceName();
    }
    else
    {
        childNamespaceName = CIMNamespaceName(cnsName);
    }

    isRelativeName = !(childNamespaceName.isNull());

}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:49,代码来源:NamespaceProvider.cpp


示例4: _testHostedIndicationServiceInstance

void _testHostedIndicationServiceInstance(CIMClient &client)
{
    cout << "Testing Association Class "
        << (const char *)PEGASUS_CLASSNAME_PG_HOSTEDINDICATIONSERVICE.
             getString().getCString()
        << "...";
    // Get PG_HostedIndicationService Instances
    Array<CIMInstance> hostedInstances = client.enumerateInstances(
        PEGASUS_NAMESPACENAME_INTEROP,
        PEGASUS_CLASSNAME_PG_HOSTEDINDICATIONSERVICE);
    PEGASUS_TEST_ASSERT(hostedInstances.size() == 1);

    // Get PG_HostedIndicationService Instance names
    Array<CIMObjectPath> hostedPaths = client.enumerateInstanceNames(
        PEGASUS_NAMESPACENAME_INTEROP,
        PEGASUS_CLASSNAME_PG_HOSTEDINDICATIONSERVICE);
    PEGASUS_TEST_ASSERT(hostedPaths.size() == 1);

    // Get CIM_IndicationService instance names
    Array<CIMObjectPath> servicePaths = client.enumerateInstanceNames(
        PEGASUS_NAMESPACENAME_INTEROP,
        PEGASUS_CLASSNAME_CIM_INDICATIONSERVICE);
    PEGASUS_TEST_ASSERT(servicePaths.size() == 1);

    // Test the CIM_IndicationService value.
    CIMValue capValue = hostedInstances[0].getProperty(
        hostedInstances[0].findProperty("Dependent")).getValue();
    CIMObjectPath testPath;
    capValue.get(testPath);
    testPath.setNameSpace(CIMNamespaceName());
    PEGASUS_TEST_ASSERT(testPath.identical(servicePaths[0]));

    cout << "Test Complete" << endl;
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:34,代码来源:ServerProfile.cpp


示例5: testArrayType

void testArrayType(const Array<T>& x)
{
    WsmToCimRequestMapper mapper((CIMRepository*) 0);

    // Create a NULL CIMValue of the appropriate type. Normally type
    // info is retrieved from the repository.
    CIMValue tmp(x);
    CIMValue cimValue(tmp.getType(), tmp.isArray());

    // Create WsmValue out of the given array
    Array<String> arr;
    for (Uint32 i = 0; i < x.size(); i++)
    {
        String str = CIMValue(x[i]).toString();
        if (tmp.getType() == CIMTYPE_BOOLEAN)
        {
            str.toLower();
        }
        arr.append(str);
    }

    WsmValue wsmValue(arr);
    mapper.convertWsmToCimValue(wsmValue, CIMNamespaceName(), cimValue);
    PEGASUS_TEST_ASSERT(tmp == cimValue);
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:25,代码来源:WsmToCimMapper.cpp


示例6:

Array<CIMInstance> CIMClient::enumerateInstances(
    const CIMNamespaceName& nameSpace,
    const CIMName& className,
    Boolean deepInheritance,
    Boolean localOnly,
    Boolean includeQualifiers,
    Boolean includeClassOrigin,
    const CIMPropertyList& propertyList)
{

    Array<CIMInstance> a = _rep->enumerateInstances(
            nameSpace,
            className,
            deepInheritance,
            localOnly,
            includeQualifiers,
            includeClassOrigin,
            propertyList).getInstances();    

    // remove name space and host name to be instance names
    for (Uint32 i = 0, n = a.size(); i < n ; i++)
    {
        if (!a[i].isUninitialized())
        {
            CIMObjectPath& p = const_cast<CIMObjectPath&>(a[i].getPath());
            p.setNameSpace(CIMNamespaceName());
            p.setHost(String());
        }
    }


    return a;
}
开发者ID:kaixuanlive,项目名称:openpegasus,代码行数:33,代码来源:CIMClient.cpp


示例7: CIMObjectPath

void AuditLogger::logUpdateInstanceOperation(
    const char* cimMethodName,
    AuditEvent eventType,
    const String& userName,
    const String& ipAddr,
    const CIMNamespaceName& nameSpace,
    const CIMObjectPath& instanceName,
    const String& moduleName,
    const String& providerName,
    CIMStatusCode statusCode)
{
    // check if SMF is gathering this type of records.
    if (_smf.isRecording(CIM_OPERATION) ||
        (! _isInternalWriterUsed) )
    {
        String cimInstanceName =
            CIMObjectPath("", CIMNamespaceName(), instanceName.getClassName(),
            instanceName.getKeyBindings()).toString();

        _writeCIMOperationRecord(
            INSTANCE_OPERATION, userName, statusCode,
            ipAddr, cimMethodName, cimInstanceName,
            nameSpace.getString(), providerName, moduleName );
    }
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:25,代码来源:AuditLoggerToSMF.cpp


示例8: CIMObjectPath

void InstanceProvider::deleteInstance(
	const OperationContext & context,
	const CIMObjectPath & instanceReference,
	ResponseHandler & handler)
{
	// convert a potential fully qualified reference into a local reference
	// (class name and keys only).
	CIMObjectPath localReference = CIMObjectPath(
		String(),
		CIMNamespaceName(),
		instanceReference.getClassName(),
		instanceReference.getKeyBindings());
	
	// begin processing the request
	handler.processing();

	// instance index corresponds to reference index
	for(Uint32 i = 0, n = _instances.size(); i < n; i++)
	{
		if(localReference == _instances[i].getPath())
		{
			// remove instance from the array
			_instances.remove(i);

			break;
		}
	}
	
	// complete processing the request
	handler.complete();
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:31,代码来源:InstanceProvider.cpp


示例9: mbReferenceNames

   static CMPIEnumeration* mbReferenceNames(const CMPIBroker *mb, const CMPIContext *ctx,
                  const CMPIObjectPath *cop, const char *resultClass, const char *role,
                  CMPIStatus *rc) {
      DDD(cout<<"--- mbReferencesNames()"<<endl);
      mb=CM_BROKER;
      CIMObjectPath qop(String::EMPTY,CIMNamespaceName(),
                        CM_ObjectPath(cop)->getClassName(),
            CM_ObjectPath(cop)->getKeyBindings());

      AutoMutex mtx(((CMPI_Broker*)mb)->mtx);
      try {
         Array<CIMObjectPath> const &en=CM_CIMOM(mb)->referenceNames(
         OperationContext(*CM_Context(ctx)),
         CM_ObjectPath(cop)->getNameSpace(),
         qop,
         resultClass ? CIMName(resultClass) : CIMName(),
         role ? String(role) : String::EMPTY);
         if (rc) CMSetStatus(rc,CMPI_RC_OK);
         CMPI_Object *obj =
             new CMPI_Object(new CMPI_OpEnumeration(new Array<CIMObjectPath>(en)));
         return (CMPI_OpEnumeration *)obj->getHdl();
      }
      catch (const CIMException &e) {
         DDD(cout<<"### exception: mbReferencesNames - code: "<<e.getCode()<<" msg: "<<e.getMessage()<<endl);
         if (rc) CMSetStatusWithString(rc,(CMPIrc)e.getCode(),
            (CMPIString*)string2CMPIString(e.getMessage()));
      }
      if (rc) CMSetStatusWithChars(mb,rc,CMPI_RC_ERROR,"Internal error - CMPIBoker.cpp-11");
      return NULL;
   }
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:30,代码来源:CMPI_Broker.cpp


示例10: methodName

void _sendIndicationShouldBeBlocked 
    (CIMClient & client)
{
    Array <CIMParamValue> inParams;
    Array <CIMParamValue> outParams;
    Array <CIMKeyBinding> keyBindings;
    Sint32 result;

    CIMName methodName ("SendTestIndication");
    CIMObjectPath className (String::EMPTY, CIMNamespaceName (), 
        CIMName("Test_IndicationProviderClass"), keyBindings);

    try
    {
        CIMValue retValue = client.invokeMethod 
            (SOURCENAMESPACE,
            className,
            methodName,
            inParams,
            outParams);
        retValue.get (result);
        PEGASUS_TEST_ASSERT (false);
    }
    catch (CIMException & e)
    {
        PEGASUS_TEST_ASSERT (e.getCode () == CIM_ERR_NOT_SUPPORTED);
    }
}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:28,代码来源:DisableEnable2.cpp


示例11: _generateFullNamespaceName

void _generateFullNamespaceName(
    Array<CIMNamespaceName>& namespaceNames,
    CIMNamespaceName& parentNamespaceName,
    CIMNamespaceName& childNamespaceName,
    Boolean isRelativeName,
    CIMNamespaceName& fullNamespaceName)

{
    // If isRelativeName is true, then the parentNamespace
    // MUST exist
    //
    if (isRelativeName)
    {
        if (!Contains(namespaceNames, parentNamespaceName))
        {
            //l10n
            //throw CIMObjectNotFoundException("Parent namespace does not exist: "
            //+ parentNamespaceName.getString());
            throw CIMObjectNotFoundException(MessageLoaderParms(
                                                 "ControlProviders.NamespaceProvider.NamespaceProvider.PARENT_NAMESPACE_DOES_NOT_EXIST",
                                                 "Parent namespace does not exist: $0",
                                                 parentNamespaceName.getString()));
        }
        // Create full namespace name by prepending parentNamespaceName
        fullNamespaceName = CIMNamespaceName (parentNamespaceName.getString()
                                              + "/" + childNamespaceName.getString());
    }
    else
    {
        fullNamespaceName = parentNamespaceName;
    }

}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:33,代码来源:NamespaceProvider.cpp


示例12: mbGetInstance

   static CMPIInstance* mbGetInstance(const CMPIBroker *mb, const CMPIContext *ctx,
                  const CMPIObjectPath *cop, const char **properties, CMPIStatus *rc) {
      DDD(cout<<"--- mbGetInstance()"<<endl);
      mb=CM_BROKER;
      CMPIFlags flgs=ctx->ft->getEntry(ctx,CMPIInvocationFlags,NULL).value.uint32;
      const CIMPropertyList props=getList(properties);
      CIMObjectPath qop(String::EMPTY,CIMNamespaceName(),
                        CM_ObjectPath(cop)->getClassName(),
            CM_ObjectPath(cop)->getKeyBindings());

      AutoMutex mtx(((CMPI_Broker*)mb)->mtx);
      try {
         CIMInstance ci=CM_CIMOM(mb)->getInstance(
                     OperationContext(*CM_Context(ctx)),
         CM_ObjectPath(cop)->getNameSpace(),
         qop, //*CM_ObjectPath(cop),
         CM_LocalOnly(flgs),
         CM_IncludeQualifiers(flgs),
         CM_ClassOrigin(flgs),
         props);
         ci.setPath(*CM_ObjectPath(cop));
         if (rc) CMSetStatus(rc,CMPI_RC_OK);
         return (CMPIInstance*)new CMPI_Object(new CIMInstance(ci));
      }
      catch (const CIMException &e) {
         DDD(cout<<"### exception: mbGetInstance - code: "<<e.getCode()<<" msg: "<<e.getMessage()<<endl);
         if (rc) CMSetStatusWithString(rc,(CMPIrc)e.getCode(),
            (CMPIString*)string2CMPIString(e.getMessage()));
         return NULL;
      }
      if (rc) CMSetStatusWithChars(mb,rc,CMPI_RC_ERROR,"Internal error - CMPIBoker.cpp-0");
      return NULL;
   }
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:33,代码来源:CMPI_Broker.cpp


示例13: _sendTestIndication

void _sendTestIndication(
    CIMClient* client,
    const CIMName & methodName,
    Uint32 indicationSendCount)
{
    //
    //  Invoke method to send test indication
    //
    Array <CIMParamValue> inParams;
    Array <CIMParamValue> outParams;
    Array <CIMKeyBinding> keyBindings;
    Sint32 result;

    CIMObjectPath className (String::EMPTY, CIMNamespaceName (),
                             CIMName ("Test_IndicationProviderClass"), keyBindings);

    inParams.append(CIMParamValue(String("indicationSendCount"),
                                  CIMValue(indicationSendCount)));

    CIMValue retValue = client->invokeMethod
                        (SOURCE_NAMESPACE,
                         className,
                         methodName,
                         inParams,
                         outParams);

    retValue.get (result);
    PEGASUS_TEST_ASSERT (result == 0);
}
开发者ID:xenserver,项目名称:openpegasus,代码行数:29,代码来源:testSnmpHandler.cpp


示例14: _testElementCapabilityInstance

void _testElementCapabilityInstance(CIMClient &client)
{
    cout << "Testing Association Class "
        << (const char *)PEGASUS_CLASSNAME_CIM_INDICATIONSERVICECAPABILITIES.
             getString().getCString()
        << "...";

    // Get CIM_IndicationServiceCapabilities instance names
    Array<CIMObjectPath> capPaths = client.enumerateInstanceNames(
        PEGASUS_NAMESPACENAME_INTEROP,
        PEGASUS_CLASSNAME_CIM_INDICATIONSERVICECAPABILITIES);
    PEGASUS_TEST_ASSERT(capPaths.size() == 1);

    // Get CIM_IndicationService instance names
    Array<CIMObjectPath> servicePaths = client.enumerateInstanceNames(
        PEGASUS_NAMESPACENAME_INTEROP,
        PEGASUS_CLASSNAME_CIM_INDICATIONSERVICE);
    PEGASUS_TEST_ASSERT(servicePaths.size() == 1);


    // Get PG_ElementCapabilities instances
    Array<CIMInstance> eleInstances = client.enumerateInstances(
        PEGASUS_NAMESPACENAME_INTEROP,
        PEGASUS_CLASSNAME_PG_ELEMENTCAPABILITIES);
    PEGASUS_TEST_ASSERT(eleInstances.size() == 1);

    // Test PG_ElementCapabilities instance.
    CIMValue capValue = eleInstances[0].getProperty(
        eleInstances[0].findProperty("Capabilities")).getValue();

    CIMValue meValue = eleInstances[0].getProperty(
        eleInstances[0].findProperty("ManagedElement")).getValue();

    // Now test the instance names of CIM_IndicationService instance and
    // CIM_IndicationServiceCapabilities instance.
    CIMObjectPath testPath;
    capValue.get(testPath);
    testPath.setNameSpace(CIMNamespaceName());
    PEGASUS_TEST_ASSERT(testPath.identical(capPaths[0]));

    meValue.get(testPath);
    testPath.setNameSpace(CIMNamespaceName());
    PEGASUS_TEST_ASSERT(testPath.identical(servicePaths[0]));

    cout << "Test Complete" << endl;
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:46,代码来源:ServerProfile.cpp


示例15: _testDuplicate

void _testDuplicate(CIMClient &client)
{
    CIMObjectPath filterPath;
    CIMObjectPath handlerPath;
    CIMObjectPath subscriptionPath;

    try
    {
        handlerPath = CreateHandler1Instance(client,
            PEGASUS_NAMESPACENAME_INTEROP);
        filterPath = CreateFilterInstance(client,
            QUERY1, "WQL", "Filter1",
            PEGASUS_NAMESPACENAME_INTEROP);
        subscriptionPath = CreateSbscriptionInstance(client, handlerPath,
            filterPath, PEGASUS_NAMESPACENAME_INTEROP);

        _createDuplicate(client, String::EMPTY, CIMNamespaceName(),
            filterPath, String::EMPTY, CIMNamespaceName(), handlerPath);

        _createDuplicate(client, String::EMPTY,
            PEGASUS_NAMESPACENAME_INTEROP, filterPath,
            String::EMPTY,PEGASUS_NAMESPACENAME_INTEROP, handlerPath);

        _createDuplicate(client, "127.0.0.1",
            PEGASUS_NAMESPACENAME_INTEROP, filterPath,
            String::EMPTY, CIMNamespaceName(), handlerPath);

        _createDuplicate(client, "127.0.0.1",PEGASUS_NAMESPACENAME_INTEROP,
            filterPath, "127.0.0.1", PEGASUS_NAMESPACENAME_INTEROP,
            handlerPath);

        _createDuplicate(client, String::EMPTY, CIMNamespaceName(),
            filterPath, "127.0.0.1", PEGASUS_NAMESPACENAME_INTEROP,
            handlerPath);
        _checkSubscriptionCount(client);
        DeleteInstance(client, subscriptionPath, PEGASUS_NAMESPACENAME_INTEROP);
        DeleteInstance(client, filterPath, PEGASUS_NAMESPACENAME_INTEROP);
        DeleteInstance(client, handlerPath, PEGASUS_NAMESPACENAME_INTEROP);
    }
    catch (const CIMException &e)
    {
        PEGASUS_STD(cerr) << "Exception: " << e.getMessage()
                          << PEGASUS_STD (endl);
        PEGASUS_TEST_ASSERT(0);
    }
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:46,代码来源:IndicationProcess.cpp


示例16: CIMObjectPath

CIMObjectPath benchmarkProvider::_buildObjectPath(
                         const CIMName& className,
                         CIMKeyBinding keyBinding)
{
    Array<CIMKeyBinding> keyBindings;
    keyBindings.append(keyBinding);
    return CIMObjectPath(String(), CIMNamespaceName(NAMESPACE), 
                                className, keyBindings);
}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:9,代码来源:benchmarkProvider.cpp


示例17: CIMNotSupportedException

void InstanceProvider::createInstance(
    const OperationContext & context,
    const CIMObjectPath & instanceReference,
    const CIMInstance & instanceObject,
    ObjectPathResponseHandler & handler)
{
    // Validate the class name
    if (!instanceObject.getClassName().equal("Sample_InstanceProviderClass"))
    {
        throw CIMNotSupportedException(
            instanceObject.getClassName().getString());
    }

    // Find the key property
    Uint32 idIndex = instanceObject.findProperty("Identifier");

    if (idIndex == PEG_NOT_FOUND)
    {
        throw CIMInvalidParameterException("Missing key value");
    }

    CIMInstance cimInstance = instanceObject.clone();

    // Create the new instance name
    CIMValue idValue = instanceObject.getProperty(idIndex).getValue();
    Array<CIMKeyBinding> keys;
    keys.append(CIMKeyBinding("Identifier", idValue));
    CIMObjectPath instanceName = CIMObjectPath(
        String(),
        CIMNamespaceName(),
        instanceObject.getClassName(),
        keys);

    cimInstance.setPath(instanceName);
    
    // Determine whether this instance already exists
    for(Uint32 i = 0, n = _instances.size(); i < n; i++)
    {
        if(instanceName == _instances[i].getPath())
        {
            throw CIMObjectAlreadyExistsException(instanceName.toString());
        }
    }

    // begin processing the request
    handler.processing();

    // add the new instance to the array
    _instances.append(cimInstance);

    // deliver the new instance name
    handler.deliver(instanceName);

    // complete processing the request
    handler.complete();
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:56,代码来源:InstanceProvider.cpp


示例18: CIMName

CIMInstance UNIX_AccountOnSystem::getPartComponent() const
{
	CIMInstance instance = part_UNIX_Account_ComponentProvider.constructInstance(
		CIMName("UNIX_Account"),
		CIMNamespaceName("root/cimv2"),
		part_UNIX_Account_Component
	);

	return instance;
}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:10,代码来源:UNIX_AccountOnSystem_FREEBSD.hpp


示例19: mbReferenceNames

    static CMPIEnumeration* mbReferenceNames(
        const CMPIBroker *mb,
        const CMPIContext *ctx,
        const CMPIObjectPath *cop,
        const char *resultClass,
        const char *role,
        CMPIStatus *rc)
    {
        PEG_METHOD_ENTER(
            TRC_CMPIPROVIDERINTERFACE,
            "CMPI_Broker:mbReferenceNames()");
        mb = CM_BROKER;
        //  ATTN-CAKG-P2-20020726:  The following condition does not correctly
        //  distinguish instanceNames from classNames in every case
        //  The instanceName of a singleton instance of a keyless class has no
        //  key bindings
        if (!SCMO_ObjectPath(cop)->getKeyBindingCount())
        {
            CMSetStatus(rc, CMPI_RC_ERR_FAILED);
            PEG_METHOD_EXIT();
            return 0;
        }

        SCMOInstance* scmoObjPath = SCMO_ObjectPath(cop);
        CIMObjectPath qop;
        try
        {
            scmoObjPath->getCIMObjectPath(qop);
            // For compatibility with previous implementations have empty ns
            qop.setNameSpace(CIMNamespaceName());

            CIMResponseData resData =
                CM_CIMOM(mb)->referenceNames(
                    *CM_Context(ctx),
                    scmoObjPath->getNameSpace(),
                    qop,
                    resultClass ? CIMName(resultClass) : CIMName(),
                    role ? String(role) : String::EMPTY);

            // Add the namespace from the input parameters when neccessary
            resData.completeNamespace(scmoObjPath);

            Array<SCMOInstance>* aRef =
                new Array<SCMOInstance>(resData.getSCMO());

            CMPIEnumeration* cmpiEnum = reinterpret_cast<CMPIEnumeration*>(
                new CMPI_Object(new CMPI_OpEnumeration(aRef)));
            CMSetStatus(rc,CMPI_RC_OK);
            PEG_METHOD_EXIT();
            return cmpiEnum;
        }
        HandlerCatchSetStatus(rc, NULL);

        // Code flow should never get here.
    }
开发者ID:rdobson,项目名称:openpegasus,代码行数:55,代码来源:CMPI_Broker.cpp


示例20: testAssociationsHostName

void testAssociationsHostName(
    CIMClient & client)
{
    Array<CIMObjectPath> objPaths = client.enumerateInstanceNames(
        CIMNamespaceName("test/TestProvider"),
        CIMName("TST_Person"));

    PEGASUS_TEST_ASSERT(objPaths.size() > 0);

    Array<CIMObject> objects = client.associators(
        CIMNamespaceName("test/TestProvider"),
        objPaths[0]);

    PEGASUS_TEST_ASSERT(objects.size() > 0);

    CIMObjectPath path = objects[0].getPath();    
    String pathHN = path.getHost();

    PEGASUS_TEST_ASSERT(String::equal(pathHN,"hugo"));
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:20,代码来源:TestChgdHosts.cpp



注:本文中的CIMNamespaceName函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CIMObjectPath函数代码示例发布时间:2022-05-30
下一篇:
C++ CIMName函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap