From cba573282de40d22c4d14ea8280b563e86c4a61b Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sun, 11 Feb 2007 23:59:19 +0000 Subject: one more example for Get --- examples/cpp/GetInstance.cpp | 16 ++++++++++++++++ examples/cpp/Makefile.am | 7 +++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 examples/cpp/GetInstance.cpp (limited to 'examples/cpp') diff --git a/examples/cpp/GetInstance.cpp b/examples/cpp/GetInstance.cpp new file mode 100644 index 0000000..965fccc --- /dev/null +++ b/examples/cpp/GetInstance.cpp @@ -0,0 +1,16 @@ +#include +#include + +using std::cout; + +using namespace WsmanClientNamespace; +int main(int argc, char* argv[]) +{ + WsmanClient client = WsmanClient("http://wsman:secret@192.168.1.41:8889/wsman"); + NameValuePairs selectors = NameValuePairs(); + selectors["CreationClassName"] = "CWS_Instance"; + selectors["Id"] = "Instance #1"; + string r = client.Get("http:///cws.sblim.sf.net/wbem/wscim/1/cim-schema/2/CWS_Instance", &selectors ); + cout << "resource: \n" << r << "\n"; + return 0; +} diff --git a/examples/cpp/Makefile.am b/examples/cpp/Makefile.am index 2f97ba3..10ad9f8 100644 --- a/examples/cpp/Makefile.am +++ b/examples/cpp/Makefile.am @@ -2,13 +2,16 @@ LDADD = \ -lwsman_clientpp -EnumInstance_CXXFLAGS = \ +CXXFLAGS = \ $(OPENWSMAN_CFLAGS) EnumInstance_SOURCES = \ EnumInstance.cpp +GetInstance_SOURCES = \ + GetInstance.cpp noinst_PROGRAMS = \ - EnumInstance + EnumInstance \ + GetInstance -- cgit