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 | |
| parent | 251a6153af825592c1f9d15806e795f96c8cc4d5 (diff) | |
| download | wsmancli-7f25cd1e67cd844169ed85fef3ca8d9b3712a5ad.tar.gz wsmancli-7f25cd1e67cd844169ed85fef3ca8d9b3712a5ad.tar.xz wsmancli-7f25cd1e67cd844169ed85fef3ca8d9b3712a5ad.zip | |
example c++ client
| -rw-r--r-- | configure.in | 2 | ||||
| -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 | ||||
| -rw-r--r-- | src/wsman-client-options.c | 2 |
6 files changed, 44 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 035ae7d..b173942 100644 --- a/configure.in +++ b/configure.in @@ -8,6 +8,7 @@ AM_MAINTAINER_MODE AC_ISC_POSIX AC_PROG_CC +AC_PROG_CXX AM_PROG_CC_STDC AC_HEADER_STDC @@ -24,6 +25,7 @@ AC_OUTPUT([ Makefile src/Makefile examples/Makefile + examples/cpp/Makefile tests/Makefile tests/interop/Makefile tests/cunit/Makefile 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 + + + diff --git a/src/wsman-client-options.c b/src/wsman-client-options.c index 4b50e2d..5e5ca76 100644 --- a/src/wsman-client-options.c +++ b/src/wsman-client-options.c @@ -398,7 +398,7 @@ int wsman_options_get_action (void) char* wsman_options_get_resource_uri (void) { - return resource_uri; + return resource_uri; } int wsman_options_get_max_elements (void) |
