{
STG::SERVCONF proto(config.server.data(),
config.port.data(),
+ config.localAddress.data(),
+ config.localPort.data(),
config.userName.data(),
config.userPass.data());
return proto.GetServices(GetServicesCallback, NULL) == STG::st_ok;
{
STG::SERVCONF proto(config.server.data(),
config.port.data(),
+ config.localAddress.data(),
+ config.localPort.data(),
config.userName.data(),
config.userPass.data());
return proto.GetService(arg, GetServiceCallback, NULL) == STG::st_ok;
{
STG::SERVCONF proto(config.server.data(),
config.port.data(),
+ config.localAddress.data(),
+ config.localPort.data(),
config.userName.data(),
config.userPass.data());
return proto.DelService(arg, SimpleCallback, NULL) == STG::st_ok;
SGCONF::MaybeSet(options, "comment", conf.comment);
STG::SERVCONF proto(config.server.data(),
config.port.data(),
+ config.localAddress.data(),
+ config.localPort.data(),
config.userName.data(),
config.userPass.data());
return proto.AddService(arg, conf, SimpleCallback, NULL) == STG::st_ok;
SGCONF::MaybeSet(options, "comment", conf.comment);
STG::SERVCONF proto(config.server.data(),
config.port.data(),
+ config.localAddress.data(),
+ config.localPort.data(),
config.userName.data(),
config.userPass.data());
return proto.ChgService(conf, SimpleCallback, NULL) == STG::st_ok;
.Add("get-services", SGCONF::MakeAPIAction(commands, GetServicesFunction), "\tget service list")
.Add("get-service", SGCONF::MakeAPIAction(commands, "<name>", GetServiceFunction), "get service")
.Add("add-service", SGCONF::MakeAPIAction(commands, "<name>", params, AddServiceFunction), "add service")
- .Add("del-service", SGCONF::MakeAPIAction(commands, "<name>", DelServiceFunction), "del service")
+ .Add("del-service", SGCONF::MakeAPIAction(commands, "<name>", DelServiceFunction), "delete service")
.Add("chg-service", SGCONF::MakeAPIAction(commands, "<name>", params, ChgServiceFunction), "change service");
}