/* private slots */
void StoragePoolControlThread::run()
{
    QStringList result;
    switch (action) {
    case GET_ALL_StPOOL :
        result.append(getAllStoragePoolList());
        break;
    case CREATE_StPOOL :
        result.append(createStoragePool());
        break;
    case DEFINE_StPOOL :
        result.append(defineStoragePool());
        break;
    case START_StPOOL :
        result.append(startStoragePool());
        break;
    case DESTROY_StPOOL :
        result.append(destroyStoragePool());
        break;
    case UNDEFINE_StPOOL :
        result.append(undefineStoragePool());
        break;
    case CHANGE_StPOOL_AUTOSTART :
        result.append(changeAutoStartStoragePool());
        break;
    case GET_StPOOL_XML_DESC :
        result.append(getStoragePoolXMLDesc());
        break;
    default:
        break;
    };
    emit resultData(action, result);
}
/* private slots */
void StoragePoolControlThread::run()
{
    Result result;
    switch (task.action) {
    case GET_ALL_ENTITY_STATE :
        result = getAllStoragePoolList();
        break;
    case GET_ALL_ENTITY_DATA :
        result = getAllStoragePoolDataList();
        break;
    case CREATE_ENTITY :
        result = createStoragePool();
        break;
    case DEFINE_ENTITY :
        result = defineStoragePool();
        break;
    case START_ENTITY :
        result = startStoragePool();
        break;
    case DESTROY_ENTITY :
        result = destroyStoragePool();
        break;
    case UNDEFINE_ENTITY :
        result = undefineStoragePool();
        break;
    case CHANGE_ENTITY_AUTOSTART :
        result = changeAutoStartStoragePool();
        break;
    case DELETE_ENTITY :
        result = deleteStoragePool();
        break;
    case GET_XML_DESCRIPTION :
        result = getStoragePoolXMLDesc();
        break;
    default:
        break;
    };
    // task.srcConnPtr reference will closed in destructor as ptr_ConnPtr
    //virConnectClose(*task.srcConnPtr);
    result.type   = "pool";
    result.number = number;
    result.action = task.action;
    emit resultData(result);
}
/* private slots */
void StoragePoolControlThread::run()
{
    Result result;
    switch (task.action) {
    case GET_ALL_ENTITY :
        result = getAllStoragePoolList();
        break;
    case CREATE_ENTITY :
        result = createStoragePool();
        break;
    case DEFINE_ENTITY :
        result = defineStoragePool();
        break;
    case START_ENTITY :
        result = startStoragePool();
        break;
    case DESTROY_ENTITY :
        result = destroyStoragePool();
        break;
    case UNDEFINE_ENTITY :
        result = undefineStoragePool();
        break;
    case CHANGE_ENTITY_AUTOSTART :
        result = changeAutoStartStoragePool();
        break;
    case DELETE_ENTITY :
        result = deleteStoragePool();
        break;
    case GET_XML_DESCRIPTION :
        result = getStoragePoolXMLDesc();
        break;
    default:
        break;
    };
    virConnectClose(task.sourceConn);
    result.type   = "pool";
    result.number = number;
    result.action = task.action;
    emit resultData(result);
}