diff options
author | Anas Nashif <nashif@intel.com> | 2007-02-09 03:28:35 +0000 |
---|---|---|
committer | Anas Nashif <nashif@intel.com> | 2007-02-09 03:28:35 +0000 |
commit | 7f25cd1e67cd844169ed85fef3ca8d9b3712a5ad (patch) | |
tree | 25465a0967d8c54b6bb11de66767fcd6dc7b522a /examples | |
parent | 251a6153af825592c1f9d15806e795f96c8cc4d5 (diff) | |
download | wsmancli-7f25cd1e67cd844169ed85fef3ca8d9b3712a5ad.tar.gz wsmancli-7f25cd1e67cd844169ed85fef3ca8d9b3712a5ad.tar.xz wsmancli-7f25cd1e67cd844169ed85fef3ca8d9b3712a5ad.zip |
example c++ client
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile.am | 2 | ||||
-rw-r--r-- | examples/cpp/.cvsignore | 8 | ||||
-rw-r--r-- | examples/cpp/Enum_ComputerSystem.cpp | 17 | ||||
-rw-r--r-- | examples/cpp/Makefile.am | 14 |
4 files changed, 41 insertions, 0 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am index 92ef36c..f0ff690 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,3 +1,5 @@ +SUBDIRS = cpp + AM_CFLAGS = @CFLAGS@ CFLAGS = \ diff --git a/examples/cpp/.cvsignore b/examples/cpp/.cvsignore new file mode 100644 index 0000000..884b0f3 --- /dev/null +++ b/examples/cpp/.cvsignore @@ -0,0 +1,8 @@ +Makefile +Makefile.in +*.o +*.lo +*.la +.deps +.libs +wsman diff --git a/examples/cpp/Enum_ComputerSystem.cpp b/examples/cpp/Enum_ComputerSystem.cpp new file mode 100644 index 0000000..7778552 --- /dev/null +++ b/examples/cpp/Enum_ComputerSystem.cpp @@ -0,0 +1,17 @@ +#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"); + vector<string> vec; + client.Enumerate("http:///cws.sblim.sf.net/wbem/wscim/1/cim-schema/2/CWS_Instance", vec ); + for (vector<string>::iterator iter = vec.begin(); + iter != vec.end(); ++iter) { + cout << "item: " << *iter << "\n"; + } + return 0; +} diff --git a/examples/cpp/Makefile.am b/examples/cpp/Makefile.am new file mode 100644 index 0000000..6d14a2f --- /dev/null +++ b/examples/cpp/Makefile.am @@ -0,0 +1,14 @@ + +LDADD = \ + -lwsman_clientpp + +Enum_ComputerSystem_CXXFLAGS = \ + $(OPENWSMAN_CFLAGS) +Enum_ComputerSystem_SOURCES = \ + Enum_ComputerSystem.cpp + +noinst_PROGRAMS = \ + Enum_ComputerSystem + + + |