diff options
author | Anas Nashif <nashif@intel.com> | 2007-02-11 23:59:19 +0000 |
---|---|---|
committer | Anas Nashif <nashif@intel.com> | 2007-02-11 23:59:19 +0000 |
commit | cba573282de40d22c4d14ea8280b563e86c4a61b (patch) | |
tree | a244c81821658f58595a57790c18a69072ea29d2 /examples | |
parent | 74c5d61a0589f794b0545b8712d416502ad0428a (diff) | |
download | wsmancli-cba573282de40d22c4d14ea8280b563e86c4a61b.tar.gz wsmancli-cba573282de40d22c4d14ea8280b563e86c4a61b.tar.xz wsmancli-cba573282de40d22c4d14ea8280b563e86c4a61b.zip |
one more example for Get
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile.am | 2 | ||||
-rw-r--r-- | examples/cpp/GetInstance.cpp | 16 | ||||
-rw-r--r-- | examples/cpp/Makefile.am | 7 |
3 files changed, 22 insertions, 3 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am index 8f1a70a..c81af3b 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -9,7 +9,7 @@ LDADD = \ $(OPENWSMAN_LIBS) \ -lwsman_curl_client_transport -wsmid_identify_SOURCES = wsmid_identify.c new_api_example.c +wsmid_identify_SOURCES = wsmid_identify.c win32_service_SOURCES = \ win32_service.c 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 <iostream> +#include <cpp/WsmanClient.h> + +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 |