summaryrefslogtreecommitdiffstats
path: root/examples/win32_service.c
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/win32_service.c
parent16803fdddfa698aa7586245d8a48ef25f480635a (diff)
downloadwsmancli-1cc54578baf92beada66be79aecdd0f5341f5cdd.tar.gz
wsmancli-1cc54578baf92beada66be79aecdd0f5341f5cdd.tar.xz
wsmancli-1cc54578baf92beada66be79aecdd0f5341f5cdd.zip
wsman_client -> wsmc
Diffstat (limited to 'examples/win32_service.c')
-rw-r--r--examples/win32_service.c36
1 files changed, 18 insertions, 18 deletions
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;
}