(file) Return to Number.c CVS log (file) (dir) Up to [OMI] / omi / samples / Providers / Number

File: [OMI] / omi / samples / Providers / Number / Number.c (download)
Revision: 1.3, Mon Apr 20 17:19:59 2015 UTC (9 years, 2 months ago) by krisbash
Branch: MAIN
CVS Tags: OMI_1_0_8_2, OMI_1_0_8_1, HEAD
Changes since 1.2: +0 -0 lines
OMI 1.0.8-1

/*
**==============================================================================
**
** Open Management Infrastructure (OMI)
**
** Copyright (c) Microsoft Corporation
** 
** Licensed under the Apache License, Version 2.0 (the "License"); you may not 
** use this file except in compliance with the License. You may obtain a copy 
** of the License at 
**
**     http://www.apache.org/licenses/LICENSE-2.0 
**
** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
** MERCHANTABLITY OR NON-INFRINGEMENT. 
**
** See the Apache 2 License for the specific language governing permissions 
** and limitations under the License.
**
**==============================================================================
*/

/* @migen@ */
#include <MI.h>
#include "Number.h"
#include <base/base.h>

void MI_CALL Number_Load(
    Number_Self** self,
    MI_Module_Self* selfModule,
    MI_Context* context)
{
    *self = NULL;
    MI_PostResult(context, MI_RESULT_OK);
}

void MI_CALL Number_Unload(
    Number_Self* self,
    MI_Context* context)
{
    MI_PostResult(context, MI_RESULT_OK);
}

void MI_CALL Number_EnumerateInstances(
    Number_Self* self,
    MI_Context* context,
    const MI_Char* nameSpace,
    const MI_Char* className,
    const MI_PropertySet* propertySet,
    MI_Boolean keysOnly,
    const MI_Filter* filter)
{
    MI_Uint32 i;
    Number inst;
    MI_Char buf[11];
    size_t size;

    Number_Construct(&inst, context);
    Number_SetPtr_Description(&inst, 
        MI_T("This is a long long long long string"));

    for (i = 0; i < 10000; i++)
    {
        Number_Set_Number(&inst, i);
        Number_Set_NumberString(&inst, Uint32ToZStr(buf, i, &size));
        Number_Post(&inst, context);
    }

    Number_Destruct(&inst);
    MI_PostResult(context, MI_RESULT_OK);
}

void MI_CALL Number_GetInstance(
    Number_Self* self,
    MI_Context* context,
    const MI_Char* nameSpace,
    const MI_Char* className,
    const Number* instanceName,
    const MI_PropertySet* propertySet)
{
    MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL Number_CreateInstance(
    Number_Self* self,
    MI_Context* context,
    const MI_Char* nameSpace,
    const MI_Char* className,
    const Number* newInstance)
{
    MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL Number_ModifyInstance(
    Number_Self* self,
    MI_Context* context,
    const MI_Char* nameSpace,
    const MI_Char* className,
    const Number* modifiedInstance,
    const MI_PropertySet* propertySet)
{
    MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL Number_DeleteInstance(
    Number_Self* self,
    MI_Context* context,
    const MI_Char* nameSpace,
    const MI_Char* className,
    const Number* instanceName)
{
    MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}


ViewCVS 0.9.2