summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAnas Nashif <nashif@intel.com>2007-05-16 23:55:28 +0000
committerAnas Nashif <nashif@intel.com>2007-05-16 23:55:28 +0000
commit1cc54578baf92beada66be79aecdd0f5341f5cdd (patch)
treeb8e8aec74b508c097ab2d9de59e37185614de184 /examples
parent16803fdddfa698aa7586245d8a48ef25f480635a (diff)
downloadwsmancli-1cc54578baf92beada66be79aecdd0f5341f5cdd.tar.gz
wsmancli-1cc54578baf92beada66be79aecdd0f5341f5cdd.tar.xz
wsmancli-1cc54578baf92beada66be79aecdd0f5341f5cdd.zip
wsman_client -> wsmc
Diffstat (limited to 'examples')
-rw-r--r--examples/create_resource.c14
-rw-r--r--examples/enum_epr.c14
-rw-r--r--examples/win32_service.c36
-rw-r--r--examples/wsmid_identify.c12
-rw-r--r--examples/wsmid_identify_no_options.c8
5 files changed, 42 insertions, 42 deletions
diff --git a/examples/create_resource.c b/examples/create_resource.c
index 337ac0f..78f8a60 100644
--- a/examples/create_resource.c
+++ b/examples/create_resource.c
@@ -128,16 +128,16 @@ int main(int argc, char** argv)
}
- cl = wsman_client_create( uri->host,
+ cl = wsmc_create( uri->host,
uri->port,
uri->path,
uri->scheme,
uri->user,
uri->pwd);
- wsman_client_transport_init(cl, NULL);
- options = wsman_client_options_init();
+ wsmc_transport_init(cl, NULL);
+ options = wsmc_options_init();
- if (dump) wsman_client_set_action_option(options,FLAG_DUMP_REQUEST );
+ if (dump) wsmc_set_action_option(options,FLAG_DUMP_REQUEST );
options->max_envelope_size = 51200;
options->timeout = 60000;
@@ -155,7 +155,7 @@ int main(int argc, char** argv)
d->Handles.count = count;
d->Handles.data = array;
- doc = wsman_client_action_create_serialized(cl, RESOURCE_URI, options, d,
+ doc = wsmc_action_create_serialized(cl, RESOURCE_URI, options, d,
EXL_ExamplePolicy_TypeInfo);
if (doc)
ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc));
@@ -164,8 +164,8 @@ int main(int argc, char** argv)
u_uri_free(uri);
}
- wsman_client_options_destroy(options);
- wsman_client_release(cl);
+ wsmc_options_destroy(options);
+ wsmc_release(cl);
return 0;
}
diff --git a/examples/enum_epr.c b/examples/enum_epr.c
index c5dd74e..c0b5b71 100644
--- a/examples/enum_epr.c
+++ b/examples/enum_epr.c
@@ -169,20 +169,20 @@ int main(int argc, char** argv)
}
- cl = wsman_client_create( uri->host,
+ cl = wsmc_create( uri->host,
uri->port,
uri->path,
uri->scheme,
uri->user,
uri->pwd);
- wsman_client_transport_init(cl, NULL);
- options = wsman_client_options_init();
+ wsmc_transport_init(cl, NULL);
+ options = wsmc_options_init();
- wsman_client_set_action_option(options, FLAG_ENUMERATION_ENUM_EPR);
+ wsmc_set_action_option(options, FLAG_ENUMERATION_ENUM_EPR);
list_t *l = list_create(LISTCOUNT_T_MAX);
- wsman_client_action_enumerate_and_pull(cl, argv[1] , options, collect_epr, l );
+ wsmc_action_enumerate_and_pull(cl, argv[1] , options, collect_epr, l );
printf("returned items: %d\n", list_count(l));
@@ -206,8 +206,8 @@ int main(int argc, char** argv)
u_uri_free(uri);
}
- wsman_client_options_destroy(options);
- wsman_client_release(cl);
+ wsmc_options_destroy(options);
+ wsmc_release(cl);
return 0;
}
diff --git a/examples/win32_service.c b/examples/win32_service.c
index 8e10c18..4d32f40 100644
--- a/examples/win32_service.c
+++ b/examples/win32_service.c
@@ -168,7 +168,7 @@ static int list_services(WsManClient *cl, WsXmlDocH doc, void *data)
node = ws_xml_get_child(node, 0, XML_NS_ENUMERATION, WSENUM_PULL_RESP);
node = ws_xml_get_child(node, 0, XML_NS_ENUMERATION, WSENUM_ITEMS);
if (ws_xml_get_child(node, 0, RESOURCE_URI , CLASSNAME )) {
- CIM_Servie *service = ws_deserialize(wsman_client_get_context(cl),
+ CIM_Servie *service = ws_deserialize(wsmc_get_context(cl),
node,
CIM_Servie_TypeInfo, CLASSNAME,
RESOURCE_URI, NULL,
@@ -233,41 +233,41 @@ int main(int argc, char** argv)
}
- cl = wsman_client_create( uri->host,
+ cl = wsmc_create( uri->host,
uri->port,
uri->path,
uri->scheme,
uri->user,
uri->pwd);
- wsman_client_transport_init(cl, NULL);
- options = wsman_client_options_init();
+ wsmc_transport_init(cl, NULL);
+ options = wsmc_options_init();
if (listall) {
- if (dump) wsman_client_set_action_option(options,FLAG_DUMP_REQUEST );
- wsman_client_action_enumerate_and_pull(cl, RESOURCE_URI, options, list_services, NULL );
+ if (dump) wsmc_set_action_option(options,FLAG_DUMP_REQUEST );
+ wsmc_action_enumerate_and_pull(cl, RESOURCE_URI, options, list_services, NULL );
} else if (start && argv[1]) {
- if (dump) wsman_client_set_action_option(options,FLAG_DUMP_REQUEST );
- wsman_client_add_selector(options, "Name", argv[1]);
- doc = wsman_client_action_invoke(cl, RESOURCE_URI, options,
+ if (dump) wsmc_set_action_option(options,FLAG_DUMP_REQUEST );
+ wsmc_add_selector(options, "Name", argv[1]);
+ doc = wsmc_action_invoke(cl, RESOURCE_URI, options,
"StartService", NULL);
ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc));
ws_xml_destroy_doc(doc);
} else if (stop && argv[1]) {
- if (dump) wsman_client_set_action_option(options,FLAG_DUMP_REQUEST );
- wsman_client_add_selector(options, "Name", argv[1]);
- doc = wsman_client_action_invoke(cl, RESOURCE_URI, options,
+ if (dump) wsmc_set_action_option(options,FLAG_DUMP_REQUEST );
+ wsmc_add_selector(options, "Name", argv[1]);
+ doc = wsmc_action_invoke(cl, RESOURCE_URI, options,
"StopService", NULL);
ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc));
ws_xml_destroy_doc(doc);
} else if ( argv[1] ) {
- if (dump) wsman_client_set_action_option(options,FLAG_DUMP_REQUEST );
- wsman_client_add_selector(options, "Name", argv[1]);
- doc = wsman_client_action_get(cl, RESOURCE_URI,
+ if (dump) wsmc_set_action_option(options,FLAG_DUMP_REQUEST );
+ wsmc_add_selector(options, "Name", argv[1]);
+ doc = wsmc_action_get(cl, RESOURCE_URI,
options);
if (doc) {
WsXmlNodeH node = ws_xml_get_soap_body(doc);
if (ws_xml_get_child(node, 0, RESOURCE_URI , CLASSNAME )) {
- CIM_Servie *service = ws_deserialize(wsman_client_get_context(cl),
+ CIM_Servie *service = ws_deserialize(wsmc_get_context(cl),
node,
CIM_Servie_TypeInfo, CLASSNAME,
RESOURCE_URI, NULL,
@@ -284,8 +284,8 @@ int main(int argc, char** argv)
u_uri_free(uri);
}
- wsman_client_options_destroy(options);
- wsman_client_release(cl);
+ wsmc_options_destroy(options);
+ wsmc_release(cl);
return 0;
}
diff --git a/examples/wsmid_identify.c b/examples/wsmid_identify.c
index 0808205..f48635c 100644
--- a/examples/wsmid_identify.c
+++ b/examples/wsmid_identify.c
@@ -117,20 +117,20 @@ fprintf( stderr, "wsman_create_client( host %s, port %d, path %s, scheme %s, use
uri->pwd);
*/
- cl = wsman_client_create( uri->host,
+ cl = wsmc_create( uri->host,
uri->port,
uri->path,
uri->scheme,
uri->user,
uri->pwd);
- options = wsman_client_options_init();
+ options = wsmc_options_init();
- doc = wsman_client_action_identify(cl, options);
+ doc = wsmc_action_identify(cl, options);
WsXmlNodeH soapBody = ws_xml_get_soap_body(doc);
if (ws_xml_get_child(soapBody, 0, XML_NS_WSMAN_ID, "IdentifyResponse")) {
- wsmid_identify *id = ws_deserialize(wsman_client_get_context(cl),
+ wsmid_identify *id = ws_deserialize(wsmc_get_context(cl),
soapBody,
wsmid_identify_TypeInfo, "IdentifyResponse",
XML_NS_WSMAN_ID, NULL,
@@ -157,8 +157,8 @@ fprintf( stderr, "wsman_create_client( host %s, port %d, path %s, scheme %s, use
ws_xml_destroy_doc(doc);
}
- wsman_client_options_destroy(options);
- wsman_client_release(cl);
+ wsmc_options_destroy(options);
+ wsmc_release(cl);
return 0;
diff --git a/examples/wsmid_identify_no_options.c b/examples/wsmid_identify_no_options.c
index 91d830d..cd961f4 100644
--- a/examples/wsmid_identify_no_options.c
+++ b/examples/wsmid_identify_no_options.c
@@ -87,21 +87,21 @@ int main(int argc, char** argv)
}
- wsman_client_transport_init(NULL);
+ wsmc_transport_init(NULL);
cl = wsman_create_client( uri->host,
uri->port,
uri->path,
uri->scheme,
uri->user,
uri->pwd);
- wsman_client_options_init(&options);
+ wsmc_options_init(&options);
//wsman_set_action_option(&options,FLAG_DUMP_REQUEST );
doc = wsman_identify(cl, options);
soapBody = ws_xml_get_soap_body(doc);
if (ws_xml_get_child(soapBody, 0, XML_NS_WSMAN_ID, "IdentifyResponse")) {
- wsmid_identify *id = ws_deserialize(wsman_client_get_context(cl),
+ wsmid_identify *id = ws_deserialize(wsmc_get_context(cl),
soapBody,
wsmid_identify_TypeInfo,"IdentifyResponse",
XML_NS_WSMAN_ID, XML_NS_WSMAN_ID,
@@ -128,7 +128,7 @@ int main(int argc, char** argv)
ws_xml_destroy_doc(doc);
}
- wsman_client_options_destroy(&options);
+ wsmc_options_destroy(&options);
wsman_release_client(cl);