示例#1
0
static CMPIData __eft_getNext ( 
    CONST CMPIEnumeration * enumeration,
    CMPIStatus * rc )
{
    struct native_enum * e = (struct native_enum *) enumeration;

    CMPIData data = checkArgsReturnData(enumeration, rc);
    if (data.state == CMPI_badValue)
    {
        return data;
    }

    return CMGetArrayElementAt ( e->data, e->current++, rc );
}
示例#2
0
static CMPIData __cft_getEntryAt (
    CONST CMPIContext * ctx,
    unsigned int index,
    CMPIString ** name,
    CMPIStatus * rc )
{
    struct native_context * c = (struct native_context *) ctx;

    CMPIData data = checkArgsReturnData(ctx, rc);

    if (data.state == CMPI_badValue)
    {
        return data;
    }

    return propertyFT.getDataPropertyAt ( c->entries, index, name, rc );
}
示例#3
0
static CMPIData __cft_getEntry (
    CONST CMPIContext * ctx,
    const char * name,
    CMPIStatus * rc )
{
    struct native_context * c = (struct native_context *) ctx;
    struct native_property *p = c->entries;

    CMPIData data = checkArgsReturnData(ctx, rc);

    if (data.state == CMPI_badValue)
    {
        return data;
    }
    // Check for containers
    if (!strcmp (name, "SnmpTrapOidContainer") )
    {
        p = c->containers;
    }

    return propertyFT.getDataProperty(p, name, rc);
}