Ignore:
Timestamp:
2012-03-16T21:38:01+13:00 (12 years ago)
Author:
ak19
Message:

Many changes to get corba working again ever since the addition of RSS support meant that the method get_rss_items needed to be mirrored in the corba code. The corba code was not compiling then and it turned out we needed a later version of Mico's corba implementation (2.3.13 up from 2.3.5). Therefore the current commit not only corrects some errors in the recently added getRssItems() method but includes further changes: 1. namespaced use of iostream functions were required in some mpp files. 2. New types and member variables added to the corbaiface.idl interface file, to mirror the presence of equivalent variables in comtools.h which hadn't been ported over yet. (Such as the complex corba data type equivalent of collectionmetamap used in comtools.h.) This required (de)serialisation methods to be declared and implemented in corbatext_t.h and corbatext_t.mpp. The additional member variables for the corbaColInfoResponse in corbaiface.idl are now also unpacked in corbaproto.mpp along with the rest of the data structure. 3. Having changed from mico version 2.3.5 to 2.3.13 required code to changed to use POA instead of BOA. This also meant that skeleton files were no longer to be generated when running idl over corbaiface.idl. corbaserver inherits from a POA related object now instead of from the skeleton. 4. Makefile.in was updated to reflect these changes (absence of skeleton), includes a target to run IDL over the corbaiface.idl file to generate the necessary helper files, and corrects earlier oversights in updating the corba makefile with the rest of the changes made over time to runtime-src.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/corba/corbatext_t.mpp

    r15463 r25231  
    8585  ct->encoding = 0;
    8686  cout << "C" << endl;
     87
     88  return 0;
    8789}
    8890
     
    178180}
    179181
     182
     183// map of metanames to array(lang, value). So each metaname[i] maps to array (lang, value).
     184// Note that corbacollectionmeta_map is an array of pairs
     185// each pair consists of (string, map)
     186void corbatext_colmetamapToCorbaColmetamap(collectionmeta_map cm, corbatext_tcollectionmeta_map *ccm)
     187{
     188  collectionmeta_map::iterator here = cm.begin();
     189  collectionmeta_map::iterator end  = cm.end();
     190  unsigned int i = 0;
     191
     192  while (here != end)
     193    {
     194      ccm->length(i+1); // increase size of array of (name, tuples) pairs by 1 each time
     195
     196      // fill in the metaname field
     197      // metaname is of type text_t, get the corbatext value for the text_t key
     198      (*ccm)[i].name = *corbatext_corbatext((*here).first); // metaname is of type text_t
     199
     200      // fill in the tuples field
     201      corbatext_mapToCorbaMap((*here).second, &((*ccm)[i].tuples));
     202
     203      here ++;
     204      i ++;
     205    }
     206
     207}
     208
     209void corbatext_corbaColmetamapToColmetamap(corbatext_tcollectionmeta_map ccm, collectionmeta_map &cm)
     210{
     211  unsigned int i;
     212
     213  for (i = 0; i < ccm.length(); i ++)
     214    {
     215    // ccm is an array
     216    // where each element is a pair of (name, tuples)
     217
     218    // 1. get the (corba_text_t) name and convert it to text_t
     219    text_t* meta_name = new corbaconv_text_t(ccm[i].name);
     220
     221    corbatext_tmap corbameta_tuples = ccm[i].tuples;
     222
     223    text_tmap *tuples_map = new text_tmap();
     224    corbatext_corbaMapToMap(ccm[i].tuples, *tuples_map);
     225
     226
     227    cm.insert(make_pair(*meta_name,
     228                *tuples_map));         
     229    }
     230}
     231
Note: See TracChangeset for help on using the changeset viewer.