Classes | Defines | Functions | Variables

Command line interface
[User Interface]

Collaboration diagram for Command line interface:

Classes

class  ui_MsgWriter
class  i_UIMessageServer_i
class  ui_ResultPacker
 Packes output result into i_Result. More...
class  ui_Confirm
class  ui_BitFlag

Defines

#define MAX_CORBA_UIRESULT_BLOCK_LENGTH   (1024*1024)

Functions

IVD_UI_DECL_d i_UIMessageServer_iCliConnectToMIF (i_ManagementInterface_out a_mif, i_UIMessageServer_out a_uims, bool a_detail=false)
IVD_UI_DECL_d void CliConnectToHSM (i_HSM_out a_hsm, const string a_serverName, const string a_partName)

Variables

class IVD_IPC_DECL_d i_Component_i
class _OMNIORB_NTDLL_IMPORT POA_i_UIMessageServer

Define Documentation

#define MAX_CORBA_UIRESULT_BLOCK_LENGTH   (1024*1024)

Definition at line 41 of file ui_helpers.h.

Referenced by ui_ResultPacker::NewRow().


Function Documentation

IVD_UI_DECL_d void CliConnectToHSM ( i_HSM_out  a_hsm,
const string  a_serverName,
const string  a_partName 
)

Definition at line 139 of file ui_helpers.cpp.

References ipc_Corba::ActivatePOA(), CliConnectToHSM(), dbg_NORM, g_cmn, ivd_BaseException::GetDescription(), ie_IPC_ORB, ie_IPC_RESOLVE, ie_NO_HSM, ipc_Corba::Init(), ipc_Corba::InitDebug(), ipc_EXEC_m, iPM, ivd_Error, log_DBG_m, log_FUNC_m, cmn_SysInfo::m_serverHost, ipc_Corba::ResolvePMByPartID(), and cmn_Global::si.

Referenced by CliConnectToHSM().

                                 {
    log_FUNC_m(CliConnectToHSM);

    i_PartitionManager_var iPM;

    try {
        log_DBG_m(dbg_NORM, "Setup CORBA...");

        ipc_Corba::InitDebug();

        ipc_Corba::Init(false);

        log_DBG_m(dbg_NORM, "CORBA is initialized.");

        ipc_Corba::ActivatePOA();

        log_DBG_m(dbg_NORM, "POAManager is activated.");
    }
    catch (ivd_Exception &e) {
        throw ivd_Error(ie_IPC_ORB, e.GetDescription());
    }
    catch (std::exception &se) {
        throw ivd_Error(ie_IPC_ORB, se.what());
    }
    catch (...) {
        throw ivd_Error(ie_IPC_ORB, "Unknown exception.");
    }

    try {
        ipc_EXEC_m(
            log_DBG_m(dbg_NORM, "Getting PM reference...");
            CORBA::Object_var obj = ipc_Corba::ResolvePMByPartID(
                g_cmn.si.m_serverHost, a_partName, false);

            iPM = i_PartitionManager::_narrow(obj);
            log_DBG_m(dbg_NORM, "Got PM reference.");

            log_DBG_m(dbg_NORM, "Getting HSM reference...");
            a_hsm = iPM->GetHSM();
            if (CORBA::is_nil(a_hsm)) {
                throw ivd_Error(ie_NO_HSM, "Partition not mounted or no valid HSM reference.");
            }
            log_DBG_m(dbg_NORM, "Got HSM reference.");
        );
    }
    catch (ivd_Error &ie) {
        throw ie;
    }
    catch (ivd_SysError &ie) {
        throw ie;
    }
    catch (ivd_InternalError &iie) {
        throw iie;
    }
    catch (ivd_Exception &e) {
        throw ivd_Error(ie_IPC_RESOLVE, e.GetDescription());
    }
    catch (std::exception &se) {
        throw ivd_Error(ie_IPC_RESOLVE, se.what());
    }
    catch (...) {
        throw ivd_Error(ie_IPC_RESOLVE, "Unknown exception.");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

IVD_UI_DECL_d i_UIMessageServer_i* CliConnectToMIF ( i_ManagementInterface_out  a_mif,
i_UIMessageServer_out  a_uims,
bool  a_detail = false 
)

Definition at line 55 of file ui_helpers.cpp.

References ipc_Corba::ActivatePOA(), CliConnectToMIF(), dbg_NORM, g_cmn, ivd_BaseException::GetDescription(), ie_IPC_MIF, ie_IPC_ORB, ie_IPC_UIMS, ipc_Corba::Init(), ipc_Corba::InitDebug(), ipc_EXEC_m, ivd_Error, log_DBG_m, log_FUNC_m, cmn_SysInfo::m_serverHost, NULL, ipc_Corba::RegisterMajorServant(), ipc_Corba::ResolveMIF(), and cmn_Global::si.

Referenced by _tmain(), CliConnectToMIF(), and main().

                                          {

    log_FUNC_m(CliConnectToMIF);

    try {
        log_DBG_m(dbg_NORM, "Setup CORBA...");

        ipc_Corba::InitDebug();

        ipc_Corba::Init(false);

        log_DBG_m(dbg_NORM, "CORBA is initialized.");

        ipc_Corba::ActivatePOA();

        log_DBG_m(dbg_NORM, "POAManager is activated.");
    }
    catch (ivd_Exception &e) {
        throw ivd_Error(ie_IPC_ORB, e.GetDescription());
    }
    catch (std::exception &se) {
        throw ivd_Error(ie_IPC_ORB, se.what());
    }
    catch (...) {
        throw ivd_Error(ie_IPC_ORB, "Unknown exception.");
    }


    try {
        log_DBG_m(dbg_NORM, "Get MIF reference...");
        ipc_EXEC_m(
            CORBA::Object_var obj = ipc_Corba::ResolveMIF(
                g_cmn.si.m_serverHost, false);

            i_ManagementInterface_var mif;
            mif = i_ManagementInterface::_narrow(obj);

            a_mif = mif._retn();
        );

        log_DBG_m(dbg_NORM, "Got MIF reference.");
    }
    catch (ivd_Exception &e) {
        throw ivd_Error(ie_IPC_MIF, e.GetDescription());
    }
    catch (std::exception &se) {
        throw ivd_Error(ie_IPC_MIF, se.what());
    }
    catch (...) {
        throw ivd_Error(ie_IPC_MIF, "Unknown exception.");
    }

    i_UIMessageServer_i* iUIMS(NULL);
    try {
        log_DBG_m(dbg_NORM, "Create UI message server...");

        ipc_EXEC_m(
            iUIMS = new i_UIMessageServer_i(false, a_detail);
            ipc_Corba::RegisterMajorServant(iUIMS);

            i_UIMessageServer_var uims;
            uims = i_UIMessageServer::_duplicate(iUIMS->_this());
            a_uims = uims._retn();
            iUIMS->_remove_ref();
        );

        log_DBG_m(dbg_NORM, "UIMS registered.");
    }
    catch (ivd_Exception &e) {
        throw ivd_Error(ie_IPC_UIMS, e.GetDescription());
    }
    catch (std::exception &se) {
        throw ivd_Error(ie_IPC_UIMS, se.what());
    }
    catch (...) {
        throw ivd_Error(ie_IPC_UIMS, "Unknown exception.");
    }

    return iUIMS;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

class IVD_IPC_DECL_d i_Component_i

Definition at line 40 of file i_uims_impl.h.

class _OMNIORB_NTDLL_IMPORT POA_i_UIMessageServer

Definition at line 41 of file i_uims_impl.h.