// Generated by genprov 2.0.0 #include "CMPL_Caller_Provider.h" #include "CMPL_Callee.h" CIMPLE_NAMESPACE_BEGIN CMPL_Caller_Provider::CMPL_Caller_Provider() { } CMPL_Caller_Provider::~CMPL_Caller_Provider() { } Load_Status CMPL_Caller_Provider::load() { return LOAD_OK; } Unload_Status CMPL_Caller_Provider::unload() { return UNLOAD_OK; } Get_Instance_Status CMPL_Caller_Provider::get_instance( const CMPL_Caller* model, CMPL_Caller*& instance) { return GET_INSTANCE_UNSUPPORTED; } static int _call_foo1() { printf("==== _call_foo1()\n"); // Create instance on which to call method: CMPL_Callee* callee = CMPL_Callee::create(); callee->Key.set("1001"); // Create method object to hold input and output parameters: CMPL_Callee_foo1_method* meth = CMPL_Callee_foo1_method::create(); meth->in1.set(100); meth->in2.set("100"); if (cimom::invoke_method("root/cimv2", callee, meth) != 0) { return -1; } if (meth->in1.value != meth->out1.value) { return -1; } if (meth->in2.value != meth->out2.value) { return -1; } if (meth->return_value.value != 1234) { return -1; } return 0; } static int _call_foo2() { printf("==== _call_foo2()\n"); // Create instance on which to call method: CMPL_Callee* callee = CMPL_Callee::create(); // Create method object to hold input and output parameters: CMPL_Callee_foo2_method* meth = CMPL_Callee_foo2_method::create(); meth->in1.set(100); meth->in2.set("100"); if (cimom::invoke_method("root/cimv2", callee, meth) != 0) { return -1; } if (meth->in1.value != meth->out1.value) { return -1; } if (meth->in2.value != meth->out2.value) { return -1; } if (meth->return_value.value != 5678) { return -1; } return 0; } Enum_Instances_Status CMPL_Caller_Provider::enum_instances( const CMPL_Caller* model, Enum_Instances_Handler* handler) { printf("==== CMPL_Caller_Provider::enum_instances()\n"); if (_call_foo1() != 0) { return ENUM_INSTANCES_FAILED; } if (_call_foo2() != 0) { return ENUM_INSTANCES_FAILED; } printf("==== CMPL_Caller_Provider::enum_instances(): okay\n"); return ENUM_INSTANCES_OK; } Create_Instance_Status CMPL_Caller_Provider::create_instance( CMPL_Caller* instance) { return CREATE_INSTANCE_UNSUPPORTED; } Delete_Instance_Status CMPL_Caller_Provider::delete_instance( const CMPL_Caller* instance) { return DELETE_INSTANCE_UNSUPPORTED; } Modify_Instance_Status CMPL_Caller_Provider::modify_instance( const CMPL_Caller* model, const CMPL_Caller* instance) { return MODIFY_INSTANCE_UNSUPPORTED; } /*@END@*/ CIMPLE_NAMESPACE_END