version 1.5, 2006/08/24 22:27:31
|
version 1.6, 2007/06/29 17:43:11
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com) |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
|
|
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
| |
| |
// Uses interop namespace defined by PEGASUS_NAMESPACENAME_INTEROP in Constants.h |
// Uses interop namespace defined by PEGASUS_NAMESPACENAME_INTEROP in |
|
// Constants.h |
| |
CIMObjectPath CreateHandler1Instance (CIMClient& client) | CIMObjectPath CreateHandler1Instance (CIMClient& client) |
{ | { |
|
|
| |
CIMObjectPath Ref = client.createInstance(PEGASUS_NAMESPACENAME_INTEROP, | CIMObjectPath Ref = client.createInstance(PEGASUS_NAMESPACENAME_INTEROP, |
handlerInstance); | handlerInstance); |
return (Ref); |
return Ref; |
} | } |
| |
CIMObjectPath CreateFilterInstance (CIMClient& client, | CIMObjectPath CreateFilterInstance (CIMClient& client, |
|
|
| |
CIMObjectPath Ref = client.createInstance(PEGASUS_NAMESPACENAME_INTEROP, | CIMObjectPath Ref = client.createInstance(PEGASUS_NAMESPACENAME_INTEROP, |
filterInstance); | filterInstance); |
return (Ref); |
return Ref; |
} | } |
| |
CIMObjectPath CreateFormattedSubscriptionIns (CIMClient& client, | CIMObjectPath CreateFormattedSubscriptionIns (CIMClient& client, |
|
|
subscriptionInstance.addProperty (CIMProperty | subscriptionInstance.addProperty (CIMProperty |
(CIMName ("TextFormatParameters"), textFormatParams)); | (CIMName ("TextFormatParameters"), textFormatParams)); |
| |
CIMObjectPath Ref = client.createInstance(PEGASUS_NAMESPACENAME_INTEROP, |
CIMObjectPath Ref = client.createInstance( |
subscriptionInstance); |
PEGASUS_NAMESPACENAME_INTEROP, subscriptionInstance); |
return (Ref); |
return Ref; |
} | } |
| |
void generateIndication(CIMClient& client) | void generateIndication(CIMClient& client) |
|
|
<< PEGASUS_STD (endl); | << PEGASUS_STD (endl); |
PEGASUS_STD (cerr) << "Client connects local failed" | PEGASUS_STD (cerr) << "Client connects local failed" |
<< PEGASUS_STD (endl); | << PEGASUS_STD (endl); |
return (-1); |
return -1; |
} | } |
| |
CIMObjectPath Handler1Ref; | CIMObjectPath Handler1Ref; |
|
|
<< PEGASUS_STD (endl); | << PEGASUS_STD (endl); |
PEGASUS_STD (cerr) << "create handler instance failed" | PEGASUS_STD (cerr) << "create handler instance failed" |
<< PEGASUS_STD (endl); | << PEGASUS_STD (endl); |
return (-1); |
return -1; |
} | } |
| |
PEGASUS_STD (cout) << "+++++ handler instances created" | PEGASUS_STD (cout) << "+++++ handler instances created" |
|
|
<< PEGASUS_STD (endl); | << PEGASUS_STD (endl); |
PEGASUS_STD (cerr) << "create filter instances failed" | PEGASUS_STD (cerr) << "create filter instances failed" |
<< PEGASUS_STD (endl); | << PEGASUS_STD (endl); |
return (-1); |
return -1; |
} | } |
| |
PEGASUS_STD (cout) << "+++++ filter instances created" | PEGASUS_STD (cout) << "+++++ filter instances created" |
|
|
<< PEGASUS_STD (endl); | << PEGASUS_STD (endl); |
PEGASUS_STD (cerr) << "create subscription instance failed" | PEGASUS_STD (cerr) << "create subscription instance failed" |
<< PEGASUS_STD (endl); | << PEGASUS_STD (endl); |
return (-1); |
return -1; |
} | } |
| |
PEGASUS_STD (cout) << "+++++ subscription instances created" | PEGASUS_STD (cout) << "+++++ subscription instances created" |
|
|
<< PEGASUS_STD (endl); | << PEGASUS_STD (endl); |
PEGASUS_STD (cerr) << "generate indication failed" | PEGASUS_STD (cerr) << "generate indication failed" |
<< PEGASUS_STD (endl); | << PEGASUS_STD (endl); |
return (-1); |
return -1; |
} | } |
| |
PEGASUS_STD (cout) << "+++++ indications generated" | PEGASUS_STD (cout) << "+++++ indications generated" |