Index: ossp-pkg/as/as-gui/TODO RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v rcsdiff -q -kk '-r1.85' '-r1.86' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v' 2>/dev/null --- TODO 2003/02/12 19:33:05 1.85 +++ TODO 2003/02/13 18:22:32 1.86 @@ -37,6 +37,8 @@ Might not need classes Amount and Tableitem at all Mach mal mit den 'autobackup' und 'fextension' Optionen von prefs Check for outdated config file version +Make status bar message, qWarning, qDebug, and Popup messages consistent + For which purposes do messages go in each category? Bugs (? = unverified) --------------------- Index: ossp-pkg/as/as-gui/as_const.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_const.h,v rcsdiff -q -kk '-r1.50' '-r1.51' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_const.h,v' 2>/dev/null --- as_const.h 2003/02/12 19:33:05 1.50 +++ as_const.h 2003/02/13 18:22:32 1.51 @@ -150,6 +150,13 @@ #define TITRAQ_ENVUSERNAME "USER" #define TITRAQ_ENVHOMEDIR "HOME" +// Falsified incoming ORB initilization arguments +#define TITRAQ_ORBINIT "-ORBGIOPVersion 1.2 -ORBIIOPVersion 1.2 -ORBInitRef" +#define TITRAQ_COSSPART1 "NameService=corbaloc::" +#define TITRAQ_COSSPART2 "/NameService" +#define TITRAQ_SOAPSPACE "http://soap.europalab.com/asdb" +#define TITRAQ_PREFIXHTTP "http://" + // Style string constants #define TITRAQ_STRCDE "CDE" #define TITRAQ_STRSGI "SGI" Index: ossp-pkg/as/as-gui/as_panel.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_panel.h,v rcsdiff -q -kk '-r1.6' '-r1.7' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_panel.h,v' 2>/dev/null --- as_panel.h 2003/02/12 19:33:05 1.6 +++ as_panel.h 2003/02/13 18:22:32 1.7 @@ -110,6 +110,8 @@ void setSoaphost(const QString &kInstr) {m_pSoapline->setText(kInstr);}; void setBackon(const bool &kbEnable = true) {m_pBackupcheck->setChecked(kbEnable);}; void setExtendon(const bool &kbEnable = true) {m_pExtendcheck->setChecked(kbEnable);}; + void lockCorba(const bool &kbLock = true) {m_pCorbacheck->setEnabled(!kbLock);}; + void lockSoap(const bool &kbLock = true) {m_pSoapcheck->setEnabled(!kbLock);}; void setCorbaon(const bool &kbEnable = true) { m_pCorbaline->setEnabled(kbEnable); m_pCorbacheck->setChecked(kbEnable); Index: ossp-pkg/as/as-gui/as_slot.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v rcsdiff -q -kk '-r1.118' '-r1.119' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v' 2>/dev/null --- as_slot.cpp 2003/02/12 19:33:05 1.118 +++ as_slot.cpp 2003/02/13 18:22:32 1.119 @@ -31,6 +31,7 @@ // system headers #include +#include // Qt headers #include @@ -1119,8 +1120,18 @@ pUserpanel->setHome(m_pPrefs->getString(TITRAQ_PREFHOME, TITRAQ_DEFHOME)); pUserpanel->setCorbahost(m_pPrefs->getString(TITRAQ_PREFCORBHOST, TITRAQ_DEFCORBHOST)); pUserpanel->setSoaphost(m_pPrefs->getString(TITRAQ_PREFSOAPHOST, TITRAQ_DEFSOAPHOST)); +#ifdef HAVE_MICO pUserpanel->setCorbaon(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)); +#else + pUserpanel->setCorbaon(false); + pUserpanel->lockCorba(); +#endif +#ifdef HAVE_ESOAP pUserpanel->setSoapon(m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON)); +#else + pUserpanel->setSoapon(false); + pUserpanel->lockSoap(); +#endif pUserpanel->setBackon(m_pPrefs->getBool(TITRAQ_PREFBAKON, TITRAQ_DEFBAKON)); pUserpanel->setExtendon(m_pPrefs->getBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON)); @@ -1547,9 +1558,8 @@ void Titraqform::syncIiop(void) { #ifdef HAVE_MICO - int nNada = 0; // Some false parameters - char **ppcNada = NULL; // to fake out the ORB - CORBA::ORB_var Orb; // The ORB + char **ppcInargv = NULL; // Parameters to the ORB + CORBA::ORB_var Orb; // The ORB iself CORBA::Object_var Nameobj; // Name service reference CosNaming::NamingContext_var Namectx; // COSS ns context @@ -1559,9 +1569,32 @@ Asdatabase_var Asdbase; // Casted object to ASDB Astuple Singlerow; // A single row of AS data + QString *pOrbargv = new QString(TITRAQ_ORBINIT); + int nCount = pOrbargv->contains(' '); + int nNamesize = 0; + + // Build a false incoming argv with which we initialize the ORB + ppcInargv = new char *[nCount + 3]; // 3 = arg0 + last section + COSS host + *ppcInargv = new char[strlen(*qApp->argv() + 2)]; // For cmd name + strcpy(ppcInargv[0], *qApp->argv()); // Copy cmd name + for (int nIter = 0; nIter <= nCount; nIter++) { + QString Section = pOrbargv->section(' ', nIter, nIter); + ppcInargv[nIter + 1] = new char[strlen(Section.ascii() + 2)]; + strcpy(ppcInargv[nIter + 1], Section.ascii()); + } + + // Build the single string COSS naming host name with associated port number + *pOrbargv = TITRAQ_COSSPART1 + + m_pPrefs->getString(TITRAQ_PREFCORBHOST, TITRAQ_DEFCORBHOST) + + TITRAQ_COSSPART2; + nNamesize = strlen(pOrbargv->ascii()); + ppcInargv[nCount + 2] = new char[nNamesize]; + strcpy(ppcInargv[nCount + 2], pOrbargv->ascii()); + try { // Initialization of the ORB and COSS naming service - Orb = CORBA::ORB_init(nNada, ppcNada, "mico-local-orb"); + nCount = nCount + 3; // Raise the count to include app, last sec, COSS + Orb = CORBA::ORB_init(nCount, ppcInargv, "mico-local-orb"); Nameobj = Orb->resolve_initial_references("NameService"); Namectx = CosNaming::NamingContext::_narrow(Nameobj); if (CORBA::is_nil(Namectx)) { // Verify sanity @@ -1569,6 +1602,12 @@ qWarning("Could not find the COSS naming service\n"); } + // Clean up our dynamically allocated array + for (int nIter = 0; nIter < nCount; nIter++) + delete ppcInargv[nIter]; + delete ppcInargv; // Free the array itself + delete pOrbargv; // Free the intermediate string + // Prepare the COSS name request Cosname.length(1); Cosname[0].id = CORBA::string_dup("Asdatabase"); @@ -1655,29 +1694,35 @@ USING_EASYSOAP_NAMESPACE try { - const char *pSpace = "http://soap.europalab.com/asdb"; - const char *pEndpoint = "http://www.europalab.com/cgi-bin/asdbserv"; - SOAPProxy Proxy(pEndpoint); - SOAPMethod Logmeth("Log", pSpace); // SOAP remote method name + SOAPMethod Logmeth("Log", TITRAQ_SOAPSPACE); // SOAP namespace SOAPString Clistr; // Outgoing parameter to marshall int nCrc; // SOAP unmarshalled return value - // A quasi diff summary to transmit to the server - QString Syncthis; - int nRow = m_pMaintable->currentRow(); - Syncthis += m_pMaintable->text(nRow, TITRAQ_IDXUSER); - for (int nIter = TITRAQ_IDXUSER + 1; nIter < TITRAQ_IDXTAIL; nIter++) - Syncthis += ' ' + m_pMaintable->text(nRow, nIter); + // Build the single string SOAP end point which look like this: + // "http://www.europalab.com/cgi-bin/asdbserv" + QString Endpoint; + Endpoint = TITRAQ_PREFIXHTTP + m_pPrefs->getString(TITRAQ_PREFSOAPHOST, TITRAQ_DEFSOAPHOST); + SOAPProxy Proxy(Endpoint.ascii()); - Clistr = Syncthis; // Build RPC parameter - Logmeth.AddParameter("Tuple") << Clistr; // Prepare for marshalling - const SOAPResponse &Logresp = Proxy.Execute(Logmeth); - Logresp.GetReturnValue() >> nCrc; + // Fill account log object(s) to marshall and transmit + QTableSelection Select = m_pMaintable->selection(0); // Capture selected rows + int nTotal = Select.bottomRow() - Select.topRow() + 1; // Total rows selected + + // Iterate through the selection of row entries to transmit + for (int nRowiter = 0; nRowiter < nTotal; nRowiter++) { + QString Syncthis = m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXUSER); + for (int nColiter = TITRAQ_IDXUSER + 1; nColiter < TITRAQ_IDXTAIL; nColiter++) + Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, nColiter); + Clistr = Syncthis; // Build RPC parameter + Logmeth.AddParameter("Tuple") << Clistr; // Prepare for marshalling + const SOAPResponse &Logresp = Proxy.Execute(Logmeth); + Logresp.GetReturnValue() >> nCrc; + } m_pStatbar->message(trUtf8("Successful transmission, CRC returned %1").arg(nCrc)); } catch (SOAPException& Soapex) { // Announce the exception we received m_pStatbar->message(trUtf8("Caught SOAP exception: %1").arg(Soapex.What().Str())); - qDebug("Caught SOAP exception: %s\n", Soapex.What().Str()); + qDebug("Caught SOAP exception: %s", Soapex.What().Str()); } catch (...) { qDebug("Caught unknown exception\n");