class Cmpi::CMPIStatus
Status (return) value from a CMPI operation
Public Instance Methods
__str__()
click to toggle source
const char* string() { CMPIStatus st = { CMPI_RC_OK, NULL }; CMPIString* s; const char *result; const CMPIBroker* broker = cmpi_broker(); s = CDToString(broker, $self, &st); RAISE_IF(st); result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #else /* no cmpi_broker() */ %newobject to_s; const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); const char *result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #endif }
is_ok()
click to toggle source
int is_ok() { return $self->rc == CMPI_RC_OK; } #if HAVE_CMPI_BROKER #ifdef SWIGPYTHON %rename ("__str__") string(); /* * add CMPIStatus.to_s in Python for backwards-compatibility * * DEPRECATED */ %newobject to_s; const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); const char *result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #endif /* PYTHON */ /* Return string representation */ %newobject string; const char* string() { CMPIStatus st = { CMPI_RC_OK, NULL }; CMPIString* s; const char *result; const CMPIBroker* broker = cmpi_broker(); s = CDToString(broker, $self, &st); RAISE_IF(st); result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #else /* no cmpi_broker() */ %newobject to_s; const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); const char *result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #endif }
msg()
click to toggle source
char *msg() { return (char *) ($self->msg->hdl); } %rename("ok?") is_ok; int is_ok() { return $self->rc == CMPI_RC_OK; } #if HAVE_CMPI_BROKER #ifdef SWIGPYTHON %rename ("__str__") string(); /* * add CMPIStatus.to_s in Python for backwards-compatibility * * DEPRECATED */ %newobject to_s; const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); const char *result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #endif /* PYTHON */ /* Return string representation */ %newobject string; const char* string() { CMPIStatus st = { CMPI_RC_OK, NULL }; CMPIString* s; const char *result; const CMPIBroker* broker = cmpi_broker(); s = CDToString(broker, $self, &st); RAISE_IF(st); result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #else /* no cmpi_broker() */ %newobject to_s; const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); const char *result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #endif }
rc()
click to toggle source
int rc() { return $self->rc; } char *msg() { return (char *) ($self->msg->hdl); } %rename("ok?") is_ok; int is_ok() { return $self->rc == CMPI_RC_OK; } #if HAVE_CMPI_BROKER #ifdef SWIGPYTHON %rename ("__str__") string(); /* * add CMPIStatus.to_s in Python for backwards-compatibility * * DEPRECATED */ %newobject to_s; const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); const char *result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #endif /* PYTHON */ /* Return string representation */ %newobject string; const char* string() { CMPIStatus st = { CMPI_RC_OK, NULL }; CMPIString* s; const char *result; const CMPIBroker* broker = cmpi_broker(); s = CDToString(broker, $self, &st); RAISE_IF(st); result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #else /* no cmpi_broker() */ %newobject to_s; const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); const char *result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #endif }
to_s(p1)
click to toggle source
const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); const char *result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #endif /* PYTHON */ /* Return string representation */ %newobject string; const char* string() { CMPIStatus st = { CMPI_RC_OK, NULL }; CMPIString* s; const char *result; const CMPIBroker* broker = cmpi_broker(); s = CDToString(broker, $self, &st); RAISE_IF(st); result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #else /* no cmpi_broker() */ %newobject to_s; const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); const char *result = strdup(CMGetCharPtr(s)); CMRelease(s); return result; } #endif }