class Openwsman::Status
Status
represents the detailed status of a (failed) WS-Management operation.
Its primarily used implementing server-side plugins to report a Fault back to the calling client.
Public Instance Methods
code → Integer
click to toggle source
Get the fault code
int code() { return $self->fault_code; } %rename("detail=") set_detail(int detail); /* * Set the fault detail code * * call-seq: * status.detail = 42 * */ void set_detail(int detail) { if (detail < 0 || detail > OWSMAN_SYSTEM_ERROR) { SWIG_exception( SWIG_ValueError, "Bad fault detail" ); } else { $self->fault_detail_code = detail; } } /* * Get the fault detail code * * call-seq: * status.detail -> Integer * */ int detail() { return $self->fault_detail_code; } %rename("msg=") set_msg(const char *msg); /* * Set the fault message * * call-seq: * status.msg = "This is a fault message" * */ void set_msg(const char *msg) { if ($self->fault_msg) free($self->fault_msg); if (msg) $self->fault_msg = strdup(msg); else $self->fault_msg = NULL; } /* * Get the fault message * * call-seq: * status.msg -> String * */ const char *msg() { return $self->fault_msg; } %typemap(newfree) WsXmlDocH "ws_xml_destroy_doc($1);"; /* * Create a new fault XmlDoc based on Status information * * call-seq: * status.generate_fault(xml_doc) -> XmlDoc * */ WsXmlDocH generate_fault(WsXmlDocH doc) { return wsman_generate_fault( doc, $self->fault_code, $self->fault_detail_code, $self->fault_msg); } }
code = 1
click to toggle source
Set the fault code
void set_code(int code) { $self->fault_code = code; } /* * Get the fault code * * call-seq: * status.code -> Integer * */ int code() { return $self->fault_code; } %rename("detail=") set_detail(int detail); /* * Set the fault detail code * * call-seq: * status.detail = 42 * */ void set_detail(int detail) { if (detail < 0 || detail > OWSMAN_SYSTEM_ERROR) { SWIG_exception( SWIG_ValueError, "Bad fault detail" ); } else { $self->fault_detail_code = detail; } } /* * Get the fault detail code * * call-seq: * status.detail -> Integer * */ int detail() { return $self->fault_detail_code; } %rename("msg=") set_msg(const char *msg); /* * Set the fault message * * call-seq: * status.msg = "This is a fault message" * */ void set_msg(const char *msg) { if ($self->fault_msg) free($self->fault_msg); if (msg) $self->fault_msg = strdup(msg); else $self->fault_msg = NULL; } /* * Get the fault message * * call-seq: * status.msg -> String * */ const char *msg() { return $self->fault_msg; } %typemap(newfree) WsXmlDocH "ws_xml_destroy_doc($1);"; /* * Create a new fault XmlDoc based on Status information * * call-seq: * status.generate_fault(xml_doc) -> XmlDoc * */ WsXmlDocH generate_fault(WsXmlDocH doc) { return wsman_generate_fault( doc, $self->fault_code, $self->fault_detail_code, $self->fault_msg); } }
detail → Integer
click to toggle source
Get the fault detail code
int detail() { return $self->fault_detail_code; } %rename("msg=") set_msg(const char *msg); /* * Set the fault message * * call-seq: * status.msg = "This is a fault message" * */ void set_msg(const char *msg) { if ($self->fault_msg) free($self->fault_msg); if (msg) $self->fault_msg = strdup(msg); else $self->fault_msg = NULL; } /* * Get the fault message * * call-seq: * status.msg -> String * */ const char *msg() { return $self->fault_msg; } %typemap(newfree) WsXmlDocH "ws_xml_destroy_doc($1);"; /* * Create a new fault XmlDoc based on Status information * * call-seq: * status.generate_fault(xml_doc) -> XmlDoc * */ WsXmlDocH generate_fault(WsXmlDocH doc) { return wsman_generate_fault( doc, $self->fault_code, $self->fault_detail_code, $self->fault_msg); } }
detail = 42
click to toggle source
Set the fault detail code
void set_detail(int detail) { if (detail < 0 || detail > OWSMAN_SYSTEM_ERROR) { SWIG_exception( SWIG_ValueError, "Bad fault detail" ); } else { $self->fault_detail_code = detail; } } /* * Get the fault detail code * * call-seq: * status.detail -> Integer * */ int detail() { return $self->fault_detail_code; } %rename("msg=") set_msg(const char *msg); /* * Set the fault message * * call-seq: * status.msg = "This is a fault message" * */ void set_msg(const char *msg) { if ($self->fault_msg) free($self->fault_msg); if (msg) $self->fault_msg = strdup(msg); else $self->fault_msg = NULL; } /* * Get the fault message * * call-seq: * status.msg -> String * */ const char *msg() { return $self->fault_msg; } %typemap(newfree) WsXmlDocH "ws_xml_destroy_doc($1);"; /* * Create a new fault XmlDoc based on Status information * * call-seq: * status.generate_fault(xml_doc) -> XmlDoc * */ WsXmlDocH generate_fault(WsXmlDocH doc) { return wsman_generate_fault( doc, $self->fault_code, $self->fault_detail_code, $self->fault_msg); } }
generate_fault(xml_doc) → XmlDoc
click to toggle source
Create a new fault XmlDoc based on Status
information
WsXmlDocH generate_fault(WsXmlDocH doc) { return wsman_generate_fault( doc, $self->fault_code, $self->fault_detail_code, $self->fault_msg); } }
msg → String
click to toggle source
Get the fault message
const char *msg() { return $self->fault_msg; } %typemap(newfree) WsXmlDocH "ws_xml_destroy_doc($1);"; /* * Create a new fault XmlDoc based on Status information * * call-seq: * status.generate_fault(xml_doc) -> XmlDoc * */ WsXmlDocH generate_fault(WsXmlDocH doc) { return wsman_generate_fault( doc, $self->fault_code, $self->fault_detail_code, $self->fault_msg); } }
msg = "This is a fault message"
click to toggle source
Set the fault message
void set_msg(const char *msg) { if ($self->fault_msg) free($self->fault_msg); if (msg) $self->fault_msg = strdup(msg); else $self->fault_msg = NULL; } /* * Get the fault message * * call-seq: * status.msg -> String * */ const char *msg() { return $self->fault_msg; } %typemap(newfree) WsXmlDocH "ws_xml_destroy_doc($1);"; /* * Create a new fault XmlDoc based on Status information * * call-seq: * status.generate_fault(xml_doc) -> XmlDoc * */ WsXmlDocH generate_fault(WsXmlDocH doc) { return wsman_generate_fault( doc, $self->fault_code, $self->fault_detail_code, $self->fault_msg); } }
to_s → String
click to toggle source
String representation (returns the fault message)
const char *to_s() { return $self->fault_msg; } %rename("code=") set_code(int code); /* * Set the fault code * * call-seq: * status.code = 1 * */ void set_code(int code) { $self->fault_code = code; } /* * Get the fault code * * call-seq: * status.code -> Integer * */ int code() { return $self->fault_code; } %rename("detail=") set_detail(int detail); /* * Set the fault detail code * * call-seq: * status.detail = 42 * */ void set_detail(int detail) { if (detail < 0 || detail > OWSMAN_SYSTEM_ERROR) { SWIG_exception( SWIG_ValueError, "Bad fault detail" ); } else { $self->fault_detail_code = detail; } } /* * Get the fault detail code * * call-seq: * status.detail -> Integer * */ int detail() { return $self->fault_detail_code; } %rename("msg=") set_msg(const char *msg); /* * Set the fault message * * call-seq: * status.msg = "This is a fault message" * */ void set_msg(const char *msg) { if ($self->fault_msg) free($self->fault_msg); if (msg) $self->fault_msg = strdup(msg); else $self->fault_msg = NULL; } /* * Get the fault message * * call-seq: * status.msg -> String * */ const char *msg() { return $self->fault_msg; } %typemap(newfree) WsXmlDocH "ws_xml_destroy_doc($1);"; /* * Create a new fault XmlDoc based on Status information * * call-seq: * status.generate_fault(xml_doc) -> XmlDoc * */ WsXmlDocH generate_fault(WsXmlDocH doc) { return wsman_generate_fault( doc, $self->fault_code, $self->fault_detail_code, $self->fault_msg); } }