int main( int argc, char **argv ) { IPC::Handle *handle = IPC::ThawHandle( argc, argv ); if( initXPCOM() != 0 ) { return 1; } Process::run( handle ); /* Should never be reached */ return 1; }
VirtualBoxBridge::VirtualBoxBridge() : virtualBox(nsnull) { if(initXPCOM()) { if(initVirtualBox()) { std::cout << "VirtualBox object created" << std::endl; nsXPIDLString vboxVersion; nsXPIDLString vboxVersionNormalized; virtualBox->GetVersion(getter_Copies(vboxVersion)); virtualBox->GetVersionNormalized(getter_Copies(vboxVersionNormalized)); std::cout << "VirtualBox version: " << returnQStringValue(vboxVersion).toStdString() << " (" << returnQStringValue(vboxVersionNormalized).toStdString() << ")" << std::endl; nsXPIDLString apiVersion; virtualBox->GetAPIVersion(getter_Copies(apiVersion)); std::cout << "VirtualBox API version: " << returnQStringValue(apiVersion).toStdString() << std::endl; startAPIknocking(); } } }